mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 02:47:52 +02:00
New basic implementation of GTypePlugin interface as a GObject.
Sun Nov 5 13:21:28 2000 Owen Taylor <otaylor@redhat.com> * Makefile.am gtypemodule.[ch]: New basic implementation of GTypePlugin interface as a GObject. Dynamically loaded modules can register any number of types and interface on the module.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
Sun Nov 5 13:21:28 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am gtypemodule.[ch]: New basic implementation of
|
||||
GTypePlugin interface as a GObject. Dynamically loaded modules can
|
||||
register any number of types and interface on the module.
|
||||
|
||||
Sun Nov 5 10:25:40 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gsignal.c (handlers_find): When appending handlers and
|
||||
|
@@ -32,6 +32,7 @@ gobject_public_h_sources = @STRIP_BEGIN@ \
|
||||
gparamspecs.h \
|
||||
gsignal.h \
|
||||
gtype.h \
|
||||
gtypemodule.h \
|
||||
gtypeplugin.h \
|
||||
gvalue.h \
|
||||
gvaluecollector.h \
|
||||
@@ -52,6 +53,7 @@ gobject_c_sources = @STRIP_BEGIN@ \
|
||||
gparamspecs.c \
|
||||
gsignal.c \
|
||||
gtype.c \
|
||||
gtypemodule.c \
|
||||
gtypeplugin.c \
|
||||
gvalue.c \
|
||||
gvaluetypes.c \
|
||||
|
@@ -1910,6 +1910,32 @@ g_type_get_plugin (GType type)
|
||||
return node ? node->plugin : NULL;
|
||||
}
|
||||
|
||||
GTypePlugin*
|
||||
g_type_interface_get_plugin (GType instance_type,
|
||||
GType interface_type)
|
||||
{
|
||||
TypeNode *node = LOOKUP_TYPE_NODE (instance_type);
|
||||
TypeNode *iface = LOOKUP_TYPE_NODE (interface_type);
|
||||
IFaceHolder *iholder;
|
||||
|
||||
g_return_val_if_fail (node == NULL, NULL);
|
||||
g_return_val_if_fail (iface == NULL, NULL);
|
||||
g_return_val_if_fail (G_TYPE_IS_INTERFACE (interface_type), NULL);
|
||||
|
||||
iholder = iface->private.iface_conformants;
|
||||
|
||||
while (iholder && iholder->instance_type != instance_type)
|
||||
iholder = iholder->next;
|
||||
|
||||
if (!iholder)
|
||||
{
|
||||
g_warning (G_STRLOC ": Attempt to look up plugin for invalid instance/interface type pair.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return iholder->plugin;
|
||||
}
|
||||
|
||||
GType
|
||||
g_type_fundamental_last (void)
|
||||
{
|
||||
|
@@ -295,6 +295,9 @@ void g_type_add_interface_dynamic (GType instance_type,
|
||||
|
||||
/* --- protected (for fundamental type implementations) --- */
|
||||
GTypePlugin* g_type_get_plugin (GType type);
|
||||
GTypePlugin* g_type_interface_get_plugin (GType instance_type,
|
||||
GType implementation_type);
|
||||
|
||||
GType g_type_fundamental_last (void);
|
||||
gboolean g_type_check_flags (GType type,
|
||||
guint flags);
|
||||
|
Reference in New Issue
Block a user