1
0
Fork 0
forked from len0rd/rockbox

S#10387 - Rework pluginlib actions

It changes pluginlib actions to contain only a single and simple context (and
other one for remote directional buttons),
consisting of 7(9) buttons: up/down/left/right, select OR short select and long
select, exit and cancel (plus 2 for scrollwheel targets).
This ensures contexts don't clash with other contexts and simplifies them, at
the expense of reduced versatility. However, the versatility made it largely unusable
due to the great number of targets.
This should allow for using pluginlib actions safely for the most simple plugins (e.g. almost all demos).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26202 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-05-20 17:41:28 +00:00
parent 97365803d3
commit 20e9d56ba5
18 changed files with 477 additions and 860 deletions

View file

@ -38,27 +38,26 @@ enum {
PLA_LEFT_REPEAT,
PLA_RIGHT_REPEAT,
PLA_INC,
PLA_DEC,
PLA_INC_REPEAT,
PLA_DEC_REPEAT,
PLA_CANCEL,
PLA_EXIT,
PLA_SELECT,
PLA_SELECT_REL,
PLA_SELECT_REPEAT,
PLA_QUIT,
PLA_START,
PLA_MENU,
PLA_FIRE,
PLA_FIRE_REPEAT,
#ifdef HAVE_SCROLLWHEEL
PLA_SCROLL_FWD,
PLA_SCROLL_FWD_REPEAT,
PLA_SCROLL_BACK,
PLA_SCROLL_BACK_REPEAT,
#endif
LAST_PLUGINLIB_ACTION
};
#if defined(HAVE_REMOTE_LCD)
extern const struct button_mapping remote_directions[];
extern const struct button_mapping pla_remote_ctx[];
#endif
extern const struct button_mapping generic_directions[];
extern const struct button_mapping generic_left_right_fire[];
extern const struct button_mapping generic_actions[];
extern const struct button_mapping generic_increase_decrease[];
extern const struct button_mapping pla_main_ctx[];
int pluginlib_getaction(int timeout,
const struct button_mapping *plugin_contexts[],