Class CGEventTapInformation

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class CGEventTapInformation extends Struct<CGEventTapInformation> implements NativeResource

 struct CGEventTapInformation {
     uint32_t eventTapID;
     CGEventTapLocation tapPoint;
     CGEventTapOptions options;
     CGEventMask eventsOfInterest;
     pid_t tappingProcess;
     pid_t processBeingTapped;
     bool enabled;
     float minUsecLatency;
     float avgUsecLatency;
     float maxUsecLatency;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • EVENTTAPID

      public static final int EVENTTAPID
      The struct member offsets.
    • TAPPOINT

      public static final int TAPPOINT
      The struct member offsets.
    • OPTIONS

      public static final int OPTIONS
      The struct member offsets.
    • EVENTSOFINTEREST

      public static final int EVENTSOFINTEREST
      The struct member offsets.
    • TAPPINGPROCESS

      public static final int TAPPINGPROCESS
      The struct member offsets.
    • PROCESSBEINGTAPPED

      public static final int PROCESSBEINGTAPPED
      The struct member offsets.
    • ENABLED

      public static final int ENABLED
      The struct member offsets.
    • MINUSECLATENCY

      public static final int MINUSECLATENCY
      The struct member offsets.
    • AVGUSECLATENCY

      public static final int AVGUSECLATENCY
      The struct member offsets.
    • MAXUSECLATENCY

      public static final int MAXUSECLATENCY
      The struct member offsets.
  • Constructor Details

    • CGEventTapInformation

      public CGEventTapInformation(ByteBuffer container)
      Creates a CGEventTapInformation instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<CGEventTapInformation>
    • eventTapID

      public int eventTapID()
      Returns:
      the value of the eventTapID field.
    • tapPoint

      public int tapPoint()
      Returns:
      the value of the tapPoint field.
    • options

      public int options()
      Returns:
      the value of the options field.
    • eventsOfInterest

      public long eventsOfInterest()
      Returns:
      the value of the eventsOfInterest field.
    • tappingProcess

      public long tappingProcess()
      Returns:
      the value of the tappingProcess field.
    • processBeingTapped

      public long processBeingTapped()
      Returns:
      the value of the processBeingTapped field.
    • enabled

      public boolean enabled()
      Returns:
      the value of the enabled field.
    • minUsecLatency

      public float minUsecLatency()
      Returns:
      the value of the minUsecLatency field.
    • avgUsecLatency

      public float avgUsecLatency()
      Returns:
      the value of the avgUsecLatency field.
    • maxUsecLatency

      public float maxUsecLatency()
      Returns:
      the value of the maxUsecLatency field.
    • malloc

      public static CGEventTapInformation malloc()
      Returns a new CGEventTapInformation instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static CGEventTapInformation calloc()
      Returns a new CGEventTapInformation instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static CGEventTapInformation create()
      Returns a new CGEventTapInformation instance allocated with BufferUtils.
    • create

      public static CGEventTapInformation create(long address)
      Returns a new CGEventTapInformation instance for the specified memory address.
    • createSafe

      public static @Nullable CGEventTapInformation createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static CGEventTapInformation.Buffer malloc(int capacity)
      Returns a new CGEventTapInformation.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static CGEventTapInformation.Buffer calloc(int capacity)
      Returns a new CGEventTapInformation.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static CGEventTapInformation.Buffer create(int capacity)
      Returns a new CGEventTapInformation.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static CGEventTapInformation.Buffer create(long address, int capacity)
      Create a CGEventTapInformation.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable CGEventTapInformation.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static CGEventTapInformation malloc(MemoryStack stack)
      Returns a new CGEventTapInformation instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static CGEventTapInformation calloc(MemoryStack stack)
      Returns a new CGEventTapInformation instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static CGEventTapInformation.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new CGEventTapInformation.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static CGEventTapInformation.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new CGEventTapInformation.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • neventTapID

      public static int neventTapID(long struct)
      Unsafe version of eventTapID().
    • ntapPoint

      public static int ntapPoint(long struct)
      Unsafe version of tapPoint().
    • noptions

      public static int noptions(long struct)
      Unsafe version of options().
    • neventsOfInterest

      public static long neventsOfInterest(long struct)
      Unsafe version of eventsOfInterest().
    • ntappingProcess

      public static long ntappingProcess(long struct)
      Unsafe version of tappingProcess().
    • nprocessBeingTapped

      public static long nprocessBeingTapped(long struct)
      Unsafe version of processBeingTapped().
    • nenabled

      public static boolean nenabled(long struct)
      Unsafe version of enabled().
    • nminUsecLatency

      public static float nminUsecLatency(long struct)
      Unsafe version of minUsecLatency().
    • nmaxUsecLatency

      public static float nmaxUsecLatency(long struct)
      Unsafe version of maxUsecLatency().