comparison src/blist.h @ 10662:54ac161a876e

[gaim-migrate @ 12199] Plugins can now add submenus to the right-click menu of a blist node by passing a GList of actions to gaim_blist_node_action_new. I'm thinking about making GaimBlistNodeActions more like plugin prefs so that plugins can create radio and check menu items as well. We'll see if I can do that and not make it ugly/suck. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Mon, 07 Mar 2005 02:19:09 +0000
parents 54f7939df8e3
children a4ae4fb7f939
comparison
equal deleted inserted replaced
10661:f02873d475dc 10662:54ac161a876e
197 197
198 struct _GaimBlistNodeAction { 198 struct _GaimBlistNodeAction {
199 char *label; 199 char *label;
200 void (*callback)(GaimBlistNode *, gpointer); 200 void (*callback)(GaimBlistNode *, gpointer);
201 gpointer data; 201 gpointer data;
202 GList *children;
202 }; 203 };
203 204
204 205
205 #ifdef __cplusplus 206 #ifdef __cplusplus
206 extern "C" { 207 extern "C" {
864 GList *gaim_blist_node_get_extended_menu(GaimBlistNode *n); 865 GList *gaim_blist_node_get_extended_menu(GaimBlistNode *n);
865 866
866 867
867 /** 868 /**
868 * Creates a new GaimBlistNodeAction. 869 * Creates a new GaimBlistNodeAction.
869 * @param label The text label to display for this action. 870 * @param label The text label to display for this action.
870 * @param callback The function to be called when the action is used on 871 * @param callback The function to be called when the action is used on
871 * a selected GaimBlistNode. 872 * a selected GaimBlistNode.
872 * @param data Additional data, to be passed to the callback 873 * @param data Additional data, to be passed to the callback
873 */ 874 * @param children A GList of GaimBlistNodeActions to be added as a
874 GaimBlistNodeAction *gaim_blist_node_action_new(char *label, 875 * submenu of the action.
875 void (*callback)(GaimBlistNode *, gpointer), gpointer data); 876 * @return The GaimBlistNodeAction.
877 */
878 GaimBlistNodeAction *gaim_blist_node_action_new(char *label,
879 void (*callback)(GaimBlistNode *, gpointer), gpointer data,
880 GList *children);
876 881
877 882
878 /**************************************************************************/ 883 /**************************************************************************/
879 /** @name UI Registration Functions */ 884 /** @name UI Registration Functions */
880 /**************************************************************************/ 885 /**************************************************************************/