minigui.h File Reference
Go to the source code of this file.
Data Structures
Defines
- #define g_rcDesktop g_rcScr
- Contains the rectangle of desktop of the application.
- #define MAX_NR_LISTEN_FD 5
- The max number of listen fd which user can use.
- #define ReinitDesktop() ReinitDesktopEx (TRUE)
- Re-initializes the desktop including the local system text.
- #define MiniGUIMain
- The main entry of a MiniGUI application.
- #define IDM_DTI_FIRST (300)
- The minimum interger value of command ID when user customize desktop menu.
- #define ETC_MAXLINE 1024
- The max line number of etc file.
- #define ETC_FILENOTFOUND -1
- No found etc file.
- #define ETC_SECTIONNOTFOUND -2
- No found section in etc file.
- #define ETC_KEYNOTFOUND -3
- No found key in etc file.
- #define ETC_TMPFILEFAILED -4
- Create tmpfile failed.
- #define ETC_FILEIOFAILED -5
- IO operation failed to etc file.
- #define ETC_INTCONV -6
- Convert the value string to an integer failed.
- #define ETC_INVALIDOBJ -7
- Invalid object to etc file.
- #define ETC_READONLYOBJ -8
- Read only to etc file.
- #define ETC_OK 0
- Operate success to etc file.
- #define SetValueToEtc(hEtc, pSection, pKey, pValue) GetValueFromEtc(hEtc, pSection, pKey, pValue, -1)
- Sets the value in the etc object.
- #define LEN_CLIPBOARD_NAME 15
- The maximum length of the name of clipboard.
- #define NR_CLIPBOARDS 4
- The maximum number of clipboard.
- #define CBNAME_TEXT ("text")
- The default clipboard name of text control.
- #define CBERR_OK 0
- Operate clipboard success.
- #define CBERR_BADNAME 1
- Bad name to clipboard.
- #define CBERR_NOMEM 2
- No enough memory to clipboard.
- #define CBOP_NORMAL 0
- Overwrite operation to clipboard.
- #define CBOP_APPEND 1
- Append the new data to clipboarda after the old data.
- #define Beep Ping
- Alias of Ping.
- #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.
- #define SetDefaultCursor(hcsr) SetCursorEx (hcsr, TRUE)
- Changes the current cursor, and set it as the default cursor.
- #define IDS_MGST_WINDOW 0
- The identifier of the window system text.
- #define IDS_MGST_START 1
- The identifier of the start system text.
- #define IDS_MGST_REFRESH 2
- The identifier of the refresh background system text.
- #define IDS_MGST_CLOSEALLWIN 3
- The identifier of the close all windows system text.
- #define IDS_MGST_ENDSESSION 4
- The identifier of the end session system text.
- #define IDS_MGST_OPERATIONS 5
- The identifier of the operations system text.
- #define IDS_MGST_MINIMIZE 6
- The identifier of the minimize system text.
- #define IDS_MGST_MAXIMIZE 7
- The identifier of the maximize system text.
- #define IDS_MGST_RESTORE 8
- The identifier of the restore system text.
- #define IDS_MGST_CLOSE 9
- The identifier of the close system text.
- #define IDS_MGST_OK 10
- The identifier of the ok system text.
- #define IDS_MGST_NEXT 11
- The identifier of the next system text.
- #define IDS_MGST_CANCEL 12
- The identifier of the cancel system text.
- #define IDS_MGST_PREV 13
- The identifier of the previous system text.
- #define IDS_MGST_YES 14
- The identifier of the yes system text.
- #define IDS_MGST_NO 15
- The identifier of the no system text.
- #define IDS_MGST_ABORT 16
- The identifier of the abort system text.
- #define IDS_MGST_RETRY 17
- The identifier of the retry system text.
- #define IDS_MGST_IGNORE 18
- The identifier of the ignore system text.
- #define IDS_MGST_ABOUTMG 19
- The identifier of the about minigui system text.
- #define IDS_MGST_OPENFILE 20
- The identifier of the open file system text.
- #define IDS_MGST_SAVEFILE 21
- The identifier of the save file system text.
- #define IDS_MGST_COLORSEL 22
- The identifier of the color selection system text.
- #define IDS_MGST_SWITCHLAYER 23
- The identifier of the switch layer system text.
- #define IDS_MGST_DELLAYER 24
- The identifier of the delete layer system text.
- #define IDS_MGST_ERROR 25
- The identifier of the error system text.
- #define IDS_MGST_LOGO 26
- The identifier of the logo system text.
- #define IDS_MGST_CURRPATH 27
- The identifier of the current path system text.
- #define IDS_MGST_FILE 28
- The identifier of the file system text.
- #define IDS_MGST_LOCATION 29
- The identifier of the location system text.
- #define IDS_MGST_UP 30
- The identifier of the up system text.
- #define IDS_MGST_NAME 31
- The identifier of the name system text.
- #define IDS_MGST_SIZE 32
- The identifier of the size system text.
- #define IDS_MGST_ACCESSMODE 33
- The identifier of the access mode system text.
- #define IDS_MGST_LASTMODTIME 34
- The identifier of the last modify time system text.
- #define IDS_MGST_OPEN 35
- The identifier of the open system text.
- #define IDS_MGST_FILENAME 36
- The identifier of the file name system text.
- #define IDS_MGST_FILETYPE 37
- The identifier of the file type system text.
- #define IDS_MGST_SHOWHIDEFILE 38
- The identifier of the show hide file system text.
- #define IDS_MGST_NOTFOUND 39
- The identifier of the not found file system text.
- #define IDS_MGST_NR 40
- The identifier of the can't read system text.
- #define IDS_MGST_NW 41
- The identifier of the can't write system text.
- #define IDS_MGST_INFO 42
- The identifier of the information system text.
- #define IDS_MGST_R 43
- The identifier of the read system text.
- #define IDS_MGST_W 44
- The identifier of the write system text.
- #define IDS_MGST_WR 45
- The identifier of the read and write system text.
- #define IDS_MGST_SAVE 46
- The identifier of the save system text.
- #define IDS_MGST_FILEEXIST 47
- The identifier of the file exist system text.
Typedefs
Functions
- MG_EXPORT int GUIAPI InitGUI (int, const char **)
- Initialize MiniGUI.
- MG_EXPORT void GUIAPI TerminateGUI (int not_used)
- Terminate MiniGUI.
- MG_EXPORT void GUIAPI MiniGUIPanic (int exitcode)
- The panic of MiniGUI application.
- MG_EXPORT BOOL GUIAPI RegisterListenFD (int fd, int type, HWND hwnd, void *context)
- Registers a listening file descriptor to MiniGUI-Lite.
- MG_EXPORT BOOL GUIAPI UnregisterListenFD (int fd)
- Unregisters a being listened file descriptor.
- MG_EXPORT BOOL GUIAPI ReinitDesktopEx (BOOL init_sys_text)
- Re-initializes the desktop.
- MG_EXPORT void GUIAPI ExitGUISafely (int exitcode)
- Exits your MiniGUI application safely.
- MG_EXPORT DESKTOPOPS *GUIAPI SetCustomDesktopOperationSet (DESKTOPOPS *usr_dsk_ops)
- Set customer desktop operation set.
- MG_EXPORT void GUIAPI DesktopUpdateAllWindow (void)
- Update all visible windows on the desktop.
- MG_EXPORT BOOL GUIAPI SetMouseCalibrationParameters (const POINT *src_pts, const POINT *dst_pts)
- Sets the parameters for doing mouse calibration.
- MG_EXPORT void GUIAPI GetOriginalMousePosition (int *x, int *y)
- Gets the original mouse position.
- MG_EXPORT HWND GUIAPI OpenAboutDialog (HWND hHosting)
- Opens or actives the 'About MiniGUI' dialog.
- 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 GetIntValueFromEtcFile (const char *pEtcFile, const char *pSection, const char *pKey, int *value)
- Gets integer value from a configuration file.
- 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 int GUIAPI RemoveSectionInEtcFile (const char *pEtcFile, const char *pSection)
- Removes a section in an etc file.
- MG_EXPORT int GUIAPI SaveSectionToEtcFile (const char *pEtcFile, PETCSECTION psect)
- Saves a section to an etc file.
- MG_EXPORT GHANDLE GUIAPI LoadEtcFile (const char *pEtcFile)
- Loads an etc file into memory.
- MG_EXPORT int GUIAPI SaveEtcToFile (GHANDLE hEtc, const char *file_name)
- Saves an ETC object into a file.
- MG_EXPORT int GUIAPI UnloadEtcFile (GHANDLE hEtc)
- Unloads an etc file.
- 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 int GUIAPI GetIntValueFromEtc (GHANDLE hEtc, const char *pSection, const char *pKey, int *pValue)
- Gets the integer value from a configuration etc object.
- MG_EXPORT GHANDLE GUIAPI FindSectionInEtc (GHANDLE hEtc, const char *pSection, BOOL bCreateNew)
- Finds/Creates a section from an etc object.
- 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 GetIntValueFromEtcSec (GHANDLE hSect, const char *pKey, int *pValue)
- Gets an integer value from an etc section object.
- MG_EXPORT int GUIAPI SetValueToEtcSec (GHANDLE hSect, const char *pKey, char *pValue)
- Sets the value in the etc section object.
- MG_EXPORT int GUIAPI RemoveSectionInEtc (GHANDLE hEtc, const char *pSection)
- Removes a section in etc object.
- static int GetMgEtcValue (const char *pSection, const char *pKey, char *pValue, int iLen)
- Gets value from MiniGUI configuration etc object.
- static int GetMgEtcIntValue (const char *pSection, const char *pKey, int *value)
- Gets integer value from MiniGUI configuration etc object.
- MG_EXPORT int GUIAPI CreateClipBoard (const char *cb_name, size_t size)
- Creates a new clipboard.
- MG_EXPORT int GUIAPI DestroyClipBoard (const char *cb_name)
- Destroys a new clipboard.
- MG_EXPORT int GUIAPI SetClipBoardData (const char *cb_name, void *data, size_t n, int cbop)
- Sets the data of a clipboard.
- MG_EXPORT size_t GUIAPI GetClipBoardDataLen (const char *cb_name)
- Gets the length of the data of a clipboard.
- MG_EXPORT size_t GUIAPI GetClipBoardData (const char *cb_name, void *data, size_t n)
- Gets the data of a clipboard.
- MG_EXPORT int GUIAPI GetClipBoardByte (const char *cb_name, int index, unsigned char *byte)
- Gets a byte from a clipboard.
- MG_EXPORT void GUIAPI Ping (void)
- Makes a beep sound.
- MG_EXPORT void GUIAPI Tone (int frequency_hz, int duration_ms)
- Makes a tone.
- MG_EXPORT void *GUIAPI GetOriginalTermIO (void)
- Gets termios structure of the original terminal before initializing MiniGUI.
- MG_EXPORT char *GUIAPI FixStrAlloc (int len)
- Allocates a buffer for a length-fixed string.
- MG_EXPORT char *GUIAPI FixStrDup (const char *str)
- Duplicates a length-fixed string.
- MG_EXPORT void GUIAPI FreeFixStr (char *str)
- Frees a length-fixed string.
- MG_EXPORT HCURSOR GUIAPI LoadCursorFromFile (const char *filename)
- Loads a cursor from a M$ Windows cursor file.
- MG_EXPORT HCURSOR GUIAPI LoadCursorFromMem (const void *area)
- Loads a cursor from a memory area.
- 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 BOOL GUIAPI DestroyCursor (HCURSOR hcsr)
- Destroys a cursor object.
- 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 void GUIAPI ClipCursor (const RECT *prc)
- Clips the cursor range.
- MG_EXPORT void GUIAPI GetClipCursor (RECT *prc)
- Gets the current cursor clipping rectangle.
- MG_EXPORT void GUIAPI GetCursorPos (POINT *ppt)
- Gets position of the current cursor.
- MG_EXPORT void GUIAPI SetCursorPos (int x, int y)
- Sets position of the current cursor.
- MG_EXPORT HCURSOR GUIAPI SetCursorEx (HCURSOR hcsr, BOOL set_def)
- Changes the current cursor.
- MG_EXPORT HCURSOR GUIAPI GetDefaultCursor (void)
- Gets the default cursor.
- MG_EXPORT int GUIAPI ShowCursor (BOOL fShow)
- Shows or hides cursor.
- MG_EXPORT BOOL GUIAPI GetKeyStatus (UINT uKey)
- Gets a key or a mouse button status.
- MG_EXPORT DWORD GUIAPI GetShiftKeyStatus (void)
- Gets status of the shift keys.
- MG_EXPORT const char *GUIAPI GetSysText (unsigned int id)
- Translates system text to localized text.
- MG_EXPORT const char **GUIAPI GetSysTextInUTF8 (const char *language)
- Gets the localized system text array in UTF-8 for a specified language.
- MG_EXPORT char * strnchr (const char *s, size_t n, int c)
- Locates character in the first n characters of string s.
- 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.
- MG_EXPORT char * strtrimall (char *src)
- Deletes all space characters.
Variables
- MG_EXPORT RECT g_rcScr
- Contains the rectangle of the whole screen.
- MG_EXPORT char ETCFILEPATH []
- The path name of MiniGUI configuration file.
- MG_EXPORT const char * SysText []
- Contains all text used by MiniGUI in English.
- MG_EXPORT const char ** local_SysText
- The pointer to the current localized system text array.
Detailed Description
- Author:
- Wei Yongming <ymwei@minigui.org>
- Date:
- 2002/01/06
This file includes global and miscellaneous interfaces of MiniGUI.
Copyright (C) 2002-2009 Feynman Software.
Copyright (C) 1998-2002 Wei Yongming.
All rights reserved by Feynman Software.
This file is part of MiniGUI, a compact cross-platform Graphics
User Interface (GUI) support system for real-time embedded systems.
Definition in file minigui.h.
Function Documentation
int GUIAPI InitGUI |
( |
int |
, |
|
|
const char ** |
| |
|
) |
| | |
Initialize MiniGUI.
The meaning of two parameters is same with parameters of main function.
void GUIAPI MiniGUIPanic |
( |
int |
exitcode |
) |
|
The panic of MiniGUI application.
The function forces to close GAL and IAL engine.
- Parameters:
-
| exitcode | The value of exitcode, now it can be any values. |
void GUIAPI TerminateGUI |
( |
int |
not_used |
) |
|
Terminate MiniGUI.
- Parameters:
-