mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
Bug 557011 - Add g_object_info_get_abstract
svn path=/trunk/; revision=757
This commit is contained in:
parent
0de03983be
commit
c3330c06c7
8
ginfo.c
8
ginfo.c
@ -1123,6 +1123,14 @@ g_object_info_get_parent (GIObjectInfo *info)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_object_info_get_abstract (GIObjectInfo *info)
|
||||
{
|
||||
GIBaseInfo *base = (GIBaseInfo *)info;
|
||||
ObjectBlob *blob = (ObjectBlob *)&base->typelib->data[base->offset];
|
||||
return blob->abstract != 0;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
g_object_info_get_type_name (GIObjectInfo *info)
|
||||
{
|
||||
|
@ -392,6 +392,7 @@ GIValueInfo * g_enum_info_get_value (GIEnumInfo *in
|
||||
|
||||
const gchar * g_object_info_get_type_name (GIObjectInfo *info);
|
||||
const gchar * g_object_info_get_type_init (GIObjectInfo *info);
|
||||
gboolean g_object_info_get_abstract (GIObjectInfo *info);
|
||||
GIObjectInfo * g_object_info_get_parent (GIObjectInfo *info);
|
||||
gint g_object_info_get_n_interfaces (GIObjectInfo *info);
|
||||
GIInterfaceInfo * g_object_info_get_interface (GIObjectInfo *info,
|
||||
|
@ -1872,6 +1872,7 @@ g_ir_node_build_typelib (GIrNode *node,
|
||||
GList *members;
|
||||
|
||||
blob->blob_type = BLOB_TYPE_OBJECT;
|
||||
blob->abstract = object->abstract;
|
||||
blob->deprecated = object->deprecated;
|
||||
blob->reserved = 0;
|
||||
blob->name = write_string (node->name, strings, data, offset2);
|
||||
|
@ -212,6 +212,7 @@ struct _GIrNodeInterface
|
||||
{
|
||||
GIrNode node;
|
||||
|
||||
gboolean abstract;
|
||||
gboolean deprecated;
|
||||
|
||||
gchar *gtype_name;
|
||||
|
@ -1362,12 +1362,14 @@ start_class (GMarkupParseContext *context,
|
||||
const gchar *typename;
|
||||
const gchar *typeinit;
|
||||
const gchar *deprecated;
|
||||
const gchar *abstract;
|
||||
|
||||
name = find_attribute ("name", attribute_names, attribute_values);
|
||||
parent = find_attribute ("parent", attribute_names, attribute_values);
|
||||
typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
|
||||
typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
|
||||
deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
|
||||
abstract = find_attribute ("abstract", attribute_names, attribute_values);
|
||||
|
||||
if (name == NULL)
|
||||
MISSING_ATTRIBUTE (context, error, element_name, "name");
|
||||
@ -1388,7 +1390,9 @@ start_class (GMarkupParseContext *context,
|
||||
iface->deprecated = TRUE;
|
||||
else
|
||||
iface->deprecated = FALSE;
|
||||
|
||||
|
||||
iface->abstract = abstract && strcmp (abstract, "1") == 0;
|
||||
|
||||
ctx->current_node = (GIrNode *) iface;
|
||||
ctx->current_module->entries =
|
||||
g_list_append (ctx->current_module->entries, iface);
|
||||
|
@ -407,9 +407,10 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
guint16 blob_type; /* 7 */
|
||||
guint16 deprecated : 1;
|
||||
guint16 reserved :15;
|
||||
guint32 name;
|
||||
guint16 deprecated : 1;
|
||||
guint16 abstract : 1;
|
||||
guint16 reserved :14;
|
||||
guint32 name;
|
||||
|
||||
guint32 gtype_name;
|
||||
guint32 gtype_init;
|
||||
@ -440,7 +441,7 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
guint16 blob_type;
|
||||
guint16 deprecated : 1;
|
||||
guint16 deprecated : 1;
|
||||
guint16 reserved :15;
|
||||
guint32 name;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user