Class CClosureExpression

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class CClosureExpression extends Expression
A variant of GtkClosureExpression using a C closure.
  • Constructor Details

    • CClosureExpression

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

      public CClosureExpression(Type valueType, @Nullable ClosureMarshal marshal, @Nullable Expression @Nullable [] params, @Nullable Callback callbackFunc, @Nullable ClosureNotify userDestroy)

      Creates a GtkExpression that calls callback_func when it is evaluated.

      This function is a variant of ClosureExpression(Type, Closure, Expression[]) that creates a GClosure by calling g_cclosure_new() with the given callback_func, user_data and user_destroy.

      Parameters:
      valueType - the type of the value that this expression evaluates to
      marshal - marshaller used for creating a closure
      params - expressions for each parameter
      callbackFunc - callback used for creating a closure
      userDestroy - destroy notify for userData
  • Method Details

    • getType

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

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

      protected CClosureExpression 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