]> Dogcows Code - chaz/tint2/blob - src/launcher/launcher.h
launcher : limit launcher_icon_theme to 1 theme. Add XSETTINGS client and read launch...
[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 *icon_themes; // List of IconTheme*
20 } Launcher;
21
22 typedef struct LauncherIcon {
23 Imlib_Image icon_scaled;
24 Imlib_Image icon_original;
25 char *cmd;
26 char *icon_name;
27 char *icon_path;
28 int icon_size;
29 int is_app_desktop;
30 int x, y;
31 } LauncherIcon;
32
33 typedef struct DesktopEntry {
34 char *name;
35 char *exec;
36 char *icon;
37 } DesktopEntry;
38
39 #define ICON_DIR_TYPE_SCALABLE 0
40 #define ICON_DIR_TYPE_FIXED 1
41 #define ICON_DIR_TYPE_THRESHOLD 2
42 typedef struct IconThemeDir {
43 char *name;
44 int size;
45 int type;
46 int max_size;
47 int min_size;
48 int threshold;
49 char *context;
50 } IconThemeDir;
51
52 typedef struct IconTheme {
53 char *name;
54 GSList *list_inherits; // each item is a char* (theme name)
55 GSList *list_directories; // each item is an IconThemeDir*
56 } IconTheme;
57
58 extern int launcher_enabled;
59 extern int launcher_max_icon_size;
60 extern char *icon_theme_name; // theme name
61 extern XSettingsClient *xsettings_client;
62
63 // default global data
64 void default_launcher();
65
66 // initialize launcher : y position, precision, ...
67 void init_launcher();
68 void init_launcher_panel(void *panel);
69 void cleanup_launcher();
70
71 int resize_launcher(void *obj);
72 void draw_launcher (void *obj, cairo_t *c);
73
74 void launcher_action(LauncherIcon *icon);
75
76 void test_launcher_read_desktop_file();
77 void test_launcher_read_theme_file();
78
79 #endif
This page took 0.033509 seconds and 4 git commands to generate.