diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/action.c | 2 | ||||
-rw-r--r-- | apps/action.h | 1 | ||||
-rw-r--r-- | apps/plugins/lib/pluginlib_actions.c | 12 | ||||
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 13 |
4 files changed, 16 insertions, 12 deletions
diff --git a/apps/action.c b/apps/action.c index 21198889d2..5810003744 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -197,7 +197,7 @@ static int get_action_worker(int context, int timeout, | |||
197 | if (button & BUTTON_REMOTE) | 197 | if (button & BUTTON_REMOTE) |
198 | context |= CONTEXT_REMOTE; | 198 | context |= CONTEXT_REMOTE; |
199 | #endif | 199 | #endif |
200 | if ((context & CONTEXT_CUSTOM) && get_context_map) | 200 | if ((context & CONTEXT_PLUGIN) && get_context_map) |
201 | items = get_context_map(context); | 201 | items = get_context_map(context); |
202 | else | 202 | else |
203 | items = get_context_mapping(context); | 203 | items = get_context_mapping(context); |
diff --git a/apps/action.h b/apps/action.h index 9869fb30b1..616fad57e9 100644 --- a/apps/action.h +++ b/apps/action.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #define CONTEXT_REMOTE 0x80000000 /* | this against another context to get remote buttons for that context */ | 30 | #define CONTEXT_REMOTE 0x80000000 /* | this against another context to get remote buttons for that context */ |
31 | #define CONTEXT_CUSTOM 0x40000000 /* | this against anything to get your context number */ | 31 | #define CONTEXT_CUSTOM 0x40000000 /* | this against anything to get your context number */ |
32 | #define CONTEXT_CUSTOM2 0x20000000 /* as above */ | 32 | #define CONTEXT_CUSTOM2 0x20000000 /* as above */ |
33 | #define CONTEXT_PLUGIN 0x10000000 /* for plugins using get_custom_action */ | ||
33 | 34 | ||
34 | #define LAST_ITEM_IN_LIST { CONTEXT_STOPSEARCHING, BUTTON_NONE, BUTTON_NONE } | 35 | #define LAST_ITEM_IN_LIST { CONTEXT_STOPSEARCHING, BUTTON_NONE, BUTTON_NONE } |
35 | #define LAST_ITEM_IN_LIST__NEXTLIST(a) { a, BUTTON_NONE, BUTTON_NONE } | 36 | #define LAST_ITEM_IN_LIST__NEXTLIST(a) { a, BUTTON_NONE, BUTTON_NONE } |
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c index 550cd56d48..e870c79b9c 100644 --- a/apps/plugins/lib/pluginlib_actions.c +++ b/apps/plugins/lib/pluginlib_actions.c | |||
@@ -71,7 +71,7 @@ const struct button_mapping remote_directions[] = | |||
71 | #else | 71 | #else |
72 | #error pluginlib_actions: Unsupported remote keypad | 72 | #error pluginlib_actions: Unsupported remote keypad |
73 | #endif | 73 | #endif |
74 | {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE} | 74 | {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE} |
75 | }; | 75 | }; |
76 | #endif /* HAVE_REMOTE_LCD */ | 76 | #endif /* HAVE_REMOTE_LCD */ |
77 | 77 | ||
@@ -174,7 +174,7 @@ const struct button_mapping generic_directions[] = | |||
174 | #else | 174 | #else |
175 | #error pluginlib_actions: Unsupported keypad | 175 | #error pluginlib_actions: Unsupported keypad |
176 | #endif | 176 | #endif |
177 | {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE} | 177 | {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE} |
178 | }; | 178 | }; |
179 | 179 | ||
180 | const struct button_mapping generic_left_right_fire[] = | 180 | const struct button_mapping generic_left_right_fire[] = |
@@ -296,7 +296,7 @@ const struct button_mapping generic_left_right_fire[] = | |||
296 | #else | 296 | #else |
297 | #error pluginlib_actions: Unsupported keypad | 297 | #error pluginlib_actions: Unsupported keypad |
298 | #endif | 298 | #endif |
299 | {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE} | 299 | {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE} |
300 | }; | 300 | }; |
301 | 301 | ||
302 | /* these were taken from the bubbles plugin, so may need tweaking */ | 302 | /* these were taken from the bubbles plugin, so may need tweaking */ |
@@ -457,7 +457,7 @@ const struct button_mapping generic_actions[] = | |||
457 | #else | 457 | #else |
458 | #error pluginlib_actions: Unsupported keypad | 458 | #error pluginlib_actions: Unsupported keypad |
459 | #endif | 459 | #endif |
460 | {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE} | 460 | {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE} |
461 | }; | 461 | }; |
462 | 462 | ||
463 | const struct button_mapping generic_increase_decrease[] = | 463 | const struct button_mapping generic_increase_decrease[] = |
@@ -537,7 +537,7 @@ const struct button_mapping generic_increase_decrease[] = | |||
537 | #else | 537 | #else |
538 | #error pluginlib_actions: Unsupported keypad | 538 | #error pluginlib_actions: Unsupported keypad |
539 | #endif | 539 | #endif |
540 | {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE} | 540 | {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE} |
541 | }; | 541 | }; |
542 | 542 | ||
543 | static struct button_mapping **plugin_context_order; | 543 | static struct button_mapping **plugin_context_order; |
@@ -560,5 +560,5 @@ int pluginlib_getaction(int timeout, | |||
560 | plugin_context_order = (struct button_mapping **)plugin_contexts; | 560 | plugin_context_order = (struct button_mapping **)plugin_contexts; |
561 | plugin_context_count = count; | 561 | plugin_context_count = count; |
562 | last_context = 0; | 562 | last_context = 0; |
563 | return rb->get_custom_action(CONTEXT_CUSTOM,timeout,get_context_map); | 563 | return rb->get_custom_action(CONTEXT_PLUGIN,timeout,get_context_map); |
564 | } | 564 | } |
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index a7a4205fa2..de9859897c 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -70,6 +70,10 @@ const struct button_mapping pf_context_album_scroll[] = | |||
70 | {PF_PREV_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE}, | 70 | {PF_PREV_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE}, |
71 | {PF_NEXT, BUTTON_RIGHT, BUTTON_NONE}, | 71 | {PF_NEXT, BUTTON_RIGHT, BUTTON_NONE}, |
72 | {PF_NEXT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE}, | 72 | {PF_NEXT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE}, |
73 | {ACTION_NONE, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT}, | ||
74 | {ACTION_NONE, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT}, | ||
75 | {ACTION_NONE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT}, | ||
76 | {ACTION_NONE, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT}, | ||
73 | #endif | 77 | #endif |
74 | #if CONFIG_KEYPAD == ONDIO_PAD | 78 | #if CONFIG_KEYPAD == ONDIO_PAD |
75 | {PF_SELECT, BUTTON_UP|BUTTON_REL, BUTTON_UP}, | 79 | {PF_SELECT, BUTTON_UP|BUTTON_REL, BUTTON_UP}, |
@@ -77,9 +81,8 @@ const struct button_mapping pf_context_album_scroll[] = | |||
77 | {ACTION_NONE, BUTTON_UP, BUTTON_NONE}, | 81 | {ACTION_NONE, BUTTON_UP, BUTTON_NONE}, |
78 | {ACTION_NONE, BUTTON_DOWN, BUTTON_NONE}, | 82 | {ACTION_NONE, BUTTON_DOWN, BUTTON_NONE}, |
79 | {ACTION_NONE, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE}, | 83 | {ACTION_NONE, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE}, |
80 | {ACTION_NONE, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT}, | ||
81 | #endif | 84 | #endif |
82 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|1) | 85 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_PLUGIN|1) |
83 | }; | 86 | }; |
84 | #endif /* !defined(HAVE_SCROLLWHEEL) */ | 87 | #endif /* !defined(HAVE_SCROLLWHEEL) */ |
85 | 88 | ||
@@ -132,7 +135,7 @@ const struct button_mapping pf_context_buttons[] = | |||
132 | #if CONFIG_KEYPAD == IAUDIO_M3_PAD | 135 | #if CONFIG_KEYPAD == IAUDIO_M3_PAD |
133 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD|CONTEXT_REMOTE) | 136 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD|CONTEXT_REMOTE) |
134 | #else | 137 | #else |
135 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 138 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_TREE) |
136 | #endif | 139 | #endif |
137 | }; | 140 | }; |
138 | const struct button_mapping *pf_contexts[] = | 141 | const struct button_mapping *pf_contexts[] = |
@@ -681,7 +684,7 @@ const struct custom_format format_transposed = { | |||
681 | 684 | ||
682 | static const struct button_mapping* get_context_map(int context) | 685 | static const struct button_mapping* get_context_map(int context) |
683 | { | 686 | { |
684 | return pf_contexts[context & ~CONTEXT_CUSTOM]; | 687 | return pf_contexts[context & ~CONTEXT_PLUGIN]; |
685 | } | 688 | } |
686 | 689 | ||
687 | /* Create the lookup table with the scaling values for the reflections */ | 690 | /* Create the lookup table with the scaling values for the reflections */ |
@@ -2596,7 +2599,7 @@ int main(void) | |||
2596 | rb->yield(); | 2599 | rb->yield(); |
2597 | 2600 | ||
2598 | /*/ Handle buttons */ | 2601 | /*/ Handle buttons */ |
2599 | button = rb->get_custom_action(CONTEXT_CUSTOM | 2602 | button = rb->get_custom_action(CONTEXT_PLUGIN |
2600 | #if !defined(HAVE_SCROLLWHEEL) | 2603 | #if !defined(HAVE_SCROLLWHEEL) |
2601 | |(pf_state == pf_show_tracks ? 1 : 0) | 2604 | |(pf_state == pf_show_tracks ? 1 : 0) |
2602 | #endif | 2605 | #endif |