gtypemodule.h

Go to the documentation of this file.
00001 /* GObject - GLib Type, Object, Parameter and Signal Library
00002  * Copyright (C) 2000 Red Hat, Inc.
00003  * Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the
00017  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018  * Boston, MA 02111-1307, USA.
00019  */
00020 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
00021 #error "Only <glib-object.h> can be included directly."
00022 #endif
00023 
00024 #ifndef __G_TYPE_MODULE_H__
00025 #define __G_TYPE_MODULE_H__
00026 
00027 #include <_ansi.h>
00028 #include <gobject/gobject.h>
00029 #include <gobject/genums.h>
00030 
00031 G_BEGIN_DECLS
00032 
00033 typedef struct _GTypeModule      GTypeModule;
00034 typedef struct _GTypeModuleClass GTypeModuleClass;
00035 
00036 #define G_TYPE_TYPE_MODULE              (g_type_module_get_type ())
00037 #define G_TYPE_MODULE(module)           (G_TYPE_CHECK_INSTANCE_CAST ((module), G_TYPE_TYPE_MODULE, GTypeModule))
00038 #define G_TYPE_MODULE_CLASS(class)      (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TYPE_MODULE, GTypeModuleClass))
00039 #define G_IS_TYPE_MODULE(module)        (G_TYPE_CHECK_INSTANCE_TYPE ((module), G_TYPE_TYPE_MODULE))
00040 #define G_IS_TYPE_MODULE_CLASS(class)   (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TYPE_MODULE))
00041 #define G_TYPE_MODULE_GET_CLASS(module) (G_TYPE_INSTANCE_GET_CLASS ((module), G_TYPE_TYPE_MODULE, GTypeModuleClass))
00042 
00043 struct _GTypeModule 
00044 {
00045   GObject parent_instance;
00046 
00047   guint use_count;
00048   GSList *type_infos;
00049   GSList *interface_infos;
00050 
00051   /*< public >*/
00052   gchar *name;
00053 };
00054 
00055 struct _GTypeModuleClass
00056 {
00057   GObjectClass parent_class;
00058 
00059   /*< public >*/
00060   gboolean (* load)   (GTypeModule *module);
00061   void     (* unload) (GTypeModule *module);
00062 
00063   /*< private >*/
00064   /* Padding for future expansion */
00065   void (*reserved1) (void);
00066   void (*reserved2) (void);
00067   void (*reserved3) (void);
00068   void (*reserved4) (void);
00069 };
00070 
00071 IMPORT_C GType    g_type_module_get_type       (void) G_GNUC_CONST;
00072 IMPORT_C gboolean g_type_module_use            (GTypeModule          *module);
00073 IMPORT_C void     g_type_module_unuse          (GTypeModule          *module);
00074 IMPORT_C void     g_type_module_set_name       (GTypeModule          *module,
00075                                        const gchar          *name);
00076 IMPORT_C GType    g_type_module_register_type  (GTypeModule          *module,
00077                                        GType                 parent_type,
00078                                        const gchar          *type_name,
00079                                        const GTypeInfo      *type_info,
00080                                        GTypeFlags            flags);
00081 IMPORT_C void     g_type_module_add_interface  (GTypeModule          *module,
00082                                        GType                 instance_type,
00083                                        GType                 interface_type,
00084                                        const GInterfaceInfo *interface_info);
00085 IMPORT_C GType    g_type_module_register_enum  (GTypeModule          *module,
00086                                        const gchar          *name,
00087                                        const GEnumValue     *const_static_values);
00088 IMPORT_C GType    g_type_module_register_flags (GTypeModule          *module,
00089                                        const gchar          *name,
00090                                        const GFlagsValue    *const_static_values);
00091 
00092 G_END_DECLS
00093 
00094 #endif /* __G_TYPE_MODULE_H__ */

Copyright © Nokia Corporation 2001-2008
Back to top