Mercurial > sdl-ios-xcode
comparison include/SDL_rwops.h @ 4971:158bb5752974
Updated headers to match wiki documentation
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 12 Jan 2011 09:47:33 -0800 |
parents | ebcb4988b16f |
children | e8916fe9cfc8 |
comparison
equal
deleted
inserted
replaced
4970:b9eed029844a | 4971:158bb5752974 |
---|---|
22 | 22 |
23 /** | 23 /** |
24 * \file SDL_rwops.h | 24 * \file SDL_rwops.h |
25 * | 25 * |
26 * This file provides a general interface for SDL to read and write | 26 * This file provides a general interface for SDL to read and write |
27 * data sources. It can easily be extended to files, memory, etc. | 27 * data streams. It can easily be extended to files, memory, etc. |
28 */ | 28 */ |
29 | 29 |
30 #ifndef _SDL_rwops_h | 30 #ifndef _SDL_rwops_h |
31 #define _SDL_rwops_h | 31 #define _SDL_rwops_h |
32 | 32 |
48 { | 48 { |
49 /** | 49 /** |
50 * Seek to \c offset relative to \c whence, one of stdio's whence values: | 50 * Seek to \c offset relative to \c whence, one of stdio's whence values: |
51 * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END | 51 * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END |
52 * | 52 * |
53 * \return the final offset in the data source. | 53 * \return the final offset in the data stream. |
54 */ | 54 */ |
55 long (SDLCALL * seek) (struct SDL_RWops * context, long offset, | 55 long (SDLCALL * seek) (struct SDL_RWops * context, long offset, |
56 int whence); | 56 int whence); |
57 | 57 |
58 /** | 58 /** |
59 * Read up to \c maxnum objects each of size \c size from the data | 59 * Read up to \c maxnum objects each of size \c size from the data |
60 * source to the area pointed at by \c ptr. | 60 * stream to the area pointed at by \c ptr. |
61 * | 61 * |
62 * \return the number of objects read, or 0 at error or end of file. | 62 * \return the number of objects read, or 0 at error or end of file. |
63 */ | 63 */ |
64 size_t(SDLCALL * read) (struct SDL_RWops * context, void *ptr, | 64 size_t(SDLCALL * read) (struct SDL_RWops * context, void *ptr, |
65 size_t size, size_t maxnum); | 65 size_t size, size_t maxnum); |
66 | 66 |
67 /** | 67 /** |
68 * Write exactly \c num objects each of size \c size from the area | 68 * Write exactly \c num objects each of size \c size from the area |
69 * pointed at by \c ptr to data source. | 69 * pointed at by \c ptr to data stream. |
70 * | 70 * |
71 * \return the number of objects written, or 0 at error or end of file. | 71 * \return the number of objects written, or 0 at error or end of file. |
72 */ | 72 */ |
73 size_t(SDLCALL * write) (struct SDL_RWops * context, const void *ptr, | 73 size_t(SDLCALL * write) (struct SDL_RWops * context, const void *ptr, |
74 size_t size, size_t num); | 74 size_t size, size_t num); |
119 | 119 |
120 | 120 |
121 /** | 121 /** |
122 * \name RWFrom functions | 122 * \name RWFrom functions |
123 * | 123 * |
124 * Functions to create SDL_RWops structures from various data sources. | 124 * Functions to create SDL_RWops structures from various data streams. |
125 */ | 125 */ |
126 /*@{*/ | 126 /*@{*/ |
127 | 127 |
128 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file, | 128 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file, |
129 const char *mode); | 129 const char *mode); |