Class GLFWGammaRamp

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


    public class GLFWGammaRamp
    extends Struct
    Describes the gamma ramp for a monitor.

    Member documentation

    • red – an array of value describing the response of the red channel
    • green – an array of value describing the response of the green channel
    • blue – an array of value 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;
    }
    • Field Detail

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • 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()
        Description copied from class: Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class 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
      • create

        public static GLFWGammaRamp create(long address)
        Returns a new GLFWGammaRamp instance for the specified memory address or null if the address is NULL.
      • 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
      • callocStack

        public static GLFWGammaRamp callocStack(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
      • 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 GLFWGammaRamp.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