Added scroll arrows to config pages to help guide user theres more options
[pandora-libraries.git] / minimenu / mmcat.h
1
2 #ifndef h_mmcat_h
3 #define h_mmcat_h
4
5 typedef struct _mm_appref_t {
6   pnd_disco_t *ref;
7   pnd_conf_handle ovrh;
8   // anything else?
9   struct _mm_appref_t *next;
10 } mm_appref_t;
11
12 typedef struct {
13   char *catname;          // name of the category
14   // current applications
15   mm_appref_t *refs;      // apps (from g_active_apps) that are in this category
16   unsigned int refcount;  // how many apps in this category
17   // if a directory browser category, additional info is needed
18   char *fspath;           // NULL if a pnd-category (not a filesystem category)
19   pnd_box_handle disco;   // faux-applications generated from filesystem (so that refs can point to here)
20 } mm_category_t;
21
22 #define MAX_CATS 200
23
24 #define CATEGORY_ALL "All"
25
26 // try to populate as many cats as necessary
27 unsigned char category_push ( char *catname, pnd_disco_t *app, pnd_conf_handle ovrh, char *fspath ); // catname is not pulled from app, so we can make them up on the fly (ie: "All");
28 mm_category_t *category_query ( char *catname );
29 void category_dump ( void ); // sort the apprefs
30 void category_freeall ( void );
31 int cat_sort_score ( mm_appref_t *s1, mm_appref_t *s2 ); // like strcmp, but used to sort apps by title
32 void category_sort ( void ); // for sorting categories
33
34 // category mapping hack
35 typedef struct {
36   mm_category_t *target;  // mapping a category _to_ this other category
37   char *from;             // from this category
38 } mm_catmap_t;
39
40 unsigned char category_map_setup ( void ); // set up the mappings
41 mm_category_t *category_map_query ( char *cat );
42 unsigned char category_meta_push ( char *catname, char *parentcatname, pnd_disco_t *app, pnd_conf_handle ovrh, unsigned char visiblep );
43
44 // filesystem browser
45 unsigned char category_fs_restock ( mm_category_t *cat );
46
47 #endif