Class KeyvalTrigger

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class KeyvalTrigger extends ShortcutTrigger
Triggers when a specific keyval and modifiers are pressed.
  • Constructor Details

    • KeyvalTrigger

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

      public KeyvalTrigger(int keyval, Set<ModifierType> modifiers)
      Creates a GtkShortcutTrigger that will trigger whenever the key with the given keyval and modifiers is pressed.
      Parameters:
      keyval - The keyval to trigger for
      modifiers - the modifiers that need to be present
    • KeyvalTrigger

      public KeyvalTrigger(int keyval, ModifierType... modifiers)
      Creates a GtkShortcutTrigger that will trigger whenever the key with the given keyval and modifiers is pressed.
      Parameters:
      keyval - The keyval to trigger for
      modifiers - the modifiers that need to be present
    • KeyvalTrigger

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

    • getType

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

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

      protected KeyvalTrigger 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
    • getModifiers

      public Set<ModifierType> getModifiers()
      Gets the modifiers that must be present to succeed triggering self.
      Returns:
      the modifiers
    • builder

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