MiniGUI API Reference (MiniGUI-Standalone)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Data Fields

#include <endianrw.h>

Data Fields

int(* seek )(struct _MG_RWops *context, int offset, int whence)
 
int(* read )(struct _MG_RWops *context, void *ptr, int objsize, int num)
 
int(* write )(struct _MG_RWops *context, const void *ptr, int objsize, int num)
 
int(* close )(struct _MG_RWops *context)
 
int(* eof )(struct _MG_RWops *context)
 
Uint32 type
 

Detailed Description

The read/write operation structure.

Definition at line 95 of file endianrw.h.

Field Documentation

int(* close) (struct _MG_RWops *context)

Close and free an allocated MG_RWops structure.

Definition at line 126 of file endianrw.h.

int(* eof) (struct _MG_RWops *context)

Test the end-of-file indicator.

Definition at line 131 of file endianrw.h.

int(* read) (struct _MG_RWops *context, void *ptr, int objsize, int num)

Read up to num objects each of size objsize from the data source to the area pointed at by ptr. Returns the number of objects read, or -1 if the read failed.

Definition at line 108 of file endianrw.h.

int(* seek) (struct _MG_RWops *context, int offset, int whence)

Seek to offset relative to whence, one of stdio's whence values:
SEEK_SET, SEEK_CUR, SEEK_END
Returns the final offset in the data source.

Definition at line 101 of file endianrw.h.

Uint32 type

Indicates the type of data source. can be one of the following values:

  • RWAREA_TYPE_UNKNOWN
    A unknown (uninitialized) data source type.
  • RWAREA_TYPE_STDIO
    Stdio stream data source.
  • RWAREA_TYPE_MEM
    Memory data source.

Definition at line 143 of file endianrw.h.

int(* write) (struct _MG_RWops *context, const void *ptr, int objsize, int num)

Write exactly num objects each of size objsize from the area pointed at by ptr to data source. Returns num, or -1 if the write failed.

Definition at line 115 of file endianrw.h.


The documentation for this struct was generated from the following file: