#ifndef TMUT_ACCOUNT_MANAGER_H #define TMUT_ACCOUNT_MANAGER_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_ACCOUNT_MANAGER (tmut_account_manager_get_type ()) #define TMUT_ACCOUNT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TMUT_TYPE_ACCOUNT_MANAGER, TMutAccountManager)) #define TMUT_ACCOUNT_MANAGER_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), TMUT_TYPE_ACCOUNT_MANAGER, TMutAccountManagerClass)) #define TMUT_IS_ACCOUNT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TMUT_TYPE_ACCOUNT_MANAGER)) #define TMUT_IS_ACCOUNT_MANAGER_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TMUT_TYPE_ACCOUNT_MANAGER)) #define TMUT_ACCOUNT_MANAGER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), TMUT_TYPE_ACCOUNT_MANAGER, TMutAccountManagerClass)) typedef struct _TMutAccountManager TMutAccountManager; typedef struct _TMutAccountManagerClass TMutAccountManagerClass; struct _TMutAccountManager { GtkVBox parent; }; struct _TMutAccountManagerClass { GtkVBoxClass parent_class; /* virtuals */ /* Override this one if you want to provide your own menu items for * edit account, new account and delete delete. 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) (TMutAccountManager *self); }; GType tmut_account_manager_get_type (void); TMutAccountManager* tmut_account_manager_new (void); void tmut_account_manager_set_active_account (TMutAccountManager *self, TnyAccount *account); /* Preimplemented handlers for your action performers */ void tmut_account_manager_on_edit_account_activated (GObject *sender, TMutAccountManager *self); void tmut_account_manager_on_new_account_activated (GObject *sender, TMutAccountManager *self); void tmut_account_manager_on_delete_account_activated (GObject *sender, TMutAccountManager *self); G_END_DECLS #endif