Class MnemonicTrigger

All Implemented Interfaces:
Proxy

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

Triggers when a specific mnemonic is pressed.

Mnemonics require a mnemonic modifier (typically Alt) to be pressed together with the mnemonic key.

  • Constructor Details

    • MnemonicTrigger

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

      public MnemonicTrigger(int keyval)

      Creates a GtkShortcutTrigger that will trigger whenever the key with the given keyval is pressed and mnemonics have been activated.

      Mnemonics are activated by calling code when a key event with the right modifiers is detected.

      Parameters:
      keyval - The keyval to trigger for
    • MnemonicTrigger

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

    • getType

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

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

      protected MnemonicTrigger 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
    • getKeyval

      public int getKeyval()
      Gets the keyval that must be pressed to succeed triggering self.
      Returns:
      the keyval
    • builder

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