42 #define SDL_RWOPS_UNKNOWN 0
43 #define SDL_RWOPS_WINFILE 1
44 #define SDL_RWOPS_STDFILE 2
45 #define SDL_RWOPS_JNIFILE 3
46 #define SDL_RWOPS_MEMORY 4
47 #define SDL_RWOPS_MEMORY_RO 5
75 size_t size,
size_t maxnum);
84 size_t size,
size_t num);
100 void *inputStreamRef;
101 void *readableByteChannelRef;
103 void *assetFileDescriptorRef;
109 #elif defined(__WIN32__)
153 extern DECLSPEC
SDL_RWops *SDLCALL SDL_RWFromFile(
const char *file,
157 extern DECLSPEC
SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp,
160 extern DECLSPEC
SDL_RWops *SDLCALL SDL_RWFromFP(
void * fp,
164 extern DECLSPEC
SDL_RWops *SDLCALL SDL_RWFromMem(
void *mem,
int size);
165 extern DECLSPEC
SDL_RWops *SDLCALL SDL_RWFromConstMem(
const void *mem,
171 extern DECLSPEC
SDL_RWops *SDLCALL SDL_AllocRW(
void);
172 extern DECLSPEC
void SDLCALL SDL_FreeRW(
SDL_RWops * area);
174 #define RW_SEEK_SET 0
175 #define RW_SEEK_CUR 1
176 #define RW_SEEK_END 2
184 #define SDL_RWsize(ctx) (ctx)->size(ctx)
185 #define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
186 #define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR)
187 #define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
188 #define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
189 #define SDL_RWclose(ctx) (ctx)->close(ctx)
214 extern DECLSPEC
size_t SDLCALL SDL_WriteU8(
SDL_RWops * dst,
Uint8 value);
215 extern DECLSPEC
size_t SDLCALL SDL_WriteLE16(
SDL_RWops * dst,
Uint16 value);
216 extern DECLSPEC
size_t SDLCALL SDL_WriteBE16(
SDL_RWops * dst,
Uint16 value);
217 extern DECLSPEC
size_t SDLCALL SDL_WriteLE32(
SDL_RWops * dst,
Uint32 value);
218 extern DECLSPEC
size_t SDLCALL SDL_WriteBE32(
SDL_RWops * dst,
Uint32 value);
219 extern DECLSPEC
size_t SDLCALL SDL_WriteLE64(
SDL_RWops * dst,
Uint64 value);
220 extern DECLSPEC
size_t SDLCALL SDL_WriteBE64(
SDL_RWops * dst,
Uint64 value);
uint8_t Uint8
An unsigned 8-bit integer type.
Definition: SDL_stdinc.h:129
uint64_t Uint64
An unsigned 64-bit integer type.
Definition: SDL_stdinc.h:154
int64_t Sint64
A signed 64-bit integer type.
Definition: SDL_stdinc.h:150
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
size_t(SDLCALL *read)(struct SDL_RWops *context
struct SDL_RWops SDL_RWops
Sint64(SDLCALL *size)(struct SDL_RWops *context)
int(SDLCALL *close)(struct SDL_RWops *context)
Definition: SDL_rwops.h:52