Add missing AUTHORS and ChangeLog.
[gnt.git] / gntstyle.h
blobc6a1cd2946eece72de99f272bdd0bad45b571e35
1 /**
2 * @file gntstyle.h Style API
3 * @ingroup gnt
4 */
5 /*
6 * GNT - The GLib Ncurses Toolkit
8 * GNT is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This library is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
27 #include "gnt.h"
28 #include "gntwm.h"
30 typedef enum
32 GNT_STYLE_SHADOW = 0,
33 GNT_STYLE_COLOR = 1,
34 GNT_STYLE_MOUSE = 2,
35 GNT_STYLE_WM = 3,
36 GNT_STYLE_REMPOS = 4,
37 GNT_STYLES
38 } GntStyle;
40 /**
41 * Read configuration from a file.
43 * @param filename The filename to read configuration from.
45 void gnt_style_read_configure_file(const char *filename);
47 /**
48 * Get the user-setting for a style.
49 * @param style The style.
50 * @return The user-setting, or @c NULL.
52 const char *gnt_style_get(GntStyle style);
54 /**
55 * Get the value of a preference in ~/.gntrc.
57 * @param group The name of the group in the keyfile. If @c NULL, the prgname
58 * will be used first, if available. Otherwise, "general" will be used.
59 * @param key The key
61 * @return The value of the setting as a string, or @c NULL
63 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
65 char *gnt_style_get_from_name(const char *group, const char *key);
67 /**
68 * Parse a boolean preference. For example, if 'value' is "false" (ignoring case)
69 * or "0", the return value will be @c FALSE, otherwise @c TRUE.
71 * @param value The value of the boolean setting as a string
72 * @return The boolean value
74 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
76 gboolean gnt_style_parse_bool(const char *value);
78 /**
79 * Get the boolean value for a user-setting.
81 * @param style The style.
82 * @param def The default value (i.e, the value if the user didn't define
83 * any value)
85 * @return The value of the setting.
87 gboolean gnt_style_get_bool(GntStyle style, gboolean def);
89 /**
90 * @internal
92 void gnt_styles_get_keyremaps(GType type, GHashTable *hash);
94 /**
95 * @internal
97 void gnt_style_read_actions(GType type, GntBindableClass *klass);
99 /**
100 * Read menu-accels from ~/.gntrc
102 * @param name The name of the window.
103 * @param table The hastable to store the accel information.
105 * @return @c TRUE if some accels were read, @c FALSE otherwise.
107 gboolean gnt_style_read_menu_accels(const char *name, GHashTable *table);
110 * @internal
111 * Read workspace information.
113 void gnt_style_read_workspaces(GntWM *wm);
116 * Initialize style settings.
118 void gnt_init_styles(void);
121 * Uninitialize style settings.
123 void gnt_uninit_styles(void);