Thu, 28 Jun 2007 03:09:03 +0000
explicit merge of '9acdb22d59a3c2871e5cd38a912ea439d5a25009'
and '8186bc6ffbb4ea0c5883b25cca3dc6bcf3ad869c'
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
1 | /** |
|
18358
2122fd567315
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17586
diff
changeset
|
2 | * @file gntutils.h Some utility functions |
|
2122fd567315
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17586
diff
changeset
|
3 | * @ingroup gnt |
|
2122fd567315
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17586
diff
changeset
|
4 | */ |
|
2122fd567315
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
17586
diff
changeset
|
5 | /* |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
6 | * GNT - The GLib Ncurses Toolkit |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
7 | * |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
8 | * GNT is the legal property of its developers, whose names are too numerous |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
10 | * source distribution. |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
11 | * |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
12 | * This library is free software; you can redistribute it and/or modify |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
13 | * it under the terms of the GNU General Public License as published by |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
14 | * the Free Software Foundation; either version 2 of the License, or |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
15 | * (at your option) any later version. |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
16 | * |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
17 | * This program is distributed in the hope that it will be useful, |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
20 | * GNU General Public License for more details. |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
21 | * |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
22 | * You should have received a copy of the GNU General Public License |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
23 | * along with this program; if not, write to the Free Software |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
25 | */ |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
26 | |
|
14121
3d8804b82150
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
27 | #include <glib.h> |
|
3d8804b82150
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
28 | |
|
3d8804b82150
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
29 | #include "gnt.h" |
|
3d8804b82150
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
30 | #include "gntwidget.h" |
|
3d8804b82150
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
31 | |
|
15365
5a83efd6955d
[gaim-migrate @ 18094]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15220
diff
changeset
|
32 | typedef gpointer (*GDupFunc)(gconstpointer data); |
|
5a83efd6955d
[gaim-migrate @ 18094]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15220
diff
changeset
|
33 | |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
34 | /** |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
35 | * Compute the width and height required to view the text on the screen. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
36 | * |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
37 | * @param text The text to be displayed. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
38 | * @param width The width required is set here, if not @c NULL. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
39 | * @param height The height required is set here, if not @c NULL. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
40 | */ |
|
14121
3d8804b82150
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
41 | void gnt_util_get_text_bound(const char *text, int *width, int *height); |
|
14373
609c902d20f5
[gaim-migrate @ 17001]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
42 | |
|
14459
d2e639b92d79
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14373
diff
changeset
|
43 | /* excluding *end */ |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
44 | /** |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
45 | * Get the onscreen width of a string, or a substring. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
46 | * |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
47 | * @param start The beginning of the string. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
48 | * @param end The end of the string. The width returned is the width |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
49 | * upto (but not including) end. If end is NULL, then start |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
50 | * is considered as a @c NULL-terminated string. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
51 | * |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
52 | * @return The on-screen width of the string. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
53 | */ |
|
14373
609c902d20f5
[gaim-migrate @ 17001]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
54 | int gnt_util_onscreen_width(const char *start, const char *end); |
|
609c902d20f5
[gaim-migrate @ 17001]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14121
diff
changeset
|
55 | |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
56 | /** |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
57 | * Computes and returns the string after a specific number of onscreen characters. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
58 | * |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
59 | * @param str The string. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
60 | * @param len The length to consider. If non-positive, the entire screenlength is used. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
61 | * @param w The actual width of the string upto the returned offset, if not @c NULL. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
62 | * |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
63 | * @return The string after len offset. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
64 | */ |
|
14482
d974bd81de08
[gaim-migrate @ 17128]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14459
diff
changeset
|
65 | const char *gnt_util_onscreen_width_to_pointer(const char *str, int len, int *w); |
|
14485
4fc80c5c8c84
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14482
diff
changeset
|
66 | |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
67 | /** |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
68 | * Inserts newlines in 'string' where necessary so that its onscreen width is |
|
14485
4fc80c5c8c84
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14482
diff
changeset
|
69 | * no more than 'maxw'. |
|
4fc80c5c8c84
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14482
diff
changeset
|
70 | * |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
71 | * @param string The string. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
72 | * @param maxw The width that the string should fit into. If maxw is <= 0, |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
73 | * then the available maximum width is used. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
74 | * |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
75 | * @return A newly allocated string that needs to be freed by the caller. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
76 | */ |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
77 | char * gnt_util_onscreen_fit_string(const char *string, int maxw); |
|
14855
84c869823944
[gaim-migrate @ 17558]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14485
diff
changeset
|
78 | |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
79 | /** |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
80 | * Duplicate the contents of a hastable. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
81 | * |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
82 | * @param src The source hashtable. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
83 | * @param hash The hash-function to use. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
84 | * @param equal The hash-equal function to use. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
85 | * @param key_d The key-destroy function to use. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
86 | * @param value_d The value-destroy function to use. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
87 | * @param key_dup The function to use to duplicate the key. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
88 | * @param value_dup The function to use to duplicate the value. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
89 | * |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
90 | * @return The new hashtable. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
91 | */ |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
92 | GHashTable * g_hash_table_duplicate(GHashTable *src, GHashFunc hash, GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d, GDupFunc key_dup, GDupFunc value_dup); |
|
15220
fc8b223f4b75
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
93 | |
|
fc8b223f4b75
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
94 | /** |
|
fc8b223f4b75
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
95 | * To be used with g_signal_new. Look in the key_pressed signal-definition in |
|
fc8b223f4b75
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
96 | * gntwidget.c for usage. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
97 | * |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
98 | * @param ihint NA |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
99 | * @param return_accu NA |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
100 | * @param handler_return NA |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
101 | * @param dummy NA |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
102 | * |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
103 | * @return NA |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
104 | */ |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
105 | gboolean gnt_boolean_handled_accumulator(GSignalInvocationHint *ihint, GValue *return_accu, const GValue *handler_return, gpointer dummy); |
|
15220
fc8b223f4b75
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14855
diff
changeset
|
106 | |
|
16047
03880dc14852
Add a way to get a list of bindings for a widget. This can be used by, eg, a window-manager to show helpful messages to the user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
107 | /** |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
108 | * Get a helpful display about the bindings of a widget. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
109 | * |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
110 | * @param widget The widget to get bindings for. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
111 | * |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
112 | * @return Returns a GntTree populated with "key" -> "binding" for the widget. |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
113 | */ |
|
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
114 | GntWidget * gnt_widget_bindings_view(GntWidget *widget); |
|
16047
03880dc14852
Add a way to get a list of bindings for a widget. This can be used by, eg, a window-manager to show helpful messages to the user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15886
diff
changeset
|
115 | |
|
16187
2977f4a9cc80
Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16047
diff
changeset
|
116 | /** |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
117 | * Parse widgets from an XML description. For example, |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
118 | * |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
119 | * @code |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
120 | * GntWidget *win, *button; |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
121 | * gnt_util_parse_widgets("\ |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
122 | * <vwindow id='0' fill='0' align='2'> \ |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
123 | * <label>This is a test</label> \ |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
124 | * <button id='1'>OK</button> \ |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
125 | * </vwindow>", |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
126 | * 2, &win, &button); |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
127 | * @endcode |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
128 | * |
|
18359
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
129 | * @param string The XML string. |
|
1e637ecf18a0
Start filling in the doxygen-help skeleton.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18358
diff
changeset
|
130 | * @param num The number of widgets to return, followed by 'num' GntWidget ** |
|
17586
5beb8d987e84
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
16187
diff
changeset
|
131 | */ |
|
16187
2977f4a9cc80
Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16047
diff
changeset
|
132 | void gnt_util_parse_widgets(const char *string, int num, ...); |
|
2977f4a9cc80
Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16047
diff
changeset
|
133 |