TypeQuery


Object Hierarchy:

GLib.TypeQuery GLib.TypeQuery GLib.TypeQuery

Description:

[ CCode ( has_type_id = false ) ]
public struct TypeQuery

A structure holding information for a specific type.

See also: query

Example: Query the type system for type-information:

public abstract class AbstractGObject : Object {
}

public static int main (string[] args) {
Type type = typeof (AbstractGObject);
TypeQuery query;

// Output:
// ``type: 156018024``
// ``name: AbstractGObject``
// ``class-size: 68``
// ``instance-size: 16``
type.query (out query);
print ("type: %s\n", query.type.to_string ());
print ("name: %s\n", query.type_name);
print ("class-size: %u\n", query.class_size);
print ("instance-size: %u\n", query.instance_size);

return 0;
}

valac --pkg gobject-2.0 GLib.Type.query.vala

Namespace: GLib
Package: gobject-2.0

Content:

Fields:




2022 vala-language.org