Mercurial > pidgin.yaz
annotate finch/libgnt/gntutils.h @ 16071:5e436cd088e4
merge of '6c54a71cc08e47f3b1498c61ee62d17107165817'
and 'eae479abc840db2b4808b2de16397086deefab3b'
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 11 Apr 2007 18:03:09 +0000 |
parents | 2c81ebc7bf0b |
children | 5f204f55af09 |
rev | line source |
---|---|
15818 | 1 #include <glib.h> |
2 | |
3 #include "gnt.h" | |
4 #include "gntwidget.h" | |
5 | |
6 typedef gpointer (*GDupFunc)(gconstpointer data); | |
7 | |
8 void gnt_util_get_text_bound(const char *text, int *width, int *height); | |
9 | |
10 /* excluding *end */ | |
11 int gnt_util_onscreen_width(const char *start, const char *end); | |
12 | |
13 const char *gnt_util_onscreen_width_to_pointer(const char *str, int len, int *w); | |
14 | |
15 /* Inserts newlines in 'string' where necessary so that its onscreen width is | |
16 * no more than 'maxw'. | |
17 * 'maxw' can be <= 0, in which case the maximum screen width is considered. | |
18 * | |
19 * Returns a newly allocated string. | |
20 */ | |
21 char *gnt_util_onscreen_fit_string(const char *string, int maxw); | |
22 | |
23 GHashTable *g_hash_table_duplicate(GHashTable *src, GHashFunc hash, | |
24 GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d, | |
25 GDupFunc key_dup, GDupFunc value_dup); | |
26 | |
27 | |
28 /** | |
29 * To be used with g_signal_new. Look in the key_pressed signal-definition in | |
30 * gntwidget.c for usage. | |
31 */ | |
32 gboolean gnt_boolean_handled_accumulator(GSignalInvocationHint *ihint, | |
33 GValue *return_accu, | |
34 const GValue *handler_return, | |
35 gpointer dummy); | |
36 | |
15979
2c81ebc7bf0b
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 <imadil@gmail.com>
parents:
15818
diff
changeset
|
37 /** |
2c81ebc7bf0b
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 <imadil@gmail.com>
parents:
15818
diff
changeset
|
38 * Returns a GntTree populated with "key" -> "binding" for the widget. |
2c81ebc7bf0b
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 <imadil@gmail.com>
parents:
15818
diff
changeset
|
39 */ |
2c81ebc7bf0b
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 <imadil@gmail.com>
parents:
15818
diff
changeset
|
40 GntWidget *gnt_widget_bindings_view(GntWidget *widget); |
2c81ebc7bf0b
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 <imadil@gmail.com>
parents:
15818
diff
changeset
|
41 |