aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/shortcut-bar/e-shortcut-bar.h
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-03-31 23:45:24 +0800
committerDamon Chaplin <damon@src.gnome.org>2000-03-31 23:45:24 +0800
commitfb80c3b9a1b00c2eb17d29293cbd9877e456f7ba (patch)
treef155a7080ac0f6bef160919649be17d5792c7630 /widgets/shortcut-bar/e-shortcut-bar.h
parent711197b6b76d7200708567005c3f864d7aa7dded (diff)
downloadgsoc2013-evolution-fb80c3b9a1b00c2eb17d29293cbd9877e456f7ba.tar.gz
gsoc2013-evolution-fb80c3b9a1b00c2eb17d29293cbd9877e456f7ba.tar.zst
gsoc2013-evolution-fb80c3b9a1b00c2eb17d29293cbd9877e456f7ba.zip
added support for a callback function to set the icons.
2000-03-31 Damon Chaplin <damon@helixcode.com> * widgets/shortcut-bar/e-shortcut-bar.[hc]: added support for a callback function to set the icons. * widgets/shortcut-bar/test-shortcut-bar.c: updated to use the callback function. svn path=/trunk/; revision=2268
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 */