X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=minimenu%2Fmmcat.h;h=1f84e7042da669b7fbe3e1faf0ffbd20203e103b;hb=62547c89828b74197844b2e298e44f468622c516;hp=bf78b86220f9300fa49dc38d919900b283b38d0b;hpb=cf9777558823f91ee16255ec38354512a655f54e;p=pandora-libraries.git diff --git a/minimenu/mmcat.h b/minimenu/mmcat.h index bf78b86..1f84e70 100644 --- a/minimenu/mmcat.h +++ b/minimenu/mmcat.h @@ -4,25 +4,32 @@ typedef struct _mm_appref_t { pnd_disco_t *ref; + pnd_conf_handle ovrh; // anything else? struct _mm_appref_t *next; } mm_appref_t; typedef struct { char *catname; // name of the category + // current applications mm_appref_t *refs; // apps (from g_active_apps) that are in this category unsigned int refcount; // how many apps in this category + // if a directory browser category, additional info is needed + char *fspath; // NULL if a pnd-category (not a filesystem category) + pnd_box_handle disco; // faux-applications generated from filesystem } mm_category_t; -#define MAX_CATS 100 +#define MAX_CATS 200 #define CATEGORY_ALL "All" // try to populate as many cats as necessary -unsigned char category_push ( char *catname, pnd_disco_t *app ); // catname is not pulled from app, so we can make them up on the fly (ie: "All") +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"); mm_category_t *category_query ( char *catname ); void category_dump ( void ); // sort the apprefs void category_freeall ( void ); +int cat_sort_score ( mm_appref_t *s1, mm_appref_t *s2 ); // like strcmp, but used to sort apps by title +void category_sort ( void ); // for sorting categories // category mapping hack typedef struct { @@ -32,6 +39,9 @@ typedef struct { unsigned char category_map_setup ( void ); // set up the mappings mm_category_t *category_map_query ( char *cat ); -unsigned char category_meta_push ( char *catname, pnd_disco_t *app ); +unsigned char category_meta_push ( char *catname, char *parentcatname, pnd_disco_t *app, pnd_conf_handle ovrh, unsigned char visiblep ); + +// filesystem browser +unsigned char category_fs_restock ( mm_category_t *cat ); #endif