]> Dogcows Code - chaz/tint2/blob - src/launcher/launcher.h
3a6abcf87f7c496408b16ad151cab14ef66bae35
[chaz/tint2] / src / launcher / launcher.h
1 /**************************************************************************
2 * Copyright (C) 2010 (mrovi@interfete-web-club.com)
3 *
4 *
5 **************************************************************************/
6
7 #ifndef LAUNCHER_H
8 #define LAUNCHER_H
9
10 #include "common.h"
11 #include "area.h"
12 #include "xsettings-client.h"
13
14 typedef struct Launcher {
15 // always start with area
16 Area 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*
20 } Launcher;
21
22 typedef struct LauncherIcon {
23 // always start with area
24 Area area;
25 Imlib_Image icon_scaled;
26 Imlib_Image icon_original;
27 char *cmd;
28 char *icon_name;
29 char *icon_path;
30 char *icon_tooltip;
31 int icon_size;
32 int is_app_desktop;
33 int x, y;
34 } LauncherIcon;
35
36 typedef struct DesktopEntry {
37 char *name;
38 char *exec;
39 char *icon;
40 } DesktopEntry;
41
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 {
46 char *name;
47 int size;
48 int type;
49 int max_size;
50 int min_size;
51 int threshold;
52 char *context;
53 } IconThemeDir;
54
55 typedef struct IconTheme {
56 char *name;
57 GSList *list_inherits; // each item is a char* (theme name)
58 GSList *list_directories; // each item is an IconThemeDir*
59 } IconTheme;
60
61 extern int launcher_enabled;
62 extern int launcher_max_icon_size;
63 extern char *icon_theme_name; // theme name
64 extern XSettingsClient *xsettings_client;
65
66 // default global data
67 void default_launcher();
68
69 // initialize launcher : y position, precision, ...
70 void init_launcher();
71 void init_launcher_panel(void *panel);
72 void cleanup_launcher();
73 void cleanup_launcher_theme(Launcher *launcher);
74
75 int resize_launcher(void *obj);
76 void draw_launcher (void *obj, cairo_t *c);
77
78 // Populates the list_themes list
79 void launcher_load_themes(Launcher *launcher);
80 // Populates the list_icons list
81 void launcher_load_icons(Launcher *launcher);
82 void launcher_action(LauncherIcon *icon);
83
84 void test_launcher_read_desktop_file();
85 void test_launcher_read_theme_file();
86
87 #endif
This page took 0.034296 seconds and 3 git commands to generate.