aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/shortcut-bar/e-shortcut-bar.h
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/shortcut-bar/e-shortcut-bar.h')
-rw-r--r--widgets/shortcut-bar/e-shortcut-bar.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/widgets/shortcut-bar/e-shortcut-bar.h b/widgets/shortcut-bar/e-shortcut-bar.h
index ff7702f869..0164bf1c94 100644
--- a/widgets/shortcut-bar/e-shortcut-bar.h
+++ b/widgets/shortcut-bar/e-shortcut-bar.h
@@ -37,6 +37,12 @@ extern "C" {
* window so users can easily access items such as folders and files.
*/
+typedef struct _EShortcutBar EShortcutBar;
+typedef struct _EShortcutBarClass EShortcutBarClass;
+
+
+typedef GdkPixbuf* (*EShortcutBarIconCallback) (EShortcutBar *shortcut_bar,
+ gchar *url);
/* This contains information on one group. */
typedef struct _EShortcutBarGroup EShortcutBarGroup;
@@ -55,9 +61,6 @@ struct _EShortcutBarGroup
#define E_IS_SHORTCUT_BAR(obj) GTK_CHECK_TYPE (obj, e_shortcut_bar_get_type ())
-typedef struct _EShortcutBar EShortcutBar;
-typedef struct _EShortcutBarClass EShortcutBarClass;
-
struct _EShortcutBar
{
EGroupBar group_bar;
@@ -65,6 +68,10 @@ struct _EShortcutBar
/* This is an array of EShortcutBarGroup elements. */
GArray *groups;
+ /* The callback which the application sets to return the icon to use
+ for a given URL. */
+ EShortcutBarIconCallback icon_callback;
+
gchar *dragged_url;
gchar *dragged_name;
};
@@ -107,6 +114,12 @@ void e_shortcut_bar_remove_item (EShortcutBar *shortcut_bar,
gint group_num,
gint item_num);
+/* 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);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */