MiniGUI API Reference (MiniGUI-Threads)
v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
This file includes functions for reading and writing data from general sources, such as file, memory, etc., and also includes functions for reading and writing endian-specific values. More...
Go to the source code of this file.
Data Structures | |
struct | _MG_RWops |
Macros | |
#define | MGUI_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence) |
Seeks an MG_RWops object. More... | |
#define | MGUI_RWtell(ctx) (ctx)->seek(ctx, 0, SEEK_CUR) |
Obtains the current value of the position indicator for a data source. More... | |
#define | MGUI_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) |
Reads data blocks from a data source. More... | |
#define | MGUI_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) |
Writes data blocks to a data source. More... | |
#define | MGUI_RWclose(ctx) (ctx)->close(ctx) |
Closes an MG_RWops object. More... | |
#define | MGUI_RWeof(ctx) (ctx)->eof(ctx) |
Tests the end-of-file indicator for an data source. More... | |
#define | ArchSwapLE16(X) (X) |
#define | ArchSwapLE32(X) (X) |
#define | ArchSwapLE64(X) (X) |
#define | ArchSwapBE16(X) ArchSwap16(X) |
#define | ArchSwapBE32(X) ArchSwap32(X) |
#define | ArchSwapBE64(X) ArchSwap64(X) |
Typedefs | |
typedef struct _MG_RWops | MG_RWops |
Functions | |
MG_EXPORT MG_RWops * | MGUI_RWFromFile (const char *file, const char *mode) |
Creates an MG_RWops object from a file. More... | |
MG_EXPORT MG_RWops * | MGUI_RWFromFP (FILE *fp, int autoclose) |
Creates an MG_RWops object from an opened stdio FILE object. More... | |
MG_EXPORT MG_RWops * | MGUI_RWFromMem (void *mem, int size) |
Creates an MG_RWops object from a block of memory. More... | |
MG_EXPORT void | MGUI_InitMemRW (MG_RWops *area, void *mem, int size) |
Initializes an MG_RWops object from a block of memory. More... | |
MG_EXPORT MG_RWops * | MGUI_AllocRW (void) |
Allocates an uninitialized MG_RWops object. More... | |
MG_EXPORT void | MGUI_FreeRW (MG_RWops *area) |
Frees an MG_RWops object. More... | |
MG_EXPORT int | MGUI_RWgetc (MG_RWops *area) |
Reads the next character from an data source. More... | |
Uint16 | MGUI_ReadLE16 (MG_RWops *src) |
Reads a 16-bit little endian integer from a MG_RWops object. More... | |
Uint16 | MGUI_ReadBE16 (MG_RWops *src) |
Reads a 16-bit big endian integer from a MG_RWops object. More... | |
Uint32 | MGUI_ReadLE32 (MG_RWops *src) |
Reads a 32-bit little endian integer from a MG_RWops object. More... | |
Uint32 | MGUI_ReadBE32 (MG_RWops *src) |
Reads a 32-bit big endian integer from a MG_RWops object. More... | |
Uint64 | MGUI_ReadLE64 (MG_RWops *src) |
Reads a 64-bit little endian integer from a MG_RWops object. More... | |
Uint64 | MGUI_ReadBE64 (MG_RWops *src) |
Reads a 64-bit big endian integer from a MG_RWops object. More... | |
int | MGUI_WriteLE16 (MG_RWops *dst, Uint16 value) |
Writes an 16-bit integer of native format to a MG_RWops object in littlen endianness. More... | |
int | MGUI_WriteBE16 (MG_RWops *dst, Uint16 value) |
Writes an 16-bit integer of native format to a MG_RWops object in big endianness. More... | |
int | MGUI_WriteLE32 (MG_RWops *dst, Uint32 value) |
Writes an 32-bit integer of native format to a MG_RWops object in littlen endianness. More... | |
int | MGUI_WriteBE32 (MG_RWops *dst, Uint32 value) |
Writes an 32-bit integer of native format to a MG_RWops object in big endianness. More... | |
int | MGUI_WriteLE64 (MG_RWops *dst, Uint64 value) |
Writes an 64-bit integer of native format to a MG_RWops object in littlen endianness. More... | |
int | MGUI_WriteBE64 (MG_RWops *dst, Uint64 value) |
Writes an 64-bit integer of native format to a MG_RWops object in big endianness. More... | |
Uint16 | MGUI_ReadLE16FP (FILE *src) |
Reads a 16-bit little endian integer from a stdio FILE object. More... | |
Uint32 | MGUI_ReadLE32FP (FILE *src) |
Reads a 32-bit little endian integer from a stdio FILE object. More... | |
int | MGUI_WriteLE16FP (FILE *dst, Uint16 value) |
Writes an 16-bit integer of native format to a stdio FILE object in littlen endianness. More... | |
int | MGUI_WriteLE32FP (FILE *dst, Uint32 value) |
Writes an 32-bit integer of native format to a stdio FILE object in littlen endianness. More... | |
This file includes functions for reading and writing data from general sources, such as file, memory, etc., and also includes functions for reading and writing endian-specific values.
This file is part of MiniGUI, a mature cross-platform windowing and Graphics User Interface (GUI) support system for embedded systems and smart IoT devices. Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd. Copyright (C) 1998~2002, WEI Yongming This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Or, As this program is a library, any link to this program must follow GNU General Public License version 3 (GPLv3). If you cannot accept GPLv3, you need to be licensed from FMSoft. If you have got a commercial license of this program, please use it under the terms and conditions of the commercial license. For more information about the commercial license, please refer to <http://www.minigui.com/en/about/licensing-policy/>.
Definition in file endianrw.h.