diff options
Diffstat (limited to 'apps/action.h')
-rw-r--r-- | apps/action.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/action.h b/apps/action.h index 3217ce4d6f..7fadc015c8 100644 --- a/apps/action.h +++ b/apps/action.h | |||
@@ -28,10 +28,13 @@ | |||
28 | #define TIMEOUT_NOBLOCK 0 | 28 | #define TIMEOUT_NOBLOCK 0 |
29 | 29 | ||
30 | #define CONTEXT_STOPSEARCHING 0xFFFFFFFF | 30 | #define CONTEXT_STOPSEARCHING 0xFFFFFFFF |
31 | |||
31 | #define CONTEXT_REMOTE 0x80000000 /* | this against another context to get remote buttons for that context */ | 32 | #define CONTEXT_REMOTE 0x80000000 /* | this against another context to get remote buttons for that context */ |
32 | #define CONTEXT_CUSTOM 0x40000000 /* | this against anything to get your context number */ | 33 | #define CONTEXT_CUSTOM 0x40000000 /* | this against anything to get your context number */ |
33 | #define CONTEXT_CUSTOM2 0x20000000 /* as above */ | 34 | #define CONTEXT_CUSTOM2 0x20000000 /* as above */ |
34 | #define CONTEXT_PLUGIN 0x10000000 /* for plugins using get_custom_action */ | 35 | #define CONTEXT_PLUGIN 0x10000000 /* for plugins using get_custom_action */ |
36 | #define CONTEXT_REMAPPED 0x08000000 /* marker for key remap context table */ | ||
37 | #define CORE_CONTEXT_REMAP(context) (CONTEXT_REMAPPED | context) | ||
35 | #ifdef HAVE_LOCKED_ACTIONS | 38 | #ifdef HAVE_LOCKED_ACTIONS |
36 | #define CONTEXT_LOCKED 0x04000000 /* flag to use alternate keymap when screen is locked */ | 39 | #define CONTEXT_LOCKED 0x04000000 /* flag to use alternate keymap when screen is locked */ |
37 | #endif | 40 | #endif |
@@ -415,6 +418,11 @@ typedef struct | |||
415 | bool repeated; | 418 | bool repeated; |
416 | bool wait_for_release; | 419 | bool wait_for_release; |
417 | 420 | ||
421 | #ifndef DISABLE_ACTION_REMAP | ||
422 | bool check_remap; | ||
423 | struct button_mapping* core_keymap; | ||
424 | #endif | ||
425 | |||
418 | #ifdef HAVE_TOUCHSCREEN | 426 | #ifdef HAVE_TOUCHSCREEN |
419 | bool ts_short_press; | 427 | bool ts_short_press; |
420 | int ts_data; | 428 | int ts_data; |
@@ -441,6 +449,9 @@ bool action_userabort(int timeout); | |||
441 | /* no other code should need this apart from action.c */ | 449 | /* no other code should need this apart from action.c */ |
442 | const struct button_mapping* get_context_mapping(int context); | 450 | const struct button_mapping* get_context_mapping(int context); |
443 | 451 | ||
452 | /* load a key map to allow buttons for actions to be remapped see: core_keymap */ | ||
453 | int action_set_keymap(struct button_mapping* core_button_map, int count); | ||
454 | |||
444 | /* returns the status code variable from action.c for the button just pressed | 455 | /* returns the status code variable from action.c for the button just pressed |
445 | If button != NULL it will be set to the actual button code */ | 456 | If button != NULL it will be set to the actual button code */ |
446 | #define ACTION_REMOTE 0x1 /* remote was pressed */ | 457 | #define ACTION_REMOTE 0x1 /* remote was pressed */ |