VLC 4.0.0-dev
|
This file defines keys and functions. More...
Go to the source code of this file.
Macros | |
#define | KEY_MODIFIER 0xFF000000 |
#define | KEY_MODIFIER_ALT 0x01000000 |
#define | KEY_MODIFIER_SHIFT 0x02000000 |
#define | KEY_MODIFIER_CTRL 0x04000000 |
#define | KEY_MODIFIER_META 0x08000000 |
#define | KEY_MODIFIER_COMMAND 0x10000000 |
#define | KEY_UNSET 0x00000000 |
#define | KEY_BACKSPACE 0x08 |
#define | KEY_TAB 0x09 |
#define | KEY_ENTER 0x0D |
#define | KEY_ESC 0x1B |
#define | KEY_LEFT 0x00200000 |
#define | KEY_RIGHT 0x00210000 |
#define | KEY_UP 0x00220000 |
#define | KEY_DOWN 0x00230000 |
#define | KEY_F(n) (0x00230000 + ((n) << 16)) |
#define | KEY_F1 KEY_F(1) |
#define | KEY_F2 KEY_F(2) |
#define | KEY_F3 KEY_F(3) |
#define | KEY_F4 KEY_F(4) |
#define | KEY_F5 KEY_F(5) |
#define | KEY_F6 KEY_F(6) |
#define | KEY_F7 KEY_F(7) |
#define | KEY_F8 KEY_F(8) |
#define | KEY_F9 KEY_F(9) |
#define | KEY_F10 KEY_F(10) |
#define | KEY_F11 KEY_F(11) |
#define | KEY_F12 KEY_F(12) |
#define | KEY_HOME 0x00470000 |
#define | KEY_END 0x00480000 |
#define | KEY_INSERT 0x00490000 |
#define | KEY_DELETE 0x004A0000 |
#define | KEY_MENU 0x004B0000 |
#define | KEY_PAGEUP 0x004C0000 |
#define | KEY_PAGEDOWN 0x004D0000 |
#define | KEY_PRINT 0x004E0000 |
#define | KEY_PAUSE 0x004F0000 |
#define | KEY_BROWSER_BACK 0x00500000 |
#define | KEY_BROWSER_FORWARD 0x00510000 |
#define | KEY_BROWSER_REFRESH 0x00520000 |
#define | KEY_BROWSER_STOP 0x00530000 |
#define | KEY_BROWSER_SEARCH 0x00540000 |
#define | KEY_BROWSER_FAVORITES 0x00550000 |
#define | KEY_BROWSER_HOME 0x00560000 |
#define | KEY_VOLUME_MUTE 0x00570000 |
#define | KEY_VOLUME_DOWN 0x00580000 |
#define | KEY_VOLUME_UP 0x00590000 |
#define | KEY_MEDIA_NEXT_TRACK 0x005A0000 |
#define | KEY_MEDIA_PREV_TRACK 0x005B0000 |
#define | KEY_MEDIA_STOP 0x005C0000 |
#define | KEY_MEDIA_PLAY_PAUSE 0x005D0000 |
#define | KEY_MEDIA_RECORD 0x005E0000 |
#define | KEY_MEDIA_REWIND 0x005F0000 |
#define | KEY_MEDIA_FORWARD 0x00600000 |
#define | KEY_MEDIA_REPEAT 0x00610000 |
#define | KEY_MEDIA_SHUFFLE 0x00620000 |
#define | KEY_MEDIA_SUBTITLE 0x00630000 |
#define | KEY_MEDIA_AUDIO 0x00640000 |
#define | KEY_MEDIA_ANGLE 0x00650000 |
#define | KEY_MEDIA_TIME 0x00660000 |
#define | KEY_MEDIA_FRAME_PREV 0x00670000 |
#define | KEY_MEDIA_FRAME_NEXT 0x00680000 |
#define | KEY_MEDIA_SELECT 0x00690000 |
#define | KEY_MEDIA_VIEW 0x006A0000 |
#define | KEY_MEDIA_MENU 0x006B0000 |
#define | KEY_ZOOM_IN 0x006C0000 |
#define | KEY_ZOOM_OUT 0x006D0000 |
#define | KEY_BRIGHTNESS_UP 0x006E0000 |
#define | KEY_BRIGHTNESS_DOWN 0x006F0000 |
#define | KEY_MOUSEWHEELUP 0x00F00000 |
#define | KEY_MOUSEWHEELDOWN 0x00F10000 |
#define | KEY_MOUSEWHEELLEFT 0x00F20000 |
#define | KEY_MOUSEWHEELRIGHT 0x00F30000 |
#define | KEY_MOUSEWHEEL_FROM_BUTTON(button) (KEY_MOUSEWHEELUP | ((button - MOUSE_BUTTON_WHEEL_UP) << 16)) |
#define | vlc_actions_get_keycodes(a, b, c, d) vlc_actions_get_keycodes(VLC_OBJECT(a), b, c, d) |
#define | vlc_actions_get_key_names(x) vlc_actions_get_key_names(VLC_OBJECT(x)) |
Typedefs | |
typedef enum vlc_action_id | vlc_action_id_t |
Functions | |
int | libvlc_InternalActionsInit (libvlc_int_t *p_libvlc) |
Initializes the key map from configuration. More... | |
void | libvlc_InternalActionsClean (libvlc_int_t *p_libvlc) |
Destroys the key map. More... | |
char * | vlc_keycode2str (uint_fast32_t i_key, bool locale) |
Format a human-readable and unique representation of a VLC key code (including modifiers). More... | |
uint_fast32_t | vlc_str2keycode (const char *str) |
Parse a human-readable string representation of a VLC key code. More... | |
vlc_action_id_t | vlc_actions_get_id (const char *psz_key_name) |
Get the action ID from an action key name. More... | |
size_t | vlc_actions_get_keycodes (vlc_object_t *p_obj, const char *psz_key_name, bool b_global, uint_fast32_t **pp_keycodes) |
Get keycodes from a action key name and vlc configuration. More... | |
const char *const * | vlc_actions_get_key_names (vlc_object_t *p_obj) |
Get a list a key names. More... | |
This file defines keys and functions.
#define KEY_BACKSPACE 0x08 |
#define KEY_BRIGHTNESS_DOWN 0x006F0000 |
#define KEY_BRIGHTNESS_UP 0x006E0000 |
#define KEY_BROWSER_BACK 0x00500000 |
#define KEY_BROWSER_FAVORITES 0x00550000 |
#define KEY_BROWSER_FORWARD 0x00510000 |
#define KEY_BROWSER_HOME 0x00560000 |
#define KEY_BROWSER_REFRESH 0x00520000 |
#define KEY_BROWSER_SEARCH 0x00540000 |
#define KEY_BROWSER_STOP 0x00530000 |
#define KEY_DELETE 0x004A0000 |
#define KEY_DOWN 0x00230000 |
#define KEY_END 0x00480000 |
#define KEY_ENTER 0x0D |
#define KEY_ESC 0x1B |
#define KEY_F | ( | n | ) | (0x00230000 + ((n) << 16)) |
#define KEY_F1 KEY_F(1) |
#define KEY_F10 KEY_F(10) |
#define KEY_F11 KEY_F(11) |
#define KEY_F12 KEY_F(12) |
#define KEY_F2 KEY_F(2) |
#define KEY_F3 KEY_F(3) |
#define KEY_F4 KEY_F(4) |
#define KEY_F5 KEY_F(5) |
#define KEY_F6 KEY_F(6) |
#define KEY_F7 KEY_F(7) |
#define KEY_F8 KEY_F(8) |
#define KEY_F9 KEY_F(9) |
#define KEY_HOME 0x00470000 |
#define KEY_INSERT 0x00490000 |
#define KEY_LEFT 0x00200000 |
#define KEY_MEDIA_ANGLE 0x00650000 |
#define KEY_MEDIA_AUDIO 0x00640000 |
#define KEY_MEDIA_FORWARD 0x00600000 |
#define KEY_MEDIA_FRAME_NEXT 0x00680000 |
#define KEY_MEDIA_FRAME_PREV 0x00670000 |
#define KEY_MEDIA_MENU 0x006B0000 |
#define KEY_MEDIA_NEXT_TRACK 0x005A0000 |
#define KEY_MEDIA_PLAY_PAUSE 0x005D0000 |
#define KEY_MEDIA_PREV_TRACK 0x005B0000 |
#define KEY_MEDIA_RECORD 0x005E0000 |
#define KEY_MEDIA_REPEAT 0x00610000 |
#define KEY_MEDIA_REWIND 0x005F0000 |
#define KEY_MEDIA_SELECT 0x00690000 |
#define KEY_MEDIA_SHUFFLE 0x00620000 |
#define KEY_MEDIA_STOP 0x005C0000 |
#define KEY_MEDIA_SUBTITLE 0x00630000 |
#define KEY_MEDIA_TIME 0x00660000 |
#define KEY_MEDIA_VIEW 0x006A0000 |
#define KEY_MENU 0x004B0000 |
#define KEY_MODIFIER 0xFF000000 |
#define KEY_MODIFIER_ALT 0x01000000 |
#define KEY_MODIFIER_COMMAND 0x10000000 |
#define KEY_MODIFIER_CTRL 0x04000000 |
#define KEY_MODIFIER_META 0x08000000 |
#define KEY_MODIFIER_SHIFT 0x02000000 |
#define KEY_MOUSEWHEEL_FROM_BUTTON | ( | button | ) | (KEY_MOUSEWHEELUP | ((button - MOUSE_BUTTON_WHEEL_UP) << 16)) |
#define KEY_MOUSEWHEELDOWN 0x00F10000 |
#define KEY_MOUSEWHEELLEFT 0x00F20000 |
#define KEY_MOUSEWHEELRIGHT 0x00F30000 |
#define KEY_MOUSEWHEELUP 0x00F00000 |
#define KEY_PAGEDOWN 0x004D0000 |
#define KEY_PAGEUP 0x004C0000 |
#define KEY_PAUSE 0x004F0000 |
#define KEY_PRINT 0x004E0000 |
#define KEY_RIGHT 0x00210000 |
#define KEY_TAB 0x09 |
#define KEY_UNSET 0x00000000 |
#define KEY_UP 0x00220000 |
#define KEY_VOLUME_DOWN 0x00580000 |
#define KEY_VOLUME_MUTE 0x00570000 |
#define KEY_VOLUME_UP 0x00590000 |
#define KEY_ZOOM_IN 0x006C0000 |
#define KEY_ZOOM_OUT 0x006D0000 |
#define vlc_actions_get_key_names | ( | x | ) | vlc_actions_get_key_names(VLC_OBJECT(x)) |
#define vlc_actions_get_keycodes | ( | a, | |
b, | |||
c, | |||
d | |||
) | vlc_actions_get_keycodes(VLC_OBJECT(a), b, c, d) |
typedef enum vlc_action_id vlc_action_id_t |
enum vlc_action_id |
void libvlc_InternalActionsClean | ( | libvlc_int_t * | p_libvlc | ) |
Destroys the key map.
References libvlc_priv_t::actions, vlc_actions_t::global_map, libvlc_priv(), vlc_actions_t::map, tdestroy(), unlikely, var_DelCallback(), and vlc_key_to_action().
Referenced by libvlc_InternalCleanup().
int libvlc_InternalActionsInit | ( | libvlc_int_t * | p_libvlc | ) |
Initializes the key map from configuration.
References libvlc_priv_t::actions, add_wheel_mapping(), ARRAY_SIZE, vlc_actions_t::global_map, name2action::id, init_action(), KEY_MOUSEWHEELDOWN, KEY_MOUSEWHEELLEFT, KEY_MOUSEWHEELRIGHT, KEY_MOUSEWHEELUP, libvlc_priv(), vlc_actions_t::map, MAXACTION, msg_Err, name, vlc_actions_t::ppsz_keys, name2action::psz, s_names2actions, unlikely, var_AddCallback(), var_Create(), var_InheritInteger(), VLC_ENOMEM, vlc_key_to_action(), VLC_OBJECT, VLC_SUCCESS, and VLC_VAR_INTEGER.
Referenced by libvlc_InternalInit().
vlc_action_id_t vlc_actions_get_id | ( | const char * | name | ) |
Get the action ID from an action key name.
Get the action ID from an action key name.
References actcmp(), ACTIONID_NONE, ARRAY_SIZE, name2action::id, name, and s_names2actions.
const char *const * vlc_actions_get_key_names | ( | vlc_object_t * | p_obj | ) |
Get a list a key names.
References libvlc_priv_t::actions, libvlc_priv(), vlc_actions_t::ppsz_keys, and vlc_object_instance.
size_t vlc_actions_get_keycodes | ( | vlc_object_t * | p_obj, |
const char * | psz_key_name, | ||
bool | b_global, | ||
uint_fast32_t ** | pp_keycodes | ||
) |
Get keycodes from a action key name and vlc configuration.
References MAXACTION, strtok_r(), unlikely, var_InheritString(), vlc_alloc(), and vlc_str2keycode().
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 ARRAY_SIZE, asprintf(), key_descriptor::i_code, KEY_MODIFIER_ALT, KEY_MODIFIER_COMMAND, KEY_MODIFIER_CTRL, KEY_MODIFIER_META, KEY_MODIFIER_SHIFT, N_, name, nooptext(), key_descriptor::psz, s_keys, 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 ARRAY_SIZE, key_descriptor::i_code, KEY_MODIFIER_ALT, KEY_MODIFIER_COMMAND, KEY_MODIFIER_CTRL, KEY_MODIFIER_META, KEY_MODIFIER_SHIFT, KEY_UNSET, keystrcmp(), name, s_keys, and vlc_towc().
Referenced by init_action(), and vlc_actions_get_keycodes().