comparison libpurple/util.h @ 32466:3b2ceeb8883b

Hide-a-PurpleMenuAction.
author masca@cpw.pidgin.im
date Thu, 01 Sep 2011 04:23:42 +0000
parents 161df36133ae
children f31dc7349961
comparison
equal deleted inserted replaced
32465:39d69f5bf146 32466:3b2ceeb8883b
49 49
50 #ifdef __cplusplus 50 #ifdef __cplusplus
51 extern "C" { 51 extern "C" {
52 #endif 52 #endif
53 53
54 struct _PurpleMenuAction
55 {
56 char *label;
57 PurpleCallback callback;
58 gpointer data;
59 GList *children;
60 };
61
62 typedef char *(*PurpleInfoFieldFormatCallback)(const char *field, size_t len); 54 typedef char *(*PurpleInfoFieldFormatCallback)(const char *field, size_t len);
63 55
64 /** 56 /**
65 * A key-value pair. 57 * A key-value pair.
66 * 58 *
92 * Frees a PurpleMenuAction 84 * Frees a PurpleMenuAction
93 * 85 *
94 * @param act The PurpleMenuAction to free. 86 * @param act The PurpleMenuAction to free.
95 */ 87 */
96 void purple_menu_action_free(PurpleMenuAction *act); 88 void purple_menu_action_free(PurpleMenuAction *act);
89
90 /**
91 * Returns the label of the PurpleMenuAction.
92 *
93 * @param act The PurpleMenuAction.
94 *
95 * @return The label string.
96 */
97 char * purple_menu_action_get_label(const PurpleMenuAction *act);
98
99 /**
100 * Returns the callback of the PurpleMenuAction.
101 *
102 * @param act The PurpleMenuAction.
103 *
104 * @return The callback function.
105 */
106 PurpleCallback purple_menu_action_get_callback(const PurpleMenuAction *act);
107
108 /**
109 * Returns the data stored in the PurpleMenuAction.
110 *
111 * @param act The PurpleMenuAction.
112 *
113 * @return The data.
114 */
115 gpointer purple_menu_action_get_data(const PurpleMenuAction *act);
116
117 /**
118 * Returns the children of the PurpleMenuAction.
119 *
120 * @param act The PurpleMenuAction.
121 *
122 * @return The GList of children.
123 */
124 GList* purple_menu_action_get_children(const PurpleMenuAction *act);
125
126 /**
127 * Set the label to the PurpleMenuAction.
128 *
129 * @param act The menu action.
130 * @param label The label for the menu action.
131 */
132 void purple_menu_action_set_label(PurpleMenuAction *act, char *label);
133
134 /**
135 * Set the callback that will be used by the PurpleMenuAction.
136 *
137 * @param act The menu action.
138 * @param callback The callback.
139 */
140 void purple_menu_action_set_callback(PurpleMenuAction *act, PurpleCallback callback);
141
142 /**
143 * Set the label to the PurpleMenuAction.
144 *
145 * @param act The menu action.
146 * @param data The data used by this PurpleMenuAction
147 */
148 void purple_menu_action_set_data(PurpleMenuAction *act, gpointer data);
149
150 /**
151 * Set the children of the PurpleMenuAction.
152 *
153 * @param act The menu action.
154 * @param children The PurpleMenuAtion children
155 */
156 void purple_menu_action_set_children(PurpleMenuAction *act, GList *children);
97 157
98 /** 158 /**
99 * Set the appropriate presence values for the currently playing song. 159 * Set the appropriate presence values for the currently playing song.
100 * 160 *
101 * @param title The title of the song, @c NULL to unset the value. 161 * @param title The title of the song, @c NULL to unset the value.