mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
girepository: Rename symbols to the GI namespace
Rather than a mix of structs being in `GI` and their methods being in `g_`. We’ve chosen not to use the `g_` namespace because a number of the libgirepository class names are quite generic, so we’d end up with confusing symbols like `GScopeType` and `GArgument`. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3155
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_object_info_get_field_offset:
|
||||
* gi_object_info_get_field_offset:
|
||||
* @info: a #GIObjectInfo
|
||||
* @n: index of queried field
|
||||
*
|
||||
@@ -58,8 +58,8 @@
|
||||
* Returns: field offset in bytes
|
||||
*/
|
||||
static gint32
|
||||
g_object_info_get_field_offset (GIObjectInfo *info,
|
||||
gint n)
|
||||
gi_object_info_get_field_offset (GIObjectInfo *info,
|
||||
gint n)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
Header *header = (Header *)rinfo->typelib->data;
|
||||
@@ -83,16 +83,16 @@ g_object_info_get_field_offset (GIObjectInfo *info,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_parent:
|
||||
* gi_object_info_get_parent:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the parent of the object type.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): the #GIObjectInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIObjectInfo *
|
||||
g_object_info_get_parent (GIObjectInfo *info)
|
||||
gi_object_info_get_parent (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -103,14 +103,14 @@ g_object_info_get_parent (GIObjectInfo *info)
|
||||
blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||
|
||||
if (blob->parent)
|
||||
return (GIObjectInfo *) _g_info_from_entry (rinfo->repository,
|
||||
rinfo->typelib, blob->parent);
|
||||
return (GIObjectInfo *) _gi_info_from_entry (rinfo->repository,
|
||||
rinfo->typelib, blob->parent);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_abstract:
|
||||
* gi_object_info_get_abstract:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain if the object type is an abstract type, eg if it cannot be
|
||||
@@ -119,7 +119,7 @@ g_object_info_get_parent (GIObjectInfo *info)
|
||||
* Returns: %TRUE if the object type is abstract
|
||||
*/
|
||||
gboolean
|
||||
g_object_info_get_abstract (GIObjectInfo *info)
|
||||
gi_object_info_get_abstract (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -133,7 +133,7 @@ g_object_info_get_abstract (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_final:
|
||||
* gi_object_info_get_final:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Checks whether the object type is a final type, i.e. if it cannot
|
||||
@@ -144,7 +144,7 @@ g_object_info_get_abstract (GIObjectInfo *info)
|
||||
* Since: 1.70
|
||||
*/
|
||||
gboolean
|
||||
g_object_info_get_final (GIObjectInfo *info)
|
||||
gi_object_info_get_final (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *) info;
|
||||
ObjectBlob *blob;
|
||||
@@ -158,7 +158,7 @@ g_object_info_get_final (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_fundamental:
|
||||
* gi_object_info_get_fundamental:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain if the object type is of a fundamental type which is not
|
||||
@@ -167,7 +167,7 @@ g_object_info_get_final (GIObjectInfo *info)
|
||||
* Returns: %TRUE if the object type is a fundamental type
|
||||
*/
|
||||
gboolean
|
||||
g_object_info_get_fundamental (GIObjectInfo *info)
|
||||
gi_object_info_get_fundamental (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -181,7 +181,7 @@ g_object_info_get_fundamental (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_type_name:
|
||||
* gi_object_info_get_type_name:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the name of the objects class/type.
|
||||
@@ -189,7 +189,7 @@ g_object_info_get_fundamental (GIObjectInfo *info)
|
||||
* Returns: name of the objects type
|
||||
*/
|
||||
const gchar *
|
||||
g_object_info_get_type_name (GIObjectInfo *info)
|
||||
gi_object_info_get_type_name (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -199,11 +199,11 @@ g_object_info_get_type_name (GIObjectInfo *info)
|
||||
|
||||
blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||
|
||||
return g_typelib_get_string (rinfo->typelib, blob->gtype_name);
|
||||
return gi_typelib_get_string (rinfo->typelib, blob->gtype_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_type_init:
|
||||
* gi_object_info_get_type_init:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the function which when called will return the GType
|
||||
@@ -212,7 +212,7 @@ g_object_info_get_type_name (GIObjectInfo *info)
|
||||
* Returns: the type init function
|
||||
*/
|
||||
const gchar *
|
||||
g_object_info_get_type_init (GIObjectInfo *info)
|
||||
gi_object_info_get_type_init (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -222,11 +222,11 @@ g_object_info_get_type_init (GIObjectInfo *info)
|
||||
|
||||
blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||
|
||||
return g_typelib_get_string (rinfo->typelib, blob->gtype_init);
|
||||
return gi_typelib_get_string (rinfo->typelib, blob->gtype_init);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_n_interfaces:
|
||||
* gi_object_info_get_n_interfaces:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the number of interfaces that this object type has.
|
||||
@@ -234,7 +234,7 @@ g_object_info_get_type_init (GIObjectInfo *info)
|
||||
* Returns: number of interfaces
|
||||
*/
|
||||
gint
|
||||
g_object_info_get_n_interfaces (GIObjectInfo *info)
|
||||
gi_object_info_get_n_interfaces (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -248,18 +248,18 @@ g_object_info_get_n_interfaces (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_interface:
|
||||
* gi_object_info_get_interface:
|
||||
* @info: a #GIObjectInfo
|
||||
* @n: index of interface to get
|
||||
*
|
||||
* Obtain an object type interface at index @n.
|
||||
*
|
||||
* Returns: (transfer full): the #GIInterfaceInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIInterfaceInfo *
|
||||
g_object_info_get_interface (GIObjectInfo *info,
|
||||
gint n)
|
||||
gi_object_info_get_interface (GIObjectInfo *info,
|
||||
gint n)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -269,12 +269,12 @@ g_object_info_get_interface (GIObjectInfo *info,
|
||||
|
||||
blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||
|
||||
return (GIInterfaceInfo *) _g_info_from_entry (rinfo->repository,
|
||||
rinfo->typelib, blob->interfaces[n]);
|
||||
return (GIInterfaceInfo *) _gi_info_from_entry (rinfo->repository,
|
||||
rinfo->typelib, blob->interfaces[n]);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_n_fields:
|
||||
* gi_object_info_get_n_fields:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the number of fields that this object type has.
|
||||
@@ -282,7 +282,7 @@ g_object_info_get_interface (GIObjectInfo *info,
|
||||
* Returns: number of fields
|
||||
*/
|
||||
gint
|
||||
g_object_info_get_n_fields (GIObjectInfo *info)
|
||||
gi_object_info_get_n_fields (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -296,18 +296,18 @@ g_object_info_get_n_fields (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_field:
|
||||
* gi_object_info_get_field:
|
||||
* @info: a #GIObjectInfo
|
||||
* @n: index of field to get
|
||||
*
|
||||
* Obtain an object type field at index @n.
|
||||
*
|
||||
* Returns: (transfer full): the #GIFieldInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIFieldInfo *
|
||||
g_object_info_get_field (GIObjectInfo *info,
|
||||
gint n)
|
||||
gi_object_info_get_field (GIObjectInfo *info,
|
||||
gint n)
|
||||
{
|
||||
gint offset;
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
@@ -315,13 +315,13 @@ g_object_info_get_field (GIObjectInfo *info,
|
||||
g_return_val_if_fail (info != NULL, NULL);
|
||||
g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
|
||||
|
||||
offset = g_object_info_get_field_offset(info, n);
|
||||
offset = gi_object_info_get_field_offset(info, n);
|
||||
|
||||
return (GIFieldInfo *) g_info_new (GI_INFO_TYPE_FIELD, (GIBaseInfo*)info, rinfo->typelib, offset);
|
||||
return (GIFieldInfo *) gi_info_new (GI_INFO_TYPE_FIELD, (GIBaseInfo*)info, rinfo->typelib, offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_n_properties:
|
||||
* gi_object_info_get_n_properties:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the number of properties that this object type has.
|
||||
@@ -329,7 +329,7 @@ g_object_info_get_field (GIObjectInfo *info,
|
||||
* Returns: number of properties
|
||||
*/
|
||||
gint
|
||||
g_object_info_get_n_properties (GIObjectInfo *info)
|
||||
gi_object_info_get_n_properties (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -342,18 +342,18 @@ g_object_info_get_n_properties (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_property:
|
||||
* gi_object_info_get_property:
|
||||
* @info: a #GIObjectInfo
|
||||
* @n: index of property to get
|
||||
*
|
||||
* Obtain an object type property at index @n.
|
||||
*
|
||||
* Returns: (transfer full): the #GIPropertyInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIPropertyInfo *
|
||||
g_object_info_get_property (GIObjectInfo *info,
|
||||
gint n)
|
||||
gi_object_info_get_property (GIObjectInfo *info,
|
||||
gint n)
|
||||
{
|
||||
gint offset;
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
@@ -372,12 +372,12 @@ g_object_info_get_property (GIObjectInfo *info,
|
||||
+ blob->n_field_callbacks * header->callback_blob_size
|
||||
+ n * header->property_blob_size;
|
||||
|
||||
return (GIPropertyInfo *) g_info_new (GI_INFO_TYPE_PROPERTY, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
return (GIPropertyInfo *) gi_info_new (GI_INFO_TYPE_PROPERTY, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_n_methods:
|
||||
* gi_object_info_get_n_methods:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the number of methods that this object type has.
|
||||
@@ -385,7 +385,7 @@ g_object_info_get_property (GIObjectInfo *info,
|
||||
* Returns: number of methods
|
||||
*/
|
||||
gint
|
||||
g_object_info_get_n_methods (GIObjectInfo *info)
|
||||
gi_object_info_get_n_methods (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -399,18 +399,18 @@ g_object_info_get_n_methods (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_method:
|
||||
* gi_object_info_get_method:
|
||||
* @info: a #GIObjectInfo
|
||||
* @n: index of method to get
|
||||
*
|
||||
* Obtain an object type method at index @n.
|
||||
*
|
||||
* Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIFunctionInfo *
|
||||
g_object_info_get_method (GIObjectInfo *info,
|
||||
gint n)
|
||||
gi_object_info_get_method (GIObjectInfo *info,
|
||||
gint n)
|
||||
{
|
||||
gint offset;
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
@@ -431,12 +431,12 @@ g_object_info_get_method (GIObjectInfo *info,
|
||||
+ blob->n_properties * header->property_blob_size
|
||||
+ n * header->function_blob_size;
|
||||
|
||||
return (GIFunctionInfo *) g_info_new (GI_INFO_TYPE_FUNCTION, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
return (GIFunctionInfo *) gi_info_new (GI_INFO_TYPE_FUNCTION, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_find_method:
|
||||
* gi_object_info_find_method:
|
||||
* @info: a #GIObjectInfo
|
||||
* @name: name of method to obtain
|
||||
*
|
||||
@@ -444,11 +444,11 @@ g_object_info_get_method (GIObjectInfo *info,
|
||||
* returned if there's no method available with that name.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): the #GIFunctionInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIFunctionInfo *
|
||||
g_object_info_find_method (GIObjectInfo *info,
|
||||
const gchar *name)
|
||||
gi_object_info_find_method (GIObjectInfo *info,
|
||||
const gchar *name)
|
||||
{
|
||||
gint offset;
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
@@ -467,11 +467,11 @@ g_object_info_find_method (GIObjectInfo *info,
|
||||
+ blob->n_field_callbacks * header->callback_blob_size
|
||||
+ blob->n_properties * header->property_blob_size;
|
||||
|
||||
return _g_base_info_find_method ((GIBaseInfo*)info, offset, blob->n_methods, name);
|
||||
return _gi_base_info_find_method ((GIBaseInfo*)info, offset, blob->n_methods, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_find_method_using_interfaces:
|
||||
* gi_object_info_find_method_using_interfaces:
|
||||
* @info: a #GIObjectInfo
|
||||
* @name: name of method to obtain
|
||||
* @implementor: (out) (transfer full): The implementor of the interface
|
||||
@@ -484,51 +484,51 @@ g_object_info_find_method (GIObjectInfo *info,
|
||||
* to chain up if that's desired.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): the #GIFunctionInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIFunctionInfo *
|
||||
g_object_info_find_method_using_interfaces (GIObjectInfo *info,
|
||||
const gchar *name,
|
||||
GIObjectInfo **implementor)
|
||||
gi_object_info_find_method_using_interfaces (GIObjectInfo *info,
|
||||
const gchar *name,
|
||||
GIObjectInfo **implementor)
|
||||
{
|
||||
GIFunctionInfo *result = NULL;
|
||||
GIObjectInfo *implementor_result = NULL;
|
||||
|
||||
result = g_object_info_find_method (info, name);
|
||||
result = gi_object_info_find_method (info, name);
|
||||
if (result)
|
||||
implementor_result = g_base_info_ref ((GIBaseInfo*) info);
|
||||
implementor_result = gi_base_info_ref ((GIBaseInfo*) info);
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
int n_interfaces;
|
||||
int i;
|
||||
|
||||
n_interfaces = g_object_info_get_n_interfaces (info);
|
||||
n_interfaces = gi_object_info_get_n_interfaces (info);
|
||||
for (i = 0; i < n_interfaces; ++i)
|
||||
{
|
||||
GIInterfaceInfo *iface_info;
|
||||
|
||||
iface_info = g_object_info_get_interface (info, i);
|
||||
iface_info = gi_object_info_get_interface (info, i);
|
||||
|
||||
result = g_interface_info_find_method (iface_info, name);
|
||||
result = gi_interface_info_find_method (iface_info, name);
|
||||
|
||||
if (result != NULL)
|
||||
{
|
||||
implementor_result = iface_info;
|
||||
break;
|
||||
}
|
||||
g_base_info_unref ((GIBaseInfo*) iface_info);
|
||||
gi_base_info_unref ((GIBaseInfo*) iface_info);
|
||||
}
|
||||
}
|
||||
if (implementor)
|
||||
*implementor = implementor_result;
|
||||
else if (implementor_result != NULL)
|
||||
g_base_info_unref ((GIBaseInfo*) implementor_result);
|
||||
gi_base_info_unref ((GIBaseInfo*) implementor_result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_n_signals:
|
||||
* gi_object_info_get_n_signals:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the number of signals that this object type has.
|
||||
@@ -536,7 +536,7 @@ g_object_info_find_method_using_interfaces (GIObjectInfo *info,
|
||||
* Returns: number of signals
|
||||
*/
|
||||
gint
|
||||
g_object_info_get_n_signals (GIObjectInfo *info)
|
||||
gi_object_info_get_n_signals (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -550,18 +550,18 @@ g_object_info_get_n_signals (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_signal:
|
||||
* gi_object_info_get_signal:
|
||||
* @info: a #GIObjectInfo
|
||||
* @n: index of signal to get
|
||||
*
|
||||
* Obtain an object type signal at index @n.
|
||||
*
|
||||
* Returns: (transfer full): the #GISignalInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GISignalInfo *
|
||||
g_object_info_get_signal (GIObjectInfo *info,
|
||||
gint n)
|
||||
gi_object_info_get_signal (GIObjectInfo *info,
|
||||
gint n)
|
||||
{
|
||||
gint offset;
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
@@ -582,12 +582,12 @@ g_object_info_get_signal (GIObjectInfo *info,
|
||||
+ blob->n_methods * header->function_blob_size
|
||||
+ n * header->signal_blob_size;
|
||||
|
||||
return (GISignalInfo *) g_info_new (GI_INFO_TYPE_SIGNAL, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
return (GISignalInfo *) gi_info_new (GI_INFO_TYPE_SIGNAL, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_find_signal:
|
||||
* gi_object_info_find_signal:
|
||||
* @info: a #GIObjectInfo
|
||||
* @name: Name of signal
|
||||
*
|
||||
@@ -596,20 +596,20 @@ g_object_info_get_signal (GIObjectInfo *info,
|
||||
* Returns: (transfer full) (nullable): Info for the signal with name @name in @info, or %NULL on failure.
|
||||
*/
|
||||
GISignalInfo *
|
||||
g_object_info_find_signal (GIObjectInfo *info,
|
||||
const gchar *name)
|
||||
gi_object_info_find_signal (GIObjectInfo *info,
|
||||
const gchar *name)
|
||||
{
|
||||
gint n_signals;
|
||||
gint i;
|
||||
|
||||
n_signals = g_object_info_get_n_signals (info);
|
||||
n_signals = gi_object_info_get_n_signals (info);
|
||||
for (i = 0; i < n_signals; i++)
|
||||
{
|
||||
GISignalInfo *siginfo = g_object_info_get_signal (info, i);
|
||||
GISignalInfo *siginfo = gi_object_info_get_signal (info, i);
|
||||
|
||||
if (g_strcmp0 (g_base_info_get_name (siginfo), name) != 0)
|
||||
if (g_strcmp0 (gi_base_info_get_name (siginfo), name) != 0)
|
||||
{
|
||||
g_base_info_unref ((GIBaseInfo*)siginfo);
|
||||
gi_base_info_unref ((GIBaseInfo*)siginfo);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -620,7 +620,7 @@ g_object_info_find_signal (GIObjectInfo *info,
|
||||
|
||||
|
||||
/**
|
||||
* g_object_info_get_n_vfuncs:
|
||||
* gi_object_info_get_n_vfuncs:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the number of virtual functions that this object type has.
|
||||
@@ -628,7 +628,7 @@ g_object_info_find_signal (GIObjectInfo *info,
|
||||
* Returns: number of virtual functions
|
||||
*/
|
||||
gint
|
||||
g_object_info_get_n_vfuncs (GIObjectInfo *info)
|
||||
gi_object_info_get_n_vfuncs (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -642,18 +642,18 @@ g_object_info_get_n_vfuncs (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_vfunc:
|
||||
* gi_object_info_get_vfunc:
|
||||
* @info: a #GIObjectInfo
|
||||
* @n: index of virtual function to get
|
||||
*
|
||||
* Obtain an object type virtual function at index @n.
|
||||
*
|
||||
* Returns: (transfer full): the #GIVFuncInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIVFuncInfo *
|
||||
g_object_info_get_vfunc (GIObjectInfo *info,
|
||||
gint n)
|
||||
gi_object_info_get_vfunc (GIObjectInfo *info,
|
||||
gint n)
|
||||
{
|
||||
gint offset;
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
@@ -675,29 +675,29 @@ g_object_info_get_vfunc (GIObjectInfo *info,
|
||||
+ blob->n_signals * header->signal_blob_size
|
||||
+ n * header->vfunc_blob_size;
|
||||
|
||||
return (GIVFuncInfo *) g_info_new (GI_INFO_TYPE_VFUNC, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
return (GIVFuncInfo *) gi_info_new (GI_INFO_TYPE_VFUNC, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_find_vfunc:
|
||||
* gi_object_info_find_vfunc:
|
||||
* @info: a #GIObjectInfo
|
||||
* @name: The name of a virtual function to find.
|
||||
*
|
||||
* Locate a virtual function slot with name @name. Note that the namespace
|
||||
* for virtuals is distinct from that of methods; there may or may not be
|
||||
* a concrete method associated for a virtual. If there is one, it may
|
||||
* be retrieved using g_vfunc_info_get_invoker(), otherwise %NULL will be
|
||||
* be retrieved using gi_vfunc_info_get_invoker(), otherwise %NULL will be
|
||||
* returned.
|
||||
* See the documentation for g_vfunc_info_get_invoker() for more
|
||||
* See the documentation for gi_vfunc_info_get_invoker() for more
|
||||
* information on invoking virtuals.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): the #GIVFuncInfo, or %NULL. Free it with
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIVFuncInfo *
|
||||
g_object_info_find_vfunc (GIObjectInfo *info,
|
||||
const gchar *name)
|
||||
gi_object_info_find_vfunc (GIObjectInfo *info,
|
||||
const gchar *name)
|
||||
{
|
||||
gint offset;
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
@@ -718,11 +718,11 @@ g_object_info_find_vfunc (GIObjectInfo *info,
|
||||
+ blob->n_methods * header->function_blob_size
|
||||
+ blob->n_signals * header->signal_blob_size;
|
||||
|
||||
return _g_base_info_find_vfunc (rinfo, offset, blob->n_vfuncs, name);
|
||||
return _gi_base_info_find_vfunc (rinfo, offset, blob->n_vfuncs, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_find_vfunc_using_interfaces:
|
||||
* gi_object_info_find_vfunc_using_interfaces:
|
||||
* @info: a #GIObjectInfo
|
||||
* @name: name of vfunc to obtain
|
||||
* @implementor: (out) (transfer full): The implementor of the interface
|
||||
@@ -731,58 +731,58 @@ g_object_info_find_vfunc (GIObjectInfo *info,
|
||||
* @info and any interfaces it implements. Note that the namespace for
|
||||
* virtuals is distinct from that of methods; there may or may not be a
|
||||
* concrete method associated for a virtual. If there is one, it may be
|
||||
* retrieved using g_vfunc_info_get_invoker(), otherwise %NULL will be
|
||||
* retrieved using gi_vfunc_info_get_invoker(), otherwise %NULL will be
|
||||
* returned.
|
||||
*
|
||||
* Note that this function does *not* search parent classes; you will have
|
||||
* to chain up if that's desired.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): the #GIVFuncInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIVFuncInfo *
|
||||
g_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
|
||||
const gchar *name,
|
||||
GIObjectInfo **implementor)
|
||||
gi_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
|
||||
const gchar *name,
|
||||
GIObjectInfo **implementor)
|
||||
{
|
||||
GIVFuncInfo *result = NULL;
|
||||
GIObjectInfo *implementor_result = NULL;
|
||||
|
||||
result = g_object_info_find_vfunc (info, name);
|
||||
result = gi_object_info_find_vfunc (info, name);
|
||||
if (result)
|
||||
implementor_result = g_base_info_ref ((GIBaseInfo*) info);
|
||||
implementor_result = gi_base_info_ref ((GIBaseInfo*) info);
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
int n_interfaces;
|
||||
int i;
|
||||
|
||||
n_interfaces = g_object_info_get_n_interfaces (info);
|
||||
n_interfaces = gi_object_info_get_n_interfaces (info);
|
||||
for (i = 0; i < n_interfaces; ++i)
|
||||
{
|
||||
GIInterfaceInfo *iface_info;
|
||||
|
||||
iface_info = g_object_info_get_interface (info, i);
|
||||
iface_info = gi_object_info_get_interface (info, i);
|
||||
|
||||
result = g_interface_info_find_vfunc (iface_info, name);
|
||||
result = gi_interface_info_find_vfunc (iface_info, name);
|
||||
|
||||
if (result != NULL)
|
||||
{
|
||||
implementor_result = iface_info;
|
||||
break;
|
||||
}
|
||||
g_base_info_unref ((GIBaseInfo*) iface_info);
|
||||
gi_base_info_unref ((GIBaseInfo*) iface_info);
|
||||
}
|
||||
}
|
||||
if (implementor)
|
||||
*implementor = implementor_result;
|
||||
else if (implementor_result != NULL)
|
||||
g_base_info_unref ((GIBaseInfo*) implementor_result);
|
||||
gi_base_info_unref ((GIBaseInfo*) implementor_result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_n_constants:
|
||||
* gi_object_info_get_n_constants:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the number of constants that this object type has.
|
||||
@@ -790,7 +790,7 @@ g_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
|
||||
* Returns: number of constants
|
||||
*/
|
||||
gint
|
||||
g_object_info_get_n_constants (GIObjectInfo *info)
|
||||
gi_object_info_get_n_constants (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -804,18 +804,18 @@ g_object_info_get_n_constants (GIObjectInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_constant:
|
||||
* gi_object_info_get_constant:
|
||||
* @info: a #GIObjectInfo
|
||||
* @n: index of constant to get
|
||||
*
|
||||
* Obtain an object type constant at index @n.
|
||||
*
|
||||
* Returns: (transfer full): the #GIConstantInfo. Free the struct by calling
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIConstantInfo *
|
||||
g_object_info_get_constant (GIObjectInfo *info,
|
||||
gint n)
|
||||
gi_object_info_get_constant (GIObjectInfo *info,
|
||||
gint n)
|
||||
{
|
||||
gint offset;
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
@@ -838,22 +838,22 @@ g_object_info_get_constant (GIObjectInfo *info,
|
||||
+ blob->n_vfuncs * header->vfunc_blob_size
|
||||
+ n * header->constant_blob_size;
|
||||
|
||||
return (GIConstantInfo *) g_info_new (GI_INFO_TYPE_CONSTANT, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
return (GIConstantInfo *) gi_info_new (GI_INFO_TYPE_CONSTANT, (GIBaseInfo*)info,
|
||||
rinfo->typelib, offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_class_struct:
|
||||
* gi_object_info_get_class_struct:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Every #GObject has two structures; an instance structure and a class
|
||||
* structure. This function returns the metadata for the class structure.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): the #GIStructInfo or %NULL. Free with
|
||||
* g_base_info_unref() when done.
|
||||
* gi_base_info_unref() when done.
|
||||
*/
|
||||
GIStructInfo *
|
||||
g_object_info_get_class_struct (GIObjectInfo *info)
|
||||
gi_object_info_get_class_struct (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -864,8 +864,8 @@ g_object_info_get_class_struct (GIObjectInfo *info)
|
||||
blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||
|
||||
if (blob->gtype_struct)
|
||||
return (GIStructInfo *) _g_info_from_entry (rinfo->repository,
|
||||
rinfo->typelib, blob->gtype_struct);
|
||||
return (GIStructInfo *) _gi_info_from_entry (rinfo->repository,
|
||||
rinfo->typelib, blob->gtype_struct);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -881,11 +881,11 @@ _get_func(GIObjectInfo *info,
|
||||
GIObjectInfo *parent_info;
|
||||
gpointer func = NULL;
|
||||
|
||||
parent_info = g_base_info_ref (info);
|
||||
parent_info = gi_base_info_ref (info);
|
||||
while (parent_info != NULL)
|
||||
{
|
||||
parents = g_slist_prepend (parents, parent_info);
|
||||
parent_info = g_object_info_get_parent (parent_info);
|
||||
parent_info = gi_object_info_get_parent (parent_info);
|
||||
}
|
||||
|
||||
for (l = parents; l; l = l->next)
|
||||
@@ -895,28 +895,28 @@ _get_func(GIObjectInfo *info,
|
||||
if (symbol == NULL)
|
||||
continue;
|
||||
|
||||
g_typelib_symbol (((GIRealInfo *)parent_info)->typelib, symbol, (gpointer*) &func);
|
||||
gi_typelib_symbol (((GIRealInfo *)parent_info)->typelib, symbol, (gpointer*) &func);
|
||||
if (func)
|
||||
break;
|
||||
}
|
||||
|
||||
g_slist_free_full (parents, (GDestroyNotify) g_base_info_unref);
|
||||
g_slist_free_full (parents, (GDestroyNotify) gi_base_info_unref);
|
||||
return func;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_ref_function:
|
||||
* gi_object_info_get_ref_function:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the symbol name of the function that should be called to ref this
|
||||
* object type. It's mainly used fundamental types. The type signature for
|
||||
* the symbol is %GIObjectInfoRefFunction, to fetch the function pointer
|
||||
* see g_object_info_get_ref_function().
|
||||
* see gi_object_info_get_ref_function().
|
||||
*
|
||||
* Returns: (nullable): the symbol or %NULL
|
||||
*/
|
||||
const char *
|
||||
g_object_info_get_ref_function (GIObjectInfo *info)
|
||||
gi_object_info_get_ref_function (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -927,13 +927,13 @@ g_object_info_get_ref_function (GIObjectInfo *info)
|
||||
blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||
|
||||
if (blob->ref_func)
|
||||
return g_typelib_get_string (rinfo->typelib, blob->ref_func);
|
||||
return gi_typelib_get_string (rinfo->typelib, blob->ref_func);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_ref_function_pointer: (skip)
|
||||
* gi_object_info_get_ref_function_pointer: (skip)
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain a pointer to a function which can be used to
|
||||
@@ -944,27 +944,27 @@ g_object_info_get_ref_function (GIObjectInfo *info)
|
||||
* Returns: (nullable): the function pointer or %NULL
|
||||
*/
|
||||
GIObjectInfoRefFunction
|
||||
g_object_info_get_ref_function_pointer (GIObjectInfo *info)
|
||||
gi_object_info_get_ref_function_pointer (GIObjectInfo *info)
|
||||
{
|
||||
g_return_val_if_fail (info != NULL, NULL);
|
||||
g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
|
||||
|
||||
return (GIObjectInfoRefFunction)_get_func(info, (SymbolGetter)g_object_info_get_ref_function);
|
||||
return (GIObjectInfoRefFunction)_get_func(info, (SymbolGetter)gi_object_info_get_ref_function);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_unref_function:
|
||||
* gi_object_info_get_unref_function:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the symbol name of the function that should be called to unref this
|
||||
* object type. It's mainly used fundamental types. The type signature for
|
||||
* the symbol is %GIObjectInfoUnrefFunction, to fetch the function pointer
|
||||
* see g_object_info_get_unref_function().
|
||||
* see gi_object_info_get_unref_function().
|
||||
*
|
||||
* Returns: (nullable): the symbol or %NULL
|
||||
*/
|
||||
const char *
|
||||
g_object_info_get_unref_function (GIObjectInfo *info)
|
||||
gi_object_info_get_unref_function (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -975,13 +975,13 @@ g_object_info_get_unref_function (GIObjectInfo *info)
|
||||
blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||
|
||||
if (blob->unref_func)
|
||||
return g_typelib_get_string (rinfo->typelib, blob->unref_func);
|
||||
return gi_typelib_get_string (rinfo->typelib, blob->unref_func);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_unref_function_pointer: (skip)
|
||||
* gi_object_info_get_unref_function_pointer: (skip)
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain a pointer to a function which can be used to
|
||||
@@ -992,28 +992,28 @@ g_object_info_get_unref_function (GIObjectInfo *info)
|
||||
* Returns: (nullable): the function pointer or %NULL
|
||||
*/
|
||||
GIObjectInfoUnrefFunction
|
||||
g_object_info_get_unref_function_pointer (GIObjectInfo *info)
|
||||
gi_object_info_get_unref_function_pointer (GIObjectInfo *info)
|
||||
{
|
||||
g_return_val_if_fail (info != NULL, NULL);
|
||||
g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
|
||||
|
||||
return (GIObjectInfoUnrefFunction)_get_func(info, (SymbolGetter)g_object_info_get_unref_function);
|
||||
return (GIObjectInfoUnrefFunction)_get_func(info, (SymbolGetter)gi_object_info_get_unref_function);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_set_value_function:
|
||||
* gi_object_info_get_set_value_function:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the symbol name of the function that should be called to convert
|
||||
* set a GValue giving an object instance pointer of this object type.
|
||||
* I's mainly used fundamental types. The type signature for the symbol
|
||||
* is %GIObjectInfoSetValueFunction, to fetch the function pointer
|
||||
* see g_object_info_get_set_value_function().
|
||||
* see gi_object_info_get_set_value_function().
|
||||
*
|
||||
* Returns: (nullable): the symbol or %NULL
|
||||
*/
|
||||
const char *
|
||||
g_object_info_get_set_value_function (GIObjectInfo *info)
|
||||
gi_object_info_get_set_value_function (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -1024,13 +1024,13 @@ g_object_info_get_set_value_function (GIObjectInfo *info)
|
||||
blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||
|
||||
if (blob->set_value_func)
|
||||
return g_typelib_get_string (rinfo->typelib, blob->set_value_func);
|
||||
return gi_typelib_get_string (rinfo->typelib, blob->set_value_func);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_set_value_function_pointer: (skip)
|
||||
* gi_object_info_get_set_value_function_pointer: (skip)
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain a pointer to a function which can be used to
|
||||
@@ -1041,28 +1041,28 @@ g_object_info_get_set_value_function (GIObjectInfo *info)
|
||||
* Returns: (nullable): the function pointer or %NULL
|
||||
*/
|
||||
GIObjectInfoSetValueFunction
|
||||
g_object_info_get_set_value_function_pointer (GIObjectInfo *info)
|
||||
gi_object_info_get_set_value_function_pointer (GIObjectInfo *info)
|
||||
{
|
||||
g_return_val_if_fail (info != NULL, NULL);
|
||||
g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
|
||||
|
||||
return (GIObjectInfoSetValueFunction)_get_func(info, (SymbolGetter)g_object_info_get_set_value_function);
|
||||
return (GIObjectInfoSetValueFunction)_get_func(info, (SymbolGetter)gi_object_info_get_set_value_function);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_get_value_function:
|
||||
* gi_object_info_get_get_value_function:
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain the symbol name of the function that should be called to convert
|
||||
* an object instance pointer of this object type to a GValue.
|
||||
* I's mainly used fundamental types. The type signature for the symbol
|
||||
* is %GIObjectInfoGetValueFunction, to fetch the function pointer
|
||||
* see g_object_info_get_get_value_function().
|
||||
* see gi_object_info_get_get_value_function().
|
||||
*
|
||||
* Returns: (nullable): the symbol or %NULL
|
||||
*/
|
||||
const char *
|
||||
g_object_info_get_get_value_function (GIObjectInfo *info)
|
||||
gi_object_info_get_get_value_function (GIObjectInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
ObjectBlob *blob;
|
||||
@@ -1073,13 +1073,13 @@ g_object_info_get_get_value_function (GIObjectInfo *info)
|
||||
blob = (ObjectBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||
|
||||
if (blob->get_value_func)
|
||||
return g_typelib_get_string (rinfo->typelib, blob->get_value_func);
|
||||
return gi_typelib_get_string (rinfo->typelib, blob->get_value_func);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_object_info_get_get_value_function_pointer: (skip)
|
||||
* gi_object_info_get_get_value_function_pointer: (skip)
|
||||
* @info: a #GIObjectInfo
|
||||
*
|
||||
* Obtain a pointer to a function which can be used to
|
||||
@@ -1090,10 +1090,10 @@ g_object_info_get_get_value_function (GIObjectInfo *info)
|
||||
* Returns: (nullable): the function pointer or %NULL
|
||||
*/
|
||||
GIObjectInfoGetValueFunction
|
||||
g_object_info_get_get_value_function_pointer (GIObjectInfo *info)
|
||||
gi_object_info_get_get_value_function_pointer (GIObjectInfo *info)
|
||||
{
|
||||
g_return_val_if_fail (info != NULL, NULL);
|
||||
g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
|
||||
|
||||
return (GIObjectInfoGetValueFunction)_get_func(info, (SymbolGetter)g_object_info_get_get_value_function);
|
||||
return (GIObjectInfoGetValueFunction)_get_func(info, (SymbolGetter)gi_object_info_get_get_value_function);
|
||||
}
|
||||
|
Reference in New Issue
Block a user