5 /* this code actually _does_ something; this way, at least all the IO routines are in one place, so
6 * I know what to replace with something sensible later :)
7 * ... ahh, to have time to make this in C++ as an actual abstract interface...
10 /* staticly cached stuff, for UI
14 IMG_BACKGROUND_800480 = 0,
15 IMG_BACKGROUND_TABMASK,
18 IMG_SELECTED_ALPHAMASK,
27 IMG_MAX, // before this point is loaded; after is generated
34 void /*SDL_Surface*/ *i;
53 unsigned char ui_setup ( void );
54 unsigned char ui_imagecache ( char *basepath );
56 #define CHANGED_NOTHING (0)
57 #define CHANGED_CATEGORY (1<<0) /* changed to different category */
58 #define CHANGED_SELECTION (1<<1) /* changed app selection */
59 #define CHANGED_DATAUPDATE (1<<2) /* deferred preview pic or icon came in */
60 #define CHANGED_APPRELOAD (1<<3) /* new set of applications entirely */
61 #define CHANGED_EVERYTHING (0xFFFF) /* redraw it all! */
62 void ui_render ( unsigned int render_mask );
64 void ui_loadscreen ( void ); // show screen while loading the menu
65 void ui_discoverscreen ( unsigned char clearscreen ); // screen to show while scanning for apps
66 void ui_cachescreen ( unsigned char clearscreen, char *filename ); // while caching icons, categories and preview-pics-Now-mode
68 // show a menu, return when selection made; -1 means no selection. Enter is pick.
69 int ui_modal_single_menu ( char *argv[], unsigned int argc, char *title, char *footer );
71 /* internal functions follow
75 void ui_process_input ( unsigned char block_p );
76 void ui_push_left ( void );
77 void ui_push_right ( void );
78 void ui_push_up ( void );
79 void ui_push_down ( void );
80 void ui_push_exec ( void );
81 void ui_push_ltrigger ( void );
82 void ui_push_rtrigger ( void );
84 // ui_render() can register tappable-areas which touchscreen code can then figure out if we made a hit
85 void ui_register_reset ( void );
86 void ui_register_tab ( mm_category_t *category, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
87 void ui_register_app ( pnd_disco_t *app, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
89 // deferred preview timer
90 void ui_set_selected ( mm_appref_t *r );
91 unsigned int ui_callback_f ( unsigned int t );