minigui.h

Go to the documentation of this file.
00001 
00021 /*
00022  * $Id: minigui.h 13368 2010-08-30 09:25:11Z wanzheng $
00023  * 
00024  *             MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, 
00025  *                     pSOS, ThreadX, NuCleus, OSE, and Win32.
00026  *
00027  *             Copyright (C) 2002-2009 Feynman Software.
00028  *             Copyright (C) 1998-2002 Wei Yongming.
00029  */
00030 
00031 #ifndef _MGUI_MINIGUI_H
00032   #define _MGUI_MINIGUI_H
00033 
00034 #include <stdio.h>
00035 
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif  /* __cplusplus */
00040 
00055 extern MG_EXPORT RECT g_rcScr;
00056 
00065 #define g_rcDesktop     g_rcScr
00066 
00074 #ifdef _MGRM_PROCESSES
00075 
00076 #include <sys/types.h>
00077 
00085 extern MG_EXPORT BOOL mgIsServer;
00086 
00096 extern MG_EXPORT void* mgSharedRes;
00097 
00106 extern MG_EXPORT size_t mgSizeRes;
00107 
00112 #define LEN_LAYER_NAME      14
00113 
00118 #define LEN_CLIENT_NAME     14
00119 
00124 #define INV_LAYER_HANDLE    0
00125 
00126 struct _MG_Layer;
00127 
00129 typedef struct _MG_Client
00130 {
00132     char    name [LEN_CLIENT_NAME + 1];
00133 
00135     pid_t   pid;
00137     uid_t   uid;
00139     int     fd;
00140 
00142     BOOL    has_dirty;
00144     DWORD   last_live_time;
00146     DWORD   dwAddData;
00147 
00149     struct  _MG_Client* next;
00151     struct  _MG_Client* prev;
00152 
00154     struct  _MG_Layer* layer;
00155 
00157     struct GlobalRes* global_res;
00158 } MG_Client;
00159 
00161 typedef struct _MG_Layer
00162 {
00164     char    name [LEN_LAYER_NAME + 1];
00165 
00167     DWORD   dwAddData;
00168 
00170     MG_Client* cli_head;
00172     MG_Client* cli_active;
00173 
00175     struct _MG_Layer* next;
00177     struct _MG_Layer* prev;
00178 
00180     void* zorder_info;
00182     int   zorder_shmid;
00183 } MG_Layer;
00184 
00185 /*screen attr type*/
00186 #define SCREEN_ATTR_ALPHA_CHANNEL    0x01      //alpha channel     
00187 #define SCREEN_ATTR_COLORKEY         0x02      //colorkey
00188 #define SCREEN_ATTR_COLORSPACE       0x03      //colorspace
00189 #define SCREEN_ATTR_ALPHA            0x04
00190 #define SCREEN_NO_EXIST              -99       //screen don't exist
00191 
00198 extern MG_EXPORT int mgClientSize;
00199 
00210 extern MG_EXPORT MG_Client* mgClients;
00211 
00218 extern MG_EXPORT MG_Layer* mgTopmostLayer;
00219 
00226 extern MG_EXPORT MG_Layer* mgLayers;
00227 
00228 #endif /* _MGRM_PROCESSES */
00229 
00242 MG_EXPORT int GUIAPI InitGUI (int, const char **);
00243 
00251 MG_EXPORT void GUIAPI TerminateGUI (int not_used);
00252 
00262 MG_EXPORT void GUIAPI MiniGUIPanic (int exitcode);
00263 
00279 #ifndef _MGRM_THREADS
00280 
00303 #define MAX_NR_LISTEN_FD   5
00304 
00305 #ifdef WIN32
00306 #ifndef POLLIN
00307 #define POLLIN  0x001
00308 #endif
00309 
00310 #ifndef POLLOUT
00311 #define POLLOUT 0x004
00312 #endif
00313 
00314 #ifndef POLLERR
00315 #define POLLERR 0x008
00316 #endif
00317 
00318 #endif
00319 
00346 MG_EXPORT BOOL GUIAPI RegisterListenFD (int fd, int type,
00347                 HWND hwnd, void* context);
00348 
00363 MG_EXPORT BOOL GUIAPI UnregisterListenFD (int fd);
00364 
00367 #ifdef _MGRM_PROCESSES
00368 
00386 #define NAME_SELF_LAYER         ""
00387 
00392 #define NAME_TOPMOST_LAYER      ""
00393 
00398 #define NAME_DEF_LAYER          "mginit"
00399 
00434 MG_EXPORT GHANDLE GUIAPI JoinLayer (const char* layer_name,
00435                 const char* client_name,
00436                 int max_nr_topmosts, int max_nr_normals);
00437 
00462 MG_EXPORT GHANDLE GUIAPI GetLayerInfo (const char* layer_name,
00463                 int* nr_clients, BOOL* is_topmost, int* cli_active);
00464 
00482 MG_EXPORT BOOL GUIAPI SetTopmostLayer (BOOL handle_name,
00483                 GHANDLE handle, const char* name);
00484 
00502 MG_EXPORT BOOL GUIAPI DeleteLayer (BOOL handle_name,
00503                         GHANDLE handle, const char* layer_name);
00504 
00526 typedef int (* ON_LOCK_CLIENT_REQ) (void);
00527 
00528 
00535 typedef int (* ON_TRYLOCK_CLIENT_REQ) (void);
00536 
00543 typedef void (* ON_UNLOCK_CLIENT_REQ) (void);
00544 
00553 extern MG_EXPORT ON_LOCK_CLIENT_REQ  OnLockClientReq;
00554 
00563 extern MG_EXPORT ON_TRYLOCK_CLIENT_REQ  OnTrylockClientReq;
00572 extern MG_EXPORT ON_UNLOCK_CLIENT_REQ  OnUnlockClientReq;
00573 
00574 #define LCO_NEW_CLIENT      1
00575 #define LCO_DEL_CLIENT      2
00576 
00583 typedef void (* ON_NEW_DEL_CLIENT) (int op, int cli);
00584 
00585 #define LCO_NEW_LAYER       1
00586 #define LCO_DEL_LAYER       2
00587 #define LCO_JOIN_CLIENT     3
00588 #define LCO_REMOVE_CLIENT   4
00589 #define LCO_TOPMOST_CHANGED 5
00590 #define LCO_ACTIVE_CHANGED  6
00591 
00599 typedef void (* ON_CHANGE_LAYER) (int op, MG_Layer* layer, 
00600                 MG_Client* client);
00601 
00602 #define ZNOP_ALLOCATE   1
00603 #define ZNOP_FREE       2
00604 #define ZNOP_MOVE2TOP   3
00605 #define ZNOP_SHOW       4
00606 #define ZNOP_HIDE       5
00607 #define ZNOP_MOVEWIN    6
00608 #define ZNOP_SETACTIVE  7
00609 
00610 #define ZNOP_ENABLEWINDOW        11
00611 #define ZNOP_DISABLEWINDOW       12
00612 #define ZNOP_STARTDRAG           13
00613 #define ZNOP_CANCELDRAG          14
00614 #define ZNOP_CHANGECAPTION       15
00615 
00622 typedef void (* ON_ZNODE_OPERATION) (int op, int cli, int idx_znode);
00623 
00647 extern MG_EXPORT ON_NEW_DEL_CLIENT OnNewDelClient;
00648 
00678 extern MG_EXPORT ON_CHANGE_LAYER OnChangeLayer;
00679 
00722 extern MG_EXPORT ON_ZNODE_OPERATION OnZNodeOperation;
00723 
00750 MG_EXPORT BOOL GUIAPI ServerStartup (int nr_globals,
00751                 int def_nr_topmosts, int def_nr_normals);
00752 
00780 MG_EXPORT MG_Layer* GUIAPI ServerCreateLayer (const char* layer_name, 
00781                 int max_nr_topmosts, int max_nr_normals);
00782 
00797 MG_EXPORT BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer);
00798 
00813 MG_EXPORT BOOL GUIAPI ServerDeleteLayer (MG_Layer* layer);
00814 
00839 MG_EXPORT int GUIAPI ServerGetNextZNode (MG_Layer* layer, int idx_znode, 
00840                 int* cli);
00841 
00842 #define ZNIT_DESKTOP         0x50000000
00843 
00844 #define ZNIT_GLOBAL_MAINWIN  0x31000000
00845 #define ZNIT_GLOBAL_TOOLWIN  0x32000000
00846 #define ZNIT_GLOBAL_CONTROL  0x30000000
00847 
00848 #define ZNIT_TOPMOST_MAINWIN 0x21000000
00849 #define ZNIT_TOPMOST_TOOLWIN 0x22000000
00850 #define ZNIT_TOPMOST_CONTROL 0x20000000
00851 
00852 #define ZNIT_NORMAL_MAINWIN  0x11000000
00853 #define ZNIT_NORMAL_TOOLWIN  0x12000000
00854 #define ZNIT_NORMAL_CONTROL  0x10000000
00855 
00856 #define ZNIT_NULL            0x00000000
00857 
00858 #define ZNIF_VISIBLE         0x00000002
00859 #define ZNIF_DISABLED        0x00000004
00860 
00862 typedef struct _ZNODEINFO
00863 {
00889     DWORD           type;
00890 
00899     DWORD           flags;
00900 
00902     const char*     caption;
00904     RECT            rc;
00905 
00907     int             cli;
00909     HWND            hwnd;
00914     HWND            main_win;
00915 } ZNODEINFO;
00916 
00936 MG_EXPORT BOOL GUIAPI ServerGetZNodeInfo (MG_Layer* layer, int idx_znode, 
00937                 ZNODEINFO* znode_info);
00938 
00971 MG_EXPORT BOOL GUIAPI ServerDoZNodeOperation (MG_Layer* layer, int idx_znode, 
00972                 int op_code, void* op_data, BOOL notify);
00973 
00985 MG_EXPORT int GUIAPI GetClientByPID (int pid);
00986 
01003 MG_EXPORT BOOL GUIAPI SetTopmostClient (int cli);
01004 
01009 MG_EXPORT void GUIAPI DisableClientsOutput (void);
01010 
01017 MG_EXPORT void GUIAPI UpdateTopmostLayer (const RECT* dirty_rc);
01018 
01055 #define MAX_SYS_REQID           0x0020
01056 
01063 #define MAX_REQID               0x0030
01064 
01066 typedef struct _REQUEST {
01068     int id;
01070     const void* data;
01072     size_t len_data;
01073 } REQUEST;
01075 typedef REQUEST* PREQUEST;
01076 
01099 MG_EXPORT int GUIAPI ClientRequestEx (const REQUEST* request, const void* ex_data, 
01100                 int ex_data_len, void* result, int len_rslt);
01101 
01124 static inline int ClientRequest (const REQUEST* request, 
01125                 void* result, int len_rslt)
01126 {
01127     return ClientRequestEx (request, NULL, 0, result, len_rslt);
01128 }
01129 
01141 MG_EXPORT int GUIAPI GetSockFD2Server (void);
01142 
01160 MG_EXPORT int GUIAPI ServerSendReply (int clifd, const void* reply, int len);
01161 
01168 typedef int (* REQ_HANDLER) (int cli, int clifd, void* buff, size_t len);
01169 
01188 MG_EXPORT BOOL GUIAPI RegisterRequestHandler (int req_id, REQ_HANDLER your_handler);
01189 
01205 MG_EXPORT REQ_HANDLER GUIAPI GetRequestHandler (int req_id);
01206 
01241 MG_EXPORT int serv_listen (const char* name);
01242 
01264 MG_EXPORT int serv_accept (int listenfd, pid_t *pidptr, uid_t *uidptr);
01265 
01286 MG_EXPORT int cli_conn (const char* name, char project);
01287 
01288 #define SOCKERR_IO          -1
01289 #define SOCKERR_CLOSED      -2
01290 #define SOCKERR_INVARG      -3
01291 #define SOCKERR_TIMEOUT     -4
01292 #define SOCKERR_OK          0
01293 
01322 MG_EXPORT int sock_write_t (int fd, const void* buff, 
01323                 int count, unsigned int timeout);
01324 
01352 MG_EXPORT int sock_read_t (int fd, void* buff, int count, unsigned int timeout);
01353 
01360 #define sock_write(fd, buff, count) sock_write_t(fd, buff, count, 0)
01361 
01368 #define sock_read(fd, buff, count) sock_read_t(fd, buff, count, 0)
01369 
01374 #endif /* _MGRM_PROCESSES */
01375 
01376 #endif /* LITE_VERSION */
01377 
01411 MG_EXPORT BOOL GUIAPI ReinitDesktopEx (BOOL init_sys_text);
01412 
01424 #define ReinitDesktop()    ReinitDesktopEx (TRUE)
01425 
01440 MG_EXPORT void GUIAPI ExitGUISafely (int exitcode);
01441 
01442 #ifdef _USE_MINIGUIENTRY
01443   #define main_entry minigui_entry
01444   int minigui_entry (int args, const char* arg[]);
01445 #else
01446   #define main_entry main
01447 #endif
01448 
01466 #define MiniGUIMain \
01467 MiniGUIAppMain (int args, const char* argv[]); \
01468 int main_entry (int args, const char* argv[]) \
01469 { \
01470     int iRet = 0; \
01471     if (InitGUI (args, argv) != 0) { \
01472         return 1; \
01473     } \
01474     iRet = MiniGUIAppMain (args, argv); \
01475     TerminateGUI (iRet); \
01476     return iRet; \
01477 } \
01478 int MiniGUIAppMain
01479 
01485 #define IDM_DTI_FIRST   (300)
01486 
01488 typedef struct _DESKTOPOPS {
01489         
01491         void* (*init) (void);
01492         
01494         void (*deinit) (void* context);
01495         
01497         void (*paint_desktop) (void* context, 
01498                                 HDC dc_desktop, const RECT* inv_rc);
01499         
01501         void (*keyboard_handler) (void* context, 
01502                                 int message, WPARAM wParam, LPARAM lParam);
01503         
01505         void (*mouse_handler) (void* context, 
01506                                 int message, WPARAM wParam, LPARAM lParam);
01507         
01509         void (*customize_desktop_menu) (void* context, 
01510                                                  HMENU hmenu, int start_pos);
01511         
01513         void (*desktop_menucmd_handler) (void* context, int id);
01514 } DESKTOPOPS;
01515 
01583 MG_EXPORT DESKTOPOPS* GUIAPI SetCustomDesktopOperationSet 
01584                                        (DESKTOPOPS* usr_dsk_ops);
01585 
01596 MG_EXPORT void GUIAPI DesktopUpdateAllWindow (void);
01597 
01605 #ifdef _MGHAVE_MOUSECALIBRATE
01606 
01636 MG_EXPORT BOOL GUIAPI SetMouseCalibrationParameters (const POINT* src_pts, 
01637                 const POINT* dst_pts);
01638 
01658 MG_EXPORT void GUIAPI GetOriginalMousePosition (int* x, int* y);
01659 
01660 #endif /* _MGHAVE_MOUSECALIBRATE */
01661 
01668 #ifdef _MGMISC_ABOUTDLG
01669 #ifdef _MGRM_THREADS
01670 
01685 MG_EXPORT  void GUIAPI OpenAboutDialog (void);
01686 #else
01687 
01705 MG_EXPORT HWND GUIAPI OpenAboutDialog (HWND hHosting);
01706 #endif /* _MGRM_THREADS */
01707 #endif /* _MGMISC_ABOUTDLG */
01708 
01758 #define ETC_MAXLINE             1024
01759 
01764 #define ETC_FILENOTFOUND        -1
01765 
01769 #define ETC_SECTIONNOTFOUND     -2
01770 
01774 #define ETC_KEYNOTFOUND         -3
01775 
01779 #define ETC_TMPFILEFAILED       -4
01780 
01784 #define ETC_FILEIOFAILED        -5
01785 
01789 #define ETC_INTCONV             -6
01790 
01794 #define ETC_INVALIDOBJ          -7
01795 
01799 #define ETC_READONLYOBJ         -8
01800 
01804 #define ETC_OK                  0
01805 
01807 typedef struct _ETCSECTION
01808 {
01810     int key_nr_alloc;           
01812     int key_nr;                 
01814     char *name;                 
01816     char** keys;                
01818     char** values;              
01819 } ETCSECTION;
01821 typedef ETCSECTION* PETCSECTION;
01822 
01824 typedef struct _ETC_S
01825 {
01827     int sect_nr_alloc;          
01829     int section_nr;             
01831     PETCSECTION sections;       
01832 } ETC_S;
01833 
01834 #ifndef _MGINCORE_RES
01835 
01851 extern MG_EXPORT char ETCFILEPATH [];
01852 
01853 #endif /* _MGINCORE_RES */
01854 
01885 MG_EXPORT int GUIAPI GetValueFromEtcFile (const char* pEtcFile, 
01886                 const char* pSection, const char* pKey, char* pValue, int iLen);
01887 
01925 MG_EXPORT int GUIAPI GetIntValueFromEtcFile (const char* pEtcFile, 
01926                 const char* pSection, const char* pKey, int* value);
01927 
01953 MG_EXPORT int GUIAPI SetValueToEtcFile (const char* pEtcFile, 
01954                 const char* pSection, const char* pKey, char* pValue);
01955 
01976 MG_EXPORT int GUIAPI RemoveSectionInEtcFile (const char* pEtcFile, 
01977                 const char* pSection);
01978 
01997 MG_EXPORT int GUIAPI SaveSectionToEtcFile (const char* pEtcFile, 
01998                                                                                    PETCSECTION psect);
02013 MG_EXPORT GHANDLE GUIAPI LoadEtcFile (const char * pEtcFile);
02014 
02032 MG_EXPORT int GUIAPI SaveEtcToFile (GHANDLE hEtc, const char* file_name);
02033 
02047 MG_EXPORT int GUIAPI UnloadEtcFile (GHANDLE hEtc);
02048 
02077 MG_EXPORT int GUIAPI GetValueFromEtc (GHANDLE hEtc, const char* pSection, 
02078                 const char* pKey, char* pValue, int iLen);
02079 
02087 MG_EXPORT int GUIAPI GetIntValueFromEtc (GHANDLE hEtc, const char* pSection,
02088                 const char* pKey, int* pValue);
02089 
02100 #define SetValueToEtc(hEtc, pSection, pKey, pValue) \
02101         GetValueFromEtc(hEtc, pSection, pKey, pValue, -1)
02102 
02120 MG_EXPORT GHANDLE GUIAPI FindSectionInEtc (GHANDLE hEtc, 
02121                 const char* pSection, BOOL bCreateNew);
02122 
02148 MG_EXPORT int GUIAPI GetValueFromEtcSec (GHANDLE hSect, 
02149                 const char* pKey, char* pValue, int iLen);
02150 
02174 MG_EXPORT int GUIAPI GetIntValueFromEtcSec (GHANDLE hSect, 
02175                 const char* pKey, int* pValue);
02176 
02187 MG_EXPORT int GUIAPI SetValueToEtcSec (GHANDLE hSect, 
02188                 const char* pKey, char* pValue);
02189 
02210 MG_EXPORT int GUIAPI RemoveSectionInEtc (GHANDLE hEtc, const char* pSection);
02211 
02212 /* global MiniGUI etc file object */
02213 extern MG_EXPORT GHANDLE hMgEtc;
02214 
02224 static inline int GetMgEtcValue(const char* pSection, 
02225                 const char *pKey, char *pValue, int iLen) 
02226 {
02227 #ifndef _MGINCORE_RES
02228     if (!hMgEtc)
02229         return GetValueFromEtcFile (ETCFILEPATH, pSection, pKey, pValue, iLen);
02230 #endif
02231 
02232     return GetValueFromEtc (hMgEtc, pSection, pKey, pValue, iLen);
02233 }
02234 
02244 static inline int GetMgEtcIntValue (const char *pSection, 
02245                 const char* pKey, int *value)
02246 {
02247 #ifndef _MGINCORE_RES
02248     if (!hMgEtc)
02249         return GetIntValueFromEtcFile (ETCFILEPATH, pSection, pKey, value);
02250 #endif
02251 
02252     return GetIntValueFromEtc (hMgEtc, pSection, pKey, value);
02253 }
02254 
02257 #ifdef _MGHAVE_CLIPBOARD
02258 
02268 #define LEN_CLIPBOARD_NAME      15
02269 
02273 #define NR_CLIPBOARDS           4
02274 
02279 #define CBNAME_TEXT             ("text")
02280 
02286 #define CBERR_OK        0
02287 
02292 #define CBERR_BADNAME   1
02293 
02298 #define CBERR_NOMEM     2
02299 
02304 #define CBOP_NORMAL     0
02305 
02309 #define CBOP_APPEND     1
02310 
02328 MG_EXPORT int GUIAPI CreateClipBoard (const char* cb_name, size_t size);
02329 
02343 MG_EXPORT int GUIAPI DestroyClipBoard (const char* cb_name);
02344 
02368 MG_EXPORT int GUIAPI SetClipBoardData (const char* cb_name, 
02369                 void* data, size_t n, int cbop);
02370 
02383 MG_EXPORT size_t GUIAPI GetClipBoardDataLen (const char* cb_name);
02384 
02400 MG_EXPORT size_t GUIAPI GetClipBoardData (const char* cb_name, 
02401                 void* data, size_t n);
02402 
02420 MG_EXPORT int GUIAPI GetClipBoardByte (const char* cb_name, 
02421                 int index, unsigned char* byte);
02422 
02425 #endif /* _MGHAVE_CLIPBOARD */
02426 
02437 MG_EXPORT void GUIAPI Ping (void);
02438 
02444 #define Beep Ping
02445 
02461 MG_EXPORT void GUIAPI Tone (int frequency_hz, int duration_ms);
02462 
02470 MG_EXPORT void* GUIAPI GetOriginalTermIO (void);
02471 
02505 MG_EXPORT char* GUIAPI FixStrAlloc (int len);
02506 
02524 MG_EXPORT char* GUIAPI FixStrDup (const char* str);
02525 
02538 MG_EXPORT void GUIAPI FreeFixStr (char* str);
02539 
02547 #ifndef _MGHAVE_CURSOR
02548 static inline void do_nothing (void) { return; }
02549 #endif
02550 
02551 #ifdef _MGHAVE_CURSOR
02552 
02569 MG_EXPORT HCURSOR GUIAPI LoadCursorFromFile (const char* filename);
02570 
02587 MG_EXPORT HCURSOR GUIAPI LoadCursorFromMem (const void* area);
02588 
02614 MG_EXPORT HCURSOR GUIAPI CreateCursor (int xhotspot, int yhotspot, int w, int h,
02615                const BYTE* pANDBits, const BYTE* pXORBits, int colornum);
02616 
02627 MG_EXPORT BOOL GUIAPI DestroyCursor (HCURSOR hcsr);
02628 
02687 MG_EXPORT HCURSOR GUIAPI GetSystemCursor (int csrid);
02688 
02697 MG_EXPORT HCURSOR GUIAPI GetCurrentCursor (void);
02698 #else
02699   #define LoadCursorFromFile(filename)    (do_nothing(), 0)
02700   #define CreateCursor(x, y, w, h, ANDbs, XORbs, cr) (do_nothing(), 0)
02701   #define DestroyCursor(hcsr)             (do_nothing(), 0)
02702   #define GetSystemCursor(csrid)          (do_nothing(), 0)
02703   #define GetCurrentCursor()              (do_nothing(), 0)
02704 #endif /* _MGHAVE_CURSOR */
02705 
02706 #define MAX_SYSCURSORINDEX    22
02707 
02708 /* System cursor index. */
02710 #define IDC_ARROW       0
02711 
02712 #define IDC_IBEAM       1
02713 
02714 #define IDC_PENCIL      2
02715 
02716 #define IDC_CROSS       3
02717 
02718 #define IDC_MOVE        4
02719 
02720 #define IDC_SIZENWSE    5
02721 
02722 #define IDC_SIZENESW    6
02723 
02724 #define IDC_SIZEWE      7
02725 
02726 #define IDC_SIZENS      8
02727 
02728 #define IDC_UPARROW     9
02729 
02730 #define IDC_NONE        10
02731 
02732 #define IDC_HELP        11
02733 
02734 #define IDC_BUSY        12
02735 
02736 #define IDC_WAIT        13
02737 
02738 #define IDC_RARROW      14
02739 
02740 #define IDC_COLOMN      15
02741 
02742 #define IDC_ROW         16
02743 
02744 #define IDC_DRAG        17
02745 
02746 #define IDC_NODROP      18
02747 
02748 #define IDC_HAND_POINT  19
02749 
02750 #define IDC_HAND_SELECT 20
02751 
02752 #define IDC_SPLIT_HORZ  21
02753 
02754 #define IDC_SPLIT_VERT  22
02755 
02767 MG_EXPORT void GUIAPI ClipCursor (const RECT* prc);
02768 
02779 MG_EXPORT void GUIAPI GetClipCursor (RECT* prc);
02780 
02793 MG_EXPORT void GUIAPI GetCursorPos (POINT* ppt);
02794 
02808 MG_EXPORT void GUIAPI SetCursorPos (int x, int y);
02809 
02810 #ifdef _MGHAVE_CURSOR
02811 
02829  MG_EXPORT HCURSOR GUIAPI SetCursorEx (HCURSOR hcsr, BOOL set_def);
02830 
02845   #define SetCursor(hcsr) SetCursorEx (hcsr, FALSE)
02846 
02862   #define SetDefaultCursor(hcsr) SetCursorEx (hcsr, TRUE)
02863 
02874 MG_EXPORT  HCURSOR GUIAPI GetDefaultCursor (void);
02875 
02876 #else
02877   #define SetCursorEx(hcsr, set_def)    (do_nothing(), 0)
02878   #define SetCursor(hcsr)               (do_nothing(), 0)
02879   #define SetDefaultCursor(hcsr)        (do_nothing(), 0)
02880   #define GetDefaultCursor()            (do_nothing(), 0)
02881 #endif /* _MGHAVE_CURSOR */
02882 
02883 #ifdef _MGHAVE_CURSOR
02884 
02899 MG_EXPORT int GUIAPI ShowCursor (BOOL fShow);
02900 #else
02901   #define ShowCursor(fShow)             (do_nothing(), 0)
02902 #endif /* _MGHAVE_CURSOR */
02903 
02936 MG_EXPORT BOOL GUIAPI GetKeyStatus (UINT uKey);
02937 
02978 MG_EXPORT DWORD GUIAPI GetShiftKeyStatus (void);
02979 
02991 #define IDS_MGST_WINDOW          0
02992 
02997 #define IDS_MGST_START           1
02998 
03003 #define IDS_MGST_REFRESH         2
03004 
03009 #define IDS_MGST_CLOSEALLWIN     3
03010 
03015 #define IDS_MGST_ENDSESSION      4
03016 
03021 #define IDS_MGST_OPERATIONS      5
03022 
03027 #define IDS_MGST_MINIMIZE        6
03028 
03033 #define IDS_MGST_MAXIMIZE        7
03034 
03039 #define IDS_MGST_RESTORE         8
03040 
03045 #define IDS_MGST_CLOSE           9
03046 
03051 #define IDS_MGST_OK              10
03052 
03057 #define IDS_MGST_NEXT            11
03058 
03063 #define IDS_MGST_CANCEL          12
03064 
03069 #define IDS_MGST_PREV            13
03070 
03075 #define IDS_MGST_YES             14
03076 
03081 #define IDS_MGST_NO              15
03082 
03087 #define IDS_MGST_ABORT           16
03088 
03093 #define IDS_MGST_RETRY           17
03094 
03099 #define IDS_MGST_IGNORE          18
03100 
03105 #define IDS_MGST_ABOUTMG         19
03106 
03111 #define IDS_MGST_OPENFILE        20
03112 
03117 #define IDS_MGST_SAVEFILE        21
03118 
03123 #define IDS_MGST_COLORSEL        22
03124 
03129 #define IDS_MGST_SWITCHLAYER     23
03130 
03135 #define IDS_MGST_DELLAYER        24
03136 
03141 #define IDS_MGST_ERROR           25
03142 
03147 #define IDS_MGST_LOGO            26
03148 
03153 #define IDS_MGST_CURRPATH        27
03154 
03159 #define IDS_MGST_FILE            28
03160 
03165 #define IDS_MGST_LOCATION        29
03166 
03171 #define IDS_MGST_UP              30
03172 
03177 #define IDS_MGST_NAME            31
03178 
03183 #define IDS_MGST_SIZE            32
03184 
03189 #define IDS_MGST_ACCESSMODE      33
03190 
03195 #define IDS_MGST_LASTMODTIME     34
03196 
03201 #define IDS_MGST_OPEN            35
03202 
03207 #define IDS_MGST_FILENAME        36
03208 
03213 #define IDS_MGST_FILETYPE        37
03214 
03219 #define IDS_MGST_SHOWHIDEFILE    38
03220 
03225 #define IDS_MGST_NOTFOUND        39
03226 
03231 #define IDS_MGST_NR              40
03232 
03237 #define IDS_MGST_NW              41
03238 
03243 #define IDS_MGST_INFO            42
03244 
03249 #define IDS_MGST_R               43
03250 
03255 #define IDS_MGST_W               44
03256 
03261 #define IDS_MGST_WR              45
03262 
03267 #define IDS_MGST_SAVE            46
03268 
03273 #define IDS_MGST_FILEEXIST       47
03274 
03275 #define IDS_MGST_MAXNUM          47
03276 
03296 MG_EXPORT const char* GUIAPI GetSysText (unsigned int id);
03297 
03364 extern MG_EXPORT const char* SysText [];
03365 
03377 extern MG_EXPORT const char** local_SysText;
03378 
03379 #ifdef _MGCHARSET_UNICODE
03380 
03399 extern MG_EXPORT const char** GUIAPI GetSysTextInUTF8 (const char* language);
03400 
03401 #endif /* _MGCHARSET_UNICODE */
03402 
03423 MG_EXPORT char* strnchr (const char* s, size_t n, int c);
03424 
03441 MG_EXPORT int substrlen (const char* text, int len, int delimiter,
03442                 int* nr_delim);
03443 
03456 MG_EXPORT char * strtrimall (char* src);
03457 
03464 #ifdef __cplusplus
03465 }
03466 #endif  /* __cplusplus */
03467 
03468 #endif /* _MGUI_MINIGUI_H */
03469 
Generated on Thu Apr 7 16:01:41 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3