Put the g_return_val_if_fail() in the right place.
[glib.git] / gobject / gtypeplugin.h
blob415259ad247027d13db58ba755f856bd643df776
1 /* GObject - GLib Type, Object, Parameter and Signal Library
2 * Copyright (C) 2000 Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General
15 * Public License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17 * Boston, MA 02111-1307, USA.
19 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
20 #error "Only <glib-object.h> can be included directly."
21 #endif
23 #ifndef __G_TYPE_PLUGIN_H__
24 #define __G_TYPE_PLUGIN_H__
26 #include <gobject/gtype.h>
28 G_BEGIN_DECLS
30 /* --- type macros --- */
31 #define G_TYPE_TYPE_PLUGIN (g_type_plugin_get_type ())
32 #define G_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TYPE_PLUGIN, GTypePlugin))
33 #define G_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), G_TYPE_TYPE_PLUGIN, GTypePluginClass))
34 #define G_IS_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TYPE_PLUGIN))
35 #define G_IS_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), G_TYPE_TYPE_PLUGIN))
36 #define G_TYPE_PLUGIN_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TYPE_PLUGIN, GTypePluginClass))
39 /* --- typedefs & structures --- */
40 typedef struct _GTypePluginClass GTypePluginClass;
41 typedef void (*GTypePluginUse) (GTypePlugin *plugin);
42 typedef void (*GTypePluginUnuse) (GTypePlugin *plugin);
43 typedef void (*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin,
44 GType g_type,
45 GTypeInfo *info,
46 GTypeValueTable *value_table);
47 typedef void (*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin,
48 GType instance_type,
49 GType interface_type,
50 GInterfaceInfo *info);
51 struct _GTypePluginClass
53 GTypeInterface base_iface;
55 GTypePluginUse use_plugin;
56 GTypePluginUnuse unuse_plugin;
57 GTypePluginCompleteTypeInfo complete_type_info;
58 GTypePluginCompleteInterfaceInfo complete_interface_info;
62 /* --- prototypes --- */
63 GType g_type_plugin_get_type (void) G_GNUC_CONST;
64 void g_type_plugin_use (GTypePlugin *plugin);
65 void g_type_plugin_unuse (GTypePlugin *plugin);
66 void g_type_plugin_complete_type_info (GTypePlugin *plugin,
67 GType g_type,
68 GTypeInfo *info,
69 GTypeValueTable *value_table);
70 void g_type_plugin_complete_interface_info (GTypePlugin *plugin,
71 GType instance_type,
72 GType interface_type,
73 GInterfaceInfo *info);
75 G_END_DECLS
77 #endif /* __G_TYPE_PLUGIN_H__ */