finch/libgnt/gntstyle.h

Fri, 09 Nov 2007 16:56:52 +0000

author
John Bailey <rekkanoryo@rekkanoryo.org>
date
Fri, 09 Nov 2007 16:56:52 +0000
branch
release-2.2.3
changeset 20293
81d324f460bd
parent 19859
71d37b57eff2
permissions
-rw-r--r--

applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
through ff5b50d410a4c5d305fbbaacab5465581332c254

applied changes from c92bfd23eea356d86913789cfa3f66ad6f156bce
through 645aa07330425e8ec239e478449e818df8061bdf

applied changes from 023bbf40f2ace632a36775360d2101e19370b4e5
through eb14385d2f3d84e0bdd1b158200baa76f86da3a2

applied changes from 18bfb4a38162cf6920d87b437ceb20124a26e028
through 2a7b93b8c57bc86dafb9f1d9af64676de420ef0a

applied changes from 2a7b93b8c57bc86dafb9f1d9af64676de420ef0a
through b2523913e5ed5b4237eedbf8ed4999736dc78137

18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
1 /**
18358
2122fd567315 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18132
diff changeset
2 * @file gntstyle.h Style API
2122fd567315 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18132
diff changeset
3 * @ingroup gnt
2122fd567315 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18132
diff changeset
4 */
2122fd567315 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18132
diff changeset
5 /*
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
6 * GNT - The GLib Ncurses Toolkit
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
7 *
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
8 * GNT is the legal property of its developers, whose names are too numerous
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
10 * source distribution.
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
11 *
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
12 * This library is free software; you can redistribute it and/or modify
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
13 * it under the terms of the GNU General Public License as published by
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
15 * (at your option) any later version.
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
16 *
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
17 * This program is distributed in the hope that it will be useful,
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
20 * GNU General Public License for more details.
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
21 *
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
22 * You should have received a copy of the GNU General Public License
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
23 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18758
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
25 */
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
26
14066
3a97522e09ee [gaim-migrate @ 16589]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
27 #include "gnt.h"
16519
9458657f5b99 Initial workspace support. refs #51
Richard Nelson <wabz@pidgin.im>
parents: 15886
diff changeset
28 #include "gntwm.h"
14066
3a97522e09ee [gaim-migrate @ 16589]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
29
14072
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
30 typedef enum
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
31 {
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
32 GNT_STYLE_SHADOW = 0,
14361
4d6014205744 [gaim-migrate @ 16989]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14301
diff changeset
33 GNT_STYLE_COLOR = 1,
14372
61f53bc11687 [gaim-migrate @ 17000]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14361
diff changeset
34 GNT_STYLE_MOUSE = 2,
14397
e53755c4dcab [gaim-migrate @ 17031]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14372
diff changeset
35 GNT_STYLE_WM = 3,
15129
4722d1cf7938 [gaim-migrate @ 17851]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14962
diff changeset
36 GNT_STYLE_REMPOS = 4,
14072
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
37 GNT_STYLES
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
38 } GntStyle;
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
39
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
40 /**
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
41 * Read configuration from a file.
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
42 *
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
43 * @param filename The filename to read configuration from.
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
44 */
14066
3a97522e09ee [gaim-migrate @ 16589]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
45 void gnt_style_read_configure_file(const char *filename);
3a97522e09ee [gaim-migrate @ 16589]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
46
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
47 /**
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
48 * Get the user-setting for a style.
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
49 * @param style The style.
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
50 * @return The user-setting, or @c NULL.
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
51 */
14072
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
52 const char *gnt_style_get(GntStyle style);
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
53
18758
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
54 /**
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
55 * Get the value of a preference in ~/.gntrc.
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
56 *
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
57 * @param group The name of the group in the keyfile. If @c NULL, the prgname
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
58 * will be used first, if available. Otherwise, "general" will be used.
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
59 * @param key The key
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
60 *
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
61 * @return The value of the setting as a string, or @c NULL
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
62 */
18370
1f3c329fe2b2 Plug a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18361
diff changeset
63 char *gnt_style_get_from_name(const char *group, const char *key);
18107
080301575c86 Update the irssi WM to allow tiling the conversation windows.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15886
diff changeset
64
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
65 /**
18758
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
66 * Parse a boolean preference. For example, if 'value' is "false" (ignoring case)
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
67 * or "0", the return value will be @c FALSE, otherwise @c TRUE.
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
68 *
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
69 * @param value The value of the boolean setting as a string
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
70 * @return The boolean value
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
71 */
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
72 gboolean gnt_style_parse_bool(const char *value);
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
73
57ca4b456815 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18370
diff changeset
74 /**
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
75 * Get the boolean value for a user-setting.
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
76 *
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
77 * @param style The style.
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
78 * @param def The default value (i.e, the value if the user didn't define
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
79 * any value)
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
80 *
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
81 * @return The value of the setting.
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
82 */
14072
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
83 gboolean gnt_style_get_bool(GntStyle style, gboolean def);
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
84
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
85 /**
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
86 * @internal
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
87 */
14301
b47bf28806d1 [gaim-migrate @ 16921]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14072
diff changeset
88 void gnt_styles_get_keyremaps(GType type, GHashTable *hash);
b47bf28806d1 [gaim-migrate @ 16921]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14072
diff changeset
89
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
90 /**
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
91 * @internal
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
92 */
14962
abfaa2e03ac7 [gaim-migrate @ 17672]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14897
diff changeset
93 void gnt_style_read_actions(GType type, GntBindableClass *klass);
14897
0daa699dac9c [gaim-migrate @ 17604]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14397
diff changeset
94
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
95 /**
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
96 * @internal
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
97 * Read workspace information.
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
98 */
16519
9458657f5b99 Initial workspace support. refs #51
Richard Nelson <wabz@pidgin.im>
parents: 15886
diff changeset
99 void gnt_style_read_workspaces(GntWM *wm);
9458657f5b99 Initial workspace support. refs #51
Richard Nelson <wabz@pidgin.im>
parents: 15886
diff changeset
100
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
101 /**
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
102 * Initialize style settings.
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
103 */
15874
46df7421a1b5 Enable DEBUG_CFLAGS in libgnt and fix up a number of compile warnings and
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 15129
diff changeset
104 void gnt_init_styles(void);
14072
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
105
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
106 /**
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
107 * Uninitialize style settings.
18114
adb3cfadc125 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18107
diff changeset
108 */
15874
46df7421a1b5 Enable DEBUG_CFLAGS in libgnt and fix up a number of compile warnings and
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 15129
diff changeset
109 void gnt_uninit_styles(void);
14072
4e64a4f18686 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14066
diff changeset
110
20293
81d324f460bd applied changes from 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
111

mercurial