1 /**************************************************************************
2 * Copyright (C) 2010 (mrovi@interfete-web-club.com)
5 **************************************************************************/
12 #include "xsettings-client.h"
14 typedef struct Launcher
{
15 // always start with area
17 GSList
*list_apps
; // List of char*, each is a path to a app.desktop file
18 GSList
*list_icons
; // List of LauncherIcon*
19 GSList
*list_themes
; // List of IconTheme*
22 typedef struct LauncherIcon
{
23 // always start with area
25 Imlib_Image icon_scaled
;
26 Imlib_Image icon_original
;
36 typedef struct DesktopEntry
{
42 #define ICON_DIR_TYPE_SCALABLE 0
43 #define ICON_DIR_TYPE_FIXED 1
44 #define ICON_DIR_TYPE_THRESHOLD 2
45 typedef struct IconThemeDir
{
55 typedef struct IconTheme
{
57 GSList
*list_inherits
; // each item is a char* (theme name)
58 GSList
*list_directories
; // each item is an IconThemeDir*
61 extern int launcher_enabled
;
62 extern int launcher_max_icon_size
;
63 extern int launcher_tooltip_enabled
;
64 extern int launcher_alpha
;
65 extern int launcher_saturation
;
66 extern int launcher_brightness
;
67 extern char *icon_theme_name
; // theme name
68 extern XSettingsClient
*xsettings_client
;
70 // default global data
71 void default_launcher();
73 // initialize launcher : y position, precision, ...
75 void init_launcher_panel(void *panel
);
76 void cleanup_launcher();
77 void cleanup_launcher_theme(Launcher
*launcher
);
79 int resize_launcher(void *obj
);
80 void draw_launcher (void *obj
, cairo_t
*c
);
82 // Populates the list_themes list
83 void launcher_load_themes(Launcher
*launcher
);
84 // Populates the list_icons list
85 void launcher_load_icons(Launcher
*launcher
);
86 void launcher_action(LauncherIcon
*icon
, XEvent
* e
);
88 void test_launcher_read_desktop_file();
89 void test_launcher_read_theme_file();