Mercurial > pidgin
comparison finch/libgnt/gntutils.h @ 18049:1cedd520cd18
Doxygen skeleton and license info for gnt files.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 06 Jun 2007 15:42:29 +0000 |
parents | 5f204f55af09 |
children | 3ee6ea8a66f8 5c6f019e48f8 |
comparison
equal
deleted
inserted
replaced
18048:9aa2c89c8b9e | 18049:1cedd520cd18 |
---|---|
1 /** | |
2 * GNT - The GLib Ncurses Toolkit | |
3 * | |
4 * GNT is the legal property of its developers, whose names are too numerous | |
5 * to list here. Please refer to the COPYRIGHT file distributed with this | |
6 * source distribution. | |
7 * | |
8 * This library is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
22 | |
1 #include <glib.h> | 23 #include <glib.h> |
2 | 24 |
3 #include "gnt.h" | 25 #include "gnt.h" |
4 #include "gntwidget.h" | 26 #include "gntwidget.h" |
5 | 27 |
6 typedef gpointer (*GDupFunc)(gconstpointer data); | 28 typedef gpointer (*GDupFunc)(gconstpointer data); |
7 | 29 |
30 /** | |
31 * | |
32 * @param text | |
33 * @param width | |
34 * @param height | |
35 */ | |
8 void gnt_util_get_text_bound(const char *text, int *width, int *height); | 36 void gnt_util_get_text_bound(const char *text, int *width, int *height); |
9 | 37 |
10 /* excluding *end */ | 38 /* excluding *end */ |
39 /** | |
40 * | |
41 * @param start | |
42 * @param end | |
43 * | |
44 * @return | |
45 */ | |
11 int gnt_util_onscreen_width(const char *start, const char *end); | 46 int gnt_util_onscreen_width(const char *start, const char *end); |
12 | 47 |
13 const char *gnt_util_onscreen_width_to_pointer(const char *str, int len, int *w); | 48 const char *gnt_util_onscreen_width_to_pointer(const char *str, int len, int *w); |
14 | 49 |
15 /* Inserts newlines in 'string' where necessary so that its onscreen width is | 50 /* Inserts newlines in 'string' where necessary so that its onscreen width is |
16 * no more than 'maxw'. | 51 * no more than 'maxw'. |
17 * 'maxw' can be <= 0, in which case the maximum screen width is considered. | 52 * 'maxw' can be <= 0, in which case the maximum screen width is considered. |
18 * | 53 * |
19 * Returns a newly allocated string. | 54 * Returns a newly allocated string. |
20 */ | 55 */ |
21 char *gnt_util_onscreen_fit_string(const char *string, int maxw); | 56 /** |
57 * | |
58 * @param string | |
59 * @param maxw | |
60 * | |
61 * @return | |
62 */ | |
63 char * gnt_util_onscreen_fit_string(const char *string, int maxw); | |
22 | 64 |
23 GHashTable *g_hash_table_duplicate(GHashTable *src, GHashFunc hash, | 65 /** |
24 GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d, | 66 * |
25 GDupFunc key_dup, GDupFunc value_dup); | 67 * @param src |
26 | 68 * @param hash |
69 * @param equal | |
70 * @param key_d | |
71 * @param value_d | |
72 * @param key_dup | |
73 * @param value_dup | |
74 * | |
75 * @return | |
76 */ | |
77 GHashTable * g_hash_table_duplicate(GHashTable *src, GHashFunc hash, GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d, GDupFunc key_dup, GDupFunc value_dup); | |
27 | 78 |
28 /** | 79 /** |
29 * To be used with g_signal_new. Look in the key_pressed signal-definition in | 80 * To be used with g_signal_new. Look in the key_pressed signal-definition in |
30 * gntwidget.c for usage. | 81 * gntwidget.c for usage. |
31 */ | 82 */ |
32 gboolean gnt_boolean_handled_accumulator(GSignalInvocationHint *ihint, | 83 /** |
33 GValue *return_accu, | 84 * |
34 const GValue *handler_return, | 85 * @param ihint |
35 gpointer dummy); | 86 * @param return_accu |
87 * @param handler_return | |
88 * @param dummy | |
89 * | |
90 * @return | |
91 */ | |
92 gboolean gnt_boolean_handled_accumulator(GSignalInvocationHint *ihint, GValue *return_accu, const GValue *handler_return, gpointer dummy); | |
36 | 93 |
37 /** | 94 /** |
38 * Returns a GntTree populated with "key" -> "binding" for the widget. | 95 * Returns a GntTree populated with "key" -> "binding" for the widget. |
39 */ | 96 */ |
40 GntWidget *gnt_widget_bindings_view(GntWidget *widget); | 97 /** |
98 * | |
99 * @param widget | |
100 * | |
101 * @return | |
102 */ | |
103 GntWidget * gnt_widget_bindings_view(GntWidget *widget); | |
41 | 104 |
42 /** | 105 /** |
43 * Parse widgets from 'string'. | 106 * Parse widgets from 'string'. |
44 */ | 107 */ |
108 /** | |
109 * | |
110 * @param string | |
111 * @param num | |
112 */ | |
45 void gnt_util_parse_widgets(const char *string, int num, ...); | 113 void gnt_util_parse_widgets(const char *string, int num, ...); |
46 | 114 |