1 /* 2 * Distributed under the Boost Software License, Version 1.0. 3 * (See accompanying file LICENSE_1_0.txt or copy at 4 * http://www.boost.org/LICENSE_1_0.txt) 5 */ 6 module gobject.gtypeplugin; 7 8 import gobject.gtype; 9 10 // #define G_TYPE_TYPE_PLUGIN (g_type_plugin_get_type ()) 11 // #define G_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TYPE_PLUGIN, GTypePlugin)) 12 // #define G_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), G_TYPE_TYPE_PLUGIN, GTypePluginClass)) 13 // #define G_IS_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TYPE_PLUGIN)) 14 // #define G_IS_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), G_TYPE_TYPE_PLUGIN)) 15 // #define G_TYPE_PLUGIN_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TYPE_PLUGIN, GTypePluginClass)) 16 17 18 alias GTypePluginUse = void function (GTypePlugin *plugin); 19 alias GTypePluginUnuse = void function (GTypePlugin *plugin); 20 alias GTypePluginCompleteTypeInfo = void function (GTypePlugin *plugin, 21 GType g_type, 22 GTypeInfo *info, 23 GTypeValueTable *value_table); 24 alias GTypePluginCompleteInterfaceInfo = void function (GTypePlugin *plugin, 25 GType instance_type, 26 GType interface_type, 27 GInterfaceInfo *info); 28 29 struct GTypePluginClass 30 { 31 /*< private >*/ 32 GTypeInterface base_iface; 33 34 /*< public >*/ 35 GTypePluginUse use_plugin; 36 GTypePluginUnuse unuse_plugin; 37 GTypePluginCompleteTypeInfo complete_type_info; 38 GTypePluginCompleteInterfaceInfo complete_interface_info; 39 } 40 41 42 /* --- prototypes --- */ 43 44 pure GType g_type_plugin_get_type (); 45 46 void g_type_plugin_use (GTypePlugin *plugin); 47 48 void g_type_plugin_unuse (GTypePlugin *plugin); 49 50 void g_type_plugin_complete_type_info (GTypePlugin *plugin, 51 GType g_type, 52 GTypeInfo *info, 53 GTypeValueTable *value_table); 54 55 void g_type_plugin_complete_interface_info (GTypePlugin *plugin, 56 GType instance_type, 57 GType interface_type, 58 GInterfaceInfo *info); 59