Mercurial > pidgin
annotate console/libgnt/gntutils.h @ 15679:cad32dba756b
Automatically format screenname to account->username
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 22 Feb 2007 23:32:39 +0000 |
parents | 7a52dce840b4 |
children | e354528c4163 |
rev | line source |
---|---|
14059
2d1b41e3cf0d
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
1 #include <glib.h> |
2d1b41e3cf0d
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
2 |
2d1b41e3cf0d
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
3 #include "gnt.h" |
2d1b41e3cf0d
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
4 #include "gntwidget.h" |
2d1b41e3cf0d
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
5 |
15303
7a52dce840b4
[gaim-migrate @ 18094]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15158
diff
changeset
|
6 typedef gpointer (*GDupFunc)(gconstpointer data); |
7a52dce840b4
[gaim-migrate @ 18094]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15158
diff
changeset
|
7 |
14059
2d1b41e3cf0d
[gaim-migrate @ 16674]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 void gnt_util_get_text_bound(const char *text, int *width, int *height); |
14311
fda9dc44807d
[gaim-migrate @ 17001]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14059
diff
changeset
|
9 |
14397
70f52ff1caec
[gaim-migrate @ 17105]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14311
diff
changeset
|
10 /* excluding *end */ |
14311
fda9dc44807d
[gaim-migrate @ 17001]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14059
diff
changeset
|
11 int gnt_util_onscreen_width(const char *start, const char *end); |
fda9dc44807d
[gaim-migrate @ 17001]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14059
diff
changeset
|
12 |
14420
c4a32405af68
[gaim-migrate @ 17128]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14397
diff
changeset
|
13 const char *gnt_util_onscreen_width_to_pointer(const char *str, int len, int *w); |
14423
cfd5bcc06a7e
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14420
diff
changeset
|
14 |
cfd5bcc06a7e
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14420
diff
changeset
|
15 /* Inserts newlines in 'string' where necessary so that its onscreen width is |
cfd5bcc06a7e
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14420
diff
changeset
|
16 * no more than 'maxw'. |
cfd5bcc06a7e
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14420
diff
changeset
|
17 * 'maxw' can be <= 0, in which case the maximum screen width is considered. |
cfd5bcc06a7e
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14420
diff
changeset
|
18 * |
cfd5bcc06a7e
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14420
diff
changeset
|
19 * Returns a newly allocated string. |
cfd5bcc06a7e
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14420
diff
changeset
|
20 */ |
cfd5bcc06a7e
[gaim-migrate @ 17131]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14420
diff
changeset
|
21 char *gnt_util_onscreen_fit_string(const char *string, int maxw); |
14793
8a0cfee11af8
[gaim-migrate @ 17558]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14423
diff
changeset
|
22 |
8a0cfee11af8
[gaim-migrate @ 17558]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14423
diff
changeset
|
23 GHashTable *g_hash_table_duplicate(GHashTable *src, GHashFunc hash, |
15303
7a52dce840b4
[gaim-migrate @ 18094]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15158
diff
changeset
|
24 GEqualFunc equal, GDestroyNotify key_d, GDestroyNotify value_d, |
7a52dce840b4
[gaim-migrate @ 18094]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15158
diff
changeset
|
25 GDupFunc key_dup, GDupFunc value_dup); |
15158
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
26 |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
27 |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
28 /** |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
29 * To be used with g_signal_new. Look in the key_pressed signal-definition in |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
30 * gntwidget.c for usage. |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
31 */ |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
32 gboolean gnt_boolean_handled_accumulator(GSignalInvocationHint *ihint, |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
33 GValue *return_accu, |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
34 const GValue *handler_return, |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
35 gpointer dummy); |
68385f5bbd61
[gaim-migrate @ 17944]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
14793
diff
changeset
|
36 |