diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2006-08-17 12:33:36 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2006-08-17 12:33:36 +0000 |
commit | f1781318d3483bac2bb5f87f4bdb96f678e6945a (patch) | |
tree | 854da549cfca5dc0e33084beb681453dbf28b4b4 /apps/action.h | |
parent | 0b35bcfc7151e7e12b221d6917e31a46c73e1d3a (diff) | |
download | rockbox-f1781318d3483bac2bb5f87f4bdb96f678e6945a.tar.gz rockbox-f1781318d3483bac2bb5f87f4bdb96f678e6945a.zip |
software keylock works again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10632 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/action.h')
-rw-r--r-- | apps/action.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/action.h b/apps/action.h index c73a9e4867..e95d009a0f 100644 --- a/apps/action.h +++ b/apps/action.h | |||
@@ -29,6 +29,12 @@ | |||
29 | #define CONTEXT_REMOTE 0x80000000 /* | this against another context to get remote buttons for that context */ | 29 | #define CONTEXT_REMOTE 0x80000000 /* | this against another context to get remote buttons for that context */ |
30 | #define CONTEXT_CUSTOM 0x40000000 /* | this against anything to get your context number */ | 30 | #define CONTEXT_CUSTOM 0x40000000 /* | this against anything to get your context number */ |
31 | 31 | ||
32 | #ifndef HAS_BUTTON_HOLD | ||
33 | #define ALLOW_SOFTLOCK 0x20000000 /* will be stripped.. never needed except in calls to get_action() */ | ||
34 | #else | ||
35 | #define ALLOW_SOFTLOCK 0 | ||
36 | #endif | ||
37 | |||
32 | enum { | 38 | enum { |
33 | CONTEXT_STD = 0, | 39 | CONTEXT_STD = 0, |
34 | /* These CONTEXT_ values were here before me, | 40 | /* These CONTEXT_ values were here before me, |
@@ -54,6 +60,7 @@ enum { | |||
54 | 60 | ||
55 | ACTION_NONE = BUTTON_NONE, | 61 | ACTION_NONE = BUTTON_NONE, |
56 | ACTION_UNKNOWN, | 62 | ACTION_UNKNOWN, |
63 | ACTION_REDRAW, /* returned if keys are locked and we splash()'ed */ | ||
57 | 64 | ||
58 | /* standard actions, use these first */ | 65 | /* standard actions, use these first */ |
59 | ACTION_STD_PREV, | 66 | ACTION_STD_PREV, |
@@ -66,9 +73,7 @@ enum { | |||
66 | ACTION_STD_CONTEXT, | 73 | ACTION_STD_CONTEXT, |
67 | ACTION_STD_MENU, | 74 | ACTION_STD_MENU, |
68 | ACTION_STD_QUICKSCREEN, | 75 | ACTION_STD_QUICKSCREEN, |
69 | ACTION_STD_KEYLOCK, /* software keylock in wps screen, very optional | 76 | ACTION_STD_KEYLOCK, |
70 | use with action_setsoftwarekeylock */ | ||
71 | |||
72 | 77 | ||
73 | /* code context actions */ | 78 | /* code context actions */ |
74 | 79 | ||
@@ -165,12 +170,9 @@ void action_signalscreenchange(void); | |||
165 | /* call this if you need to check for ACTION_STD_CANCEL only (i.e user abort! */ | 170 | /* call this if you need to check for ACTION_STD_CANCEL only (i.e user abort! */ |
166 | bool action_userabort(int timeout); | 171 | bool action_userabort(int timeout); |
167 | 172 | ||
168 | /* on targets without hardware keylock, use this to to emulate keylock. | ||
169 | unlock_action is the action which will disaable the keylock | ||
170 | allow_remote should be true if you want the remote buttons to still be usable while locked */ | ||
171 | void action_setsoftwarekeylock(int unlock_action, bool allow_remote); | ||
172 | |||
173 | /* no other code should need this apart from action.c */ | 173 | /* no other code should need this apart from action.c */ |
174 | const struct button_mapping* get_context_mapping(int context); | 174 | const struct button_mapping* get_context_mapping(int context); |
175 | 175 | #ifndef HAS_BUTTON_HOLD | |
176 | bool is_keys_locked(void); | ||
177 | #endif | ||
176 | #endif | 178 | #endif |