Created common signature for panel event handling functions.
Made all panel event handlers have the same signature:
typedef int (*panel_event_func_t)(struct xuni_t *xuni,
struct panel_data_t *data);
Created a structure, widgets.h::panel_event_t, which handles the
event-specific variables, much like struct widget_t, with a union of
structures. (This needs to be converted to a union of pointers to structures
to save space.)
Note that many events do not use the int return value of this signature.
Updated all panel event handlers to match the new function signature. Any
parameters were translated into equivalent variables, with as little effort
as possible.
At the same time, renamed all panel event handlers to <panel>_<event>.
In other words:
- init_game() became game_init();
- game_perform_click() became game_click();
- and so on.
Also note that several functions could use the new panel_event_recursive() in
loop.c instead of old, specific functions like call_perform_click_func(). There
are many other optimizations that could be made now that a panel event handler
pointer can be created.
15 files changed: