comparison src/util.h @ 12919:248b8b39c671

[gaim-migrate @ 15272] Replace GaimBlistNodeAction with the more generic GaimMenuAction, this is in preparation for letting the chat room user list have extensible menus like the blist entries do. (I know it's not exactly the prettiest, and the callback isn't exactly type-safe, when we eventually gobjectify everything we can get some safety back by using (GObject, gpointer) but that's for later.) I'm planning to look into merging GaimPluginActions into GaimMenuActions as well. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Tue, 17 Jan 2006 23:22:19 +0000
parents 4f2b96f23700
children 69b3d5cbd2b1
comparison
equal deleted inserted replaced
12918:a05fbd9dcc31 12919:248b8b39c671
35 35
36 #ifdef __cplusplus 36 #ifdef __cplusplus
37 extern "C" { 37 extern "C" {
38 #endif 38 #endif
39 39
40 typedef struct _GaimMenuAction
41 {
42 char *label;
43 GaimCallback callback;
44 gpointer data;
45 GList *children;
46 } GaimMenuAction;
40 47
41 /** 48 /**
42 * A key-value pair. 49 * A key-value pair.
43 * 50 *
44 * This is used by, among other things, gaim_gtk_combo* functions to pass in a 51 * This is used by, among other things, gaim_gtk_combo* functions to pass in a
49 gchar *key; 56 gchar *key;
50 void *value; 57 void *value;
51 58
52 } GaimKeyValuePair; 59 } GaimKeyValuePair;
53 60
54 61 /**
62 * Creates a new GaimMenuAction.
63 * @param label The text label to display for this action.
64 * @param callback The function to be called when the action is used on
65 * the selected item.
66 * @param data Additional data to be passed to the callback.
67 * @param children A GList of GaimMenuActions to be added as a submenu
68 * of the action.
69 * @return The GaimMenuAction.
70 */
71 GaimMenuAction *gaim_menu_action_new(char *label, GaimCallback callback,
72 gpointer data, GList *children);
55 73
56 /**************************************************************************/ 74 /**************************************************************************/
57 /** @name Base16 Functions */ 75 /** @name Base16 Functions */
58 /**************************************************************************/ 76 /**************************************************************************/
59 /*@{*/ 77 /*@{*/
87 * @see gaim_base16_encode() 105 * @see gaim_base16_encode()
88 */ 106 */
89 guchar *gaim_base16_decode(const char *str, gsize *ret_len); 107 guchar *gaim_base16_decode(const char *str, gsize *ret_len);
90 108
91 /*@}*/ 109 /*@}*/
92
93 110
94 /**************************************************************************/ 111 /**************************************************************************/
95 /** @name Base64 Functions */ 112 /** @name Base64 Functions */
96 /**************************************************************************/ 113 /**************************************************************************/
97 /*@{*/ 114 /*@{*/