X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gobject%2Fgtypeplugin.h;h=d56eb669153f1a929d7141154eb1a54c64fa1e96;hb=2e5bd8cf47f9e1559ccc44823a2f321b8ff8c1ea;hp=463f3a16eceb3f357d687048440a58090fe26ec4;hpb=e767aa0a4fad23c766b3bf16a079e8e7c5b4c448;p=platform%2Fupstream%2Fglib.git
diff --git a/gobject/gtypeplugin.h b/gobject/gtypeplugin.h
index 463f3a1..d56eb66 100644
--- a/gobject/gtypeplugin.h
+++ b/gobject/gtypeplugin.h
@@ -12,17 +12,15 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see .
*/
+#ifndef __G_TYPE_PLUGIN_H__
+#define __G_TYPE_PLUGIN_H__
+
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
#error "Only can be included directly."
#endif
-#ifndef __G_TYPE_PLUGIN_H__
-#define __G_TYPE_PLUGIN_H__
-
#include
G_BEGIN_DECLS
@@ -38,20 +36,74 @@ G_BEGIN_DECLS
/* --- typedefs & structures --- */
typedef struct _GTypePluginClass GTypePluginClass;
+/**
+ * GTypePluginUse:
+ * @plugin: the #GTypePlugin whose use count should be increased
+ *
+ * The type of the @use_plugin function of #GTypePluginClass, which gets called
+ * to increase the use count of @plugin.
+ */
typedef void (*GTypePluginUse) (GTypePlugin *plugin);
+/**
+ * GTypePluginUnuse:
+ * @plugin: the #GTypePlugin whose use count should be decreased
+ *
+ * The type of the @unuse_plugin function of #GTypePluginClass.
+ */
typedef void (*GTypePluginUnuse) (GTypePlugin *plugin);
+/**
+ * GTypePluginCompleteTypeInfo:
+ * @plugin: the #GTypePlugin
+ * @g_type: the #GType whose info is completed
+ * @info: the #GTypeInfo struct to fill in
+ * @value_table: the #GTypeValueTable to fill in
+ *
+ * The type of the @complete_type_info function of #GTypePluginClass.
+ */
typedef void (*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin,
GType g_type,
GTypeInfo *info,
GTypeValueTable *value_table);
+/**
+ * GTypePluginCompleteInterfaceInfo:
+ * @plugin: the #GTypePlugin
+ * @instance_type: the #GType of an instantiable type to which the interface
+ * is added
+ * @interface_type: the #GType of the interface whose info is completed
+ * @info: the #GInterfaceInfo to fill in
+ *
+ * The type of the @complete_interface_info function of #GTypePluginClass.
+ */
typedef void (*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin,
- GType interface_type,
GType instance_type,
+ GType interface_type,
GInterfaceInfo *info);
+/**
+ * GTypePlugin:
+ *
+ * The GTypePlugin typedef is used as a placeholder
+ * for objects that implement the GTypePlugin interface.
+ */
+/**
+ * GTypePluginClass:
+ * @use_plugin: Increases the use count of the plugin.
+ * @unuse_plugin: Decreases the use count of the plugin.
+ * @complete_type_info: Fills in the #GTypeInfo and
+ * #GTypeValueTable structs for the type. The structs are initialized
+ * with `memset(s, 0, sizeof (s))` before calling this function.
+ * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo
+ * for the interface. The structs is initialized with
+ * `memset(s, 0, sizeof (s))` before calling this function.
+ *
+ * The #GTypePlugin interface is used by the type system in order to handle
+ * the lifecycle of dynamically loaded types.
+ */
struct _GTypePluginClass
{
+ /*< private >*/
GTypeInterface base_iface;
+ /*< public >*/
GTypePluginUse use_plugin;
GTypePluginUnuse unuse_plugin;
GTypePluginCompleteTypeInfo complete_type_info;
@@ -60,16 +112,21 @@ struct _GTypePluginClass
/* --- prototypes --- */
+GLIB_AVAILABLE_IN_ALL
GType g_type_plugin_get_type (void) G_GNUC_CONST;
+GLIB_AVAILABLE_IN_ALL
void g_type_plugin_use (GTypePlugin *plugin);
+GLIB_AVAILABLE_IN_ALL
void g_type_plugin_unuse (GTypePlugin *plugin);
+GLIB_AVAILABLE_IN_ALL
void g_type_plugin_complete_type_info (GTypePlugin *plugin,
GType g_type,
GTypeInfo *info,
GTypeValueTable *value_table);
+GLIB_AVAILABLE_IN_ALL
void g_type_plugin_complete_interface_info (GTypePlugin *plugin,
- GType interface_type,
GType instance_type,
+ GType interface_type,
GInterfaceInfo *info);
G_END_DECLS