Class AlternativeTrigger

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class AlternativeTrigger extends ShortcutTrigger

Combines two shortcut triggers.

The GtkAlternativeTrigger triggers when either of the two trigger.

This can be cascaded to combine more than two triggers.

  • Constructor Details

    • AlternativeTrigger

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

      public AlternativeTrigger(ShortcutTrigger first, ShortcutTrigger second)

      Creates a GtkShortcutTrigger that will trigger whenever either of the two given triggers gets triggered.

      Note that nesting is allowed, so if you want more than two alternative, create a new alternative trigger for each option.

      Parameters:
      first - The first trigger that may trigger
      second - The second trigger that may trigger
    • AlternativeTrigger

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

    • getType

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

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

      protected AlternativeTrigger 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 ShortcutTrigger
      Returns:
      the instance as if it were its parent type
    • getFirst

      public ShortcutTrigger getFirst()

      Gets the first of the two alternative triggers that may trigger self.

      getSecond() will return the other one.

      Returns:
      the first alternative trigger
    • getSecond

      public ShortcutTrigger getSecond()

      Gets the second of the two alternative triggers that may trigger self.

      getFirst() will return the other one.

      Returns:
      the second alternative trigger
    • builder

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