1 /* 2 * peas-extension-base.h 3 * This file is part of libpeas 4 * 5 * Copyright (C) 2002-2005 - Paolo Maggi 6 * 7 * libpeas 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.1 of the License, or (at your option) any later version. 11 * 12 * libpeas 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 this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 */ 21 22 #ifndef __PEAS_EXTENSION_BASE_H__ 23 #define __PEAS_EXTENSION_BASE_H__ 24 25 #include <glib-object.h> 26 27 #include "peas-plugin-info.h" 28 #include "peas-version-macros.h" 29 30 G_BEGIN_DECLS 31 32 /* 33 * Type checking and casting macros 34 */ 35 #define PEAS_TYPE_EXTENSION_BASE (peas_extension_base_get_type()) 36 #define PEAS_EXTENSION_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PEAS_TYPE_EXTENSION_BASE, PeasExtensionBase)) 37 #define PEAS_EXTENSION_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PEAS_TYPE_EXTENSION_BASE, PeasExtensionBaseClass)) 38 #define PEAS_IS_EXTENSION_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PEAS_TYPE_EXTENSION_BASE)) 39 #define PEAS_IS_EXTENSION_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PEAS_TYPE_EXTENSION_BASE)) 40 #define PEAS_EXTENSION_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PEAS_TYPE_EXTENSION_BASE, PeasExtensionBaseClass)) 41 42 /** 43 * PeasExtensionBase: 44 * 45 * Base class for C extensions. 46 */ 47 typedef struct _PeasExtensionBase PeasExtensionBase; 48 typedef struct _PeasExtensionBaseClass PeasExtensionBaseClass; 49 typedef struct _PeasExtensionBasePrivate PeasExtensionBasePrivate; 50 51 struct _PeasExtensionBase { 52 GObject parent; 53 54 PeasExtensionBasePrivate *priv; 55 }; 56 57 /** 58 * PeasExtensionBaseClass: 59 * @parent_class: The parent class. 60 * 61 * The class structure of #PeasExtensionBase. 62 */ 63 struct _PeasExtensionBaseClass { 64 GObjectClass parent_class; 65 66 /*< private >*/ 67 gpointer padding[8]; 68 }; 69 70 /* 71 * Public methods 72 */ 73 PEAS_AVAILABLE_IN_ALL 74 GType peas_extension_base_get_type (void) G_GNUC_CONST; 75 76 PEAS_AVAILABLE_IN_ALL 77 PeasPluginInfo *peas_extension_base_get_plugin_info (PeasExtensionBase *extbase); 78 PEAS_AVAILABLE_IN_ALL 79 gchar *peas_extension_base_get_data_dir (PeasExtensionBase *extbase); 80 81 G_END_DECLS 82 83 #endif /* __PEAS_EXTENSION_BASE_H__ */ 84