SDL standard library

Dependents:   H261_encoder

Embed: (wiki syntax)

« Back to documentation index

SDL_rwops.h File Reference

SDL_rwops.h File Reference

This file provides a general interface for SDL to read and write data streams. More...

Go to the source code of this file.

Data Structures

struct  SDL_RWops
 This is the read/write operation structure -- very basic. More...

Typedefs

typedef struct SDL_RWops SDL_RWops
 This is the read/write operation structure -- very basic.

Functions

RWFrom functions

Functions to create SDL_RWops structures from various data streams.

DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile (const char *file, const char *mode)
DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP (FILE *fp, SDL_bool autoclose)
DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP (void *fp, SDL_bool autoclose)
DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem (void *mem, int size)
DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem (const void *mem, int size)
Read endian functions

Read an item of the specified endianness and return in native format.

DECLSPEC Uint8 SDLCALL SDL_ReadU8 (SDL_RWops *src)
DECLSPEC Uint16 SDLCALL SDL_ReadLE16 (SDL_RWops *src)
DECLSPEC Uint16 SDLCALL SDL_ReadBE16 (SDL_RWops *src)
DECLSPEC Uint32 SDLCALL SDL_ReadLE32 (SDL_RWops *src)
DECLSPEC Uint32 SDLCALL SDL_ReadBE32 (SDL_RWops *src)
DECLSPEC Uint64 SDLCALL SDL_ReadLE64 (SDL_RWops *src)
DECLSPEC Uint64 SDLCALL SDL_ReadBE64 (SDL_RWops *src)
Write endian functions

Write an item of native format to the specified endianness.

DECLSPEC size_t SDLCALL SDL_WriteU8 (SDL_RWops *dst, Uint8 value)
DECLSPEC size_t SDLCALL SDL_WriteLE16 (SDL_RWops *dst, Uint16 value)
DECLSPEC size_t SDLCALL SDL_WriteBE16 (SDL_RWops *dst, Uint16 value)
DECLSPEC size_t SDLCALL SDL_WriteLE32 (SDL_RWops *dst, Uint32 value)
DECLSPEC size_t SDLCALL SDL_WriteBE32 (SDL_RWops *dst, Uint32 value)
DECLSPEC size_t SDLCALL SDL_WriteLE64 (SDL_RWops *dst, Uint64 value)
DECLSPEC size_t SDLCALL SDL_WriteBE64 (SDL_RWops *dst, Uint64 value)

Detailed Description

This file provides a general interface for SDL to read and write data streams.

It can easily be extended to files, memory, etc.

Definition in file SDL_rwops.h.


Typedef Documentation

typedef struct SDL_RWops SDL_RWops

This is the read/write operation structure -- very basic.