Class SignalAction

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class SignalAction extends ShortcutAction

Emits a signal on a widget.

Signals that are used in this way are referred to as keybinding signals, and they are expected to be defined with the G_SIGNAL_ACTION flag.

  • Constructor Details

    • SignalAction

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

      public SignalAction(String signalName)

      Creates an action that when activated, emits the given action signal on the provided widget.

      It will also unpack the args into arguments passed to the signal.

      Parameters:
      signalName - name of the signal to emit
    • SignalAction

      public SignalAction()
      Create a new SignalAction.
  • Method Details

    • getType

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

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

      protected SignalAction 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 ShortcutAction
      Returns:
      the instance as if it were its parent type
    • getSignalName

      public String getSignalName()
      Returns the name of the signal that will be emitted.
      Returns:
      the name of the signal to emit
    • builder

      public static SignalAction.Builder<? extends SignalAction.Builder> builder()
      A SignalAction.Builder object constructs a SignalAction with the specified properties. Use the various set...() methods to set properties, and finish construction with SignalAction.Builder.build().
      Returns:
      the builder object