Enum Class ModifierType

java.lang.Object
java.lang.Enum<ModifierType>
org.gnome.gdk.ModifierType
All Implemented Interfaces:
Serializable, Comparable<ModifierType>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum ModifierType extends Enum<ModifierType> implements Enumeration

Flags to indicate the state of modifier keys and mouse buttons in events.

Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.

Note that GDK may add internal values to events which include values outside of this enumeration. Your code should preserve and ignore them. You can use GDK_MODIFIER_MASK to remove all private values.

  • Enum Constant Details

    • NO_MODIFIER_MASK

      public static final ModifierType NO_MODIFIER_MASK
      No modifier.
      Since:
      4.14
    • SHIFT_MASK

      public static final ModifierType SHIFT_MASK
      the Shift key.
    • LOCK_MASK

      public static final ModifierType LOCK_MASK
      a Lock key (depending on the Windowing System configuration, this may either be CapsLock or ShiftLock).
    • CONTROL_MASK

      public static final ModifierType CONTROL_MASK
      the Control key.
    • ALT_MASK

      public static final ModifierType ALT_MASK
      the fourth modifier key (it depends on the Windowing System configuration which key is interpreted as this modifier, but normally it is the Alt key).
    • INTERNAL_4

      public static final ModifierType INTERNAL_4
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_5

      public static final ModifierType INTERNAL_5
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_6

      public static final ModifierType INTERNAL_6
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_7

      public static final ModifierType INTERNAL_7
      Internal flag. Your code should preserve and ignore this flag.
    • BUTTON1_MASK

      public static final ModifierType BUTTON1_MASK
      the first mouse button.
    • BUTTON2_MASK

      public static final ModifierType BUTTON2_MASK
      the second mouse button.
    • BUTTON3_MASK

      public static final ModifierType BUTTON3_MASK
      the third mouse button.
    • BUTTON4_MASK

      public static final ModifierType BUTTON4_MASK
      the fourth mouse button.
    • BUTTON5_MASK

      public static final ModifierType BUTTON5_MASK
      the fifth mouse button.
    • INTERNAL_13

      public static final ModifierType INTERNAL_13
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_14

      public static final ModifierType INTERNAL_14
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_15

      public static final ModifierType INTERNAL_15
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_16

      public static final ModifierType INTERNAL_16
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_17

      public static final ModifierType INTERNAL_17
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_18

      public static final ModifierType INTERNAL_18
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_19

      public static final ModifierType INTERNAL_19
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_20

      public static final ModifierType INTERNAL_20
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_21

      public static final ModifierType INTERNAL_21
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_22

      public static final ModifierType INTERNAL_22
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_23

      public static final ModifierType INTERNAL_23
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_24

      public static final ModifierType INTERNAL_24
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_25

      public static final ModifierType INTERNAL_25
      Internal flag. Your code should preserve and ignore this flag.
    • SUPER_MASK

      public static final ModifierType SUPER_MASK
      the Super modifier.
    • HYPER_MASK

      public static final ModifierType HYPER_MASK
      the Hyper modifier.
    • META_MASK

      public static final ModifierType META_MASK
      the Meta modifier. Maps to Command on macOS.
    • INTERNAL_29

      public static final ModifierType INTERNAL_29
      Internal flag. Your code should preserve and ignore this flag.
    • INTERNAL_30

      public static final ModifierType INTERNAL_30
      Internal flag. Your code should preserve and ignore this flag.
  • Method Details

    • values

      public static ModifierType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ModifierType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<ModifierType> of(int flags)
      Create a new EnumSet<ModifierType> for the provided bitfield
      Parameters:
      flags - the ModifierType bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<ModifierType> of(MemorySegment address)
      Create a new EnumSet<ModifierType> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address
    • getType

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