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;
|
2010-08-14 20:52:17 +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;
|
2010-08-14 20:52:17 +00:00
|
|
|
Imlib_Image icon_scaled;
|
|
|
|
Imlib_Image icon_original;
|
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-03-20 21:54:07 +00:00
|
|
|
extern char *icon_theme_name_xsettings; // theme name
|
|
|
|
extern char *icon_theme_name_config;
|
2010-11-07 08:44:27 +00:00
|
|
|
extern XSettingsClient *xsettings_client;
|
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
|
|
|
|
2010-09-16 23:24:25 +00:00
|
|
|
int resize_launcher(void *obj);
|
2010-08-02 17:12:45 +00:00
|
|
|
void draw_launcher (void *obj, cairo_t *c);
|
|
|
|
|
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);
|
2012-07-02 16:50:30 +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
|