ClipBoard Operations
[MiniGUI-Processes specific functions]

Defines

Functions


Define Documentation

#define CBERR_BADNAME   1

Bad name to clipboard.

See also:
CreateClipBoard

Definition at line 2292 of file minigui.h.

#define CBERR_NOMEM   2

No enough memory to clipboard.

See also:
CreateClipBoard

Definition at line 2298 of file minigui.h.

#define CBERR_OK   0

Operate clipboard success.

See also:
CreateClipBoard

Definition at line 2286 of file minigui.h.

#define CBNAME_TEXT   ("text")

The default clipboard name of text control.

Definition at line 2279 of file minigui.h.

#define CBOP_APPEND   1

Append the new data to clipboarda after the old data.

Definition at line 2309 of file minigui.h.

#define CBOP_NORMAL   0

Overwrite operation to clipboard.

Definition at line 2304 of file minigui.h.

#define LEN_CLIPBOARD_NAME   15

The maximum length of the name of clipboard.

Definition at line 2268 of file minigui.h.

#define NR_CLIPBOARDS   4

The maximum number of clipboard.

Definition at line 2273 of file minigui.h.


Function Documentation

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.

Parameters:
cb_name The name of the new clipboard.
size The size of the clipboard.
Return values:
CBERR_OK The clipboard created.
CBERR_BADNAME Duplicated clipboard name.
CBERR_NOMEM No enough memory.
See also:
DestroyClipBoard
int GUIAPI DestroyClipBoard ( const char *  cb_name  ) 

Destroys a new clipboard.

This function destroys a clipboard with the name cb_name.

Parameters:
cb_name The name of the clipboard.
Return values:
CBERR_OK The clipboard has been destroyed.
CBERR_BADNAME Can not find the clipboard with the name.
See also:
CreateClipBoard
int GUIAPI GetClipBoardByte ( const char *  cb_name,
int  index,
unsigned char *  byte 
)

Gets a byte from a clipboard.

This function gets a byte from the clipboard named cb_name.

Parameters:
cb_name The name of the clipboard.
index The index of the byte.
byte The buffer saving the returned byte.
Return values:
CBERR_OK Success.
CBERR_BADNAME Bad clipboard name.
CBERR_NOMEM The index is beyond the data in the clipboard.
See also:
GetClipBoardData
size_t GUIAPI GetClipBoardData ( const char *  cb_name,
void *  data,
size_t  n 
)

Gets the data of a clipboard.

This function gets the all data from the clipboard named cb_name.

Parameters:
cb_name The name of the clipboard.
data The pointer to a buffer will save the data.
n The length of the buffer.
Returns:
The size of the data got if success, otherwise zero.
See also:
GetClipBoardByte
size_t GUIAPI GetClipBoardDataLen ( const char *  cb_name  ) 

Gets the length of the data of a clipboard.

This function gets the data length of the clipboard named cb_name.

Parameters:
cb_name The name of the clipboard.
Returns:
The size of the data if success, otherwise zero.
See also:
GetClipBoardData
int GUIAPI SetClipBoardData ( const char *  cb_name,
void *  data,
size_t  n,
int  cbop 
)

Sets the data of a clipboard.

This function sets the data into the clipboard named cb_name.

Parameters:
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:

  • CBOP_NORMAL
    Overwrite the old data.
  • CBOP_APPEND
    Append the new data after the old data.
Return values:
CBERR_OK Success.
CBERR_BADNAME Bad clipboard name.
CBERR_NOMEM No enough memory.
See also:
GetClipBoardDataLen, GetClipBoardData
Generated on Thu Apr 7 15:58:42 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3