MiniGUI API Reference (MiniGUI-Processes)
v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Macros | |
#define | LEN_CLIPBOARD_NAME 15 |
The maximum length of the name of clipboard. More... | |
#define | NR_CLIPBOARDS 4 |
The maximum number of clipboard. More... | |
#define | CBNAME_TEXT ("text") |
The default clipboard name of text control. More... | |
#define | CBERR_OK 0 |
Operate clipboard success. More... | |
#define | CBERR_BADNAME 1 |
Bad name to clipboard. More... | |
#define | CBERR_NOMEM 2 |
No enough memory to clipboard. More... | |
#define | CBOP_NORMAL 0 |
Overwrite operation to clipboard. More... | |
#define | CBOP_APPEND 1 |
Append the new data to clipboarda after the old data. More... | |
Functions | |
MG_EXPORT int GUIAPI | CreateClipBoard (const char *cb_name, size_t size) |
Creates a new clipboard. More... | |
MG_EXPORT int GUIAPI | DestroyClipBoard (const char *cb_name) |
Destroys a new clipboard. More... | |
MG_EXPORT int GUIAPI | SetClipBoardData (const char *cb_name, void *data, size_t n, int cbop) |
Set the data of a clipboard. More... | |
MG_EXPORT size_t GUIAPI | GetClipBoardDataLen (const char *cb_name) |
Get the length of the data of a clipboard. More... | |
MG_EXPORT size_t GUIAPI | GetClipBoardData (const char *cb_name, void *data, size_t n) |
Get the data of a clipboard. More... | |
MG_EXPORT int GUIAPI | GetClipBoardByte (const char *cb_name, int index, unsigned char *byte) |
Get a byte from a clipboard. More... | |
#define CBERR_BADNAME 1 |
#define CBERR_NOMEM 2 |
#define CBERR_OK 0 |
#define CBNAME_TEXT ("text") |
#define CBOP_APPEND 1 |
#define LEN_CLIPBOARD_NAME 15 |
int GUIAPI CreateClipBoard | ( | const char * | cb_name, |
size_t | size | ||
) |
Creates a new clipboard.
This function creates a new clipboard with the name cb_name. MiniGUI itself creates a clipboard for text copying/pasting called CBNAME_TEXT.
cb_name | The name of the new clipboard. |
size | The size of the clipboard. |
CBERR_OK | The clipboard created. |
CBERR_BADNAME | Duplicated clipboard name. |
CBERR_NOMEM | No enough memory. |
int GUIAPI DestroyClipBoard | ( | const char * | cb_name | ) |
Destroys a new clipboard.
This function destroys a clipboard with the name cb_name.
cb_name | The name of the clipboard. |
CBERR_OK | The clipboard has been destroyed. |
CBERR_BADNAME | Can not find the clipboard with the name. |
int GUIAPI GetClipBoardByte | ( | const char * | cb_name, |
int | index, | ||
unsigned char * | byte | ||
) |
Get a byte from a clipboard.
This function gets a byte from the clipboard named cb_name.
cb_name | The name of the clipboard. |
index | The index of the byte. |
byte | The buffer saving the returned byte. |
CBERR_OK | Success. |
CBERR_BADNAME | Bad clipboard name. |
CBERR_NOMEM | The index is beyond the data in the clipboard. |
size_t GUIAPI GetClipBoardData | ( | const char * | cb_name, |
void * | data, | ||
size_t | n | ||
) |
Get the data of a clipboard.
This function gets the all data from the clipboard named cb_name.
cb_name | The name of the clipboard. |
data | The pointer to a buffer will save the data. |
n | The length of the buffer. |
size_t GUIAPI GetClipBoardDataLen | ( | const char * | cb_name | ) |
Get the length of the data of a clipboard.
This function gets the data length of the clipboard named cb_name.
cb_name | The name of the clipboard. |
int GUIAPI SetClipBoardData | ( | const char * | cb_name, |
void * | data, | ||
size_t | n, | ||
int | cbop | ||
) |
Set the data of a clipboard.
This function sets the data into the clipboard named cb_name.
cb_name | The name of the clipboard. |
data | The pointer to the data. |
n | The length of the data. |
cbop | Type of clipboard operations, can be one of the following values:
|
CBERR_OK | Success. |
CBERR_BADNAME | Bad clipboard name. |
CBERR_NOMEM | No enough memory. |