2010-08-02 17:12:45 +00:00
|
|
|
/**************************************************************************
|
|
|
|
* Copyright (C) 2010 (mrovi@interfete-web-club.com)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
#ifndef LAUNCHER_H
|
|
|
|
#define LAUNCHER_H
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "area.h"
|
2010-11-07 08:44:27 +00:00
|
|
|
#include "xsettings-client.h"
|
2015-01-28 14:47:39 +00:00
|
|
|
#include "icon-theme-common.h"
|
2010-08-02 17:12:45 +00:00
|
|
|
|
|
|
|
typedef struct Launcher {
|
|
|
|
// always start with area
|
|
|
|
Area area;
|
2015-11-20 22:28:37 +00:00
|
|
|
GSList *list_apps; // List of char*, each is a path to a app.desktop file
|
|
|
|
GSList *list_icons; // List of LauncherIcon*
|
2015-01-28 14:47:39 +00:00
|
|
|
IconThemeWrapper *list_themes;
|
2010-08-02 17:12:45 +00:00
|
|
|
} Launcher;
|
|
|
|
|
|
|
|
typedef struct LauncherIcon {
|
2011-05-28 22:43:03 +00:00
|
|
|
// always start with area
|
|
|
|
Area area;
|
2015-05-10 10:43:58 +00:00
|
|
|
Imlib_Image image;
|
2015-11-04 12:02:12 +00:00
|
|
|
Imlib_Image image_hover;
|
|
|
|
Imlib_Image image_pressed;
|
2010-08-02 17:12:45 +00:00
|
|
|
char *cmd;
|
2010-08-14 20:52:17 +00:00
|
|
|
char *icon_name;
|
|
|
|
char *icon_path;
|
2011-05-28 22:43:03 +00:00
|
|
|
char *icon_tooltip;
|
2010-08-14 20:52:17 +00:00
|
|
|
int icon_size;
|
|
|
|
int is_app_desktop;
|
2010-08-02 17:12:45 +00:00
|
|
|
int x, y;
|
|
|
|
} LauncherIcon;
|
|
|
|
|
|
|
|
extern int launcher_enabled;
|
|
|
|
extern int launcher_max_icon_size;
|
2011-10-12 00:10:46 +00:00
|
|
|
extern int launcher_tooltip_enabled;
|
2011-10-11 23:50:18 +00:00
|
|
|
extern int launcher_alpha;
|
|
|
|
extern int launcher_saturation;
|
|
|
|
extern int launcher_brightness;
|
2015-11-20 22:28:37 +00:00
|
|
|
extern char *icon_theme_name_xsettings; // theme name
|
2015-03-20 21:54:07 +00:00
|
|
|
extern char *icon_theme_name_config;
|
2015-05-03 08:05:31 +00:00
|
|
|
extern int launcher_icon_theme_override;
|
2015-03-21 13:39:43 +00:00
|
|
|
extern int startup_notifications;
|
2015-11-04 01:05:41 +00:00
|
|
|
extern Background *launcher_icon_bg;
|
2010-08-02 17:12:45 +00:00
|
|
|
|
|
|
|
// default global data
|
|
|
|
void default_launcher();
|
|
|
|
|
|
|
|
// initialize launcher : y position, precision, ...
|
|
|
|
void init_launcher();
|
|
|
|
void init_launcher_panel(void *panel);
|
|
|
|
void cleanup_launcher();
|
2010-11-07 12:59:51 +00:00
|
|
|
void cleanup_launcher_theme(Launcher *launcher);
|
2010-08-02 17:12:45 +00:00
|
|
|
|
2015-11-20 22:28:37 +00:00
|
|
|
gboolean resize_launcher(void *obj);
|
|
|
|
void draw_launcher(void *obj, cairo_t *c);
|
2015-12-12 14:13:32 +00:00
|
|
|
void launcher_default_icon_theme_changed();
|
2010-08-02 17:12:45 +00:00
|
|
|
|
2010-11-07 12:59:51 +00:00
|
|
|
// Populates the list_icons list
|
|
|
|
void launcher_load_icons(Launcher *launcher);
|
2015-01-28 14:47:39 +00:00
|
|
|
// Populates the list_themes list
|
|
|
|
void launcher_load_themes(Launcher *launcher);
|
2015-11-20 22:28:37 +00:00
|
|
|
void launcher_action(LauncherIcon *icon, XEvent *e);
|
2010-08-02 17:12:45 +00:00
|
|
|
|
2010-08-08 22:38:43 +00:00
|
|
|
void test_launcher_read_desktop_file();
|
2010-08-14 20:52:17 +00:00
|
|
|
void test_launcher_read_theme_file();
|
2010-08-08 22:38:43 +00:00
|
|
|
|
2010-08-02 17:12:45 +00:00
|
|
|
#endif
|