Class SDL_RWops


  • @FieldOrder({"size","seek","read","write","close","type","hidden"})
    public final class SDL_RWops
    extends com.sun.jna.Structure
    This is a structure that holds references to functions for IO operations (read/write/seek).

    It is advisable to keep a reference to this class forever (more precisely, as long as the callbacks are valid) and reuse it to limit repeated creation of multiple JNA callback objects.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.sun.jna.Structure

        com.sun.jna.Structure.ByReference, com.sun.jna.Structure.ByValue, com.sun.jna.Structure.FieldOrder, com.sun.jna.Structure.StructField
    • Field Summary

      Fields 
      Modifier and Type Field Description
      SDL_RWCloseFunction close
      A function that knows how to close a file.
      SDL_RWopsPlatformSpecific hidden  
      SDL_RWReadFunction read
      A function that knows how to read up to maxnum objects each of size from the data stream to the area pointed at by ptr.
      SDL_RWSeekFunction seek
      A function that knows how to seek to offset relative to whence, one of stdio's whence values: RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
      SDL_RWSizeFunction size
      A function that knows how to figure out the size of the file in this rwops, or -1 if unknown
      int type  
      SDL_RWWriteFunction write
      A function that knows how to write exactly num objects each of size from the area pointed at by ptr to data stream.
      • Fields inherited from class com.sun.jna.Structure

        ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      SDL_RWops()  
      SDL_RWops​(com.sun.jna.Pointer p)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void read()  
      • Methods inherited from class com.sun.jna.Structure

        allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFieldOrder, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField
    • Field Detail

      • size

        public SDL_RWSizeFunction size
        A function that knows how to figure out the size of the file in this rwops, or -1 if unknown
      • seek

        public SDL_RWSeekFunction seek
        A function that knows how to seek to offset relative to whence, one of stdio's whence values: RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
      • read

        public SDL_RWReadFunction read
        A function that knows how to read up to maxnum objects each of size from the data stream to the area pointed at by ptr.
      • write

        public SDL_RWWriteFunction write
        A function that knows how to write exactly num objects each of size from the area pointed at by ptr to data stream.
      • type

        public int type
    • Constructor Detail

      • SDL_RWops

        public SDL_RWops()
      • SDL_RWops

        public SDL_RWops​(com.sun.jna.Pointer p)
    • Method Detail

      • read

        public void read()
        Overrides:
        read in class com.sun.jna.Structure