Class GLFWGammaRamp

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

    public class GLFWGammaRamp
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Describes the gamma ramp for a monitor.

    Member documentation

    • red – an array of values describing the response of the red channel
    • green – an array of values describing the response of the green channel
    • blue – an array of values describing the response of the blue channel
    • size – the number of elements in each array

    Layout

    
     struct GLFWgammaramp {
         unsigned short * red;
         unsigned short * green;
         unsigned short * blue;
         unsigned int size;
     }
    Since:
    version 3.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  GLFWGammaRamp.Buffer
      An array of GLFWGammaRamp structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

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

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int BLUE
      GREEN
      RED
      SIZE
      The struct member offsets.
      static int SIZEOF
      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
      GLFWGammaRamp​(java.nio.ByteBuffer container)
      Creates a GLFWGammaRamp instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.ShortBuffer blue()
      Returns a ShortBuffer view of the data pointed to by the blue field.
      GLFWGammaRamp blue​(java.nio.ShortBuffer value)
      Sets the address of the specified ShortBuffer to the blue field.
      static GLFWGammaRamp calloc()
      Returns a new GLFWGammaRamp instance allocated with memCalloc.
      static GLFWGammaRamp.Buffer calloc​(int capacity)
      Returns a new GLFWGammaRamp.Buffer instance allocated with memCalloc.
      static GLFWGammaRamp callocStack()
      Returns a new GLFWGammaRamp instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      static GLFWGammaRamp.Buffer callocStack​(int capacity)
      Returns a new GLFWGammaRamp.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      static GLFWGammaRamp.Buffer callocStack​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new GLFWGammaRamp.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static GLFWGammaRamp callocStack​(org.lwjgl.system.MemoryStack stack)
      Returns a new GLFWGammaRamp instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static GLFWGammaRamp create()
      Returns a new GLFWGammaRamp instance allocated with BufferUtils.
      static GLFWGammaRamp.Buffer create​(int capacity)
      Returns a new GLFWGammaRamp.Buffer instance allocated with BufferUtils.
      static GLFWGammaRamp create​(long address)
      Returns a new GLFWGammaRamp instance for the specified memory address.
      static GLFWGammaRamp.Buffer create​(long address, int capacity)
      Create a GLFWGammaRamp.Buffer instance at the specified memory.
      static GLFWGammaRamp createSafe​(long address)
      Like create, but returns null if address is NULL.
      static GLFWGammaRamp.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      java.nio.ShortBuffer green()
      Returns a ShortBuffer view of the data pointed to by the green field.
      GLFWGammaRamp green​(java.nio.ShortBuffer value)
      Sets the address of the specified ShortBuffer to the green field.
      static GLFWGammaRamp malloc()
      Returns a new GLFWGammaRamp instance allocated with memAlloc.
      static GLFWGammaRamp.Buffer malloc​(int capacity)
      Returns a new GLFWGammaRamp.Buffer instance allocated with memAlloc.
      static GLFWGammaRamp mallocStack()
      Returns a new GLFWGammaRamp instance allocated on the thread-local MemoryStack.
      static GLFWGammaRamp.Buffer mallocStack​(int capacity)
      Returns a new GLFWGammaRamp.Buffer instance allocated on the thread-local MemoryStack.
      static GLFWGammaRamp.Buffer mallocStack​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new GLFWGammaRamp.Buffer instance allocated on the specified MemoryStack.
      static GLFWGammaRamp mallocStack​(org.lwjgl.system.MemoryStack stack)
      Returns a new GLFWGammaRamp instance allocated on the specified MemoryStack.
      static java.nio.ShortBuffer nblue​(long struct)
      Unsafe version of blue.
      static void nblue​(long struct, java.nio.ShortBuffer value)
      Unsafe version of blue.
      static java.nio.ShortBuffer ngreen​(long struct)
      Unsafe version of green.
      static void ngreen​(long struct, java.nio.ShortBuffer value)
      Unsafe version of green.
      static java.nio.ShortBuffer nred​(long struct)
      Unsafe version of red.
      static void nred​(long struct, java.nio.ShortBuffer value)
      Unsafe version of red.
      static int nsize​(long struct)
      Unsafe version of size().
      static void nsize​(long struct, int value)
      Sets the specified value to the size field of the specified struct.
      java.nio.ShortBuffer red()
      Returns a ShortBuffer view of the data pointed to by the red field.
      GLFWGammaRamp red​(java.nio.ShortBuffer value)
      Sets the address of the specified ShortBuffer to the red field.
      GLFWGammaRamp set​(java.nio.ShortBuffer red, java.nio.ShortBuffer green, java.nio.ShortBuffer blue, int size)
      Initializes this struct with the specified values.
      GLFWGammaRamp set​(GLFWGammaRamp src)
      Copies the specified struct data to this struct.
      int size()
      Returns the value of the size field.
      GLFWGammaRamp size​(int value)
      Sets the specified value to the size field.
      int sizeof()  
      static void validate​(long struct)
      Validates pointer members that should not be NULL.
      static void validate​(long array, int count)
      Calls validate(long) for each struct contained in the specified struct array.
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • RED, GREEN, BLUE, SIZE

        The struct member offsets.
    • Constructor Detail

      • GLFWGammaRamp

        public GLFWGammaRamp​(java.nio.ByteBuffer container)
        Creates a GLFWGammaRamp 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • red

        public java.nio.ShortBuffer red()
        Returns a ShortBuffer view of the data pointed to by the red field.
      • green

        public java.nio.ShortBuffer green()
        Returns a ShortBuffer view of the data pointed to by the green field.
      • blue

        public java.nio.ShortBuffer blue()
        Returns a ShortBuffer view of the data pointed to by the blue field.
      • size

        public int size()
        Returns the value of the size field.
      • red

        public GLFWGammaRamp red​(java.nio.ShortBuffer value)
        Sets the address of the specified ShortBuffer to the red field.
      • green

        public GLFWGammaRamp green​(java.nio.ShortBuffer value)
        Sets the address of the specified ShortBuffer to the green field.
      • blue

        public GLFWGammaRamp blue​(java.nio.ShortBuffer value)
        Sets the address of the specified ShortBuffer to the blue field.
      • size

        public GLFWGammaRamp size​(int value)
        Sets the specified value to the size field.
      • set

        public GLFWGammaRamp set​(java.nio.ShortBuffer red,
                                 java.nio.ShortBuffer green,
                                 java.nio.ShortBuffer blue,
                                 int size)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

        public static GLFWGammaRamp mallocStack()
        Returns a new GLFWGammaRamp instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

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

        public static GLFWGammaRamp.Buffer mallocStack​(int capacity)
        Returns a new GLFWGammaRamp.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static GLFWGammaRamp.Buffer callocStack​(int capacity)
        Returns a new GLFWGammaRamp.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

        public static GLFWGammaRamp.Buffer callocStack​(int capacity,
                                                       org.lwjgl.system.MemoryStack stack)
        Returns a new GLFWGammaRamp.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nred

        public static java.nio.ShortBuffer nred​(long struct)
        Unsafe version of red.
      • ngreen

        public static java.nio.ShortBuffer ngreen​(long struct)
        Unsafe version of green.
      • nblue

        public static java.nio.ShortBuffer nblue​(long struct)
        Unsafe version of blue.
      • nsize

        public static int nsize​(long struct)
        Unsafe version of size().
      • nred

        public static void nred​(long struct,
                                java.nio.ShortBuffer value)
        Unsafe version of red.
      • ngreen

        public static void ngreen​(long struct,
                                  java.nio.ShortBuffer value)
        Unsafe version of green.
      • nblue

        public static void nblue​(long struct,
                                 java.nio.ShortBuffer value)
        Unsafe version of blue.
      • nsize

        public static void nsize​(long struct,
                                 int value)
        Sets the specified value to the size field of the specified struct.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array