]> Dogcows Code - chaz/tint2/blob - src/launcher/launcher.h
add comment
[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_apps; // List of char*, each is a path to a app.desktop file
17 GSList *list_icons; // List of LauncherIcon*
18 GSList *icon_theme_names; // List of char*, each is a theme name (oxygen, Tango...)
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
61 // default global data
62 void default_launcher();
63
64 // initialize launcher : y position, precision, ...
65 void init_launcher();
66 void init_launcher_panel(void *panel);
67 void cleanup_launcher();
68
69 int resize_launcher(void *obj);
70 void draw_launcher (void *obj, cairo_t *c);
71
72 void launcher_action(LauncherIcon *icon);
73
74 void test_launcher_read_desktop_file();
75 void test_launcher_read_theme_file();
76
77 #endif
This page took 0.037314 seconds and 4 git commands to generate.