X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Flauncher%2Flauncher.h;h=79c6fd88c65ebd6e57a878e83debd2dda1fbd653;hb=18daca5ab3402c2c3f8ae44df5cec89928d35afe;hp=de86835ed3f8a09d32d02b1ed7f51c9b1c309172;hpb=b977a896a4581d583fce7a55ab2279fcdcd6843c;p=chaz%2Ftint2 diff --git a/src/launcher/launcher.h b/src/launcher/launcher.h index de86835..79c6fd8 100644 --- a/src/launcher/launcher.h +++ b/src/launcher/launcher.h @@ -9,24 +9,62 @@ #include "common.h" #include "area.h" +#include "xsettings-client.h" typedef struct Launcher { // always start with area Area area; - GSList *list_icon_paths; - GSList *list_cmds; - GSList *list_icons; + GSList *list_apps; // List of char*, each is a path to a app.desktop file + GSList *list_icons; // List of LauncherIcon* + GSList *list_themes; // List of IconTheme* } Launcher; typedef struct LauncherIcon { - Imlib_Image icon; + // always start with area + Area area; + Imlib_Image icon_scaled; + Imlib_Image icon_original; char *cmd; + char *icon_name; + char *icon_path; + char *icon_tooltip; + int icon_size; + int is_app_desktop; int x, y; - int width, height; } LauncherIcon; +typedef struct DesktopEntry { + char *name; + char *exec; + char *icon; +} DesktopEntry; + +#define ICON_DIR_TYPE_SCALABLE 0 +#define ICON_DIR_TYPE_FIXED 1 +#define ICON_DIR_TYPE_THRESHOLD 2 +typedef struct IconThemeDir { + char *name; + int size; + int type; + int max_size; + int min_size; + int threshold; + char *context; +} IconThemeDir; + +typedef struct IconTheme { + char *name; + GSList *list_inherits; // each item is a char* (theme name) + GSList *list_directories; // each item is an IconThemeDir* +} IconTheme; + extern int launcher_enabled; extern int launcher_max_icon_size; +extern int launcher_alpha; +extern int launcher_saturation; +extern int launcher_brightness; +extern char *icon_theme_name; // theme name +extern XSettingsClient *xsettings_client; // default global data void default_launcher(); @@ -35,10 +73,18 @@ void default_launcher(); void init_launcher(); void init_launcher_panel(void *panel); void cleanup_launcher(); +void cleanup_launcher_theme(Launcher *launcher); -void resize_launcher(void *obj); +int resize_launcher(void *obj); void draw_launcher (void *obj, cairo_t *c); +// Populates the list_themes list +void launcher_load_themes(Launcher *launcher); +// Populates the list_icons list +void launcher_load_icons(Launcher *launcher); void launcher_action(LauncherIcon *icon); +void test_launcher_read_desktop_file(); +void test_launcher_read_theme_file(); + #endif