52 #ifndef _MGUI_MINIGUI_H 53 #define _MGUI_MINIGUI_H 86 #define g_rcDesktop g_rcScr 95 #ifdef _MGRM_PROCESSES 97 #include <sys/types.h> 106 extern MG_EXPORT
BOOL mgIsServer;
117 extern MG_EXPORT
void* mgSharedRes;
127 extern MG_EXPORT
size_t mgSizeRes;
133 #define LEN_LAYER_NAME 14 139 #define LEN_CLIENT_NAME 14 145 #define INV_LAYER_HANDLE 0 150 typedef struct _MG_Client
153 char name [LEN_CLIENT_NAME + 1];
165 DWORD last_live_time;
170 struct _MG_Client* next;
172 struct _MG_Client* prev;
175 struct _MG_Layer* layer;
178 struct GlobalRes* global_res;
182 typedef struct _MG_Layer
185 char name [LEN_LAYER_NAME + 1];
193 MG_Client* cli_active;
196 struct _MG_Layer* next;
198 struct _MG_Layer* prev;
207 #define SCREEN_ATTR_ALPHA_CHANNEL 0x01 //alpha channel 208 #define SCREEN_ATTR_COLORKEY 0x02 //colorkey 209 #define SCREEN_ATTR_COLORSPACE 0x03 //colorspace 210 #define SCREEN_ATTR_ALPHA 0x04 211 #define SCREEN_NO_EXIST -99 //screen don't exist 219 extern MG_EXPORT
int mgClientSize;
231 extern MG_EXPORT MG_Client* mgClients;
239 extern MG_EXPORT MG_Layer* mgTopmostLayer;
247 extern MG_EXPORT MG_Layer* mgLayers;
263 MG_EXPORT
int GUIAPI
InitGUI (
int,
const char **);
300 #ifndef _MGRM_THREADS 324 #define MAX_NR_LISTEN_FD 5 332 #define POLLOUT 0x004 336 #define POLLERR 0x008 368 HWND hwnd,
void* context);
388 #ifdef _MGRM_PROCESSES 407 #define NAME_SELF_LAYER "" 413 #define NAME_TOPMOST_LAYER "" 419 #define NAME_DEF_LAYER "mginit" 455 MG_EXPORT
GHANDLE GUIAPI JoinLayer (
const char* layer_name,
456 const char* client_name,
457 int max_nr_topmosts,
int max_nr_normals);
483 MG_EXPORT
GHANDLE GUIAPI GetLayerInfo (
const char* layer_name,
484 int* nr_clients,
BOOL* is_topmost,
int* cli_active);
503 MG_EXPORT
BOOL GUIAPI SetTopmostLayer (
BOOL handle_name,
504 GHANDLE handle,
const char* name);
523 MG_EXPORT
BOOL GUIAPI DeleteLayer (
BOOL handle_name,
524 GHANDLE handle,
const char* layer_name);
547 typedef int (* ON_LOCK_CLIENT_REQ) (void);
556 typedef int (* ON_TRYLOCK_CLIENT_REQ) (void);
564 typedef void (* ON_UNLOCK_CLIENT_REQ) (void);
574 extern MG_EXPORT ON_LOCK_CLIENT_REQ OnLockClientReq;
584 extern MG_EXPORT ON_TRYLOCK_CLIENT_REQ OnTrylockClientReq;
593 extern MG_EXPORT ON_UNLOCK_CLIENT_REQ OnUnlockClientReq;
595 #define LCO_NEW_CLIENT 1 596 #define LCO_DEL_CLIENT 2 604 typedef void (* ON_NEW_DEL_CLIENT) (
int op,
int cli);
606 #define LCO_NEW_LAYER 1 607 #define LCO_DEL_LAYER 2 608 #define LCO_JOIN_CLIENT 3 609 #define LCO_REMOVE_CLIENT 4 610 #define LCO_TOPMOST_CHANGED 5 611 #define LCO_ACTIVE_CHANGED 6 620 typedef void (* ON_CHANGE_LAYER) (
int op, MG_Layer* layer,
623 #define ZNOP_ALLOCATE 1 625 #define ZNOP_MOVE2TOP 3 628 #define ZNOP_MOVEWIN 6 629 #define ZNOP_SETACTIVE 7 631 #define ZNOP_ENABLEWINDOW 11 632 #define ZNOP_DISABLEWINDOW 12 633 #define ZNOP_STARTDRAG 13 634 #define ZNOP_CANCELDRAG 14 635 #define ZNOP_CHANGECAPTION 15 643 typedef void (* ON_ZNODE_OPERATION) (
int op,
int cli,
int idx_znode);
668 extern MG_EXPORT ON_NEW_DEL_CLIENT OnNewDelClient;
699 extern MG_EXPORT ON_CHANGE_LAYER OnChangeLayer;
743 extern MG_EXPORT ON_ZNODE_OPERATION OnZNodeOperation;
771 MG_EXPORT
BOOL GUIAPI ServerStartup (
int nr_globals,
772 int def_nr_topmosts,
int def_nr_normals);
801 MG_EXPORT MG_Layer* GUIAPI ServerCreateLayer (
const char* layer_name,
802 int max_nr_topmosts,
int max_nr_normals);
818 MG_EXPORT
BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer);
834 MG_EXPORT
BOOL GUIAPI ServerDeleteLayer (MG_Layer* layer);
860 MG_EXPORT
int GUIAPI ServerGetNextZNode (MG_Layer* layer,
int idx_znode,
863 #define ZNIT_DESKTOP 0x50000000 865 #define ZNIT_GLOBAL_MAINWIN 0x31000000 866 #define ZNIT_GLOBAL_TOOLWIN 0x32000000 867 #define ZNIT_GLOBAL_CONTROL 0x30000000 869 #define ZNIT_TOPMOST_MAINWIN 0x21000000 870 #define ZNIT_TOPMOST_TOOLWIN 0x22000000 871 #define ZNIT_TOPMOST_CONTROL 0x20000000 873 #define ZNIT_NORMAL_MAINWIN 0x11000000 874 #define ZNIT_NORMAL_TOOLWIN 0x12000000 875 #define ZNIT_NORMAL_CONTROL 0x10000000 877 #define ZNIT_NULL 0x00000000 879 #define ZNIF_VISIBLE 0x00000002 880 #define ZNIF_DISABLED 0x00000004 883 typedef struct _ZNODEINFO
957 MG_EXPORT
BOOL GUIAPI ServerGetZNodeInfo (MG_Layer* layer,
int idx_znode,
958 ZNODEINFO* znode_info);
992 MG_EXPORT
BOOL GUIAPI ServerDoZNodeOperation (MG_Layer* layer,
int idx_znode,
993 int op_code,
void* op_data,
BOOL notify);
1006 MG_EXPORT
int GUIAPI GetClientByPID (
int pid);
1024 MG_EXPORT
BOOL GUIAPI SetTopmostClient (
int cli);
1030 MG_EXPORT
void GUIAPI DisableClientsOutput (
void);
1038 MG_EXPORT
void GUIAPI UpdateTopmostLayer (
const RECT* dirty_rc);
1076 #define MAX_SYS_REQID 0x0020 1084 #define MAX_REQID 0x0030 1087 typedef struct _REQUEST {
1096 typedef REQUEST* PREQUEST;
1120 MG_EXPORT
int GUIAPI ClientRequestEx (
const REQUEST* request,
const void* ex_data,
1121 int ex_data_len,
void* result,
int len_rslt);
1145 static inline int ClientRequest (
const REQUEST* request,
1146 void* result,
int len_rslt)
1148 return ClientRequestEx (request,
NULL, 0, result, len_rslt);
1162 MG_EXPORT
int GUIAPI GetSockFD2Server (
void);
1181 MG_EXPORT
int GUIAPI ServerSendReply (
int clifd,
const void* reply,
int len);
1189 typedef int (* REQ_HANDLER) (
int cli,
int clifd,
void* buff,
size_t len);
1209 MG_EXPORT
BOOL GUIAPI RegisterRequestHandler (
int req_id, REQ_HANDLER your_handler);
1226 MG_EXPORT REQ_HANDLER GUIAPI GetRequestHandler (
int req_id);
1262 MG_EXPORT
int serv_listen (
const char* name);
1285 MG_EXPORT
int serv_accept (
int listenfd, pid_t *pidptr, uid_t *uidptr);
1307 MG_EXPORT
int cli_conn (
const char* name,
char project);
1309 #define SOCKERR_IO -1 1310 #define SOCKERR_CLOSED -2 1311 #define SOCKERR_INVARG -3 1312 #define SOCKERR_TIMEOUT -4 1313 #define SOCKERR_OK 0 1343 MG_EXPORT
int sock_write_t (
int fd,
const void* buff,
1344 int count,
unsigned int timeout);
1373 MG_EXPORT
int sock_read_t (
int fd,
void* buff,
int count,
unsigned int timeout);
1381 #define sock_write(fd, buff, count) sock_write_t(fd, buff, count, 0) 1389 #define sock_read(fd, buff, count) sock_read_t(fd, buff, count, 0) 1445 #define ReinitDesktop() ReinitDesktopEx (TRUE) 1463 #ifdef _USE_MINIGUIENTRY 1464 #define main_entry minigui_entry 1465 int minigui_entry (
int args,
const char* arg[]);
1467 #define main_entry main 1487 #define MiniGUIMain \ 1488 MiniGUIAppMain (int args, const char* argv[]); \ 1489 int main_entry (int args, const char* argv[]) \ 1492 if (InitGUI (args, argv) != 0) { \ 1495 iRet = MiniGUIAppMain (args, argv); \ 1496 TerminateGUI (iRet); \ 1506 #define IDM_DTI_FIRST (300) 1512 void* (*init) (void);
1515 void (*deinit) (
void* context);
1518 void (*paint_desktop) (
void* context,
1519 HDC dc_desktop,
const RECT* inv_rc);
1522 void (*keyboard_handler) (
void* context,
1526 void (*mouse_handler) (
void* context,
1530 void (*customize_desktop_menu) (
void* context,
1531 HMENU hmenu,
int start_pos);
1534 void (*desktop_menucmd_handler) (
void* context,
int id);
1626 #ifdef _MGHAVE_MOUSECALIBRATE 1658 const POINT* dst_pts);
1689 #ifdef _MGMISC_ABOUTDLG 1690 #ifdef _MGRM_THREADS 1779 #define ETC_MAXLINE 1024 1785 #define ETC_FILENOTFOUND -1 1790 #define ETC_SECTIONNOTFOUND -2 1795 #define ETC_KEYNOTFOUND -3 1800 #define ETC_TMPFILEFAILED -4 1805 #define ETC_FILEIOFAILED -5 1810 #define ETC_INTCONV -6 1815 #define ETC_INVALIDOBJ -7 1820 #define ETC_READONLYOBJ -8 1855 #ifndef _MGINCORE_RES 1907 const char* pSection,
const char* pKey,
char* pValue,
int iLen);
1947 const char* pSection,
const char* pKey,
int* value);
1975 const char* pSection,
const char* pKey,
char* pValue);
1998 const char* pSection);
2099 const char* pKey,
char* pValue,
int iLen);
2109 const char* pKey,
int* pValue);
2121 #define SetValueToEtc(hEtc, pSection, pKey, pValue) \ 2122 GetValueFromEtc(hEtc, pSection, pKey, pValue, -1) 2142 const char* pSection,
BOOL bCreateNew);
2170 const char* pKey,
char* pValue,
int iLen);
2196 const char* pKey,
int* pValue);
2209 const char* pKey,
char* pValue);
2234 extern MG_EXPORT
GHANDLE hMgEtc;
2246 const char *pKey,
char *pValue,
int iLen)
2248 #ifndef _MGINCORE_RES 2266 const char* pKey,
int *value)
2268 #ifndef _MGINCORE_RES 2278 #ifdef _MGHAVE_CLIPBOARD 2289 #define LEN_CLIPBOARD_NAME 15 2294 #define NR_CLIPBOARDS 4 2300 #define CBNAME_TEXT ("text") 2313 #define CBERR_BADNAME 1 2319 #define CBERR_NOMEM 2 2325 #define CBOP_NORMAL 0 2330 #define CBOP_APPEND 1 2349 MG_EXPORT
int GUIAPI
CreateClipBoard (
const char* cb_name,
size_t size);
2390 void* data,
size_t n,
int cbop);
2422 void* data,
size_t n);
2442 int index,
unsigned char* byte);
2458 MG_EXPORT
void GUIAPI
Ping (
void);
2482 MG_EXPORT
void GUIAPI
Tone (
int frequency_hz,
int duration_ms);
2545 MG_EXPORT
char* GUIAPI
FixStrDup (
const char* str);
2559 MG_EXPORT
void GUIAPI
FreeFixStr (
char* str);
2568 #ifndef _MGHAVE_CURSOR 2569 static inline void do_nothing (
void) {
return; }
2572 #ifdef _MGHAVE_CURSOR 2636 const BYTE* pANDBits,
const BYTE* pXORBits,
int colornum);
2734 #define LoadCursorFromFile(filename) (do_nothing(), 0) 2735 #define CreateCursor(x, y, w, h, ANDbs, XORbs, cr) (do_nothing(), 0) 2736 #define DestroyCursor(hcsr) (do_nothing(), 0) 2737 #define GetSystemCursor(csrid) (do_nothing(), 0) 2738 #define GetCurrentCursor() (do_nothing(), 0) 2741 #define MAX_SYSCURSORINDEX 22 2749 #define IDC_PENCIL 2 2755 #define IDC_SIZENWSE 5 2757 #define IDC_SIZENESW 6 2759 #define IDC_SIZEWE 7 2761 #define IDC_SIZENS 8 2763 #define IDC_UPARROW 9 2773 #define IDC_RARROW 14 2775 #define IDC_COLOMN 15 2781 #define IDC_NODROP 18 2783 #define IDC_HAND_POINT 19 2785 #define IDC_HAND_SELECT 20 2787 #define IDC_SPLIT_HORZ 21 2789 #define IDC_SPLIT_VERT 22 2845 #ifdef _MGHAVE_CURSOR 2880 #define SetCursor(hcsr) SetCursorEx (hcsr, FALSE) 2897 #define SetDefaultCursor(hcsr) SetCursorEx (hcsr, TRUE) 2912 #define SetCursorEx(hcsr, set_def) (do_nothing(), 0) 2913 #define SetCursor(hcsr) (do_nothing(), 0) 2914 #define SetDefaultCursor(hcsr) (do_nothing(), 0) 2915 #define GetDefaultCursor() (do_nothing(), 0) 2918 #ifdef _MGHAVE_CURSOR 2936 #define ShowCursor(fShow) (do_nothing(), 0) 3042 #define IDS_MGST_WINDOW 0 3048 #define IDS_MGST_START 1 3054 #define IDS_MGST_REFRESH 2 3060 #define IDS_MGST_CLOSEALLWIN 3 3066 #define IDS_MGST_ENDSESSION 4 3072 #define IDS_MGST_OPERATIONS 5 3078 #define IDS_MGST_MINIMIZE 6 3084 #define IDS_MGST_MAXIMIZE 7 3090 #define IDS_MGST_RESTORE 8 3096 #define IDS_MGST_CLOSE 9 3102 #define IDS_MGST_OK 10 3108 #define IDS_MGST_NEXT 11 3114 #define IDS_MGST_CANCEL 12 3120 #define IDS_MGST_PREV 13 3126 #define IDS_MGST_YES 14 3132 #define IDS_MGST_NO 15 3138 #define IDS_MGST_ABORT 16 3144 #define IDS_MGST_RETRY 17 3150 #define IDS_MGST_IGNORE 18 3156 #define IDS_MGST_ABOUTMG 19 3162 #define IDS_MGST_OPENFILE 20 3168 #define IDS_MGST_SAVEFILE 21 3174 #define IDS_MGST_COLORSEL 22 3180 #define IDS_MGST_SWITCHLAYER 23 3186 #define IDS_MGST_DELLAYER 24 3192 #define IDS_MGST_ERROR 25 3198 #define IDS_MGST_LOGO 26 3204 #define IDS_MGST_CURRPATH 27 3210 #define IDS_MGST_FILE 28 3216 #define IDS_MGST_LOCATION 29 3222 #define IDS_MGST_UP 30 3228 #define IDS_MGST_NAME 31 3234 #define IDS_MGST_SIZE 32 3240 #define IDS_MGST_ACCESSMODE 33 3246 #define IDS_MGST_LASTMODTIME 34 3252 #define IDS_MGST_OPEN 35 3258 #define IDS_MGST_FILENAME 36 3264 #define IDS_MGST_FILETYPE 37 3270 #define IDS_MGST_SHOWHIDEFILE 38 3276 #define IDS_MGST_NOTFOUND 39 3282 #define IDS_MGST_NR 40 3288 #define IDS_MGST_NW 41 3294 #define IDS_MGST_INFO 42 3300 #define IDS_MGST_R 43 3306 #define IDS_MGST_W 44 3312 #define IDS_MGST_WR 45 3318 #define IDS_MGST_SAVE 46 3324 #define IDS_MGST_FILEEXIST 47 3326 #define IDS_MGST_MAXNUM 47 3347 MG_EXPORT
const char* GUIAPI
GetSysText (
unsigned int id);
3415 extern MG_EXPORT
const char*
SysText [];
3430 #ifdef _MGCHARSET_UNICODE 3450 extern MG_EXPORT
const char** GUIAPI
GetSysTextInUTF8 (
const char* language);
3474 MG_EXPORT
char*
strnchr (
const char* s,
size_t n,
int c);
3492 MG_EXPORT
int substrlen (
const char* text,
int len,
int delimiter,
MG_EXPORT int GUIAPI GetClipBoardByte(const char *cb_name, int index, unsigned char *byte)
Gets a byte from a clipboard.
MG_EXPORT GHANDLE GUIAPI FindSectionInEtc(GHANDLE hEtc, const char *pSection, BOOL bCreateNew)
Finds/Creates a section from an etc object.
MG_EXPORT void GUIAPI Tone(int frequency_hz, int duration_ms)
Makes a tone.
MG_EXPORT void GUIAPI GetCursorPos(POINT *ppt)
Gets position of the current cursor.
MG_EXPORT char *GUIAPI FixStrAlloc(int len)
Allocates a buffer for a length-fixed string.
int BOOL
A type definition for boolean value.
MG_EXPORT void GUIAPI SetCursorPos(int x, int y)
Sets position of the current cursor.
unsigned char BYTE
A type definition for an 8-bit unsigned character (byte).
MG_EXPORT int GUIAPI RemoveSectionInEtcFile(const char *pEtcFile, const char *pSection)
Removes a section in an etc file.
MG_EXPORT void GUIAPI DesktopUpdateAllWindow(void)
Update all visible windows on the desktop.
MG_EXPORT int GUIAPI GetIntValueFromEtcSec(GHANDLE hSect, const char *pKey, int *pValue)
Gets an integer value from an etc section object.
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.
MG_EXPORT const char ** local_SysText
The pointer to the current localized system text array.
MG_EXPORT void GUIAPI GetOriginalMousePosition(int *x, int *y)
Gets the original mouse position.
MG_EXPORT HCURSOR GUIAPI CopyCursor(HCURSOR hcsr)
Copies a cursor object.
MG_EXPORT int GUIAPI CreateClipBoard(const char *cb_name, size_t size)
Creates a new clipboard.
MG_EXPORT int GUIAPI InitGUI(int, const char **)
Initialize MiniGUI.
MG_EXPORT DESKTOPOPS *GUIAPI SetCustomDesktopOperationSet(DESKTOPOPS *usr_dsk_ops)
Set customer desktop operation set.
MG_EXPORT size_t GUIAPI GetClipBoardDataLen(const char *cb_name)
Gets the length of the data of a clipboard.
struct _DESKTOPOPS DESKTOPOPS
static int GetMgEtcIntValue(const char *pSection, const char *pKey, int *value)
Gets integer value from MiniGUI configuration etc object.
MG_EXPORT int GUIAPI SaveEtcToFile(GHANDLE hEtc, const char *file_name)
Saves an ETC object into a file.
GHANDLE HDC
Handle to device context.
MG_EXPORT BOOL GUIAPI UnregisterListenFD(int fd)
Unregisters a being listened file descriptor.
MG_EXPORT char ETCFILEPATH[]
The path name of MiniGUI configuration file.
MG_EXPORT BOOL GUIAPI GetKeyStatus(UINT uKey)
Gets a key or a mouse button status.
MG_EXPORT const char *GUIAPI GetSysText(unsigned int id)
Translates system text to localized text.
MG_EXPORT int GUIAPI GetValueFromEtcFile(const char *pEtcFile, const char *pSection, const char *pKey, char *pValue, int iLen)
Gets value from a configuration file.
MG_EXPORT int GUIAPI UnloadEtcFile(GHANDLE hEtc)
Unloads an etc file.
MG_EXPORT char * strtrimall(char *src)
Deletes all space characters.
MG_EXPORT BOOL GUIAPI RegisterListenFD(int fd, int type, HWND hwnd, void *context)
Registers a listening file descriptor to MiniGUI-Lite.
MG_EXPORT HCURSOR GUIAPI LoadCursorFromMem(const void *area)
Loads a cursor from a memory area.
MG_EXPORT void GUIAPI FreeFixStr(char *str)
Frees a length-fixed string.
MG_EXPORT BOOL GUIAPI ReinitDesktopEx(BOOL init_sys_text)
Re-initializes the desktop.
MG_EXPORT int GUIAPI GetIntValueFromEtcFile(const char *pEtcFile, const char *pSection, const char *pKey, int *value)
Gets integer value from a configuration file.
MG_EXPORT void GUIAPI GetClipCursor(RECT *prc)
Gets the current cursor clipping rectangle.
GHANDLE HWND
Handle to main window or control.
MG_EXPORT void GUIAPI Ping(void)
Makes a beep sound.
MG_EXPORT int GUIAPI GetValueFromEtcSec(GHANDLE hSect, const char *pKey, char *pValue, int iLen)
Gets value from an etc section object.
MG_EXPORT int GUIAPI SetClipBoardData(const char *cb_name, void *data, size_t n, int cbop)
Sets the data of a clipboard.
MG_EXPORT int GUIAPI GetValueFromEtc(GHANDLE hEtc, const char *pSection, const char *pKey, char *pValue, int iLen)
Gets value from a configuration etc object.
MG_EXPORT char *GUIAPI FixStrDup(const char *str)
Duplicates a length-fixed string.
static int GetMgEtcValue(const char *pSection, const char *pKey, char *pValue, int iLen)
Gets value from MiniGUI configuration etc object.
MG_EXPORT size_t GUIAPI GetClipBoardData(const char *cb_name, void *data, size_t n)
Gets the data of a clipboard.
MG_EXPORT HCURSOR GUIAPI SetCursorEx(HCURSOR hcsr, BOOL set_def)
Changes the current cursor.
MG_EXPORT BOOL GUIAPI DestroyCursor(HCURSOR hcsr)
Destroys a cursor object.
GHANDLE HCURSOR
Handle to cursor.
#define NULL
A value indicates null pointer.
PVOID GHANDLE
General handle.
struct _ETCSECTION ETCSECTION
MG_EXPORT HWND GUIAPI OpenAboutDialog(HWND hHosting)
Opens or actives the 'About MiniGUI' dialog.
MG_EXPORT const char **GUIAPI GetSysTextInUTF8(const char *language)
Gets the localized system text array in UTF-8 for a specified language.
UINT_PTR LPARAM
A type definition for the second message paramter.
MG_EXPORT int GUIAPI GetIntValueFromEtc(GHANDLE hEtc, const char *pSection, const char *pKey, int *pValue)
Gets the integer value from a configuration etc object.
MG_EXPORT void GUIAPI MiniGUIPanic(int exitcode)
The panic of MiniGUI application.
MG_EXPORT void *GUIAPI GetOriginalTermIO(void)
Gets termios structure of the original terminal before initializing MiniGUI.
MG_EXPORT HCURSOR GUIAPI GetDefaultCursor(void)
Gets the default cursor.
MG_EXPORT RECT g_rcScr
Contains the rectangle of the whole screen.
MG_EXPORT HCURSOR GUIAPI LoadCursorFromFile(const char *filename)
Loads a cursor from a M$ Windows cursor file.
MG_EXPORT void GUIAPI TerminateGUI(int not_used)
Terminate MiniGUI.
MG_EXPORT HCURSOR GUIAPI GetSystemCursor(int csrid)
Gets the handle to a system cursor by its identifier.
MG_EXPORT HCURSOR GUIAPI GetCurrentCursor(void)
Gets the handle to the current cursor.
MG_EXPORT int GUIAPI ShowCursor(BOOL fShow)
Shows or hides cursor.
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...
UINT_PTR WPARAM
A type definition for the first message paramter.
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
MG_EXPORT void GUIAPI ClipCursor(const RECT *prc)
Clips the cursor range.
MG_EXPORT void GUIAPI ExitGUISafely(int exitcode)
Exits your MiniGUI application safely.
MG_EXPORT int GUIAPI SetValueToEtcFile(const char *pEtcFile, const char *pSection, const char *pKey, char *pValue)
Sets a value in a configuration file.
MG_EXPORT BOOL GUIAPI SetMouseCalibrationParameters(const POINT *src_pts, const POINT *dst_pts)
Sets the parameters for doing mouse calibration.
MG_EXPORT int GUIAPI SetValueToEtcSec(GHANDLE hSect, const char *pKey, char *pValue)
Sets the value in the etc section object.
MG_EXPORT int GUIAPI DestroyClipBoard(const char *cb_name)
Destroys a new clipboard.
MG_EXPORT char * strnchr(const char *s, size_t n, int c)
Locates character in the first n characters of string s.
MG_EXPORT const char * SysText[]
Contains all text used by MiniGUI in English.
unsigned int UINT
A type definition for unsigned integer.
MG_EXPORT DWORD GUIAPI GetShiftKeyStatus(void)
Gets status of the shift keys.
GHANDLE HMENU
Handle to menu.
MG_EXPORT GHANDLE GUIAPI LoadEtcFile(const char *pEtcFile)
Loads an etc file into memory.
MG_EXPORT int GUIAPI SaveSectionToEtcFile(const char *pEtcFile, PETCSECTION psect)
Saves a section to an etc file.
MG_EXPORT void GUIAPI GetKeyboardState(BYTE *kbd_state)
Gets status of all keys on keyboard.
MG_EXPORT int GUIAPI RemoveSectionInEtc(GHANDLE hEtc, const char *pSection)
Removes a section in etc object.