sets focus to a point
556582
def set_focus(self, point):
        
        if isinstance(point, np.ndarray):
            if point.ndim != 1:
                point = point.ravel()
        self.camera.SetFocalPoint(point)
        self._render()
1336125
def focusInEvent(self, event):
        """"""
        self.focus_changed.emit()
        self.focus_in.emit()
        self.highlight_current_cell()
        QPlainTextEdit.focusInEvent(self, event)
943503
def _unfocus(self, event):
        """"""
        w = self.focus_get()
        if w != self and 'spinbox' not in str(w) and 'entry' not in str(w):
            self.focus_set()
1278715
def set_vel_setpoint(self, velocity_x, velocity_y, velocity_z, rate_yaw):
        """"""
        self._queue.put((velocity_x, velocity_y, velocity_z, rate_yaw))
267334
public void setPlaceholderImageFocusPoint(PointF focusPoint) {
    Preconditions.checkNotNull(focusPoint);
    getScaleTypeDrawableAtIndex(PLACEHOLDER_IMAGE_INDEX).setFocusPoint(focusPoint);
  }
866623
function FocusClock () {
  var blurStart = Date.now()
  var focusStart, focused = false
  var focusTime, blurTime

  var clock = h('div', {
    onfocus: function () {
      focusStart = Date.now()
      focused = true
      blurTime = Date.now() - blurStart
      update()
      clock.parentNode.classList.remove('-notify')
    },
    onblur: function () {
      blurStart = Date.now()
      focusTime = Date.now() - focusStart
      focused = false
    }
  },
  'CLOCK'
  )

  function update () {
    var page = clock.parentNode

    var t = focused
      ? 'focus(focused)'
      : 'focus(blurred)'
    if(page.title != t) page.title = t

    if(Date.now() - blurStart > 1000 && !focused && !page.classList.contains('-notify')) {
      page.classList.add('-notify')
    }

    if(!focused) return
    clock.innerHTML = ''
    clock.appendChild(
      h('div', [
        h('p', 'current focus:'+(Date.now() - focusStart)),
        h('p', 'blur time:'+blurTime),
        h('p', 'prev focus:'+focusTime)
      ])
    )
  }

  setInterval(update, 100)

  return clock
}
444639
@Override
    public final void onEnterFocus(FocusChangeDirection direction, Interactable previouslyInFocus) {
        inFocus = true;
        afterEnterFocus(direction, previouslyInFocus);
    }
214840
function watchFocus() {
  var _blurred = false;
  window.addEventListener('focus', function() {
    if (_blurred) {
      _blurred = false;
      // startAnimating();
      // controls.freeze = false;
    }
  });
  window.addEventListener('blur', function() {
    // stopAnimating();
    _blurred = true;
    controls.freeze = true;
  });
}
224499
function setFocusedElement(cstOption) {
    if (focusedElement) {
      focusedElement.classList.remove(builderParams.hasFocusClass);
    }
    if (typeof cstOption !== 'undefined') {
      focusedElement = cstOption;
      focusedElement.classList.add(builderParams.hasFocusClass);
      // Offset update: checks if the focused element is in the visible part of the panelClass
      // if not dispatches a custom event
      if (isOpen) {
        if (cstOption.offsetTop < cstOption.offsetParent.scrollTop
          || cstOption.offsetTop >
            (cstOption.offsetParent.scrollTop + cstOption.offsetParent.clientHeight)
            - cstOption.clientHeight) {
          cstOption.dispatchEvent(new CustomEvent('custom-select:focus-outside-panel', { bubbles: true }));
        }
      }
    } else {
      focusedElement = undefined;
    }
  }
653151
function() {
            if (this.first !== null) {
                this.first = this.getItemIndex(this.$first);
                this.setFocusableItem(this.$first);
            }
            else if (this.$items.length) {
                this.setFocusableItem($(this.$items[0]));
            }

            if (this.$focusedItem) {
                this.setFocusableItem(this.$focusedItem);
                this.focusItem(this.$focusedItem);
            }

            if (this.last !== null) {
                this.last = this.getItemIndex(this.$last);
            }
        }
1279392
def freshenFocus(self):
        
        self.top.update_idletasks()
        self.top.after(10, self.setViewAtTop)
381154
public void focus() {
        requestFocus();

        // Show keyboard
        InputMethodManager inputMethodManager = (InputMethodManager) getContext()
                .getSystemService(Context.INPUT_METHOD_SERVICE);
        inputMethodManager.showSoftInput(this, 0);
    }
289834
def point(self, t):
        """"""
        return (1 - t)**2*self.start + 2*(1 - t)*t*self.control + t**2*self.end
385329
def focusInEvent(self, event):
        """"""
        self.focus_changed.emit()
        return super(ControlWidget, self).focusInEvent(event)
913804
function onFocus(e) {
		var $this = $(e.target);
		$this.closest(Selector.PMD_TEXTFIELD).addClass(ClassName.FLOATING_ACTIVE + " " + ClassName.FLOATING_COMPLETE);
	}
1105642
def on_focusout(self, event, a):
		
		if event.widget.get() == '':
			event.widget.insert(0, default_text[a])
			event.widget.config(fg = 'grey')
441024
def focus_property(self, prop, direction):
        """"""
        newpos = self.get_selected_mid()
        newpos = direction(newpos)
        while newpos is not None:
            MT = self._tree[newpos]
            if prop(MT):
                newpos = self._sanitize_position((newpos,))
                self.body.set_focus(newpos)
                break
            newpos = direction(newpos)