Adds a callback.
178615
def append(self, cb):
        """"""
        self.callbacks.append(cb.callb)
        self.monitor = self.monitor | cb.callb.bit

        yield from self.pi._pigpio_aio_command(_PI_CMD_NB, self.handle,
                                               self.monitor)
713942
def add_update_callback(self, callback, sensor):
        """"""
        self._updateCallbacks.append([callback, sensor])
        _LOGGING.debug('Added update callback to %s on %s', callback, sensor)
413719
public Callbacks add(com.google.gwt.core.client.Callback<?, ?>... c) {
    addAll((Object[]) c);
    return this;
  }
1231509
public function addCallback($callback, $driver = null)
	{
		if (!empty($driver)) {
			if (is_array($driver)) {
				if (!in_array($this->index->driver, $driver)) {
					return $this;
				}
			}
			else if ($driver != $this->index->driver) {
				return $this;
			}
		}
		
		$this->callbacks[] = $callback;
		
		return $this;
	}
775759
def addCallback(cls, eventType, func, record=None, once=False):
        
        callbacks = cls.callbacks()
        callbacks.setdefault(eventType, [])
        callbacks[eventType].append((func, record, once))
848093
public function addMethod($method, $callback)
        {
            $this->traceInternal("Added '" . $method . "' to " . __METHOD__ . "()");
            $this->callbacks[$method] = $callback;
        }
1353712
def add_callback(type, options, &block)
      callbacks[type == :around ? :before : type] << callback = Callback.new(type, options, &block)
      add_states(callback.known_states)
      callback
    end
65136
def add_callback(obj, callback, args=()):
    """"""
    callbacks = obj._callbacks
    node = Node(callback, args)
    # Store a single callback directly in _callbacks
    if callbacks is None:
        obj._callbacks = node
        return node
    # Otherwise use a dllist.
    if not isinstance(callbacks, dllist):
        obj._callbacks = dllist()
        obj._callbacks.insert(callbacks)
        callbacks = obj._callbacks
    callbacks.insert(node)
    return node
593122
def set_callback(self, ref, callback):
        
        # if the callback already exists, remove it
        self.remove_callback(ref)

        # add it to the callbacks
        if callback is not None:
            self._callbacks[ref] = callback
756407
@Override
	public void addCallback(Callback callback) {
		if (manager != null) {
			callback.initialize(manager);
		}
		callbacks.add(callback);
	}
1222632
def add_listener(self, event, callback, single=False, priority=1):
        
        event_stack = self._events[event]
        event_stack.append({
            "callback": callback,
            "single": single,
            "priority": priority
        })
        event_stack.sort(key=lambda x: x['priority'])
977918
function addCallback (t, data) {
  var result = data.result || data.error;
  cbid = data.id;
  if (t.callbacks[cbid]) {
    if (data.result) {
      t.callbacks[cbid](result);
    } else {
      t.callbacks[cbid](result, 'error');
    }
  }
}
986651
def add_done_callback(self, fn):
        
        if self.done():
            return fn(self)
        self._callbacks.append(fn)
1008450
public void addFirstCallcack(final Callback<?> callback) {
        // 一旦他のリストにコピーする。
        List<Callback<?>> list = new ArrayList<Callback<?>>();
        list.add(callback);
        list.addAll(callbacks);
        
        // 削除して、追加し直す。
        callbacks.clear();
        callbacks.addAll(list);
    }
954126
def on(self, evt, func):
        ''''''
        if evt not in self._callbacks:
            raise NotImplementedError('callback "%s"' % evt)
        else:
            self._callbacks[evt] = func
588127
def addStep(self, callback, *args, **kwargs):
    '''
    
    '''
    self.steps.append((callback, args, kwargs))
1323281
public void addMouseEventCallback(MouseEventCallback callback) {
		if (mouseEventCallbacks == null) {
			mouseEventCallbacks = new ArrayList<MouseEventCallback>();
		}
		mouseEventCallbacks.add(callback);
	}