MiniGUI API Reference (MiniGUI-Processes)
v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
This file includes global and miscellaneous interfaces of MiniGUI. More...
#include <stdio.h>
#include <sys/types.h>
Go to the source code of this file.
Data Structures | |
struct | _MG_Client |
struct | _MG_Layer |
struct | _ZNODEINFO |
struct | _ZNODEHEADER |
struct | _CompositorOps |
struct | _CombParamsFallback |
struct | _REQUEST |
struct | _DESKTOPOPS |
struct | _ETCSECTION |
struct | _ETC_S |
Macros | |
#define | g_rcScr (GetScreenRect()) |
Contains the rectangle of the whole screen. More... | |
#define | g_rcDesktop g_rcScr |
Contains the rectangle of desktop of the application. More... | |
#define | mgIsServer (IsServer()) |
Indicates whether the current process is the server or a client on MiniGUI-Processes. More... | |
#define | LEN_LAYER_NAME 15 |
The maximum length of name of layer in MiniGUI-Processes. More... | |
#define | LEN_CLIENT_NAME 15 |
The maximum length of name of client in MiniGUI-Processes. More... | |
#define | INV_LAYER_HANDLE 0 |
Invalid handle value of the layer. More... | |
#define | NAME_SELF_LAYER "" |
The name of the self layer. More... | |
#define | NAME_TOPMOST_LAYER "" |
The name of the topmost layer. More... | |
#define | NAME_DEF_LAYER "mginit" |
The default name of the layer. More... | |
#define | MAX_SYS_REQID 0x0023 |
Maximal system reserved request identifier. More... | |
#define | MAX_REQID 0x0030 |
Maximal request identifier. More... | |
#define | sock_write(fd, buff, count) sock_write_t(fd, buff, count, 0) |
The blocking version of sock_write_t function. More... | |
#define | sock_read(fd, buff, count) sock_read_t(fd, buff, count, 0) |
The blocking version of sock_read_t function. More... | |
#define | ReinitDesktop() ReinitDesktopEx (TRUE) |
Re-initializes the desktop including the local system text. More... | |
#define | MiniGUIMain |
The main entry of a MiniGUI application. More... | |
#define | IDM_DTI_FIRST (300) |
The minimum interger value of command ID when user customize desktop menu. More... | |
#define | ETC_MAXLINE 1024 |
The max line number of etc file. More... | |
#define | ETC_FILENOTFOUND -1 |
No found etc file. More... | |
#define | ETC_SECTIONNOTFOUND -2 |
No found section in etc file. More... | |
#define | ETC_KEYNOTFOUND -3 |
No found key in etc file. More... | |
#define | ETC_TMPFILEFAILED -4 |
Create tmpfile failed. More... | |
#define | ETC_FILEIOFAILED -5 |
IO operation failed to etc file. More... | |
#define | ETC_INTCONV -6 |
Convert the value string to an integer failed. More... | |
#define | ETC_INVALIDOBJ -7 |
Invalid object to etc file. More... | |
#define | ETC_READONLYOBJ -8 |
Read only to etc file. More... | |
#define | ETC_OK 0 |
Operate success to etc file. More... | |
#define | SetValueToEtc(hEtc, pSection, pKey, pValue) GetValueFromEtc(hEtc, pSection, pKey, pValue, -1) |
Set the value in the etc object. More... | |
#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... | |
#define | Beep Ping |
Alias of Ping. More... | |
#define | IDC_ARROW 0 |
#define | IDC_IBEAM 1 |
#define | IDC_PENCIL 2 |
#define | IDC_CROSS 3 |
#define | IDC_MOVE 4 |
#define | IDC_SIZENWSE 5 |
#define | IDC_SIZENESW 6 |
#define | IDC_SIZEWE 7 |
#define | IDC_SIZENS 8 |
#define | IDC_UPARROW 9 |
#define | IDC_NONE 10 |
#define | IDC_HELP 11 |
#define | IDC_BUSY 12 |
#define | IDC_WAIT 13 |
#define | IDC_RARROW 14 |
#define | IDC_COLOMN 15 |
#define | IDC_ROW 16 |
#define | IDC_DRAG 17 |
#define | IDC_NODROP 18 |
#define | IDC_HAND_POINT 19 |
#define | IDC_HAND_SELECT 20 |
#define | IDC_SPLIT_HORZ 21 |
#define | IDC_SPLIT_VERT 22 |
#define | SetCursor(hcsr) SetCursorEx (hcsr, FALSE) |
Changes the current cursor. More... | |
#define | SetDefaultCursor(hcsr) SetCursorEx (hcsr, TRUE) |
Changes the current cursor, and set it as the default cursor. More... | |
#define | IDS_MGST_WINDOW 0 |
The identifier of the window system text. More... | |
#define | IDS_MGST_START 1 |
The identifier of the start system text. More... | |
#define | IDS_MGST_REFRESH 2 |
The identifier of the refresh background system text. More... | |
#define | IDS_MGST_CLOSEALLWIN 3 |
The identifier of the close all windows system text. More... | |
#define | IDS_MGST_ENDSESSION 4 |
The identifier of the end session system text. More... | |
#define | IDS_MGST_OPERATIONS 5 |
The identifier of the operations system text. More... | |
#define | IDS_MGST_MINIMIZE 6 |
The identifier of the minimize system text. More... | |
#define | IDS_MGST_MAXIMIZE 7 |
The identifier of the maximize system text. More... | |
#define | IDS_MGST_RESTORE 8 |
The identifier of the restore system text. More... | |
#define | IDS_MGST_CLOSE 9 |
The identifier of the close system text. More... | |
#define | IDS_MGST_OK 10 |
The identifier of the ok system text. More... | |
#define | IDS_MGST_NEXT 11 |
The identifier of the next system text. More... | |
#define | IDS_MGST_CANCEL 12 |
The identifier of the cancel system text. More... | |
#define | IDS_MGST_PREV 13 |
The identifier of the previous system text. More... | |
#define | IDS_MGST_YES 14 |
The identifier of the yes system text. More... | |
#define | IDS_MGST_NO 15 |
The identifier of the no system text. More... | |
#define | IDS_MGST_ABORT 16 |
The identifier of the abort system text. More... | |
#define | IDS_MGST_RETRY 17 |
The identifier of the retry system text. More... | |
#define | IDS_MGST_IGNORE 18 |
The identifier of the ignore system text. More... | |
#define | IDS_MGST_ABOUTMG 19 |
The identifier of the about minigui system text. More... | |
#define | IDS_MGST_OPENFILE 20 |
The identifier of the open file system text. More... | |
#define | IDS_MGST_SAVEFILE 21 |
The identifier of the save file system text. More... | |
#define | IDS_MGST_COLORSEL 22 |
The identifier of the color selection system text. More... | |
#define | IDS_MGST_SWITCHLAYER 23 |
The identifier of the switch layer system text. More... | |
#define | IDS_MGST_DELLAYER 24 |
The identifier of the delete layer system text. More... | |
#define | IDS_MGST_ERROR 25 |
The identifier of the error system text. More... | |
#define | IDS_MGST_LOGO 26 |
The identifier of the logo system text. More... | |
#define | IDS_MGST_CURRPATH 27 |
The identifier of the current path system text. More... | |
#define | IDS_MGST_FILE 28 |
The identifier of the file system text. More... | |
#define | IDS_MGST_LOCATION 29 |
The identifier of the location system text. More... | |
#define | IDS_MGST_UP 30 |
The identifier of the up system text. More... | |
#define | IDS_MGST_NAME 31 |
The identifier of the name system text. More... | |
#define | IDS_MGST_SIZE 32 |
The identifier of the size system text. More... | |
#define | IDS_MGST_ACCESSMODE 33 |
The identifier of the access mode system text. More... | |
#define | IDS_MGST_LASTMODTIME 34 |
The identifier of the last modify time system text. More... | |
#define | IDS_MGST_OPEN 35 |
The identifier of the open system text. More... | |
#define | IDS_MGST_FILENAME 36 |
The identifier of the file name system text. More... | |
#define | IDS_MGST_FILETYPE 37 |
The identifier of the file type system text. More... | |
#define | IDS_MGST_SHOWHIDEFILE 38 |
The identifier of the show hide file system text. More... | |
#define | IDS_MGST_NOTFOUND 39 |
The identifier of the not found file system text. More... | |
#define | IDS_MGST_NR 40 |
The identifier of the can't read system text. More... | |
#define | IDS_MGST_NW 41 |
The identifier of the can't write system text. More... | |
#define | IDS_MGST_INFO 42 |
The identifier of the information system text. More... | |
#define | IDS_MGST_R 43 |
The identifier of the read system text. More... | |
#define | IDS_MGST_W 44 |
The identifier of the write system text. More... | |
#define | IDS_MGST_WR 45 |
The identifier of the read and write system text. More... | |
#define | IDS_MGST_SAVE 46 |
The identifier of the save system text. More... | |
#define | IDS_MGST_FILEEXIST 47 |
The identifier of the file exist system text. More... | |
#define | mg_slice_new(type) ((type*)mg_slice_alloc(sizeof (type))) |
The macro to allocate a slice memory for a structure. More... | |
#define | mg_slice_new0(type) ((type*)mg_slice_alloc0(sizeof (type))) |
The macro to allocate a zero'd slice memory for a structure. More... | |
#define | mg_slice_dup(type, mem) |
Duplicate a structure. More... | |
#define | mg_slice_delete(type, mem) |
Free a block of memory. More... | |
#define | mg_slice_delete_chain(type, mem_chain, next) |
Free a linked list of memory blocks. More... | |
Typedefs | |
typedef struct _MG_Client | MG_Client |
typedef struct _MG_Layer | MG_Layer |
typedef int(* | ON_LOCK_CLIENT_REQ) (void) |
Type of client request lock callback. More... | |
typedef int(* | ON_TRYLOCK_CLIENT_REQ) (void) |
Type of client request lock callback. More... | |
typedef void(* | ON_UNLOCK_CLIENT_REQ) (void) |
Type of client request unlock callback. More... | |
typedef void(* | ON_NEW_DEL_CLIENT) (int op, int cli) |
Type of client event callback. More... | |
typedef void(* | ON_CHANGE_LAYER) (int op, MG_Layer *layer, MG_Client *client) |
Type of layer change event callback. More... | |
typedef void(* | ON_ZNODE_OPERATION) (int op, int cli, int idx_znode) |
Type of z-node operation callback. More... | |
typedef struct _ZNODEINFO | ZNODEINFO |
typedef struct _ZNODEHEADER | ZNODEHEADER |
typedef struct _CompositorOps | CompositorOps |
typedef struct _CombParamsFallback | COMBPARAMS_FALLBACK |
typedef struct _REQUEST | REQUEST |
typedef REQUEST * | PREQUEST |
typedef int(* | REQ_HANDLER) (int cli, int clifd, void *buff, size_t len) |
The prototype of a request handler (version 0). More... | |
typedef int(* | REQ_HANDLER_V1) (int cli, int clifd, void *buff, size_t len, int fd_received) |
The prototype of an extended request handler (version 1). More... | |
typedef struct _DESKTOPOPS | DESKTOPOPS |
typedef struct _ETCSECTION | ETCSECTION |
typedef ETCSECTION * | PETCSECTION |
typedef struct _ETC_S | ETC_S |
Functions | |
MG_EXPORT RECT GUIAPI | GetScreenRect (void) |
Return the rectangle of the physical screen. More... | |
MG_EXPORT BOOL GUIAPI | IsServer (void) |
Check whether the current process is the server of MiniGUI-Processes. More... | |
MG_EXPORT int GUIAPI | InitGUI (int argc, const char *argv[]) |
Initialize MiniGUI. More... | |
MG_EXPORT void GUIAPI | TerminateGUI (int not_used) |
Terminate MiniGUI. More... | |
MG_EXPORT void GUIAPI | MiniGUIPanic (int exitcode) |
The panic of MiniGUI application. More... | |
MG_EXPORT GHANDLE GUIAPI | JoinLayer (const char *layer_name, const char *client_name, int max_nr_highers, int max_nr_normals) |
Joins to a layer. More... | |
MG_EXPORT GHANDLE GUIAPI | GetLayerInfo (const char *layer_name, int *nr_clients, BOOL *is_topmost, int *cli_active) |
Get information of a layer by a client. More... | |
MG_EXPORT BOOL GUIAPI | SetTopmostLayer (BOOL handle_name, GHANDLE layer_handle, const char *layer_name) |
Brings a layer to be the topmost one. More... | |
MG_EXPORT BOOL GUIAPI | DeleteLayer (BOOL handle_name, GHANDLE layer_handle, const char *layer_name) |
Deletes a specific layer. More... | |
MG_EXPORT BOOL GUIAPI | MoveToLayer (BOOL handle_name, GHANDLE layer_handle, const char *layer_name) |
Move current client to the specified layer. More... | |
MG_EXPORT BOOL GUIAPI | ServerStartup (int nr_globals, int def_nr_highers, int def_nr_normals) |
Initializes the server of MiniGUI-Processes. More... | |
MG_EXPORT MG_Layer *GUIAPI | ServerCreateLayer (const char *layer_name, int max_nr_highers, int max_nr_normals) |
Create a new layer from the server. More... | |
MG_EXPORT BOOL GUIAPI | ServerSetTopmostLayer (MG_Layer *layer) |
Set topmost layer from the server. More... | |
MG_EXPORT BOOL GUIAPI | ServerDeleteLayer (MG_Layer *layer) |
Delete a layer from the server. More... | |
MG_EXPORT int GUIAPI | ServerGetTopmostZNodeOfType (MG_Layer *layer, DWORD type, int *cli) |
Get the topmost z-node in the specified layer for the specific window type from the server. More... | |
MG_EXPORT int GUIAPI | ServerGetNextZNode (MG_Layer *layer, int idx_znode, int *cli) |
Get the next z-node in the specified layer from the server. More... | |
MG_EXPORT int GUIAPI | ServerGetPrevZNode (MG_Layer *layer, int idx_znode, int *cli) |
Get the previous z-node in the specified layer from the server. More... | |
MG_EXPORT BOOL GUIAPI | ServerGetZNodeInfo (MG_Layer *layer, int idx_znode, ZNODEINFO *znode_info) |
Get the z-node information in the specified layer from the server. More... | |
const MG_EXPORT ZNODEHEADER *GUIAPI | ServerGetWinZNodeHeader (MG_Layer *layer, int idx_znode, void **priv_data, BOOL lock) |
Get the pointer to the z-node header of a specific window in the specified layer. More... | |
MG_EXPORT BOOL GUIAPI | ServerReleaseWinZNodeHeader (MG_Layer *layer, int idx_znode) |
Release z-node header of a specific window in the specified layer. More... | |
MG_EXPORT int GUIAPI | ServerGetPopupMenusCount (void) |
Get the number of popup menus shown on the screen. More... | |
MG_EXPORT BOOL GUIAPI | ServerReleasePopupMenuZNodeHeader (int idx_znode) |
Release the lock of the z-node header of the specific popup menu. More... | |
MG_EXPORT BOOL GUIAPI | ServerGetWinZNodeRegion (MG_Layer *layer, int idx_znode, DWORD rgn_ops, CLIPRGN *dst_rgn) |
Get the z-node region of a specific window in the specified layer. More... | |
MG_EXPORT BOOL GUIAPI | ServerGetPopupMenuZNodeRegion (int idx_znode, DWORD rgn_ops, CLIPRGN *dst_rgn) |
Get the z-node region of a specific popup menu in the current layer. More... | |
MG_EXPORT BOOL GUIAPI | ServerSetWinZNodePrivateData (MG_Layer *layer, int idx_znode, void *priv_data) |
Set the private data of the z-node of a specific window in the specified layer. More... | |
MG_EXPORT BOOL GUIAPI | ServerSetPopupMenuZNodePrivateData (int idx_znode, void *priv_data) |
Set the private data of the z-node of the specific popup menu. More... | |
MG_EXPORT BOOL GUIAPI | ServerDoZNodeOperation (MG_Layer *layer, int idx_znode, int op_code, void *op_data, BOOL notify) |
Does an operation on the z-node in the specified layer from the server. More... | |
MG_EXPORT BOOL GUIAPI | ServerMoveClientToLayer (int cli, MG_Layer *dst_layer) |
Move a client to the specified layer. More... | |
MG_EXPORT int GUIAPI | GetClientByPID (int pid) |
Returns the client identifier from PID of a client. More... | |
MG_EXPORT BOOL GUIAPI | SetTopmostClient (int cli) |
Set topmost layer by a client identifier. More... | |
MG_EXPORT void GUIAPI | DisableClientsOutput (void) |
Disable all clients output. More... | |
MG_EXPORT void GUIAPI | UpdateTopmostLayer (const RECT *dirty_rc) |
Update topmost layer. More... | |
const MG_EXPORT CompositorOps *GUIAPI | ServerGetCompositorOps (const char *name) |
Get the operations of a specific compositor. More... | |
MG_EXPORT BOOL GUIAPI | ServerRegisterCompositor (const char *name, const CompositorOps *ops) |
Register a new compositor. More... | |
MG_EXPORT BOOL GUIAPI | ServerUnregisterCompositor (const char *name) |
Un-register a new compositor. More... | |
const MG_EXPORT CompositorOps *GUIAPI | ServerSelectCompositor (const char *name, CompositorCtxt **ctxt) |
Select a compositor as the current compositor. More... | |
const MG_EXPORT char *GUIAPI | ServerGetCurrentCompositor (const CompositorOps **ops, CompositorCtxt **ctxt) |
Get the name and the context of the current compositor. More... | |
const CompositorOps * | __ex_compositor_get (const char *name, const CompositorOps *fallback_ops, int *version) |
static int GUIAPI | ClientRequestEx (const REQUEST *request, const void *ex_data, int ex_data_len, void *result, int len_rslt) |
Sends a request to the server and wait reply. More... | |
static int | ClientRequest (const REQUEST *request, void *result, int len_rslt) |
Sends a request to the server and wait reply. More... | |
MG_EXPORT int GUIAPI | GetSockFD2Server (void) |
Get the file descriptor of the socket connected to the server. More... | |
MG_EXPORT int GUIAPI | ServerSendReplyEx (int clifd, const void *reply, int len, int fd_to_send) |
Sends a reply to the client. More... | |
static int GUIAPI | ServerSendReply (int clifd, const void *reply, int len) |
Sends the reply to the client. More... | |
MG_EXPORT BOOL GUIAPI | RegisterRequestHandler (int req_id, REQ_HANDLER your_handler) |
Registers a customized request handler of version 0. More... | |
MG_EXPORT BOOL GUIAPI | RegisterRequestHandlerV1 (int req_id, REQ_HANDLER_V1 your_handler_v1) |
Registers a customized extended request handler of version 1. More... | |
MG_EXPORT REQ_HANDLER GUIAPI | GetRequestHandler (int req_id) |
Get the request handler by request identifier. More... | |
MG_EXPORT REQ_HANDLER_V1 GUIAPI | GetRequestHandlerV1 (int req_id) |
Get the extended request handler by a request identifier. More... | |
MG_EXPORT void *GUIAPI | GetRequestHandlerEx (int req_id, int *version) |
Get the request handler and the version by request identifier. More... | |
MG_EXPORT int | serv_listen (const char *name) |
Creates a listen socket. More... | |
MG_EXPORT int | serv_accept (int listenfd, pid_t *pidptr, uid_t *uidptr) |
Waits for a client connection to arrive, and accept it. More... | |
MG_EXPORT int | cli_conn (const char *name, char project) |
Used by clients to connect to a server. More... | |
MG_EXPORT ssize_t | sock_read_t (int fd, void *buff, size_t count, DWORD timeout) |
Reads data from socket. More... | |
MG_EXPORT BOOL GUIAPI | ReinitDesktopEx (BOOL init_sys_text) |
Re-initializes the desktop. More... | |
MG_EXPORT void GUIAPI | ExitGUISafely (int exitcode) |
Exits your MiniGUI application safely. More... | |
MG_EXPORT DESKTOPOPS *GUIAPI | SetCustomDesktopOperationSet (DESKTOPOPS *usr_dsk_ops) |
Set customer desktop operation set. More... | |
MG_EXPORT void GUIAPI | DesktopUpdateAllWindow (void) |
Update all visible windows on the desktop. More... | |
MG_EXPORT BOOL GUIAPI | SetMouseCalibrationParameters (const POINT *src_pts, const POINT *dst_pts) |
Set the parameters for doing mouse calibration. More... | |
MG_EXPORT void GUIAPI | GetOriginalMousePosition (int *x, int *y) |
Get the original mouse position. More... | |
MG_EXPORT HWND GUIAPI | OpenAboutDialog (HWND hHosting) |
Opens or actives the 'About MiniGUI' dialog. More... | |
MG_EXPORT int GUIAPI | GetValueFromEtcFile (const char *pEtcFile, const char *pSection, const char *pKey, char *pValue, int iLen) |
Get value from a configuration file. More... | |
MG_EXPORT int GUIAPI | GetIntValueFromEtcFile (const char *pEtcFile, const char *pSection, const char *pKey, int *value) |
Get integer value from a configuration file. More... | |
MG_EXPORT int GUIAPI | SetValueToEtcFile (const char *pEtcFile, const char *pSection, const char *pKey, char *pValue) |
Set a value in a configuration file. More... | |
MG_EXPORT int GUIAPI | RemoveSectionInEtcFile (const char *pEtcFile, const char *pSection) |
Removes a section in an etc file. More... | |
MG_EXPORT int GUIAPI | SaveSectionToEtcFile (const char *pEtcFile, PETCSECTION psect) |
Saves a section to an etc file. More... | |
MG_EXPORT GHANDLE GUIAPI | LoadEtcFile (const char *pEtcFile) |
Loads an etc file into memory. More... | |
MG_EXPORT int GUIAPI | SaveEtcToFile (GHANDLE hEtc, const char *file_name) |
Saves an ETC object into a file. More... | |
MG_EXPORT int GUIAPI | UnloadEtcFile (GHANDLE hEtc) |
Unloads an etc file. More... | |
MG_EXPORT int GUIAPI | GetValueFromEtc (GHANDLE hEtc, const char *pSection, const char *pKey, char *pValue, int iLen) |
Get value from a configuration etc object. More... | |
MG_EXPORT int GUIAPI | GetIntValueFromEtc (GHANDLE hEtc, const char *pSection, const char *pKey, int *pValue) |
Get the integer value from a configuration etc object. More... | |
MG_EXPORT GHANDLE GUIAPI | FindSectionInEtc (GHANDLE hEtc, const char *pSection, BOOL bCreateNew) |
Finds/Creates a section from an etc object. More... | |
MG_EXPORT int GUIAPI | GetValueFromEtcSec (GHANDLE hSect, const char *pKey, char *pValue, int iLen) |
Get value from an etc section object. More... | |
MG_EXPORT int GUIAPI | GetIntValueFromEtcSec (GHANDLE hSect, const char *pKey, int *pValue) |
Get an integer value from an etc section object. More... | |
MG_EXPORT int GUIAPI | SetValueToEtcSec (GHANDLE hSect, const char *pKey, char *pValue) |
Set the value in the etc section object. More... | |
MG_EXPORT int GUIAPI | RemoveSectionInEtc (GHANDLE hEtc, const char *pSection) |
Removes a section in etc object. More... | |
static int | GetMgEtcValue (const char *pSection, const char *pKey, char *pValue, int iLen) |
Get value from MiniGUI configuration etc object. More... | |
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... | |
MG_EXPORT DWORD GUIAPI | GetTickCount (void) |
Retrieve the tick counts that have elapsed since MiniGUI was started. More... | |
MG_EXPORT void GUIAPI | Ping (void) |
Makes a beep sound. More... | |
MG_EXPORT void GUIAPI | Tone (int frequency_hz, int duration_ms) |
Makes a tone. More... | |
MG_EXPORT void *GUIAPI | GetOriginalTermIO (void) |
Get termios structure of the original terminal before initializing MiniGUI. More... | |
MG_EXPORT char *GUIAPI | FixStrAlloc (int len) |
Allocates a buffer for a length-fixed string. More... | |
MG_EXPORT char *GUIAPI | FixStrDup (const char *str) |
Duplicates a length-fixed string. More... | |
MG_EXPORT void GUIAPI | FreeFixStr (char *str) |
Frees a length-fixed string. More... | |
MG_EXPORT HCURSOR GUIAPI | LoadCursorFromFile (const char *filename) |
Loads a cursor from a M$ Windows cursor file. More... | |
MG_EXPORT HCURSOR GUIAPI | LoadCursorFromMem (const void *area) |
Loads a cursor from a memory area. More... | |
MG_EXPORT HCURSOR GUIAPI | LoadCursorFromPNGFile (const char *filename, int hotspot_x, int hotspot_y) |
Loads a cursor from a PNG file. More... | |
MG_EXPORT HCURSOR GUIAPI | LoadCursorFromPNGMem (const void *area, size_t size, int hotspot_x, int hotspot_y) |
Loads a cursor from a memory area in PNG layout. More... | |
MG_EXPORT HCURSOR GUIAPI | CreateCursor (int xhotspot, int yhotspot, int w, int h, const BYTE *pANDBits, const BYTE *pXORBits, int colornum) |
Creates a cursor from memory data. More... | |
MG_EXPORT HCURSOR GUIAPI | CopyCursor (HCURSOR hcsr) |
Copies a cursor object. More... | |
MG_EXPORT BOOL GUIAPI | DestroyCursor (HCURSOR hcsr) |
Destroys a cursor object. More... | |
MG_EXPORT HCURSOR GUIAPI | GetSystemCursor (int csrid) |
Get the handle to a system cursor by its identifier. More... | |
MG_EXPORT HCURSOR GUIAPI | GetCurrentCursor (void) |
Get the handle to the current cursor. More... | |
MG_EXPORT void GUIAPI | ClipCursor (const RECT *prc) |
Clips the cursor range. More... | |
MG_EXPORT void GUIAPI | GetClipCursor (RECT *prc) |
Get the current cursor clipping rectangle. More... | |
MG_EXPORT void GUIAPI | GetCursorPos (POINT *ppt) |
Get position of the current cursor. More... | |
MG_EXPORT void GUIAPI | SetCursorPos (int x, int y) |
Set position of the current cursor. More... | |
MG_EXPORT HCURSOR GUIAPI | SetCursorEx (HCURSOR hcsr, BOOL set_def) |
Changes the current cursor. More... | |
MG_EXPORT HCURSOR GUIAPI | GetDefaultCursor (void) |
Get the default cursor. More... | |
MG_EXPORT int GUIAPI | ShowCursor (BOOL fShow) |
Shows or hides cursor. More... | |
MG_EXPORT BOOL GUIAPI | GetKeyStatus (UINT uKey) |
Get a key or a mouse button status. More... | |
MG_EXPORT DWORD GUIAPI | GetShiftKeyStatus (void) |
Get status of the shift keys. More... | |
MG_EXPORT void GUIAPI | GetKeyboardState (BYTE *kbd_state) |
Get status of all keys on keyboard. More... | |
const MG_EXPORT char *GUIAPI | GetSysText (unsigned int id) |
Translates system text to localized text. More... | |
const MG_EXPORT char **GUIAPI | GetSysTextInUTF8 (const char *language) |
Get the localized system text array in UTF-8 for a specified language. More... | |
MG_EXPORT char * | strnchr (const char *s, size_t n, int c) |
Locates character in the first n characters of string s. More... | |
MG_EXPORT int | substrlen (const char *text, int len, int delimiter, int *nr_delim) |
Locates a substring delimited by one or more delimiters in the first len characters of string text. More... | |
MG_EXPORT char * | strtrimall (char *src) |
Deletes all space characters. More... | |
MG_EXPORT void * | mg_slice_alloc (size_t block_size) |
Allocate a slice memory. More... | |
MG_EXPORT void * | mg_slice_alloc0 (size_t block_size) |
Allocate a slice memory and initialize the memory to zero. More... | |
MG_EXPORT void * | mg_slice_copy (size_t block_size, const void *mem_block) |
Allocate and copy a slice. More... | |
MG_EXPORT void | mg_slice_free (size_t block_size, void *mem_block) |
Free a block of memory. More... | |
MG_EXPORT void | mg_slice_free_chain_with_offset (size_t block_size, void *mem_chain, size_t next_offset) |
Free a linked list of memory blocks. More... | |
Variables | |
MG_EXPORT void * | mgSharedRes |
Contains the pointer to the shared resource of MiniGUI-Processes. More... | |
MG_EXPORT size_t | mgSizeRes |
Contains the length of shared resource of MiniGUI-Processes. More... | |
MG_EXPORT int | mgClientSize |
The current size of the array mgClients. More... | |
MG_EXPORT MG_Client * | mgClients |
The pointer to the array contains all clients' information. More... | |
MG_EXPORT MG_Layer * | mgTopmostLayer |
The pointer to the topmost layer. More... | |
MG_EXPORT MG_Layer * | mgDefaultLayer |
The pointer to the default layer. More... | |
MG_EXPORT MG_Layer * | mgLayers |
The pointer to the layer list. More... | |
MG_EXPORT ON_LOCK_CLIENT_REQ | OnLockClientReq |
Set to a function to lock a client request. More... | |
MG_EXPORT ON_TRYLOCK_CLIENT_REQ | OnTrylockClientReq |
Set to a function to lock a client request. More... | |
MG_EXPORT ON_UNLOCK_CLIENT_REQ | OnUnlockClientReq |
Set to a function to unlock a client request. More... | |
MG_EXPORT ON_NEW_DEL_CLIENT | OnNewDelClient |
Set to a function to handle a comming in (going away) connection of client. More... | |
MG_EXPORT ON_CHANGE_LAYER | OnChangeLayer |
Set to a function to handle events of layers. More... | |
MG_EXPORT ON_ZNODE_OPERATION | OnZNodeOperation |
Set to a function to handle events of z-node. More... | |
MG_EXPORT char | ETCFILEPATH [] |
The path name of MiniGUI configuration file. More... | |
const MG_EXPORT char * | SysText [] |
Contains all text used by MiniGUI in English. More... | |
const MG_EXPORT char ** | local_SysText |
The pointer to the current localized system text array. More... | |
This file includes global and miscellaneous interfaces of MiniGUI.
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~2020, 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/blog/minigui-licensing-policy/>.
Definition in file minigui.h.