aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcut.h
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>2000-01-18 16:47:25 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-01-18 16:47:25 +0800
commitec6a1f428845967606ef209be19679d702811c0c (patch)
tree731f05302eddcd424521c90d91c5e5095cc7cedd /shell/e-shortcut.h
parent28bb14ecfcd3a5ef437ac0e77b3d391d9c2b4950 (diff)
downloadgsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.tar
gsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.tar.gz
gsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.tar.bz2
gsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.tar.lz
gsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.tar.xz
gsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.tar.zst
gsoc2013-evolution-ec6a1f428845967606ef209be19679d702811c0c.zip
More work; Model view for the shortcut bar is better; More menus; More features -migu
svn path=/trunk/; revision=1587
Diffstat (limited to 'shell/e-shortcut.h')
-rw-r--r--shell/e-shortcut.h79
1 files changed, 61 insertions, 18 deletions
diff --git a/shell/e-shortcut.h b/shell/e-shortcut.h
index 1087fb0847..e7dde69124 100644
--- a/shell/e-shortcut.h
+++ b/shell/e-shortcut.h
@@ -3,6 +3,11 @@
#include <gtk/gtkobject.h>
#include "e-folder.h"
+#include "shortcut-bar/e-icon-bar.h"
+
+typedef struct _EShortcut EShortcut;
+typedef struct _EShortcutGroup EShortcutGroup;
+typedef struct _EShortcutBarModel EShortcutBarModel;
#define E_SHORTCUT_TYPE (e_shortcut_get_type ())
#define E_SHORTCUT(o) (GTK_CHECK_CAST ((o), E_SHORTCUT_TYPE, EShortcut))
@@ -10,10 +15,10 @@
#define E_IS_SHORTCUT(o) (GTK_CHECK_TYPE ((o), E_SHORTCUT_TYPE))
#define E_IS_SHORTCUT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SHORTCUT_TYPE))
-typedef struct {
+struct _EShortcut {
GtkObject object;
EFolder *efolder;
-} EShortcut;
+};
typedef struct {
GtkObjectClass parent_class;
@@ -25,35 +30,73 @@ typedef struct {
#define E_IS_SHORTCUT_GROUP(o) (GTK_CHECK_TYPE ((o), E_SHORTCUT_GROUP_TYPE))
#define E_IS_SHORTCUT_GROUP_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SHORTCUT_GROUP_TYPE))
-typedef struct {
- GtkObject object;
- char *group_name;
- GArray *shortcuts;
- char *title;
- gboolean small_icons;
-} EShortcutGroup;
-
-typedef enum {
- E_SHORTCUT_GROUP_ITEM_ADDED,
- E_SHORTCUT_GROUP_ITEM_REMOVED,
- E_SHORTCUT_GROUP_ITEM_MOVED,
-} EShortcutGroupChange;
+struct _EShortcutGroup {
+ GtkObject object;
+ EShortcutBarModel *model;
+ char *group_name;
+ GArray *shortcuts;
+ char *title;
+ EIconBarViewType type;
+};
typedef struct {
GtkObjectClass parent_class;
-
- void (*structure_changed) (EShortcutGroup *, EShortcutGroupChange change, int arg1, int arg2);
} EShortcutGroupClass;
GtkType e_shortcut_get_type (void);
EShortcut *e_shortcut_new (EFolder *efolder);
GtkType e_shortcut_group_get_type (void);
-EShortcutGroup *e_shortcut_group_new (const char *name, gboolean small_icons);
+EShortcutGroup *e_shortcut_group_new (const char *name, EIconBarViewType type);
void e_shortcut_group_append (EShortcutGroup *sg, EShortcut *shortcut);
void e_shortcut_group_destroy (EShortcutGroup *sg);
void e_shortcut_group_remove (EShortcutGroup *sg, EShortcut *shortcut);
void e_shortcut_group_move (EShortcutGroup *sg, int from, int to);
+void e_shortcut_group_set_view_type (EShortcutGroup *sg, EIconBarViewType type);
+void e_shortcut_group_rename (EShortcutGroup *sg, const char *text);
+
+#define E_SHORTCUT_BAR_MODEL_TYPE (e_shortcut_bar_model_get_type ())
+#define E_SHORTCUT_BAR_MODEL(o) (GTK_CHECK_CAST ((o), E_SHORTCUT_BAR_MODEL_TYPE, EShortcutBarModel))
+#define E_SHORTCUT_BAR_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_SHORTCUT_BAR_MODEL_TYPE, EShortcutBarMNodelClass))
+#define E_IS_SHORTCUT_BAR_MODEL(o) (GTK_CHECK_TYPE ((o), E_SHORTCUT_BAR_MODEL_TYPE))
+#define E_IS_SHORTCUT_BAR_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SHORTCUT_BAR_MODEL_TYPE))
+
+struct _EShortcutBarModel {
+ GtkObject object;
+ GArray *groups;
+ GSList *views;
+};
+
+typedef struct {
+ GtkObjectClass object_class;
+} EShortcutBarModelClass;
+
+GtkType e_shortcut_bar_model_get_type (void);
+EShortcutBarModel *e_shortcut_bar_model_new (void);
+void e_shortcut_bar_model_append (EShortcutBarModel *shortcut_bar,
+ EShortcutGroup *group);
+int e_shortcut_bar_model_add_group (EShortcutBarModel *shortcut_bar);
+void e_shortcut_bar_model_remove_group
+ (EShortcutBarModel *model,
+ EShortcutGroup *sg);
+
+/* Ugly api name */
+int e_group_num_from_group_ptr (EShortcutBarModel *bm,
+ EShortcutGroup *group);
+
+/*
+ * Produces a new view of the Shortcut Bar model
+ */
+GtkWidget *e_shortcut_bar_view_new (EShortcutBarModel *bm);
+
+/*
+ * Locating objects
+ */
+EShortcutGroup *e_shortcut_group_from_pos (EShortcutBarModel *bm,
+ int group_num);
+EShortcut *e_shortcut_from_pos (EShortcutGroup *group,
+ int item_num);
#endif
+