annotate finch/libgnt/gntstyle.h @ 21161:e119edfc0fb0

applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b through 365b126365cc18309aea7f8eef0e9b2a19e6bda8 And others.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 07 Nov 2007 14:07:52 +0000
parents bddf964880cf
children 6de09629f091
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
1 /**
18303
5c6f019e48f8 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18069
diff changeset
2 * @file gntstyle.h Style API
5c6f019e48f8 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18069
diff changeset
3 * @ingroup gnt
5c6f019e48f8 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18069
diff changeset
4 */
5c6f019e48f8 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18069
diff changeset
5 /*
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
6 * GNT - The GLib Ncurses Toolkit
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
7 *
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
8 * GNT is the legal property of its developers, whose names are too numerous
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
10 * source distribution.
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
11 *
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
12 * This library is free software; you can redistribute it and/or modify
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
13 * it under the terms of the GNU General Public License as published by
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
15 * (at your option) any later version.
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
16 *
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
17 * This program is distributed in the hope that it will be useful,
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
20 * GNU General Public License for more details.
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
21 *
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
22 * You should have received a copy of the GNU General Public License
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
23 * along with this program; if not, write to the Free Software
19680
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18506
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
25 */
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
26
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 #include "gnt.h"
16414
56d2ae9cbb5c Initial workspace support. refs #51
Richard Nelson <wabz@pidgin.im>
parents: 15818
diff changeset
28 #include "gntwm.h"
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 typedef enum
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 GNT_STYLE_SHADOW = 0,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 GNT_STYLE_COLOR = 1,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 GNT_STYLE_MOUSE = 2,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 GNT_STYLE_WM = 3,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36 GNT_STYLE_REMPOS = 4,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 GNT_STYLES
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 } GntStyle;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
40 /**
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
41 * Read configuration from a file.
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
42 *
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
43 * @param filename The filename to read configuration from.
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
44 */
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 void gnt_style_read_configure_file(const char *filename);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
47 /**
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
48 * Get the user-setting for a style.
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
49 * @param style The style.
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
50 * @return The user-setting, or @c NULL.
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
51 */
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 const char *gnt_style_get(GntStyle style);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53
18506
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
54 /**
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
55 * Get the value of a preference in ~/.gntrc.
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
56 *
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
57 * @param group The name of the group in the keyfile. If @c NULL, the prgname
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
58 * will be used first, if available. Otherwise, "general" will be used.
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
59 * @param key The key
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
60 *
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
61 * @return The value of the setting as a string, or @c NULL
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
62 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
63 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18506
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
64 */
18317
8aff2d3d6820 Plug a memory leak.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18312
diff changeset
65 char *gnt_style_get_from_name(const char *group, const char *key);
18045
08e93462f189 Update the irssi WM to allow tiling the conversation windows.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
66
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
67 /**
18506
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
68 * Parse a boolean preference. For example, if 'value' is "false" (ignoring case)
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
69 * or "0", the return value will be @c FALSE, otherwise @c TRUE.
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
70 *
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
71 * @param value The value of the boolean setting as a string
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
72 * @return The boolean value
20874
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
73 *
acf284962b40 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19680
diff changeset
74 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
18506
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
75 */
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
76 gboolean gnt_style_parse_bool(const char *value);
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
77
9f029b7208f1 Allow one-line high buttons. Specify 'small-button = true' under 'general',
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18317
diff changeset
78 /**
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
79 * Get the boolean value for a user-setting.
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
80 *
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
81 * @param style The style.
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
82 * @param def The default value (i.e, the value if the user didn't define
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
83 * any value)
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
84 *
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
85 * @return The value of the setting.
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
86 */
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 gboolean gnt_style_get_bool(GntStyle style, gboolean def);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
89 /**
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
90 * @internal
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
91 */
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 void gnt_styles_get_keyremaps(GType type, GHashTable *hash);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
94 /**
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
95 * @internal
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
96 */
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97 void gnt_style_read_actions(GType type, GntBindableClass *klass);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
99 /**
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
100 * @internal
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
101 * Read workspace information.
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
102 */
16414
56d2ae9cbb5c Initial workspace support. refs #51
Richard Nelson <wabz@pidgin.im>
parents: 15818
diff changeset
103 void gnt_style_read_workspaces(GntWM *wm);
56d2ae9cbb5c Initial workspace support. refs #51
Richard Nelson <wabz@pidgin.im>
parents: 15818
diff changeset
104
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
105 /**
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
106 * Initialize style settings.
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
107 */
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 void gnt_init_styles(void);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
110 /**
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
111 * Uninitialize style settings.
18049
1cedd520cd18 Doxygen skeleton and license info for gnt files.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18045
diff changeset
112 */
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113 void gnt_uninit_styles(void);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114
21161
e119edfc0fb0 applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 21158
diff changeset
115