1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ 2 /* 3 * anjuta-profile-manager.h 4 * Copyright (C) Naba Kumar <naba@gnome.org> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 */ 20 21 #ifndef _ANJUTA_PROFILE_MANAGER_H_ 22 #define _ANJUTA_PROFILE_MANAGER_H_ 23 24 #include <glib-object.h> 25 #include <libanjuta/anjuta-profile.h> 26 #include <libanjuta/anjuta-plugin-manager.h> 27 28 G_BEGIN_DECLS 29 30 #define ANJUTA_TYPE_PROFILE_MANAGER (anjuta_profile_manager_get_type ()) 31 #define ANJUTA_PROFILE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_PROFILE_MANAGER, AnjutaProfileManager)) 32 #define ANJUTA_PROFILE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_PROFILE_MANAGER, AnjutaProfileManagerClass)) 33 #define ANJUTA_IS_PROFILE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_PROFILE_MANAGER)) 34 #define ANJUTA_IS_PROFILE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_PROFILE_MANAGER)) 35 #define ANJUTA_PROFILE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_PROFILE_MANAGER, AnjutaProfileManagerClass)) 36 37 typedef struct _AnjutaProfileManagerClass AnjutaProfileManagerClass; 38 typedef struct _AnjutaProfileManagerPriv AnjutaProfileManagerPriv; 39 typedef struct _AnjutaProfileManager AnjutaProfileManager; 40 41 struct _AnjutaProfileManagerClass 42 { 43 GObjectClass parent_class; 44 void(* profile_pushed) (AnjutaProfileManager *self, 45 AnjutaProfile* profile); 46 void(* profile_popped) (AnjutaProfileManager *self, 47 AnjutaProfile* profile); 48 }; 49 50 /** 51 * AnjutaProfileManager: 52 * 53 * Stores stack of #AnjutaProfile. 54 */ 55 struct _AnjutaProfileManager 56 { 57 GObject parent_instance; 58 AnjutaProfileManagerPriv *priv; 59 }; 60 61 GType anjuta_profile_manager_get_type (void) G_GNUC_CONST; 62 AnjutaProfileManager *anjuta_profile_manager_new (AnjutaPluginManager *plugin_manager); 63 64 /* Plugin profiles */ 65 gboolean anjuta_profile_manager_push (AnjutaProfileManager *profile_manager, 66 AnjutaProfile *profile, GError **error); 67 gboolean anjuta_profile_manager_pop (AnjutaProfileManager *profile_manager, 68 AnjutaProfile *profile, GError **error); 69 70 void anjuta_profile_manager_freeze (AnjutaProfileManager *profile_manager); 71 gboolean anjuta_profile_manager_thaw (AnjutaProfileManager *profile_manager, 72 GError **error); 73 AnjutaProfile* anjuta_profile_manager_get_current (AnjutaProfileManager *profile_manager); 74 75 void anjuta_profile_manager_close (AnjutaProfileManager *profile_manager); 76 77 G_END_DECLS 78 79 #endif /* _ANJUTA_PROFILE_MANAGER_H_ */ 80