Lines Matching full:action
22 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
23 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
51 * Define the size of the hash table that is used to associate action
52 * names with action functions. This should be a prime number.
198 * action char * The action to associate with the key sequence, or
199 * NULL to remove the action associated with the
206 const char *action) in _kt_set_keybinding() argument
208 KtKeyFn *keyfn; /* The action function */ in _kt_set_keybinding()
209 void *data; /* The callback data of the action function */ in _kt_set_keybinding()
220 * Lookup the function that implements the specified action. in _kt_set_keybinding()
222 if(!action) { in _kt_set_keybinding()
226 Symbol *sym = _find_HashSymbol(kt->actions, action); in _kt_set_keybinding()
228 _err_record_msg(kt->err, "Unknown key-binding action: ", action, in _kt_set_keybinding()
237 * Record the action in the table. in _kt_set_keybinding()
243 * Add, update or remove a keybinding to the table, specifying an action
250 * keyfn KtKeyFn * The action function, or NULL to remove any existing
251 * action function.
368 KtAction *action = sym->actions + i; in _kt_set_keyfn() local
369 action->fn = 0; in _kt_set_keyfn()
370 action->data = NULL; in _kt_set_keyfn()
648 * Add, remove or modify an action.
652 * action char * The name of the action.
653 * fn KtKeyFn * The function that implements the action, or NULL
654 * to remove an existing action.
656 * action function whenever it is called.
661 int _kt_set_action(KeyTab *kt, const char *action, KtKeyFn *fn, void *data) in _kt_set_action() argument
663 Symbol *sym; /* The symbol table entry of the action */ in _kt_set_action()
667 if(!kt || !action) { in _kt_set_action()
674 * If no function was provided, delete an existing action. in _kt_set_action()
677 sym = _del_HashSymbol(kt->actions, action); in _kt_set_action()
681 * If the action already exists, replace its action function. in _kt_set_action()
683 sym = _find_HashSymbol(kt->actions, action); in _kt_set_action()
690 * Add a new action. in _kt_set_action()
692 if(!_new_HashSymbol(kt->actions, action, 0, (void (*)(void))fn, data, 0)) { in _kt_set_action()
693 _err_record_msg(kt->err, "Insufficient memory to record key-binding action", in _kt_set_action()
741 * Assign a given action function to a binding table entry.
746 * keyfn KtKeyFn * The action function.
748 * the action function whenever it is called.
753 KtAction *action; /* An action function/data pair */ in _kt_assign_action() local
761 * Record the action according to its source. in _kt_assign_action()
763 action = sym->actions + binder; in _kt_assign_action()
764 action->fn = keyfn; in _kt_assign_action()
765 action->data = data; in _kt_assign_action()
768 * action. Note that the actions[] array is ordered in order of in _kt_assign_action()
775 * Record the index of this action for use during lookups. in _kt_assign_action()
956 if(_kt_set_keybinding(kt, binder, bindings[i].keyseq, bindings[i].action)) in _kt_add_bindings()
963 * Lookup the function that implements a given action.
967 * action const char * The name of the action to look up.
969 * fn KtKeyFn ** If the action is found, the function that
972 * data void ** If the action is found, the callback data
973 * associated with the action function, will be
977 * 1 - Action not found.
979 int _kt_lookup_action(KeyTab *kt, const char *action, in _kt_lookup_action() argument
982 Symbol *sym; /* The symbol table entry of the action */ in _kt_lookup_action()
986 if(!kt || !action) { in _kt_lookup_action()
993 * Lookup the symbol table entry of the action. in _kt_lookup_action()
995 sym = _find_HashSymbol(kt->actions, action); in _kt_lookup_action()
999 * Return the function and ccallback data associated with the action. in _kt_lookup_action()