MiniGUI API Reference (MiniGUI-Threads)  v5.0.6
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 118 of file endianrw.h.

Field Documentation

◆ close

int(* close(struct _MG_RWops *context)

Close and free an allocated MG_RWops structure.

Definition at line 149 of file endianrw.h.

◆ eof

int(* eof(struct _MG_RWops *context)

Test the end-of-file indicator.

Definition at line 154 of file endianrw.h.

◆ read

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 131 of file endianrw.h.

◆ seek

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 124 of file endianrw.h.

◆ type

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 166 of file endianrw.h.

◆ write

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 138 of file endianrw.h.


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