Class ObjectExpression

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ObjectExpression extends Expression
A GObject value in a GtkExpression.
  • Constructor Details

    • ObjectExpression

      public ObjectExpression(MemorySegment address)
      Create a ObjectExpression instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ObjectExpression

      public ObjectExpression(GObject object)

      Creates an expression evaluating to the given object with a weak reference.

      Once the object is disposed, it will fail to evaluate.

      This expression is meant to break reference cycles.

      If you want to keep a reference to object, use ConstantExpression(Type, Object...).

      Parameters:
      object - object to watch
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the ObjectExpression class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected ObjectExpression asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Expression
      Returns:
      the instance as if it were its parent type
    • getObject

      public @Nullable GObject getObject()
      Gets the object that the expression evaluates to.
      Returns:
      the object, or NULL