|
VLC
2.1.0-git
|
This file defines functions and structures for hotkey handling in vlc. More...

Data Structures | |
| struct | key_descriptor_s |
| struct | action |
| struct | mapping |
| struct | vlc_actions |
Macros | |
| #define | KEYS_COUNT (sizeof(vlc_keys)/sizeof(vlc_keys[0])) |
| #define | MAXACTION 20 |
| #define | ACTIONS_COUNT (sizeof (actions) / sizeof (actions[0])) |
Typedefs | |
| typedef struct key_descriptor_s | key_descriptor_t |
Functions | |
| static int | keystrcmp (const void *key, const void *elem) |
| static char * | utf8_cp (uint_fast32_t cp, char *buf) |
| uint_fast32_t | vlc_str2keycode (const char *name) |
| Parse a human-readable string representation of a VLC key code. | |
| static char * | nooptext (const char *txt) |
| char * | vlc_keycode2str (uint_fast32_t code, bool locale) |
| Format a human-readable and unique representation of a VLC key code (including modifiers). | |
| static int | keycmp (const void *a, const void *b) |
| static int | vlc_key_to_action (vlc_object_t *obj, const char *varname, vlc_value_t prevkey, vlc_value_t curkey, void *d) |
| static int | vlc_AddMapping (void **map, uint32_t keycode, vlc_action_t action) |
| Adds a mapping from a certain key code to a certain action. | |
| static void | vlc_InitAction (vlc_object_t *obj, void **map, const char *confname, vlc_action_t action) |
| Sets up all key mappings for a given action. | |
| struct vlc_actions * | vlc_InitActions (libvlc_int_t *libvlc) |
| Initializes the key map from configuration. | |
| void | vlc_DeinitActions (libvlc_int_t *libvlc, struct vlc_actions *as) |
| Destroys the key map. | |
| static int | actcmp (const void *key, const void *ent) |
| vlc_action_t | vlc_GetActionId (const char *name) |
| Get the action ID from the action name in the configuration subsystem. | |
Variables | |
| static struct key_descriptor_s | vlc_keys [] |
| static struct action | actions [] |
This file defines functions and structures for hotkey handling in vlc.
Referenced by vlc_GetActionId(), and vlc_InitActions().
Referenced by vlc_keycode2str(), and vlc_str2keycode().
| #define MAXACTION 20 |
Referenced by vlc_InitActions().
| typedef struct key_descriptor_s key_descriptor_t |
|
static |
References action::name.
Referenced by vlc_GetActionId().
|
static |
References mapping::key.
Referenced by vlc_AddMapping(), and vlc_key_to_action().
|
static |
Referenced by vlc_str2keycode().
|
static |
Referenced by vlc_keycode2str().
|
static |
Referenced by vlc_keycode2str().
|
static |
Adds a mapping from a certain key code to a certain action.
References mapping::action, mapping::key, keycmp(), tsearch(), and unlikely.
Referenced by vlc_InitAction(), and vlc_InitActions().
| void vlc_DeinitActions | ( | libvlc_int_t * | libvlc, |
| struct vlc_actions * | as | ||
| ) |
Destroys the key map.
References vlc_actions::global_map, vlc_actions::map, libvlc_int_t::p_hotkeys, tdestroy(), unlikely, var_DelCallback, and vlc_key_to_action().
Referenced by libvlc_InternalCleanup().
| vlc_action_t vlc_GetActionId | ( | const char * | name | ) |
Get the action ID from the action name in the configuration subsystem.
References actcmp(), ACTIONID_NONE, ACTIONS_COUNT, and action::value.
|
static |
Sets up all key mappings for a given action.
| map | tree (of struct mapping entries) to write mappings to |
| confname | VLC configuration item to read mappings from |
| action | action ID |
References code, mapping::key, KEY_UNSET, msg_Warn, strtok_r(), var_InheritString, vlc_AddMapping(), and vlc_str2keycode().
Referenced by vlc_InitActions().
|
read |
Initializes the key map from configuration.
References ACTIONID_JUMP_BACKWARD_EXTRASHORT, ACTIONID_JUMP_FORWARD_EXTRASHORT, ACTIONID_VOL_DOWN, ACTIONID_VOL_UP, ACTIONS_COUNT, vlc_actions::global_map, KEY_MOUSEWHEELDOWN, KEY_MOUSEWHEELLEFT, KEY_MOUSEWHEELRIGHT, KEY_MOUSEWHEELUP, vlc_actions::keys, vlc_actions::map, MAXACTION, msg_Err, action::name, name, libvlc_int_t::p_hotkeys, hotkey::psz_action, unlikely, action::value, var_AddCallback, var_Create, var_InheritInteger, vlc_AddMapping(), vlc_InitAction(), vlc_key_to_action(), VLC_OBJECT, and VLC_VAR_INTEGER.
Referenced by libvlc_InternalInit().
|
static |
< No error
References vlc_value_t::i_int, keycmp(), tfind(), var_SetInteger, and VLC_SUCCESS.
Referenced by vlc_DeinitActions(), and vlc_InitActions().
| char* vlc_keycode2str | ( | uint_fast32_t | code, |
| bool | locale | ||
| ) |
Format a human-readable and unique representation of a VLC key code (including modifiers).
| code | key code to translate to a string |
| locale | true to get a localized string, false to get a C string suitable for 'vlcrc' |
References asprintf(), key_descriptor_s::i_key_code, KEY_MODIFIER, KEY_MODIFIER_ALT, KEY_MODIFIER_COMMAND, KEY_MODIFIER_CTRL, KEY_MODIFIER_META, KEY_MODIFIER_SHIFT, KEYS_COUNT, N_, name, nooptext(), key_descriptor_s::psz_key_string, utf8_cp(), and vlc_gettext().
| uint_fast32_t vlc_str2keycode | ( | const char * | name | ) |
Parse a human-readable string representation of a VLC key code.
References code, key_descriptor_s::i_key_code, KEY_MODIFIER_ALT, KEY_MODIFIER_COMMAND, KEY_MODIFIER_CTRL, KEY_MODIFIER_META, KEY_MODIFIER_SHIFT, KEY_UNSET, KEYS_COUNT, keystrcmp(), and vlc_towc().
Referenced by vlc_InitAction().
|
static |
|
static |
1.8.1.2