Class ObjectExpression
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gtk.Expression
org.gnome.gtk.ObjectExpression
- All Implemented Interfaces:
Proxy
A
GObject value in a GtkExpression.-
Nested Class Summary
Nested classes/interfaces inherited from class Expression
Expression.Expression$Impl -
Constructor Summary
ConstructorsConstructorDescriptionObjectExpression(MemorySegment address) Create a ObjectExpression instance for the provided memory address.ObjectExpression(GObject object) Creates an expression evaluating to the givenobjectwith a weak reference. -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectExpressionasParent()Return this instance as if it were its parent type.static MemoryLayoutThe memory layout of the native struct.@Nullable GObjectGets the object that the expression evaluates to.static @Nullable TypegetType()Get the GType of the ObjectExpression class.Methods inherited from class Expression
bind, evaluate, getValueType, isStatic, ref, unref, watchMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ObjectExpression
Create a ObjectExpression instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
ObjectExpression
Creates an expression evaluating to the given
objectwith a weak reference.Once the
objectis disposed, it will fail to evaluate.This expression is meant to break reference cycles.
If you want to keep a reference to
object, useConstantExpression(Type, Object...).- Parameters:
object- object to watch
-
-
Method Details
-
getType
Get the GType of the ObjectExpression class.- Returns:
- the GType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code.- Overrides:
asParentin classExpression- Returns:
- the instance as if it were its parent type
-
getObject
Gets the object that the expression evaluates to.- Returns:
- the object, or
NULL
-