Package org.lwjgl.sdl

Class SDL_CameraSpec

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_CameraSpec extends Struct<SDL_CameraSpec> implements NativeResource

 struct SDL_CameraSpec {
     SDL_PixelFormat format;
     SDL_Colorspace colorspace;
     int width;
     int height;
     int framerate_numerator;
     int framerate_denominator;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int FORMAT
      The struct member offsets.
    • COLORSPACE

      public static final int COLORSPACE
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • FRAMERATE_NUMERATOR

      public static final int FRAMERATE_NUMERATOR
      The struct member offsets.
    • FRAMERATE_DENOMINATOR

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

    • SDL_CameraSpec

      public SDL_CameraSpec(ByteBuffer container)
      Creates a SDL_CameraSpec 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<SDL_CameraSpec>
    • format

      public int format()
      Returns:
      the value of the format field.
    • colorspace

      public int colorspace()
      Returns:
      the value of the colorspace field.
    • width

      public int width()
      Returns:
      the value of the width field.
    • height

      public int height()
      Returns:
      the value of the height field.
    • framerate_numerator

      public int framerate_numerator()
      Returns:
      the value of the framerate_numerator field.
    • framerate_denominator

      public int framerate_denominator()
      Returns:
      the value of the framerate_denominator field.
    • format

      public SDL_CameraSpec format(int value)
      Sets the specified value to the format field.
    • colorspace

      public SDL_CameraSpec colorspace(int value)
      Sets the specified value to the colorspace field.
    • width

      public SDL_CameraSpec width(int value)
      Sets the specified value to the width field.
    • height

      public SDL_CameraSpec height(int value)
      Sets the specified value to the height field.
    • framerate_numerator

      public SDL_CameraSpec framerate_numerator(int value)
      Sets the specified value to the framerate_numerator field.
    • framerate_denominator

      public SDL_CameraSpec framerate_denominator(int value)
      Sets the specified value to the framerate_denominator field.
    • set

      public SDL_CameraSpec set(int format, int colorspace, int width, int height, int framerate_numerator, int framerate_denominator)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static SDL_CameraSpec.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SDL_CameraSpec.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
    • nformat

      public static int nformat(long struct)
      Unsafe version of format().
    • ncolorspace

      public static int ncolorspace(long struct)
      Unsafe version of colorspace().
    • nwidth

      public static int nwidth(long struct)
      Unsafe version of width().
    • nheight

      public static int nheight(long struct)
      Unsafe version of height().
    • nframerate_numerator

      public static int nframerate_numerator(long struct)
      Unsafe version of framerate_numerator().
    • nframerate_denominator

      public static int nframerate_denominator(long struct)
      Unsafe version of framerate_denominator().
    • nformat

      public static void nformat(long struct, int value)
      Unsafe version of format.
    • ncolorspace

      public static void ncolorspace(long struct, int value)
      Unsafe version of colorspace.
    • nwidth

      public static void nwidth(long struct, int value)
      Unsafe version of width.
    • nheight

      public static void nheight(long struct, int value)
      Unsafe version of height.
    • nframerate_numerator

      public static void nframerate_numerator(long struct, int value)
      Unsafe version of framerate_numerator.
    • nframerate_denominator

      public static void nframerate_denominator(long struct, int value)
      Unsafe version of framerate_denominator.