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> 133 #define LEN_LAYER_NAME 14 139 #define LEN_CLIENT_NAME 14 145 #define INV_LAYER_HANDLE 0 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 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" 456 const char* client_name,
457 int max_nr_topmosts,
int max_nr_normals);
524 GHANDLE handle,
const char* layer_name);
595 #define LCO_NEW_CLIENT 1 596 #define LCO_DEL_CLIENT 2 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 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 772 int def_nr_topmosts,
int def_nr_normals);
802 int max_nr_topmosts,
int max_nr_normals);
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 993 int op_code,
void* op_data,
BOOL notify);
1076 #define MAX_SYS_REQID 0x0020 1084 #define MAX_REQID 0x0030 1121 int ex_data_len,
void* result,
int len_rslt);
1146 void* result,
int len_rslt)
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);
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 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.
void(* ON_CHANGE_LAYER)(int op, MG_Layer *layer, MG_Client *client)
Type of layer change event callback.
struct _ZNODEINFO ZNODEINFO
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 BOOL GUIAPI SetTopmostLayer(BOOL handle_name, GHANDLE handle, const char *name)
Brings a layer to be the topmost one.
MG_EXPORT void GUIAPI SetCursorPos(int x, int y)
Sets position of the current cursor.
MG_EXPORT MG_Client * mgClients
The pointer to the array contains all clients' information.
unsigned char BYTE
A type definition for an 8-bit unsigned character (byte).
MG_EXPORT ON_TRYLOCK_CLIENT_REQ OnTrylockClientReq
Sets to a function to lock a client request.
MG_EXPORT BOOL mgIsServer
Indicates whether the process is the server or a client on MiniGUI-Processes.
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.
#define LEN_LAYER_NAME
The maximum length of name of layer in MiniGUI-Processes.
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 ON_NEW_DEL_CLIENT OnNewDelClient
Sets to a function to handle a comming in (going away) connection of client.
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 BOOL GUIAPI ServerSetTopmostLayer(MG_Layer *layer)
Sets topmost layer from the server.
MG_EXPORT DESKTOPOPS *GUIAPI SetCustomDesktopOperationSet(DESKTOPOPS *usr_dsk_ops)
Set customer desktop operation set.
MG_EXPORT int GUIAPI ServerSendReply(int clifd, const void *reply, int len)
Sends the reply to the client.
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.
#define LEN_CLIENT_NAME
The maximum length of name of client in MiniGUI-Processes.
struct _MG_Layer MG_Layer
MG_EXPORT GHANDLE GUIAPI GetLayerInfo(const char *layer_name, int *nr_clients, BOOL *is_topmost, int *cli_active)
Gets information of a layer by a client.
MG_EXPORT size_t GUIAPI GetClipBoardDataLen(const char *cb_name)
Gets the length of the data of a clipboard.
MG_EXPORT REQ_HANDLER GUIAPI GetRequestHandler(int req_id)
Gets the request handler by request identifier.
void(* ON_ZNODE_OPERATION)(int op, int cli, int idx_znode)
Type of z-node operation callback.
struct _DESKTOPOPS DESKTOPOPS
static int GetMgEtcIntValue(const char *pSection, const char *pKey, int *value)
Gets integer value from MiniGUI configuration etc object.
MG_EXPORT size_t mgSizeRes
Contains the length of shared resource of MiniGUI-Processes.
MG_EXPORT GHANDLE GUIAPI JoinLayer(const char *layer_name, const char *client_name, int max_nr_topmosts, int max_nr_normals)
Joins to a layer.
MG_EXPORT int GUIAPI SaveEtcToFile(GHANDLE hEtc, const char *file_name)
Saves an ETC object into a file.
char name[LEN_CLIENT_NAME+1]
MG_EXPORT 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.
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 SetTopmostClient(int cli)
Sets topmost layer by a client identifier.
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 void * mgSharedRes
Contains the pointer to the shared resource of MiniGUI-Processes.
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 MG_Layer *GUIAPI ServerCreateLayer(const char *layer_name, int max_nr_topmosts, int max_nr_normals)
Create a new layer from the server.
MG_EXPORT BOOL GUIAPI RegisterListenFD(int fd, int type, HWND hwnd, void *context)
Registers a listening file descriptor to MiniGUI-Lite.
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.
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 int mgClientSize
The current size of the array mgClients.
MG_EXPORT void GUIAPI Ping(void)
Makes a beep sound.
void(* ON_NEW_DEL_CLIENT)(int op, int cli)
Type of client event callback.
struct GlobalRes * global_res
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 ON_ZNODE_OPERATION OnZNodeOperation
Sets to a function to handle events of z-node.
MG_EXPORT int serv_accept(int listenfd, pid_t *pidptr, uid_t *uidptr)
Waits for a client connection to arrive, and accept it.
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 int sock_write_t(int fd, const void *buff, int count, unsigned int timeout)
Writes data to socket.
MG_EXPORT void GUIAPI TerminateGUI(int not_used)
Terminate MiniGUI.
MG_EXPORT BOOL GUIAPI DeleteLayer(BOOL handle_name, GHANDLE handle, const char *layer_name)
Deletes a specific layer.
MG_EXPORT int sock_read_t(int fd, void *buff, int count, unsigned int timeout)
Reads data from socket.
MG_EXPORT HCURSOR GUIAPI GetSystemCursor(int csrid)
Gets the handle to a system cursor by its identifier.
static int ClientRequest(const REQUEST *request, void *result, int len_rslt)
Sends a request to the server and wait reply.
MG_EXPORT int GUIAPI GetSockFD2Server(void)
Gets the file descriptor of the socket connected to the server.
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.
int(* REQ_HANDLER)(int cli, int clifd, void *buff, size_t len)
Request handler.
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 void GUIAPI UpdateTopmostLayer(const RECT *dirty_rc)
Update topmost layer.
MG_EXPORT char * strnchr(const char *s, size_t n, int c)
Locates character in the first n characters of string s.
MG_EXPORT BOOL GUIAPI ServerDeleteLayer(MG_Layer *layer)
Delete a layer from the server.
MG_EXPORT ON_CHANGE_LAYER OnChangeLayer
Sets to a function to handle events of layers.
MG_EXPORT const char * SysText[]
Contains all text used by MiniGUI in English.
MG_EXPORT BOOL GUIAPI RegisterRequestHandler(int req_id, REQ_HANDLER your_handler)
Registers a customize request handler.
MG_EXPORT int cli_conn(const char *name, char project)
Used by clients to connect to a server.
unsigned int UINT
A type definition for unsigned integer.
MG_EXPORT DWORD GUIAPI GetShiftKeyStatus(void)
Gets status of the shift keys.
int(* ON_TRYLOCK_CLIENT_REQ)(void)
Type of client request lock callback.
MG_EXPORT MG_Layer * mgLayers
The pointer to the array of layers.
MG_EXPORT void GUIAPI DisableClientsOutput(void)
Disable all clients output.
MG_EXPORT int serv_listen(const char *name)
Creates a listen socket.
int(* ON_LOCK_CLIENT_REQ)(void)
Type of client request lock callback.
struct _MG_Client MG_Client
GHANDLE HMENU
Handle to menu.
MG_EXPORT int GUIAPI GetClientByPID(int pid)
Returns the client identifier from PID of a client.
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.
MG_EXPORT GHANDLE GUIAPI LoadEtcFile(const char *pEtcFile)
Loads an etc file into memory.
MG_EXPORT MG_Layer * mgTopmostLayer
The pointer to the topmost layer.
MG_EXPORT ON_LOCK_CLIENT_REQ OnLockClientReq
Sets to a function to lock a client request.
MG_EXPORT int GUIAPI SaveSectionToEtcFile(const char *pEtcFile, PETCSECTION psect)
Saves a section to an etc file.
MG_EXPORT BOOL GUIAPI ServerStartup(int nr_globals, int def_nr_topmosts, int def_nr_normals)
Initializes the server of MiniGUI-Processes.
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.
void(* ON_UNLOCK_CLIENT_REQ)(void)
Type of client request unlock callback.
MG_EXPORT ON_UNLOCK_CLIENT_REQ OnUnlockClientReq
Sets to a function to unlock a client request.