#ifndef TMUT_MENU_VIEW_H #define TMUT_MENU_VIEW_H /* TMut * Copyright (C) 2006-2007 Philip Van Hoof * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with self library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include G_BEGIN_DECLS #define TMUT_TYPE_MENU_VIEW (tmut_menu_view_get_type ()) #define TMUT_MENU_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TMUT_TYPE_MENU_VIEW, TMutMenuView)) #define TMUT_MENU_VIEW_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), TMUT_TYPE_MENU_VIEW, TMutMenuViewClass)) #define TMUT_IS_MENU_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TMUT_TYPE_MENU_VIEW)) #define TMUT_IS_MENU_VIEW_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TMUT_TYPE_MENU_VIEW)) #define TMUT_MENU_VIEW_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), TMUT_TYPE_MENU_VIEW, TMutMenuViewClass)) typedef struct _TMutMenuView TMutMenuView; typedef struct _TMutMenuViewClass TMutMenuViewClass; struct _TMutMenuView { GtkVBox parent; }; struct _TMutMenuViewClass { GtkVBoxClass parent_class; /* virtuals */ /* Override this one if you want to provide your own menu items for * rename folder, create folder, move© folder, account manager * and delete folder. The construction of this type will call this. * Note that @self here is a GtkVBox and that you can add your widgets * to it. */ void (*create_menu) (TMutMenuView *self); }; GType tmut_menu_view_get_type (void); TMutMenuView* tmut_menu_view_new (void); void tmut_menu_view_set_active_account (TMutMenuView *self, TnyAccount *account); /* Preimplemented handlers for your action performers */ void tmut_menu_view_on_folder_rename_activated (GObject *sender, TMutMenuView *self); void tmut_menu_view_on_folder_move_activated (GObject *sender, TMutMenuView *self); void tmut_menu_view_on_folder_copy_activated (GObject *sender, TMutMenuView *self); void tmut_menu_view_on_folder_create_activated (GObject *sender, TMutMenuView *self); void tmut_menu_view_on_folder_delete_activated (GObject *sender, TMutMenuView *self); void tmut_menu_view_on_new_msg_activated (GObject *sender, TMutMenuView *self); void tmut_menu_view_on_account_manager_activated (GObject *sender, TMutMenuView *self); G_END_DECLS #endif