]> Dogcows Code - chaz/tint2/blob - src/launcher/launcher.h
Added .desktop file parsing (but not for UTF8...) and skeleton for loading icons...
[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
13 typedef struct Launcher {
14 // always start with area
15 Area area;
16 GSList *list_icon_paths;
17 GSList *list_cmds;
18 GSList *list_icons;
19 } Launcher;
20
21 typedef struct LauncherIcon {
22 Imlib_Image icon;
23 char *cmd;
24 int x, y;
25 int width, height;
26 } LauncherIcon;
27
28 typedef struct DesktopEntry {
29 char *name;
30 char *exec;
31 char *icon;
32 } DesktopEntry;
33
34 #define ICON_DIR_TYPE_SCALABLE 0
35 #define ICON_DIR_TYPE_FIXED 1
36 #define ICON_DIR_TYPE_THRESHOLD 2
37 typedef struct IconThemeDir {
38 char *name;
39 int size;
40 int type;
41 int max_size;
42 int min_size;
43 int threshold;
44 } IconThemeDir;
45
46 typedef struct IconTheme {
47 char *name;
48 GSList *list_inherits; // each item is a char* (theme name)
49 GSList *list_directories; // each item is an IconThemeDir*
50 } IconTheme;
51
52 extern int launcher_enabled;
53 extern int launcher_max_icon_size;
54
55 extern GSList *icon_themes; // each item is an IconTheme*
56
57 // default global data
58 void default_launcher();
59
60 // initialize launcher : y position, precision, ...
61 void init_launcher();
62 void init_launcher_panel(void *panel);
63 void cleanup_launcher();
64
65 void resize_launcher(void *obj);
66 void draw_launcher (void *obj, cairo_t *c);
67
68 void launcher_action(LauncherIcon *icon);
69
70 void test_launcher_read_desktop_file();
71
72 #endif
This page took 0.037328 seconds and 5 git commands to generate.