from_instance


Description:

[ CCode ( cname = "G_TYPE_FROM_INSTANCE" ) ]
public static Type from_instance (void* instance)

Example: Get a type from a instance:

public class MyClass : Object {
}

public static int main (string[] args) {
// Output: ``MyClass``
print ("%s\n", Type.from_instance (new MyClass ()).name ());
return 0;
}

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