]> Dogcows Code - chaz/tint2/blobdiff - src/launcher/launcher.h
Launcher support for .desktop files (working but experimental)
[chaz/tint2] / src / launcher / launcher.h
index de86835ed3f8a09d32d02b1ed7f51c9b1c309172..3023546e90fb3f23bb7d833e2ef3702f63cebe9d 100644 (file)
 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 *icon_theme_names;       // List of char*, each is a theme name (oxygen, Tango...)
+       GSList *icon_themes;            // List of IconTheme*
 } Launcher;
 
 typedef struct LauncherIcon {
-       Imlib_Image icon;
+       Imlib_Image icon_scaled;
+       Imlib_Image icon_original;
        char *cmd;
+       char *icon_name;
+       char *icon_path;
+       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;
 
@@ -41,4 +71,7 @@ void draw_launcher (void *obj, cairo_t *c);
 
 void launcher_action(LauncherIcon *icon);
 
+void test_launcher_read_desktop_file();
+void test_launcher_read_theme_file();
+
 #endif
This page took 0.029092 seconds and 4 git commands to generate.