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,
33 IMG_MAX, // before this point is loaded; after is generated
40 void /*SDL_Surface*/ *i;
59 unsigned char ui_setup ( void );
60 unsigned char ui_imagecache ( char *basepath );
61 unsigned char ui_pick_skin ( void ); // return >0 if skin has changed
63 void ui_render ( void );
65 void ui_loadscreen ( void ); // show screen while loading the menu
66 void ui_discoverscreen ( unsigned char clearscreen ); // screen to show while scanning for apps
67 void ui_cachescreen ( unsigned char clearscreen, char *filename ); // while caching icons, categories and preview-pics-Now-mode
68 void ui_show_hourglass ( unsigned char updaterect );
69 void ui_post_scan ( void );
71 /* internal functions follow
74 // show a menu, return when selection made; -1 means no selection. Enter is pick.
75 int ui_modal_single_menu ( char *argv[], unsigned int argc, char *title, char *footer );
77 // run a forked app (ie: not wait for it to return)
78 unsigned char ui_forkexec ( char *argv[] ); // argv[0] is proggy to exec; argv last entry must be NULLptr
80 // create a thread of this guy, and it'll try to load the preview pic in background and then signal the app
81 unsigned char ui_threaded_defered_preview ( pnd_disco_t *p );
82 unsigned char ui_threaded_defered_icon ( void * );
85 void ui_process_input ( unsigned char block_p );
86 void ui_push_left ( unsigned char forcecoil );
87 void ui_push_right ( unsigned char forcecoil );
88 void ui_push_up ( void );
89 void ui_push_down ( void );
90 void ui_push_exec ( void );
91 void ui_push_ltrigger ( void );
92 void ui_push_rtrigger ( void );
93 unsigned char ui_determine_row ( mm_appref_t *a );
94 unsigned char ui_determine_screen_row ( mm_appref_t *a );
95 unsigned char ui_determine_screen_col ( mm_appref_t *a );
96 unsigned char ui_show_info ( char *pndrun, pnd_disco_t *p );
98 // ui_render() can register tappable-areas which touchscreen code can then figure out if we made a hit
99 void ui_register_reset ( void );
100 void ui_register_tab ( unsigned char catnum, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
101 void ui_register_app ( mm_appref_t *app, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
102 void ui_touch_act ( unsigned int x, unsigned int y );
104 // deferred preview timer
105 void ui_set_selected ( mm_appref_t *r );
106 unsigned int ui_callback_f ( unsigned int t );