Adding upstream version 0.5.1.
[debian/lxappearance.git] / src / lxappearance.h
1 /*
2 * lxappearance.h
3 *
4 * Copyright 2010 PCMan <pcman.tw@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 */
21
22 #ifndef _LXAPPEARANCE_H_
23 #define _LXAPPEARANCE_H_
24
25 #include <gtk/gtk.h>
26
27 #define LXAPPEARANCE_ABI_VERSION 1
28
29 typedef struct _LXAppearance LXAppearance;
30 struct _LXAppearance
31 {
32 guint32 abi_version;
33 GtkWidget* dlg;
34 GtkWidget* notebook;
35
36 /* gtk theme */
37 GtkWidget* widget_theme_view;
38 GtkListStore* widget_theme_store;
39 GtkWidget* default_font_btn;
40
41 /* color scheme */
42 GtkWidget* color_table;
43 GtkWidget* custom_colors;
44 GtkWidget* no_custom_colors;
45 GHashTable* color_scheme_hash; /* the custom color scheme set by the user */
46 GHashTable* default_color_scheme_hash; /* default colors of current gtk theme */
47 gboolean color_scheme_supported; /* if color scheme is supported by current gtk theme */
48 /* color buttons in color scheme page. */
49 GtkWidget* color_btns[8]; /* FIXME: this value might be changed in the future */
50
51 /* icon theme */
52 GtkWidget* icon_theme_view;
53 GtkListStore* icon_theme_store;
54 GtkWidget* icon_theme_remove_btn;
55
56 /* cursor theme */
57 GtkWidget* cursor_theme_view;
58 GtkWidget* cursor_demo_view;
59 GtkListStore* cursor_theme_store;
60 GtkWidget* cursor_size_range;
61 GtkWidget* cursor_theme_remove_btn;
62
63 GSList* icon_themes; /* a list of IconTheme struct representing all icon and cursor themes */
64
65 /* toolbar style and icon size */
66 GtkWidget* tb_style_combo;
67 GtkWidget* tb_icon_size_combo;
68
69 GtkWidget* button_images_check;
70 GtkWidget* menu_images_check;
71
72 /* font rendering */
73 GtkWidget* font_rgba_combo;
74 GtkWidget* hinting_style_combo;
75
76 GtkWidget* enable_antialising_check;
77 GtkWidget* enable_hinting_check;
78
79 /* the page for window manager plugins */
80 GtkWidget* wm_page;
81
82 char* widget_theme;
83 char* default_font;
84 char* icon_theme;
85 char* cursor_theme;
86 int cursor_theme_size;
87 char* color_scheme;
88 int toolbar_style;
89 int toolbar_icon_size;
90 char* hinting_style;
91 char* font_rgba;
92
93 gboolean button_images;
94 gboolean menu_images;
95
96 #if GTK_CHECK_VERSION(2, 14, 0)
97 GtkWidget* event_sound_check;
98 GtkWidget* input_feedback_check;
99 gboolean enable_event_sound;
100 gboolean enable_input_feedback;
101 #endif
102
103 gboolean enable_antialising;
104 gboolean enable_hinting;
105
106 gboolean changed;
107 gboolean use_lxsession;
108 };
109
110 extern LXAppearance app;
111
112 void lxappearance_changed();
113
114 void on_check_button_toggled(GtkToggleButton* btn, gpointer user_data);
115
116 #endif