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 #include "gtypeplugin.h"
23 /* --- functions --- */
25 g_type_plugin_get_type (void)
27 static GType type_plugin_type
= 0;
29 if (!type_plugin_type
)
31 static const GTypeInfo type_plugin_info
= {
32 sizeof (GTypePluginClass
),
34 NULL
, /* base_finalize */
37 type_plugin_type
= g_type_register_static (G_TYPE_INTERFACE
, "GTypePlugin", &type_plugin_info
, 0);
40 return type_plugin_type
;
44 g_type_plugin_use (GTypePlugin
*plugin
)
46 GTypePluginClass
*iface
;
48 g_return_if_fail (G_IS_TYPE_PLUGIN (plugin
));
50 iface
= G_TYPE_PLUGIN_GET_CLASS (plugin
);
51 iface
->use_plugin (plugin
);
55 g_type_plugin_unuse (GTypePlugin
*plugin
)
57 GTypePluginClass
*iface
;
59 g_return_if_fail (G_IS_TYPE_PLUGIN (plugin
));
61 iface
= G_TYPE_PLUGIN_GET_CLASS (plugin
);
62 iface
->unuse_plugin (plugin
);
66 g_type_plugin_complete_type_info (GTypePlugin
*plugin
,
69 GTypeValueTable
*value_table
)
71 GTypePluginClass
*iface
;
73 g_return_if_fail (G_IS_TYPE_PLUGIN (plugin
));
74 g_return_if_fail (info
!= NULL
);
75 g_return_if_fail (value_table
!= NULL
);
77 iface
= G_TYPE_PLUGIN_GET_CLASS (plugin
);
78 iface
->complete_type_info (plugin
,
85 g_type_plugin_complete_interface_info (GTypePlugin
*plugin
,
90 GTypePluginClass
*iface
;
92 g_return_if_fail (G_IS_TYPE_PLUGIN (plugin
));
93 g_return_if_fail (info
!= NULL
);
95 iface
= G_TYPE_PLUGIN_GET_CLASS (plugin
);
96 iface
->complete_interface_info (plugin
,