all repos — tint2 @ 4d2def5633a0b3c6c0d20094bd6663e1707ace89

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

src/launcher/launcher.h (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**************************************************************************
 * Copyright (C) 2010       (mrovi@interfete-web-club.com)
 *
 *
 **************************************************************************/

#ifndef LAUNCHER_H
#define LAUNCHER_H

#include "common.h"
#include "area.h"

typedef struct Launcher {
	// always start with area
	Area area;
	GSList *list_apps;			// List of char*, each is a path to a app.desktop file
	GSList *list_icons; 		// List of LauncherIcon*
	GSList *icon_theme_names; 	// List of char*, each is a theme name (oxygen, Tango...)
	GSList *icon_themes;		// List of IconTheme*
} Launcher;

typedef struct LauncherIcon {
	Imlib_Image icon_scaled;
	Imlib_Image icon_original;
	char *cmd;
	char *icon_name;
	char *icon_path;
	int icon_size;
	int is_app_desktop;
	int x, y;
} LauncherIcon;

typedef struct DesktopEntry {
	char *name;
	char *exec;
	char *icon;
} DesktopEntry;

#define ICON_DIR_TYPE_SCALABLE 0
#define ICON_DIR_TYPE_FIXED 1
#define ICON_DIR_TYPE_THRESHOLD 2
typedef struct IconThemeDir {
	char *name;
	int size;
	int type;
	int max_size;
	int min_size;
	int threshold;
	char *context;
} IconThemeDir;

typedef struct IconTheme {
	char *name;
	GSList *list_inherits; // each item is a char* (theme name)
	GSList *list_directories; // each item is an IconThemeDir*
} IconTheme;

extern int launcher_enabled;
extern int launcher_max_icon_size;

// default global data
void default_launcher();

// initialize launcher : y position, precision, ...
void init_launcher();
void init_launcher_panel(void *panel);
void cleanup_launcher();

int  resize_launcher(void *obj);
void draw_launcher (void *obj, cairo_t *c);

void launcher_action(LauncherIcon *icon);

void test_launcher_read_desktop_file();
void test_launcher_read_theme_file();

#endif