root/trunk/src/tmut-menu-view.h

Revision 75 (checked in by pvanhoof, 6 months ago)

2008-04-15 Philip Van Hoof <pvanhoof@gnome.org>

        • Added the first signs of simple account management
Line 
1 #ifndef TMUT_MENU_VIEW_H
2 #define TMUT_MENU_VIEW_H
3
4 /* TMut
5  * Copyright (C) 2006-2007 Philip Van Hoof <pvanhoof@gnome.org>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with self library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 #include <glib.h>
24 #include <gtk/gtk.h>
25 #include <glib-object.h>
26 #include <tny-shared.h>
27
28 #include <tny-account.h>
29 #include <tny-account-store-view.h>
30
31 G_BEGIN_DECLS
32
33 #define TMUT_TYPE_MENU_VIEW             (tmut_menu_view_get_type ())
34 #define TMUT_MENU_VIEW(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TMUT_TYPE_MENU_VIEW, TMutMenuView))
35 #define TMUT_MENU_VIEW_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TMUT_TYPE_MENU_VIEW, TMutMenuViewClass))
36 #define TMUT_IS_MENU_VIEW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TMUT_TYPE_MENU_VIEW))
37 #define TMUT_IS_MENU_VIEW_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TMUT_TYPE_MENU_VIEW))
38 #define TMUT_MENU_VIEW_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), TMUT_TYPE_MENU_VIEW, TMutMenuViewClass))
39
40 typedef struct _TMutMenuView TMutMenuView;
41 typedef struct _TMutMenuViewClass TMutMenuViewClass;
42
43 struct _TMutMenuView
44 {
45         GtkVBox parent;
46 };
47
48 struct _TMutMenuViewClass
49 {
50         GtkVBoxClass parent_class;
51
52         /* virtuals */
53
54         /* Override this one if you want to provide your own menu items for
55          * rename folder, create folder, move&copy folder, account manager
56          * and delete folder.  The construction of this type will call this.
57          * Note that @self here is a GtkVBox and that you can add your widgets
58          * to it. */
59
60         void (*create_menu) (TMutMenuView *self);
61 };
62
63 GType tmut_menu_view_get_type (void);
64 TMutMenuView* tmut_menu_view_new (void);
65
66 void tmut_menu_view_set_active_account (TMutMenuView *self, TnyAccount *account);
67
68 /* Preimplemented handlers for your action performers */
69 void tmut_menu_view_on_folder_rename_activated (GObject *sender, TMutMenuView *self);
70 void tmut_menu_view_on_folder_move_activated (GObject *sender, TMutMenuView *self);
71 void tmut_menu_view_on_folder_copy_activated (GObject *sender, TMutMenuView *self);
72 void tmut_menu_view_on_folder_create_activated (GObject *sender, TMutMenuView *self);
73 void tmut_menu_view_on_folder_delete_activated (GObject *sender, TMutMenuView *self);
74 void tmut_menu_view_on_new_msg_activated (GObject *sender, TMutMenuView *self);
75 void tmut_menu_view_on_account_manager_activated (GObject *sender, TMutMenuView *self);
76
77 G_END_DECLS
78
79 #endif
Note: See TracBrowser for help on using the browser.