Class EpollEvent

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct
org.lwjgl.system.linux.EpollEvent
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class EpollEvent extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource

Layout


 struct epoll_event {
     uint32_t events();
     epoll_data_t data();
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of EpollEvent structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a EpollEvent instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static EpollEvent
    Returns a new EpollEvent instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new EpollEvent.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new EpollEvent.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static EpollEvent
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new EpollEvent instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static EpollEvent
    Returns a new EpollEvent instance allocated with BufferUtils.
    create(int capacity)
    Returns a new EpollEvent.Buffer instance allocated with BufferUtils.
    static EpollEvent
    create(long address)
    Returns a new EpollEvent instance for the specified memory address.
    create(long address, int capacity)
    Create a EpollEvent.Buffer instance at the specified memory.
    static EpollEvent
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    user data variable
    data(Consumer<EpollData> consumer)
    Passes the data() field to the specified Consumer.
    data(EpollData value)
    Copies the specified EpollData to the data() field.
    int
    epoll events
    events(int value)
    Sets the specified value to the events() field.
    static EpollEvent
    Returns a new EpollEvent instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new EpollEvent.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new EpollEvent.Buffer instance allocated on the specified MemoryStack.
    static EpollEvent
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new EpollEvent instance allocated on the specified MemoryStack.
    static EpollData
    ndata(long struct)
    Unsafe version of data().
    static void
    ndata(long struct, EpollData value)
    Unsafe version of data.
    static int
    nevents(long struct)
    Unsafe version of events().
    static void
    nevents(long struct, int value)
    Unsafe version of events.
    set(int events, EpollData data)
    Initializes this struct with the specified values.
    Copies the specified struct data to this struct.
    int
     

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

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

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

      public static final int EVENTS
      The struct member offsets.
    • DATA

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

    • EpollEvent

      public EpollEvent(ByteBuffer container)
      Creates a EpollEvent 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct
    • events

      public int events()
      epoll events
    • data

      public EpollData data()
      user data variable
    • events

      public EpollEvent events(int value)
      Sets the specified value to the events() field.
    • data

      public EpollEvent data(EpollData value)
      Copies the specified EpollData to the data() field.
    • data

      public EpollEvent data(Consumer<EpollData> consumer)
      Passes the data() field to the specified Consumer.
    • set

      public EpollEvent set(int events, EpollData data)
      Initializes this struct with the specified values.
    • set

      public EpollEvent set(EpollEvent src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static EpollEvent.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new EpollEvent.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
    • nevents

      public static int nevents(long struct)
      Unsafe version of events().
    • ndata

      public static EpollData ndata(long struct)
      Unsafe version of data().
    • nevents

      public static void nevents(long struct, int value)
      Unsafe version of events.
    • ndata

      public static void ndata(long struct, EpollData value)
      Unsafe version of data.