⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 minigui.h

📁 在ecos 下mingui 的移植开发
💻 H
字号:
/* minigui.h * * This file include main definitions of MiniGUI. * *             MiniGUI for Linux Version 0.3.xx *             Copyright (c) 1994 ~ 2000  Wei Yongming. *             Last modified date: 2000/06/18 *//***  This library is free software; you can redistribute it and/or**  modify it under the terms of the GNU Library General Public**  License as published by the Free Software Foundation; either**  version 2 of the License, or (at your option) any later version.****  This library 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**  Library General Public License for more details.****  You should have received a copy of the GNU Library General Public**  License along with this library; if not, write to the Free**  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,**  MA 02111-1307, USA*/#ifndef MINIGUI_H  #define MINIGUI_H#ifdef __cplusplusextern "C" {#endif  /* __cplusplus *//************************* Init and terminate ********************************/BOOL GUIAPI InitGUI (void);void GUIAPI TerminateGUI (int rcByGUI);void GUIAPI MiniGUIPanic (int exitcode);BOOL GUIAPI ReinitDesktop (void);/* We remove the SuspendGUI and ResumeGUI functions.    Don't use these two functios any more. */// void GUIAPI SuspendGUI (void);// BOOL GUIAPI ResumeGUI (void);void GUIAPI ExitGUISafely (int exitcode);/********************************** Main Entry *******************************//* These functions should defined by application */int MiniGUIMain (int args, const char* arg[]);BOOL GUIAPI PreInitGUI (int args, const char* arg[], int* retp);int GUIAPI PostTerminateGUI (int args, const char* arg[], int rcByGUI); #define IDM_DTI_FIRST   (300)void GUIAPI CustomizeDesktopMenu (HMENU hDesktopMenu, int iPos);int GUIAPI CustomDesktopCommand (int id);/********************************* About Dialog *****************************/#ifdef _MISC_ABOUTDLGvoid GUIAPI OpenAboutDialog (void);#endif /* _MISC_ABOUTDLG *//************************** ETC File Operations ******************************/#define ETC_MAXLINE             1024#define ETC_FILENOTFOUND        -1#define ETC_SECTIONNOTFOUND     -2#define ETC_KEYNOTFOUND         -3#define ETC_TMPFILEFAILED       -4#define ETC_FILEIOFAILED        -5#define ETC_OK                  0extern char ETCFILEPATH [];int GUIAPI GetValueFromEtcFile (const char* pEtcFile, const char* pSection,                               const char* pKey, char* pValue, int iLen);int GUIAPI GetIntValueFromEtcFile (const char* pEtcFile, const char* pSection,                               const char* pKey, int* value);int GUIAPI SetValueToEtcFile (const char* pEtcFile, const char* pSection,                               const char* pKey, char* pValue);/********************************** Miscellouse ******************************/void GUIAPI Ping (void);#define Beep Pingvoid GUIAPI Tone (int frequency_hz, int duration_ms);void* GUIAPI GetOriginalTermIO (void);void GUIAPI Draw3DUpFrame (HDC hDC, int l, int t, int r, int b, int fillc);void GUIAPI Draw3DDownFrame (HDC hDC, int l, int t, int r, int b, int fillc);#define Draw3DUpThickFrame      Draw3DUpFrame#define Draw3DDonwThickFrame    Draw3DDownFramevoid GUIAPI Draw3DUpThinFrame (HDC hDC,                 int l, int t, int r, int b, int fillc);void GUIAPI Draw3DDownThinFrame (HDC hDC,                 int l, int t, int r, int b, int fillc);void GUIAPI Draw3DBorder (HDC hdc, int l, int t, int r, int b);void GUIAPI DisabledTextOut (HDC hDC, int x, int y, const char* szText);/************************ Length-Fixed String Support *************************/char* GUIAPI FixStrAlloc (int len);void GUIAPI FreeFixStr (char* str);/******************************** Cursor Support ******************************/// Cursor creating and destroying.HCURSOR GUIAPI LoadCursorFromFile (const char* filename);HCURSOR GUIAPI CreateCursor (int xhotspot, int yhotspot, int w, int h,                const BYTE* pANDBits, const BYTE* pXORBits, int colornum);BOOL GUIAPI DestroyCursor (HCURSOR hcsr);HCURSOR GUIAPI GetSystemCursor (int csrid);HCURSOR GUIAPI GetCurrentCursor (void);#define MAX_SYSCURSORINDEX    13// System cursor index.#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// Cursor clipping support.void GUIAPI ClipCursor (const RECT* prc);void GUIAPI GetClipCursor (RECT* prc);// Cursor position.void GUIAPI GetCursorPos (POINT* ppt);void GUIAPI SetCursorPos (int x, int y);// Cursor pointer shape and hiding and showing.HCURSOR GUIAPI SetCursorEx (HCURSOR hcsr, BOOL set_def);#define SetCursor(hcsr) SetCursorEx (hcsr, FALSE)#define SetDefaultCursor(hcsr) SetCursorEx (hcsr, TRUE)HCURSOR GUIAPI GetDefaultCursor (void);int GUIAPI ShowCursor (BOOL fShow);// Mouse event helper.BOOL GUIAPI RefreshCursor (int* x, int* y, int* button);/***************************** Async Key Support ******************************/// asynchronize key statusBOOL GUIAPI GetKeyStatus (UINT uKey);DWORD GUIAPI GetShiftKeyStatus (void);/*************************** Internationalization *****************************//* This functions should defined by application */const char* GetSysText (const char* text);extern const char* SysText [];/*************************** String operation helpers *************************/char* strnchr (const char* s, size_t n, int c);int substrlen (const char* text, int len, char delimiter, int* nr_delim);#ifdef __cplusplus}#endif  /* __cplusplus */#endif // MINIGUI_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -