Class CGEventTapInformation

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class CGEventTapInformation
    extends Struct
    implements NativeResource
    The structure used to report information about event taps.

    Member documentation

    • tapPoint – HID, session, annotated session
    • options – listener, filter
    • eventsOfInterest – mask of events being tapped
    • tappingProcess – process that is tapping events
    • processBeingTapped – zero if not a per-process tap
    • enabled – true if tap is enabled
    • minUsecLatency – minimum latency in microseconds
    • avgUsecLatency – average latency in microseconds
    • maxUsecLatency – maximum latency in microseconds

    Layout

    
     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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • EVENTTAPID, TAPPOINT, OPTIONS, EVENTSOFINTEREST, TAPPINGPROCESS, PROCESSBEINGTAPPED, ENABLED, MINUSECLATENCY, AVGUSECLATENCY, MAXUSECLATENCY

        The struct member offsets.
    • Constructor Detail

      • CGEventTapInformation

        public CGEventTapInformation​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • 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​(long address)
        Returns a new CGEventTapInformation instance for the specified memory address.
      • createSafe

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

        public static CGEventTapInformation callocStack()
        Returns a new CGEventTapInformation instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

        public static CGEventTapInformation callocStack​(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
      • 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().
      • navgUsecLatency

        public static float navgUsecLatency​(long struct)
        Unsafe version of avgUsecLatency().
      • nmaxUsecLatency

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