From 5801d079852bd2e877d9511e4c3ea8083066c58c Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 4 May 2000 06:16:33 +0000 Subject: Fixed EShortcutBar API: the icon callback function now gets a `const char *' url (instead of just a `char *') and a closure. svn path=/trunk/; revision=2790 --- widgets/shortcut-bar/e-shortcut-bar.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'widgets/shortcut-bar/e-shortcut-bar.h') diff --git a/widgets/shortcut-bar/e-shortcut-bar.h b/widgets/shortcut-bar/e-shortcut-bar.h index 0164bf1c94..682967b12a 100644 --- a/widgets/shortcut-bar/e-shortcut-bar.h +++ b/widgets/shortcut-bar/e-shortcut-bar.h @@ -42,7 +42,8 @@ typedef struct _EShortcutBarClass EShortcutBarClass; typedef GdkPixbuf* (*EShortcutBarIconCallback) (EShortcutBar *shortcut_bar, - gchar *url); + const gchar *url, + gpointer data); /* This contains information on one group. */ typedef struct _EShortcutBarGroup EShortcutBarGroup; @@ -72,6 +73,9 @@ struct _EShortcutBar for a given URL. */ EShortcutBarIconCallback icon_callback; + /* Closure for the callback. */ + gpointer icon_callback_data; + gchar *dragged_url; gchar *dragged_name; }; @@ -117,8 +121,9 @@ void e_shortcut_bar_remove_item (EShortcutBar *shortcut_bar, /* Sets the callback which is called to return the icon to use for a particular URL. This callback must be set before any items are added. If the callback returns NULL the default icon is used. */ -void e_shortcut_bar_set_icon_callback (EShortcutBar *shortcut_bar, - EShortcutBarIconCallback cb); +void e_shortcut_bar_set_icon_callback (EShortcutBar *shortcut_bar, + EShortcutBarIconCallback cb, + gpointer data); #ifdef __cplusplus } -- cgit v1.2.3