|
Packit Service |
d3d246 |
/* GObject - GLib Type, Object, Parameter and Signal Library
|
|
Packit Service |
d3d246 |
* Copyright (C) 2000 Red Hat, Inc.
|
|
Packit Service |
d3d246 |
*
|
|
Packit Service |
d3d246 |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
d3d246 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
d3d246 |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
d3d246 |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
d3d246 |
*
|
|
Packit Service |
d3d246 |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
d3d246 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
d3d246 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
d3d246 |
* Lesser General Public License for more details.
|
|
Packit Service |
d3d246 |
*
|
|
Packit Service |
d3d246 |
* You should have received a copy of the GNU Lesser General
|
|
Packit Service |
d3d246 |
* Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
d3d246 |
*/
|
|
Packit Service |
d3d246 |
#ifndef __G_TYPE_PLUGIN_H__
|
|
Packit Service |
d3d246 |
#define __G_TYPE_PLUGIN_H__
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
|
Packit Service |
d3d246 |
#error "Only <glib-object.h> can be included directly."
|
|
Packit Service |
d3d246 |
#endif
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
#include <gobject/gtype.h>
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
G_BEGIN_DECLS
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
/* --- type macros --- */
|
|
Packit Service |
d3d246 |
#define G_TYPE_TYPE_PLUGIN (g_type_plugin_get_type ())
|
|
Packit Service |
d3d246 |
#define G_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TYPE_PLUGIN, GTypePlugin))
|
|
Packit Service |
d3d246 |
#define G_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), G_TYPE_TYPE_PLUGIN, GTypePluginClass))
|
|
Packit Service |
d3d246 |
#define G_IS_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TYPE_PLUGIN))
|
|
Packit Service |
d3d246 |
#define G_IS_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), G_TYPE_TYPE_PLUGIN))
|
|
Packit Service |
d3d246 |
#define G_TYPE_PLUGIN_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TYPE_PLUGIN, GTypePluginClass))
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
/* --- typedefs & structures --- */
|
|
Packit Service |
d3d246 |
typedef struct _GTypePluginClass GTypePluginClass;
|
|
Packit Service |
d3d246 |
/**
|
|
Packit Service |
d3d246 |
* GTypePluginUse:
|
|
Packit Service |
d3d246 |
* @plugin: the #GTypePlugin whose use count should be increased
|
|
Packit Service |
d3d246 |
*
|
|
Packit Service |
d3d246 |
* The type of the @use_plugin function of #GTypePluginClass, which gets called
|
|
Packit Service |
d3d246 |
* to increase the use count of @plugin.
|
|
Packit Service |
d3d246 |
*/
|
|
Packit Service |
d3d246 |
typedef void (*GTypePluginUse) (GTypePlugin *plugin);
|
|
Packit Service |
d3d246 |
/**
|
|
Packit Service |
d3d246 |
* GTypePluginUnuse:
|
|
Packit Service |
d3d246 |
* @plugin: the #GTypePlugin whose use count should be decreased
|
|
Packit Service |
d3d246 |
*
|
|
Packit Service |
d3d246 |
* The type of the @unuse_plugin function of #GTypePluginClass.
|
|
Packit Service |
d3d246 |
*/
|
|
Packit Service |
d3d246 |
typedef void (*GTypePluginUnuse) (GTypePlugin *plugin);
|
|
Packit Service |
d3d246 |
/**
|
|
Packit Service |
d3d246 |
* GTypePluginCompleteTypeInfo:
|
|
Packit Service |
d3d246 |
* @plugin: the #GTypePlugin
|
|
Packit Service |
d3d246 |
* @g_type: the #GType whose info is completed
|
|
Packit Service |
d3d246 |
* @info: the #GTypeInfo struct to fill in
|
|
Packit Service |
d3d246 |
* @value_table: the #GTypeValueTable to fill in
|
|
Packit Service |
d3d246 |
*
|
|
Packit Service |
d3d246 |
* The type of the @complete_type_info function of #GTypePluginClass.
|
|
Packit Service |
d3d246 |
*/
|
|
Packit Service |
d3d246 |
typedef void (*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin,
|
|
Packit Service |
d3d246 |
GType g_type,
|
|
Packit Service |
d3d246 |
GTypeInfo *info,
|
|
Packit Service |
d3d246 |
GTypeValueTable *value_table);
|
|
Packit Service |
d3d246 |
/**
|
|
Packit Service |
d3d246 |
* GTypePluginCompleteInterfaceInfo:
|
|
Packit Service |
d3d246 |
* @plugin: the #GTypePlugin
|
|
Packit Service |
d3d246 |
* @instance_type: the #GType of an instantiable type to which the interface
|
|
Packit Service |
d3d246 |
* is added
|
|
Packit Service |
d3d246 |
* @interface_type: the #GType of the interface whose info is completed
|
|
Packit Service |
d3d246 |
* @info: the #GInterfaceInfo to fill in
|
|
Packit Service |
d3d246 |
*
|
|
Packit Service |
d3d246 |
* The type of the @complete_interface_info function of #GTypePluginClass.
|
|
Packit Service |
d3d246 |
*/
|
|
Packit Service |
d3d246 |
typedef void (*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin,
|
|
Packit Service |
d3d246 |
GType instance_type,
|
|
Packit Service |
d3d246 |
GType interface_type,
|
|
Packit Service |
d3d246 |
GInterfaceInfo *info);
|
|
Packit Service |
d3d246 |
/**
|
|
Packit Service |
d3d246 |
* GTypePlugin:
|
|
Packit Service |
d3d246 |
*
|
|
Packit Service |
d3d246 |
* The GTypePlugin typedef is used as a placeholder
|
|
Packit Service |
d3d246 |
* for objects that implement the GTypePlugin interface.
|
|
Packit Service |
d3d246 |
*/
|
|
Packit Service |
d3d246 |
/**
|
|
Packit Service |
d3d246 |
* GTypePluginClass:
|
|
Packit Service |
d3d246 |
* @use_plugin: Increases the use count of the plugin.
|
|
Packit Service |
d3d246 |
* @unuse_plugin: Decreases the use count of the plugin.
|
|
Packit Service |
d3d246 |
* @complete_type_info: Fills in the #GTypeInfo and
|
|
Packit Service |
d3d246 |
* #GTypeValueTable structs for the type. The structs are initialized
|
|
Packit Service |
d3d246 |
* with `memset(s, 0, sizeof (s))` before calling this function.
|
|
Packit Service |
d3d246 |
* @complete_interface_info: Fills in missing parts of the #GInterfaceInfo
|
|
Packit Service |
d3d246 |
* for the interface. The structs is initialized with
|
|
Packit Service |
d3d246 |
* `memset(s, 0, sizeof (s))` before calling this function.
|
|
Packit Service |
d3d246 |
*
|
|
Packit Service |
d3d246 |
* The #GTypePlugin interface is used by the type system in order to handle
|
|
Packit Service |
d3d246 |
* the lifecycle of dynamically loaded types.
|
|
Packit Service |
d3d246 |
*/
|
|
Packit Service |
d3d246 |
struct _GTypePluginClass
|
|
Packit Service |
d3d246 |
{
|
|
Packit Service |
d3d246 |
/*< private >*/
|
|
Packit Service |
d3d246 |
GTypeInterface base_iface;
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
/*< public >*/
|
|
Packit Service |
d3d246 |
GTypePluginUse use_plugin;
|
|
Packit Service |
d3d246 |
GTypePluginUnuse unuse_plugin;
|
|
Packit Service |
d3d246 |
GTypePluginCompleteTypeInfo complete_type_info;
|
|
Packit Service |
d3d246 |
GTypePluginCompleteInterfaceInfo complete_interface_info;
|
|
Packit Service |
d3d246 |
};
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
/* --- prototypes --- */
|
|
Packit Service |
d3d246 |
GLIB_AVAILABLE_IN_ALL
|
|
Packit Service |
d3d246 |
GType g_type_plugin_get_type (void) G_GNUC_CONST;
|
|
Packit Service |
d3d246 |
GLIB_AVAILABLE_IN_ALL
|
|
Packit Service |
d3d246 |
void g_type_plugin_use (GTypePlugin *plugin);
|
|
Packit Service |
d3d246 |
GLIB_AVAILABLE_IN_ALL
|
|
Packit Service |
d3d246 |
void g_type_plugin_unuse (GTypePlugin *plugin);
|
|
Packit Service |
d3d246 |
GLIB_AVAILABLE_IN_ALL
|
|
Packit Service |
d3d246 |
void g_type_plugin_complete_type_info (GTypePlugin *plugin,
|
|
Packit Service |
d3d246 |
GType g_type,
|
|
Packit Service |
d3d246 |
GTypeInfo *info,
|
|
Packit Service |
d3d246 |
GTypeValueTable *value_table);
|
|
Packit Service |
d3d246 |
GLIB_AVAILABLE_IN_ALL
|
|
Packit Service |
d3d246 |
void g_type_plugin_complete_interface_info (GTypePlugin *plugin,
|
|
Packit Service |
d3d246 |
GType instance_type,
|
|
Packit Service |
d3d246 |
GType interface_type,
|
|
Packit Service |
d3d246 |
GInterfaceInfo *info);
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
G_END_DECLS
|
|
Packit Service |
d3d246 |
|
|
Packit Service |
d3d246 |
#endif /* __G_TYPE_PLUGIN_H__ */
|