Package ch.bailu.gtk.gobject
Class ObjectClass
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.gobject.ObjectClass
- All Implemented Interfaces:
PointerInterface
- Direct Known Subclasses:
ObjectClassExtended
The class structure for the GObject type.
<!-- language="C" -->
// Example of implementing a singleton using a constructor.
static MySingleton *the_singleton = NULL;
static GObject*
my_singleton_constructor (GType type,
guint n_construct_params,
GObjectConstructParam *construct_params)
{
GObject *object;
if (!the_singleton)
{
object = G_OBJECT_CLASS (parent_class)->constructor (type,
n_construct_params,
construct_params);
the_singleton = MY_SINGLETON (object);
}
else
object = g_object_ref (G_OBJECT (the_singleton));
return object;
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfacestatic interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindProperty(Str property_name) Looks up the #GParamSpec for a property of a class.findProperty(String property_name) Looks up the #GParamSpec for a property of a class.static ClassHandlerch.bailu.gtk.gobject.JnaObjectClass.OnConstructorch.bailu.gtk.gobject.JnaObjectClass.OnDisposech.bailu.gtk.gobject.JnaObjectClass.OnFinalizech.bailu.gtk.gobject.JnaObjectClass.OnGetPropertych.bailu.gtk.gobject.JnaObjectClass.OnSetPropertystatic intstatic TypeSystem.TypeSizestatic TypeSystem.TypeSizevoidinstallProperty(int property_id, ParamSpec pspec) Installs a new property.voidoverrideProperty(int property_id, Str name) Registers @property_id as referring to a property with the name
@name in a parent class or in an interface implemented by @oclass.voidoverrideProperty(int property_id, String name) Registers @property_id as referring to a property with the name
@name in a parent class or in an interface implemented by @oclass.voidsetFieldConstructor(ObjectClass.OnConstructor constructor) voidsetFieldDispose(ObjectClass.OnDispose dispose) voidsetFieldFinalize(ObjectClass.OnFinalize finalize) voidsetFieldGetProperty(ObjectClass.OnGetProperty get_property) voidsetFieldSetProperty(ObjectClass.OnSetProperty set_property) Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksMethods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
G_TYPE_CLASS
the parent class
Private field: direct-type- See Also:
-
CONSTRUCT_PROPERTIES
- See Also:
-
CONSTRUCTOR
- See Also:
-
SET_PROPERTY
- See Also:
-
GET_PROPERTY
- See Also:
-
DISPOSE
- See Also:
-
FINALIZE
- See Also:
-
-
Constructor Details
-
ObjectClass
-
-
Method Details
-
getClassHandler
-
getFieldConstructProperties
-
setFieldConstructor
-
getFieldConstructor
public ch.bailu.gtk.gobject.JnaObjectClass.OnConstructor getFieldConstructor() -
setFieldSetProperty
-
getFieldSetProperty
public ch.bailu.gtk.gobject.JnaObjectClass.OnSetProperty getFieldSetProperty() -
setFieldGetProperty
-
getFieldGetProperty
public ch.bailu.gtk.gobject.JnaObjectClass.OnGetProperty getFieldGetProperty() -
setFieldDispose
-
getFieldDispose
public ch.bailu.gtk.gobject.JnaObjectClass.OnDispose getFieldDispose() -
setFieldFinalize
-
getFieldFinalize
public ch.bailu.gtk.gobject.JnaObjectClass.OnFinalize getFieldFinalize() -
findProperty
Looks up the #GParamSpec for a property of a class.- Parameters:
property_name- the name of the property to look up- Returns:
- the #GParamSpec for the property, or %NULL if the class doesn't have a property of that name
-
findProperty
Looks up the #GParamSpec for a property of a class.- Parameters:
property_name- the name of the property to look up- Returns:
- the #GParamSpec for the property, or %NULL if the class doesn't have a property of that name
-
installProperty
Installs a new property.
All properties should be installed during the class initializer. It
is possible to install properties after that, but doing so is not
recommend, and specifically, is not guaranteed to be thread-safe vs.
use of properties on the same type on other threads.
Note that it is possible to redefine a property in a derived class,
by installing a property with the same name. This can be useful at times,
e.g. to change the range of allowed values or the default value.- Parameters:
property_id- the id for the new propertypspec- the #GParamSpec for the new property
-
overrideProperty
Registers @property_id as referring to a property with the name
@name in a parent class or in an interface implemented by @oclass.
This allows this class to "override" a property implementation in
a parent class or to provide the implementation of a property from
an interface.
Internally, overriding is implemented by creating a property of type
#GParamSpecOverride; generally operations that query the properties of
the object class, such as g_object_class_find_property() or
g_object_class_list_properties() will return the overridden
property. However, in one case, the @construct_properties argument of
the @constructor virtual function, the #GParamSpecOverride is passed
instead, so that the @param_id field of the #GParamSpec will be
correct. For virtually all uses, this makes no difference. If you
need to get the overridden property, you can call
g_param_spec_get_redirect_target().- Parameters:
property_id- the new property IDname- the name of a property registered in a parent class or in an interface of this class.
-
overrideProperty
Registers @property_id as referring to a property with the name
@name in a parent class or in an interface implemented by @oclass.
This allows this class to "override" a property implementation in
a parent class or to provide the implementation of a property from
an interface.
Internally, overriding is implemented by creating a property of type
#GParamSpecOverride; generally operations that query the properties of
the object class, such as g_object_class_find_property() or
g_object_class_list_properties() will return the overridden
property. However, in one case, the @construct_properties argument of
the @constructor virtual function, the #GParamSpecOverride is passed
instead, so that the @param_id field of the #GParamSpec will be
correct. For virtually all uses, this makes no difference. If you
need to get the overridden property, you can call
g_param_spec_get_redirect_target().- Parameters:
property_id- the new property IDname- the name of a property registered in a parent class or in an interface of this class.
-
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-