diff --git a/include/common.h b/include/common.h index e996939e..3b71cc15 100644 --- a/include/common.h +++ b/include/common.h @@ -2,13 +2,13 @@ * \file common.h * \author Wei Yongming * \date 2002/01/06 - * - * \brief This file includes macro definitions and typedefs that commonly used + * + * \brief This file includes macro definitions and typedefs that commonly used * by MiniGUI. * \verbatim - This file is part of MiniGUI, a mature cross-platform windowing + This file is part of MiniGUI, a mature cross-platform windowing and Graphics User Interface (GUI) support system for embedded systems and smart IoT devices. @@ -46,10 +46,10 @@ /* * $Id: common.h 13674 2010-12-06 06:45:01Z wanzheng $ * - * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, + * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, * pSOS, ThreadX, NuCleus, OSE, and Win32. * - * The definitions of some data types and byte order macros + * The definitions of some data types and byte order macros * borrowed from LGPL'ed SDL by Sam Lantinga. * * Fix point math routines come from Allegro (a gift software) @@ -109,11 +109,11 @@ /** * \def _VERSION_CODE(major, minor, micro) - * \brief A macro that returns the version code from \a major, \a minor + * \brief A macro that returns the version code from \a major, \a minor * and \a micro version number. * - * MiniGUI uses this macro to evaluate the version code of current MiniGUI - * library installed in your system, and define it to _MINIGUI_VERSION_CODE. + * MiniGUI uses this macro to evaluate the version code of current MiniGUI + * library installed in your system, and define it to _MINIGUI_VERSION_CODE. * * \sa _MINIGUI_VERSION_CODE */ @@ -333,7 +333,7 @@ typedef int BOOL; # if defined(__MINIGUI_LIB__) # define MG_EXPORT __declspec(dllexport) # else -# define MG_EXPORT __declspec(dllimport) +# define MG_EXPORT __declspec(dllimport) # endif #else # define MG_EXPORT @@ -463,7 +463,7 @@ typedef signed char SBYTE; /** * \var WORD_HPTR - * \brief An unsigned int (word) type in half pointer precision. + * \brief An unsigned int (word) type in half pointer precision. */ #if defined(_WIN64) typedef unsigned int WORD_HPTR; @@ -475,7 +475,7 @@ typedef unsigned short WORD_HPTR; /** * \var SWORD_HPTR - * \brief An signed int type in half pointer precision. + * \brief An signed int type in half pointer precision. */ #if defined(_WIN64) typedef signed int SWORD_HPTR; @@ -486,13 +486,13 @@ typedef signed short SWORD_HPTR; #endif /** - * \var WORD + * \var WORD * \brief A type definition for an unsigned integer (word). */ typedef WORD_HPTR WORD; /** - * \var SWORD + * \var SWORD * \brief A type definition for a signed integer. */ typedef SWORD_HPTR SWORD; @@ -511,7 +511,7 @@ typedef signed short SWORD16; /** * \var LONG_PTR - * \brief A signed long type for pointer precision. + * \brief A signed long type for pointer precision. */ #if defined(_WIN64) typedef __int64 LONG_PTR; @@ -535,9 +535,9 @@ typedef LONG_PTR LRESULT; /** * \var DWORD_PTR - * \brief An unsigned long type for pointer precision. + * \brief An unsigned long type for pointer precision. * - * Commonly used for general 32-bit parameters that have been extended + * Commonly used for general 32-bit parameters that have been extended * to 64 bits in 64-bit platform. */ #if defined(_WIN64) @@ -562,9 +562,9 @@ typedef unsigned int DWORD32; /** * \var SDWORD_PTR - * \brief A signed long type for pointer precision. + * \brief A signed long type for pointer precision. * - * Commonly used for general 32-bit parameters that have been extended + * Commonly used for general 32-bit parameters that have been extended * to 64 bits in 64-bit platform. */ #if defined(_WIN64) @@ -843,7 +843,7 @@ typedef DWORD32 RGBCOLOR; /** * \def MakeRGBA(r, g, b, a) - * \brief Makes a RGBA triple value from red \a r, green \a g, + * \brief Makes a RGBA triple value from red \a r, green \a g, * blue \a b and alpha \a components. * * \note The red, green, blue and alpha components are all ranged from 0 to 255, @@ -967,7 +967,7 @@ typedef struct _RGB */ BYTE b; /** - * Reserved for alignment, maybe used for the alpha component of a RGB triple. + * Reserved for alignment, maybe used for the alpha component of a RGB triple. */ BYTE a; } RGB; @@ -976,7 +976,7 @@ typedef struct _RGB * \var typedef RGB* PRGB * \brief Data type of the pointer to a RGB. * - * \sa RGB + * \sa RGB */ typedef RGB* PRGB; @@ -1043,7 +1043,7 @@ typedef signed int gal_sint; typedef unsigned int gal_uint; /** - * \var typedef Uint32 gal_pixel + * \var typedef Uint32 gal_pixel * \brief Data type of pixel value */ typedef Uint32 gal_pixel; @@ -1101,7 +1101,7 @@ typedef struct _GAL_Palette /** * A rectangle defined by upper-left coordinates and width/height. - * \sa RECT + * \sa RECT */ typedef struct _GAL_Rect { /** @@ -1127,11 +1127,11 @@ typedef struct _GAL_Rect { * * The number of MiniGUI keys is defined to 255 by default. This means that * MiniGUI can destinguish 255 different keys with each has an unique scan code. - * The scan codes below 129 are defined for PC keyboard by default. - * If your system has a large amount of keys, you can define the scan code of - * keys ranged from 1 to 255 in your IAL engine. And your application will - * receive a MSG_KEYDOWN and MSG_KEYUP messages when a key pressed and - * released, and the wParam of the messages will be defined to be equal to + * The scan codes below 129 are defined for PC keyboard by default. + * If your system has a large amount of keys, you can define the scan code of + * keys ranged from 1 to 255 in your IAL engine. And your application will + * receive a MSG_KEYDOWN and MSG_KEYUP messages when a key pressed and + * released, and the wParam of the messages will be defined to be equal to * the scan code of the key. * * \sa NR_KEYS, SCANCODE_USER @@ -1140,11 +1140,11 @@ typedef struct _GAL_Rect { /** * \def NR_KEYS - * \brief The number of keys defined by Linux operating system. + * \brief The number of keys defined by Linux operating system. * * For a PC box, NR_KEYS is defined to 128 by default. You can define - * some input events from an input device other than keyboard, e.g. - * your remote controller, as key events with different scan codes from + * some input events from an input device other than keyboard, e.g. + * your remote controller, as key events with different scan codes from * those of PC's. MiniGUI can support 255 keys, and the constant * is defined by MGUI_NR_KEYS. * @@ -1319,7 +1319,7 @@ typedef struct _GAL_Rect { /** * \def KS_REPEATED - * \brief This status indicate that the key down message is an + * \brief This status indicate that the key down message is an * auto-repeated one. * * You can test the status by AND'ed with lParam of the message, like below: @@ -1341,7 +1341,7 @@ typedef struct _GAL_Rect { /** * \def KS_CAPTURED - * \brief This status indicate that the mouse is captured by a window when + * \brief This status indicate that the mouse is captured by a window when * the mouse message posted. * * You can test the status by AND'ed with wParam of the message, like below: @@ -1371,7 +1371,7 @@ typedef struct _GAL_Rect { /** * \def KS_CAPSLOCK - * \brief This status indicate that the CapsLock key was locked when + * \brief This status indicate that the CapsLock key was locked when * the key or mouse message posted to the window. * * You can test the status by AND'ed with lParam of the message, like below @@ -1393,7 +1393,7 @@ typedef struct _GAL_Rect { /** * \def KS_NUMLOCK - * \brief This status indicate that the NumLock key was locked when + * \brief This status indicate that the NumLock key was locked when * the key or mouse message posted to the window. * * \sa key_msgs @@ -1429,7 +1429,7 @@ typedef struct _GAL_Rect { /** * \def KS_CTRL - * \brief This status indicate that either the left-Ctrl key or the right-Ctrl key + * \brief This status indicate that either the left-Ctrl key or the right-Ctrl key * was pressed when the key or mouse message posted to the window. * * \sa key_msgs @@ -1456,7 +1456,7 @@ typedef struct _GAL_Rect { /** * \def KS_ALT - * \brief This status indicate that either the left-Alt key or the right-Alt key + * \brief This status indicate that either the left-Alt key or the right-Alt key * was pressed when the key or mouse message posted to the window. * * \sa key_msgs @@ -1483,7 +1483,7 @@ typedef struct _GAL_Rect { /** * \def KS_SHIFT - * \brief This status indicate that either the left-Shift key or the right-Shift key + * \brief This status indicate that either the left-Shift key or the right-Shift key * was pressed when the key or mouse message posted to the window. * * \sa key_msgs @@ -1498,7 +1498,7 @@ typedef struct _GAL_Rect { /** * \def KS_LEFTBUTTON - * \brief This status indicate that left button was pressed when + * \brief This status indicate that left button was pressed when * the key or mouse message posted to the window. * * \sa key_msgs @@ -1507,7 +1507,7 @@ typedef struct _GAL_Rect { /** * \def KS_RIGHTBUTTON - * \brief This status indicate that right button was pressed when + * \brief This status indicate that right button was pressed when * the key or mouse message posted to the window. * * \sa key_msgs @@ -1516,7 +1516,7 @@ typedef struct _GAL_Rect { /** * \def KS_MIDDLBUTTON - * \brief This status indicate that middle button was pressed when + * \brief This status indicate that middle button was pressed when * the key or mouse message posted to the window. * * \sa key_msgs @@ -1549,37 +1549,37 @@ typedef struct _GAL_Rect { /** * \def ERR_QUEUE_FULL - * \brief Return value queue is full error. + * \brief Return value queue is full error. */ #define ERR_QUEUE_FULL -2 /** * \def ERR_INVALID_HANDLE - * \brief Return value invalid handle error. + * \brief Return value invalid handle error. */ #define ERR_INVALID_HANDLE -3 /** * \def ERR_INVALID_HMENU - * \brief Return value invalid menu handle error. + * \brief Return value invalid menu handle error. */ #define ERR_INVALID_HMENU -4 /** * \def ERR_INVALID_POS - * \brief Return value invalid postion error. + * \brief Return value invalid postion error. */ #define ERR_INVALID_POS -5 /** * \def ERR_INVALID_ID - * \brief Return value invalid id error. + * \brief Return value invalid id error. */ #define ERR_INVALID_ID -6 /** * \def ERR_RES_ALLOCATION - * \brief Return value allocation resource error . + * \brief Return value allocation resource error . */ #define ERR_RES_ALLOCATION -7 @@ -1603,7 +1603,7 @@ typedef struct _GAL_Rect { /** * \def ERR_CTRLCLASS_INUSE - * \brief Return value inuse control class error. + * \brief Return value inuse control class error. */ #define ERR_CTRLCLASS_INUSE -11 @@ -1663,7 +1663,7 @@ typedef struct _GAL_Rect { /** * \def ERR_INPUT_ENGINE - * \brief Return value input engine error. + * \brief Return value input engine error. */ #define ERR_INPUT_ENGINE -21 @@ -1783,12 +1783,12 @@ struct tm { #define fseek tp_fseek #define feof tp_feof -#undef assert -#define _HAVE_ASSERT 1 +#undef assert +#define _HAVE_ASSERT 1 #define assert(e) do { \ e; \ - } while (0) + } while (0) #undef stdin #undef stdout @@ -1825,13 +1825,13 @@ MG_EXPORT int strncasecmp(const char *s1, const char *s2, unsigned int n); #ifdef _MGUSE_OWN_MALLOC -/** +/** * \fn int init_minigui_malloc (unsigned char* heap, unsigned int heap_size, \ int (*lock_heap) (void), int (*unlock_heap) (void)) * \brief Initialize MiniGUI's own heap system. * * MiniGUI implements a heap system which is compatbile with ANIS C. When you - * RTOS does not provide a re-entriable malloc implementation, you can use MiniGUI's + * RTOS does not provide a re-entriable malloc implementation, you can use MiniGUI's * heap system. * * Before using MiniGUI's own heap system, you should provide a memory range to be @@ -1844,7 +1844,7 @@ MG_EXPORT int strncasecmp(const char *s1, const char *s2, unsigned int n); * * \return Zero on success, non-zero on error. */ -int init_minigui_malloc (unsigned char* heap, unsigned int heap_size, +int init_minigui_malloc (unsigned char* heap, unsigned int heap_size, int (*lock_heap) (void), int (*unlock_heap) (void)); #define USE_DL_PREFIX @@ -1890,7 +1890,7 @@ int init_minigui_malloc (unsigned char* heap, unsigned int heap_size, * * \return Zero no success, non-zero on error. */ -int init_minigui_printf (int (*output_char) (int ch), +int init_minigui_printf (int (*output_char) (int ch), int (*input_char) (void)); #if defined (__UCOSII__) || defined (__VXWORKS__) || defined (__NUCLEUS__) || defined (__PSOS__) @@ -2099,7 +2099,7 @@ int init_minigui_printf (int (*output_char) (int ch), * * This function initializes MiniGUI's own POSIX Threads system. * If pth_entry is not NULL, this function will create a detached pthread - * as the main pthread, and call pth_entry with the arguments passed to + * as the main pthread, and call pth_entry with the arguments passed to * this function. * * Note for pSOS, this function will ignore the stack_base, cause pSOS kernel @@ -2114,8 +2114,8 @@ int init_minigui_printf (int (*output_char) (int ch), * * \return Zero on success, non-zero on error. */ -int start_minigui_pthread (int (* pth_entry) (int argc, const char* argv []), - int argc, const char* argv[], +int start_minigui_pthread (int (* pth_entry) (int argc, const char* argv []), + int argc, const char* argv[], char* stack_base, unsigned int stack_size); #ifndef ESRCH @@ -2275,17 +2275,17 @@ int _sysvipc_mutex_sem_term (void); #define pthread_mutex_t _sysvipc_pthread_mutex_t #define pthread_mutexattr_t _sysvipc_pthread_mutexattr_t -#define pthread_mutexattr_init _sysvipc_pthread_mutexattr_init -#define pthread_mutexattr_destroy _sysvipc_pthread_mutexattr_destroy -#define pthread_mutexattr_settype _sysvipc_pthread_mutexattr_settype +#define pthread_mutexattr_init _sysvipc_pthread_mutexattr_init +#define pthread_mutexattr_destroy _sysvipc_pthread_mutexattr_destroy +#define pthread_mutexattr_settype _sysvipc_pthread_mutexattr_settype #define pthread_mutexattr_gettype _sysvipc_pthread_mutexattr_gettype -#define pthread_init _sysvipc_pthread_init -#define pthread_mutex_init _sysvipc_pthread_mutex_init +#define pthread_init _sysvipc_pthread_init +#define pthread_mutex_init _sysvipc_pthread_mutex_init #define pthread_mutex_destroy _sysvipc_pthread_mutex_destroy -#define pthread_mutex_lock _sysvipc_pthread_mutex_lock -#define pthread_mutex_trylock _sysvipc_pthread_mutex_trylock -#define pthread_mutex_unlock _sysvipc_pthread_mutex_unlock +#define pthread_mutex_lock _sysvipc_pthread_mutex_lock +#define pthread_mutex_trylock _sysvipc_pthread_mutex_trylock +#define pthread_mutex_unlock _sysvipc_pthread_mutex_unlock typedef struct { diff --git a/include/control.h b/include/control.h index 39f415a1..49ca3cc9 100644 --- a/include/control.h +++ b/include/control.h @@ -2,12 +2,12 @@ * \file control.h * \author Wei Yongming * \date 2001/12/29 - * + * * \brief This file includes interfaces of standard controls of MiniGUI. * \verbatim - This file is part of MiniGUI, a mature cross-platform windowing + This file is part of MiniGUI, a mature cross-platform windowing and Graphics User Interface (GUI) support system for embedded systems and smart IoT devices. @@ -45,7 +45,7 @@ /* * $Id: control.h 11349 2009-03-02 05:00:43Z weiym $ * - * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, + * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, * pSOS, ThreadX, NuCleus, OSE, and Win32. * */ diff --git a/include/gdi.h b/include/gdi.h index 8288de3c..505a0897 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -8882,7 +8882,7 @@ MG_EXPORT HDC GUIAPI InitSlaveScreenEx (const char* name, const char* mode, int * * \return Valid handle on success, HDC_INVALID on failure. */ -inline HDC InitSlaveScreen (const char* name, const char* mode) +static inline HDC InitSlaveScreen (const char* name, const char* mode) { return InitSlaveScreenEx(name, mode, GDCAP_DPI_DEFAULT); } diff --git a/include/minigui.h b/include/minigui.h index 3e0bcfe1..2b757446 100644 --- a/include/minigui.h +++ b/include/minigui.h @@ -2,12 +2,12 @@ * \file minigui.h * \author Wei Yongming * \date 2002/01/06 - * + * * \brief This file includes global and miscellaneous interfaces of MiniGUI. * \verbatim - This file is part of MiniGUI, a mature cross-platform windowing + This file is part of MiniGUI, a mature cross-platform windowing and Graphics User Interface (GUI) support system for embedded systems and smart IoT devices. @@ -44,8 +44,8 @@ /* * $Id: minigui.h 13674 2010-12-06 06:45:01Z wanzheng $ - * - * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, + * + * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, * pSOS, ThreadX, NuCleus, OSE, and Win32. */ @@ -98,7 +98,7 @@ extern MG_EXPORT RECT g_rcScr; /** * \var BOOL mgIsServer - * \brief Indicates whether the process is the server or a client on + * \brief Indicates whether the process is the server or a client on * MiniGUI-Processes. * * \note Only defined for MiniGUI-Processes. @@ -120,7 +120,7 @@ extern MG_EXPORT void* mgSharedRes; * \var void* mgSizeRes * \brief Contains the length of shared resource of MiniGUI-Processes. * - * \note Only defined for MiniGUI-Processes. + * \note Only defined for MiniGUI-Processes. * * \sa mgSharedRes */ @@ -204,7 +204,7 @@ typedef struct _MG_Layer } MG_Layer; /*screen attr type*/ -#define SCREEN_ATTR_ALPHA_CHANNEL 0x01 //alpha channel +#define SCREEN_ATTR_ALPHA_CHANNEL 0x01 //alpha channel #define SCREEN_ATTR_COLORKEY 0x02 //colorkey #define SCREEN_ATTR_COLORSPACE 0x03 //colorspace #define SCREEN_ATTR_ALPHA 0x04 @@ -222,7 +222,7 @@ extern MG_EXPORT int mgClientSize; * \var MG_Client* mgClients * \brief The pointer to the array contains all clients' information. * - * You can access the elements in \a mgClients as a normal array. If the + * You can access the elements in \a mgClients as a normal array. If the * field \a fd of one element is not less than zero, then the element * will be a vaild client. * @@ -253,7 +253,7 @@ extern MG_EXPORT MG_Layer* mgLayers; /** @} end of global_vars */ -/** +/** * \fn int GUIAPI InitGUI (int, const char **) * \brief Initialize MiniGUI. * @@ -262,7 +262,7 @@ extern MG_EXPORT MG_Layer* mgLayers; **/ MG_EXPORT int GUIAPI InitGUI (int, const char **); -/** +/** * \fn void GUIAPI TerminateGUI (int not_used) * \brief Terminate MiniGUI. * @@ -271,7 +271,7 @@ MG_EXPORT int GUIAPI InitGUI (int, const char **); **/ MG_EXPORT void GUIAPI TerminateGUI (int not_used); -/** +/** * \fn void GUIAPI MiniGUIPanic (int exitcode) * \brief The panic of MiniGUI application. * @@ -305,9 +305,9 @@ MG_EXPORT void GUIAPI MiniGUIPanic (int exitcode); * Register/Unregister a listen fd to MiniGUI. * * When you need to listen a file descriptor, you can use \a select(2) - * system call. In MiniGUI, you can also register it to MiniGUI to - * be a listened fd, and when there is a read/write/except event on - * the registered fd , MiniGUI will sent a notification message to + * system call. In MiniGUI, you can also register it to MiniGUI to + * be a listened fd, and when there is a read/write/except event on + * the registered fd , MiniGUI will sent a notification message to * the registered window. * * Example: @@ -338,12 +338,12 @@ MG_EXPORT void GUIAPI MiniGUIPanic (int exitcode); #endif -/** +/** * \fn BOOL GUIAPI RegisterListenFD (int fd, int type,\ HWND hwnd, void* context) * \brief Registers a listening file descriptor to MiniGUI-Lite. * - * This function registers the file desciptor \a fd to MiniGUI-Lite for + * This function registers the file desciptor \a fd to MiniGUI-Lite for * listening. * * When there is a read/write/except event on this \a fd, MiniGUI @@ -352,10 +352,10 @@ MG_EXPORT void GUIAPI MiniGUIPanic (int exitcode); * to the target window \a hwnd. * * \param fd The file descriptor to be listened. - * \param type The type of the event to be listened, can be POLLIN, POLLOUT, + * \param type The type of the event to be listened, can be POLLIN, POLLOUT, * or POLLERR. * \param hwnd The handle to the window will receive MSG_FDEVENT message. - * \param context The value will be passed to the window as lParam of + * \param context The value will be passed to the window as lParam of * MSG_FDEVENT message. * * \return TRUE if all OK, and FALSE on error. @@ -367,13 +367,13 @@ MG_EXPORT void GUIAPI MiniGUIPanic (int exitcode); MG_EXPORT BOOL GUIAPI RegisterListenFD (int fd, int type, HWND hwnd, void* context); -/** +/** * \fn BOOL GUIAPI UnregisterListenFD (int fd) * \brief Unregisters a being listened file descriptor. * * This function unregisters the being listened file descriptor \a fd. * - * \param fd The file descriptor to be unregistered, should be a being + * \param fd The file descriptor to be unregistered, should be a being * listened file descriptor. * \return TRUE if all OK, and FALSE on error. * @@ -390,7 +390,7 @@ MG_EXPORT BOOL GUIAPI UnregisterListenFD (int fd); /** * \defgroup lite_layer_fns Layer operations * - * A client in MiniGUI-Processes can create a new layer or join + * A client in MiniGUI-Processes can create a new layer or join * an existed layer. * * Example: @@ -418,7 +418,7 @@ MG_EXPORT BOOL GUIAPI UnregisterListenFD (int fd); **/ #define NAME_DEF_LAYER "mginit" -/** +/** * \fn GHANDLE GUIAPI JoinLayer (const char* layer_name,\ const char* client_name,\ int max_nr_topmosts, int max_nr_normals) @@ -427,21 +427,21 @@ MG_EXPORT BOOL GUIAPI UnregisterListenFD (int fd); * This function should be called by clients before calling any other MiniGUI * functions. You can call \a GetLayerInfo to get the layer information. * If the layer to be joined does not exist, the server, i.e. \a mginit, will - * try to create a new one. If you passed a NULL pointer or a null string for + * try to create a new one. If you passed a NULL pointer or a null string for * \a layer_name, the client will join to the default layer. * - * If the client want to create a new layer, you should specify the maximal - * number of topmost frame objects (max_nr_topmosts) and the maximal number of - * normal frame objects (max_nr_normals) in the new layer. Passing zero to - * \a max_nr_topmosts and max_nr_normals will use the default values, and the default + * If the client want to create a new layer, you should specify the maximal + * number of topmost frame objects (max_nr_topmosts) and the maximal number of + * normal frame objects (max_nr_normals) in the new layer. Passing zero to + * \a max_nr_topmosts and max_nr_normals will use the default values, and the default * values are specified by ServerStartup. * - * Note that the server will create a default layer named "mginit". + * Note that the server will create a default layer named "mginit". * * \param layer_name The name of the layer.You can use NAME_TOPMOST_LAYER to * specify the current topmost layer. * \param client_name The name of the client. - * \param max_nr_topmosts The maximal number of topmost z-order nodes in + * \param max_nr_topmosts The maximal number of topmost z-order nodes in * the new layer. * \param max_nr_normals The maximal number of normal z-order nodes in * the new layer. @@ -456,24 +456,24 @@ MG_EXPORT GHANDLE GUIAPI JoinLayer (const char* layer_name, const char* client_name, int max_nr_topmosts, int max_nr_normals); -/** +/** * \fn GHANDLE GUIAPI GetLayerInfo (const char* layer_name,\ int* nr_clients, BOOL* is_topmost, int* cli_active) * \brief Gets information of a layer by a client. * - * You can get the information of a layer through this function. - * The information will be returned through the pointer arguments + * You can get the information of a layer through this function. + * The information will be returned through the pointer arguments * if the specific pointer is not NULL. * * \param layer_name The name of the layer. You can use NAME_SELF_LAYER to * specify the layer the calling client belongs to. - * \param nr_clients The number of clients in the layer will be returned + * \param nr_clients The number of clients in the layer will be returned * through this pointer. - * \param is_topmost A boolean which indicates whether the layer is the + * \param is_topmost A boolean which indicates whether the layer is the * topmost layer will be returned. * \param cli_active The identifier of the active client in the layer. * - * \return Returns the handle to the layer on success, + * \return Returns the handle to the layer on success, * INV_LAYER_HANDLE on error. * * \note Only call this function in clients of MiniGUI-Processes. @@ -483,14 +483,14 @@ MG_EXPORT GHANDLE GUIAPI JoinLayer (const char* layer_name, MG_EXPORT GHANDLE GUIAPI GetLayerInfo (const char* layer_name, int* nr_clients, BOOL* is_topmost, int* cli_active); -/** +/** * \fn BOOL GUIAPI SetTopmostLayer (BOOL handle_name,\ * GHANDLE handle, const char* name) * \brief Brings a layer to be the topmost one. * * This function brings the specified layer \a handle to be the topmost layer. * - * \param handle_name The way specifing the layer; TRUE for handle of + * \param handle_name The way specifing the layer; TRUE for handle of * the layer, FALSE for name. * \param handle The handle to the layer. * \param name The name of the layer. You can use NAME_SELF_LAYER to @@ -503,12 +503,12 @@ MG_EXPORT GHANDLE GUIAPI GetLayerInfo (const char* layer_name, MG_EXPORT BOOL GUIAPI SetTopmostLayer (BOOL handle_name, GHANDLE handle, const char* name); -/** +/** * \fn BOOL GUIAPI DeleteLayer (BOOL handle_name,\ GHANDLE handle, const char* layer_name) * \brief Deletes a specific layer. * - * \param handle_name The way specifing the layer; TRUE for handle of + * \param handle_name The way specifing the layer; TRUE for handle of * the layer, FALSE for name. * \param handle The handle to the layer. * \param layer_name The name of the layer. You can use NAME_SELF_LAYER to @@ -568,7 +568,7 @@ typedef void (* ON_UNLOCK_CLIENT_REQ) (void); * \brief Sets to a function to lock a client request. * * \note Only available for the client of MiniGUI-Processes. - * + * * \sa ON_LOCK_CLIENT_REQ */ extern MG_EXPORT ON_LOCK_CLIENT_REQ OnLockClientReq; @@ -578,7 +578,7 @@ extern MG_EXPORT ON_LOCK_CLIENT_REQ OnLockClientReq; * \brief Sets to a function to lock a client request. * * \note Only available for the client of MiniGUI-Processes. - * + * * \sa ON_TRYLOCK_CLIENT_REQ */ extern MG_EXPORT ON_TRYLOCK_CLIENT_REQ OnTrylockClientReq; @@ -587,7 +587,7 @@ extern MG_EXPORT ON_TRYLOCK_CLIENT_REQ OnTrylockClientReq; * \brief Sets to a function to unlock a client request. * * \note Only available for the client of MiniGUI-Processes. - * + * * \sa ON_UNLOCK_CLIENT_REQ */ extern MG_EXPORT ON_UNLOCK_CLIENT_REQ OnUnlockClientReq; @@ -611,13 +611,13 @@ typedef void (* ON_NEW_DEL_CLIENT) (int op, int cli); #define LCO_ACTIVE_CHANGED 6 /** - * \var typedef void (* ON_CHANGE_LAYER) (int op, + * \var typedef void (* ON_CHANGE_LAYER) (int op, MG_Layer* layer, MG_Client* client) * \brief Type of layer change event callback. * * \sa OnNewDelClient, OnChangeLayer */ -typedef void (* ON_CHANGE_LAYER) (int op, MG_Layer* layer, +typedef void (* ON_CHANGE_LAYER) (int op, MG_Layer* layer, MG_Client* client); #define ZNOP_ALLOCATE 1 @@ -644,11 +644,11 @@ typedef void (* ON_ZNODE_OPERATION) (int op, int cli, int idx_znode); /** * \var ON_NEW_DEL_CLIENT OnNewDelClient - * \brief Sets to a function to handle a comming in (going away) + * \brief Sets to a function to handle a comming in (going away) * connection of client. * * When a client is connecting to or disconnecting from the server, MiniGUI - * will call this function to tell you the event and the client identifier. + * will call this function to tell you the event and the client identifier. * The event could be one of the following: * * - LCO_NEW_CLIENT\n @@ -658,11 +658,11 @@ typedef void (* ON_ZNODE_OPERATION) (int op, int cli, int idx_znode); * * The event will be passed through the argument of \a op, and the client * identifier will be passed through the argument of \a cli. - * You can get the information of the client by accessing \a mgClients + * You can get the information of the client by accessing \a mgClients * with \a cli. * * \note Only available for the server of MiniGUI-Processes. - * + * * \sa ON_NEW_DEL_CLIENT, mgClients */ extern MG_EXPORT ON_NEW_DEL_CLIENT OnNewDelClient; @@ -671,7 +671,7 @@ extern MG_EXPORT ON_NEW_DEL_CLIENT OnNewDelClient; * \var ON_CHANGE_LAYER OnChangeLayer * \brief Sets to a function to handle events of layers. * - * When a layer is changing, MiniGUI will call this function to tell + * When a layer is changing, MiniGUI will call this function to tell * you the event and the layer or the client which leads to the event. * The event could be one of the following: * @@ -688,12 +688,12 @@ extern MG_EXPORT ON_NEW_DEL_CLIENT OnNewDelClient; * - LCO_ACTIVE_CHANGED\n * The active client changed, the client will be the active one. * - * The event will be passed through the argument of \a op, and the - * pointers to the relevant layer and client will be passed through + * The event will be passed through the argument of \a op, and the + * pointers to the relevant layer and client will be passed through * the argument of \a layer and \a client respectively. * * \note Only available for the server of MiniGUI-Processes. - * + * * \sa ON_NEW_DEL_CLIENT, mgClients */ extern MG_EXPORT ON_CHANGE_LAYER OnChangeLayer; @@ -702,8 +702,8 @@ extern MG_EXPORT ON_CHANGE_LAYER OnChangeLayer; * \var ON_ZNODE_OPERATION OnZNodeOperation * \brief Sets to a function to handle events of z-node. * - * After the server does an operation on a znode, MiniGUI will call - * this function to tell you the event and the layer, the client, and + * After the server does an operation on a znode, MiniGUI will call + * this function to tell you the event and the layer, the client, and * the z-node which leads to the event. * * The event could be one of the following: @@ -731,34 +731,34 @@ extern MG_EXPORT ON_CHANGE_LAYER OnChangeLayer; * - ZNOP_CHANGECAPTION\n * The caption of the z-node has changed. * - * The event will be passed through the argument of \a op; the - * pointers to the layer, the identifier of the client, and the index of - * the z-node will be passed through the argument of \a layer, \a cli, + * The event will be passed through the argument of \a op; the + * pointers to the layer, the identifier of the client, and the index of + * the z-node will be passed through the argument of \a layer, \a cli, * and \a idx_znode respectively. * * \note Only available for the server of MiniGUI-Processes. - * + * * \sa ON_ZNODE_OPERATION, ServerGetZNodeInfo, mgClients */ extern MG_EXPORT ON_ZNODE_OPERATION OnZNodeOperation; -/** +/** * \fn BOOL GUIAPI ServerStartup (int nr_globals,\ int def_nr_topmosts, int def_nr_normals) * \brief Initializes the server of MiniGUI-Processes. * - * This function initializes the server, i.e. \a mginit. It creates the - * shared resource, the listening socket, the default layer, and other - * internal objects. Your costomized \a mginit program should call + * This function initializes the server, i.e. \a mginit. It creates the + * shared resource, the listening socket, the default layer, and other + * internal objects. Your costomized \a mginit program should call * this function before calling any other function. * - * Note that the default layer created by the server called + * Note that the default layer created by the server called * "mginit" (NAME_DEF_LAYER). * * \param nr_globals The number of the global z-order nodes. All z-order nodes * created by mginit are global ones. - * \param def_nr_topmosts The maximal number of the topmost z-order nodes in - * the default layer. It is also the default number of topmost + * \param def_nr_topmosts The maximal number of the topmost z-order nodes in + * the default layer. It is also the default number of topmost * z-order nodes of a new layer. * \param def_nr_normals The maximal number of normal global z-order nodes in * the new layer. It is also the default number of normal @@ -771,23 +771,23 @@ extern MG_EXPORT ON_ZNODE_OPERATION OnZNodeOperation; MG_EXPORT BOOL GUIAPI ServerStartup (int nr_globals, int def_nr_topmosts, int def_nr_normals); -/** +/** * \fn MG_Layer* GUIAPI ServerCreateLayer (const char* layer_name,\ int max_nr_topmosts, int max_nr_normals) * \brief Create a new layer from the server. * * This function creates a new layer named by \a layer_name. - * You should specify the maximal number of topmost frame - * objects (max_nr_topmosts) and the maximal number of normal frame - * objects (max_nr_normals) in the new layer. Passing zero to - * max_nr_topmosts and max_nr_normals will use the default values, + * You should specify the maximal number of topmost frame + * objects (max_nr_topmosts) and the maximal number of normal frame + * objects (max_nr_normals) in the new layer. Passing zero to + * max_nr_topmosts and max_nr_normals will use the default values, * and the default values are specified by ServerStartup. * - * Note that the server will create a default layer named "mginit". + * Note that the server will create a default layer named "mginit". * - * \param layer_name The name of the layer. If there is already a layer + * \param layer_name The name of the layer. If there is already a layer * named \a layer_name, the function will return the pointer to the layer. - * \param max_nr_topmosts The maximal number of topmost z-order nodes in + * \param max_nr_topmosts The maximal number of topmost z-order nodes in * the new layer. * \param max_nr_normals The maximal number of normal z-order nodes in * the new layer. @@ -798,10 +798,10 @@ MG_EXPORT BOOL GUIAPI ServerStartup (int nr_globals, * * \sa ServerDeleteLayer, ServerStartup */ -MG_EXPORT MG_Layer* GUIAPI ServerCreateLayer (const char* layer_name, +MG_EXPORT MG_Layer* GUIAPI ServerCreateLayer (const char* layer_name, int max_nr_topmosts, int max_nr_normals); -/** +/** * \fn BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer) * \brief Sets topmost layer from the server. * @@ -817,7 +817,7 @@ MG_EXPORT MG_Layer* GUIAPI ServerCreateLayer (const char* layer_name, */ MG_EXPORT BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer); -/** +/** * \fn BOOL GUIAPI ServerDeleteLayer (MG_Layer* layer) * \brief Delete a layer from the server. * @@ -833,31 +833,31 @@ MG_EXPORT BOOL GUIAPI ServerSetTopmostLayer (MG_Layer* layer); */ MG_EXPORT BOOL GUIAPI ServerDeleteLayer (MG_Layer* layer); -/** +/** * \fn int GUIAPI ServerGetNextZNode (MG_Layer* layer, int idx_znode, \ * int* cli) * \brief Get the next z-node in the specified layer from the server. * - * This functions gets the next z-node in the specified layer \a layer from + * This functions gets the next z-node in the specified layer \a layer from * the server. * * \param layer The pointer to the layer, NULL for the current topmost layer. - * \param idx_znode The initial z-node. If the initial z-node index is - * less than or equal to zero, the function will return - * the index of the first z-node in the layer. - * \param cli The client identifier of the next znode will be returned + * \param idx_znode The initial z-node. If the initial z-node index is + * less than or equal to zero, the function will return + * the index of the first z-node in the layer. + * \param cli The client identifier of the next znode will be returned * through this pointer. NULL is okay. * - * \return The index of the next z-node. Zero when the next z-node is + * \return The index of the next z-node. Zero when the next z-node is * the last one; < 0 when error; * - * \note Server-only function. Note that this function will not return - * the z-node of the desktop, and the desktop always has the index + * \note Server-only function. Note that this function will not return + * the z-node of the desktop, and the desktop always has the index * of z-node zero. * * \sa ServerGetZNodeInfo */ -MG_EXPORT int GUIAPI ServerGetNextZNode (MG_Layer* layer, int idx_znode, +MG_EXPORT int GUIAPI ServerGetNextZNode (MG_Layer* layer, int idx_znode, int* cli); #define ZNIT_DESKTOP 0x50000000 @@ -884,11 +884,11 @@ typedef struct _ZNODEINFO { /** * The type of the znode, can be one of the following values: - * - ZNIT_GLOBAL_MAINWIN\n + * - ZNIT_GLOBAL_MAINWIN\n * a global main window. * - ZNIT_GLOBAL_TOOLWIN\n * a global tool window. - * - ZNIT_GLOBAL_CONTROL\n + * - ZNIT_GLOBAL_CONTROL\n * a global control with WS_EX_CTRLASMAINWIN style. * - ZNIT_TOPMOST_MAINWIN\n * a topmost main window. @@ -909,7 +909,7 @@ typedef struct _ZNODEINFO */ DWORD type; - /** + /** * The flags of the znode, can be OR'd with the following values: * - ZNIF_VISIBLE\n * a visible window. @@ -929,23 +929,23 @@ typedef struct _ZNODEINFO /** The window handle of the znode if it is a window. */ HWND hwnd; /** - * The window handle of the znode's main window if it is a control + * The window handle of the znode's main window if it is a control * with WS_EX_CTRLASMAINWIN style. */ HWND main_win; } ZNODEINFO; -/** +/** * \fn BOOL GUIAPI ServerGetZNodeInfo (MG_Layer* layer, int idx_znode, \ * ZNODEINFO* znode_info) * \brief Get the z-node information in the specified layer from the server. * - * This functions gets the z-node information in the specified layer \a layer + * This functions gets the z-node information in the specified layer \a layer * from the server. * * \param layer The pointer to the layer, NULL for the current topmost layer. * \param idx_znode The index of the znode. - * \param znode_info The information of the requested znode will be returned + * \param znode_info The information of the requested znode will be returned * through this structure. * * \return TRUE on success, otherwise FALSE. @@ -954,21 +954,21 @@ typedef struct _ZNODEINFO * * \sa ServerGetNextZNode, ZNODEINFO */ -MG_EXPORT BOOL GUIAPI ServerGetZNodeInfo (MG_Layer* layer, int idx_znode, +MG_EXPORT BOOL GUIAPI ServerGetZNodeInfo (MG_Layer* layer, int idx_znode, ZNODEINFO* znode_info); -/** +/** * \fn BOOL GUIAPI ServerDoZNodeOperation (MG_Layer* layer, int idx_znode, \ * int op_code, void* op_data, BOOL notify) - * \brief Does an operation on the z-node in the specified layer + * \brief Does an operation on the z-node in the specified layer * from the server. * - * This functions does an operation upon the z-node in the specified + * This functions does an operation upon the z-node in the specified * layer \a layer from the server. * * \param layer The pointer to the layer, NULL for the current topmost layer. * \param idx_znode The index of the znode. - * \param op_code The code of the operation, can be one of the following + * \param op_code The code of the operation, can be one of the following * values: * - ZNOP_MOVE2TOP\n * Move the znode to be the topmost one. @@ -976,7 +976,7 @@ MG_EXPORT BOOL GUIAPI ServerGetZNodeInfo (MG_Layer* layer, int idx_znode, * Set the znode to be the active one. * Note that the operation can be applied only for a main window. * \param op_data The data of the operation, used to pass the data need by - * the operation. For example, if the operation is moving the z-node, + * the operation. For example, if the operation is moving the z-node, * \a op_data will be a pointer to a RECT structure, which contains * the new position and size of the znode. Not used currently, reserved * for future use. @@ -984,15 +984,15 @@ MG_EXPORT BOOL GUIAPI ServerGetZNodeInfo (MG_Layer* layer, int idx_znode, * * \return TRUE on success, otherwise FALSE. * - * \note Server-only function, and the operation can be applied only for + * \note Server-only function, and the operation can be applied only for * a main window. * * \sa ServerGetZNodeInfo */ -MG_EXPORT BOOL GUIAPI ServerDoZNodeOperation (MG_Layer* layer, int idx_znode, +MG_EXPORT BOOL GUIAPI ServerDoZNodeOperation (MG_Layer* layer, int idx_znode, int op_code, void* op_data, BOOL notify); -/** +/** * \fn int GUIAPI GetClientByPID (int pid) * \brief Returns the client identifier from PID of a client. * @@ -1005,12 +1005,12 @@ MG_EXPORT BOOL GUIAPI ServerDoZNodeOperation (MG_Layer* layer, int idx_znode, */ MG_EXPORT int GUIAPI GetClientByPID (int pid); -/** +/** * \fn BOOL GUIAPI SetTopmostClient (int cli) * \brief Sets topmost layer by a client identifier. * - * This function sets the topmost layer by the specified client - * identifier \a cli. It will bring the layer contains the client + * This function sets the topmost layer by the specified client + * identifier \a cli. It will bring the layer contains the client * to be the topmost one. * * \param cli The identifier of the client. @@ -1041,23 +1041,23 @@ MG_EXPORT void GUIAPI UpdateTopmostLayer (const RECT* dirty_rc); /** * \defgroup lite_request_fns Simple request/reply interfaces - * - * You can register a customized request handler to extend your server, + * + * You can register a customized request handler to extend your server, * i.e. mginit, of MiniGUI-Processes. * - * A request consists of an identifier and the data associated with - * the request. The identifier is used by MiniGUI to determine which - * handler should be called when a request arrives. When MiniGUI - * finds one handler, it will call the handler and pass the socket + * A request consists of an identifier and the data associated with + * the request. The identifier is used by MiniGUI to determine which + * handler should be called when a request arrives. When MiniGUI + * finds one handler, it will call the handler and pass the socket * fd connected to the client, the data associated with the request, - * and the length of the data. Eventually, the handler will sent the + * and the length of the data. Eventually, the handler will sent the * reply to the client. * - * After register a customized request handler in your server, you can call - * \a ClientRequest function in the client to send a request to the server - * and wait for the reply. On the other hand, the request handler in the - * server will receive the request and call \a ServerSendReply to send the - * reply to the client. In this way, you can create a simple IPC + * After register a customized request handler in your server, you can call + * \a ClientRequest function in the client to send a request to the server + * and wait for the reply. On the other hand, the request handler in the + * server will receive the request and call \a ServerSendReply to send the + * reply to the client. In this way, you can create a simple IPC * (inter-process conmmunication) mechanism between clients and the server. * * Example: @@ -1095,15 +1095,15 @@ typedef struct _REQUEST { /** Data type of pointer to a REQUEST */ typedef REQUEST* PREQUEST; -/** - * \fn int ClientRequestEx (const REQUEST* request, const void* ex_data, +/** + * \fn int ClientRequestEx (const REQUEST* request, const void* ex_data, int ex_data_len, void* result, int len_rslt) * \brief Sends a request to the server and wait reply. * - * If \a result is NULL or \a len_rslt is zero, the function will return + * If \a result is NULL or \a len_rslt is zero, the function will return * immediately after sent the data to the server. * - * \param request The pointer to REQUEST, which contains the data of + * \param request The pointer to REQUEST, which contains the data of * the request. * \param ex_data The pointer to extra data to be sent to the server. * \param ex_data_len The length of the extra data in bytes. @@ -1112,47 +1112,47 @@ typedef REQUEST* PREQUEST; * * \return Zero on success, no-zero on error. * - * \note Only used by clients to send a request to the server of + * \note Only used by clients to send a request to the server of * MiniGUI-Processes. * * \sa ServerSendReply */ -MG_EXPORT int GUIAPI ClientRequestEx (const REQUEST* request, const void* ex_data, +MG_EXPORT int GUIAPI ClientRequestEx (const REQUEST* request, const void* ex_data, int ex_data_len, void* result, int len_rslt); -/** +/** * \fn int ClientRequest (const REQUEST* request, void* result, int len_rslt) * \brief Sends a request to the server and wait reply. * - * If \a result is NULL or \a len_rslt is zero, the function will return + * If \a result is NULL or \a len_rslt is zero, the function will return * immediately after sent the data to the server. * * This function is a simplified version of ClientRequestEx, i.e. * there is no extra data to be sent. * - * \param request The pointer to REQUEST, which contains the data of + * \param request The pointer to REQUEST, which contains the data of * the request. * \param result The buffer receives the reply. * \param len_rslt The lenght of the buffer. * * \return Zero on success, no-zero on error. * - * \note Only used by clients to send a request to the server of + * \note Only used by clients to send a request to the server of * MiniGUI-Processes. * * \sa ClientRequestEx, ServerSendReply */ -static inline int ClientRequest (const REQUEST* request, +static inline int ClientRequest (const REQUEST* request, void* result, int len_rslt) { return ClientRequestEx (request, NULL, 0, result, len_rslt); } -/** +/** * \fn int GUIAPI GetSockFD2Server (void) * \brief Gets the file descriptor of the socket connected to the server. * - * This function returns the file descriptor of the socket connected + * This function returns the file descriptor of the socket connected * to the server, i.e. mginit. * * \return The file descriptor of the socket connected to the server. @@ -1161,11 +1161,11 @@ static inline int ClientRequest (const REQUEST* request, */ MG_EXPORT int GUIAPI GetSockFD2Server (void); -/** +/** * \fn int GUIAPI ServerSendReply (int clifd, const void* reply, int len) * \brief Sends the reply to the client. * - * This function sends a replay pointed to by \a reply which is + * This function sends a replay pointed to by \a reply which is * \a len bytes long to the client. * * \note Only used by the server to send the reply to the client. @@ -1188,31 +1188,31 @@ MG_EXPORT int GUIAPI ServerSendReply (int clifd, const void* reply, int len); */ typedef int (* REQ_HANDLER) (int cli, int clifd, void* buff, size_t len); -/** +/** * \fn BOOL GUIAPI RegisterRequestHandler (int req_id, REQ_HANDLER your_handler) * \brief Registers a customize request handler. * * This function registers a request handler to the server, i.e. \a mginit. * * \param req_id The identifier of the customized request. - * \param your_handler The handler of the request. + * \param your_handler The handler of the request. * Being NULL to unregister the request handler. * * \return TRUE on success, FALSE on error. * * \note Only used by the server to register a request handler. - * And the identifier should be larger than \a MAX_SYS_REQID and + * And the identifier should be larger than \a MAX_SYS_REQID and * less than or equal to \a MAX_REQID. * * \sa ClientRequest, ServerSendReply, MAX_SYS_REQID, MAX_REQID */ MG_EXPORT BOOL GUIAPI RegisterRequestHandler (int req_id, REQ_HANDLER your_handler); -/** +/** * \fn EQ_HANDLER GUIAPI GetRequestHandler (int req_id) * \brief Gets the request handler by request identifier. * - * This function returns the request handler of the specified request + * This function returns the request handler of the specified request * identifier \a req_id. * * \param req_id The request identifier. @@ -1247,16 +1247,16 @@ MG_EXPORT REQ_HANDLER GUIAPI GetRequestHandler (int req_id); * \fn int serv_listen (const char* name) * \brief Creates a listen socket. * - * This function is used by the server to create a listening socket. - * Any MiniGUI-Processes application can call this function to create a - * listening socket. The server, i.e. \a mginit, of MiniGUI-Processes uses - * this function to create its listening socket, and named the socket + * This function is used by the server to create a listening socket. + * Any MiniGUI-Processes application can call this function to create a + * listening socket. The server, i.e. \a mginit, of MiniGUI-Processes uses + * this function to create its listening socket, and named the socket * to '/var/tmp/minigui'. * * \param name The path name of the listening socket. * \return The file discriptor of the listening socket created, -1 on error. * - * \note As a convention, you should located the socket in '/var/tmp/' + * \note As a convention, you should located the socket in '/var/tmp/' * directory. */ MG_EXPORT int serv_listen (const char* name); @@ -1267,15 +1267,15 @@ MG_EXPORT int serv_listen (const char* name); * * This function is used by the server to wait a connection and accept it. * - * After creating a listening socket by calling \a serv_listen, you can - * call this function to create a connection with a client. We also obtain - * the client's PID and UID from the pathname that it must bind before + * After creating a listening socket by calling \a serv_listen, you can + * call this function to create a connection with a client. We also obtain + * the client's PID and UID from the pathname that it must bind before * calling us. * * \param listenfd The fd of listen socket. - * \param pidptr The client PID will be saved to this buffer when this + * \param pidptr The client PID will be saved to this buffer when this * function returns. - * \param uidptr The client UID will be saved to this buffer when this + * \param uidptr The client UID will be saved to this buffer when this * function returns. * * \return The new connected fd if all OK, < 0 on error. @@ -1294,11 +1294,11 @@ MG_EXPORT int serv_accept (int listenfd, pid_t *pidptr, uid_t *uidptr); * and with name of '/var/tmp/xxxxx-c', where 'xxxxx' is the pid of client. * and 'c' is a character to distinguish different projects. * - * Note that MiniGUI itself uses 'a' as the project character to + * Note that MiniGUI itself uses 'a' as the project character to * create socket between 'mginit' and clients. * * \param name The name of the well-known listen socket (created by server). - * \param project A character to distinguish different projects + * \param project A character to distinguish different projects * (Do \em NOT use 'a'). * \return The new connected fd if all OK, < 0 on error. * @@ -1314,18 +1314,18 @@ MG_EXPORT int cli_conn (const char* name, char project); /** * \fn int sock_write_t (int fd, const void* buff,\ - int count, unsigned int timeout) + int count, unsigned int timeout) * \brief Writes data to socket. * - * This function writes the data block pointed to by \a buff + * This function writes the data block pointed to by \a buff * which is \a count bytes long to the socket \a fd. * * \param fd The file descriptor of the socket. * \param buff The buffer contains the data. * \param count The length in bytes of the buffer. - * \param timeout An upper bound on the amount of time elapsed before - * \a sock_write_t returns. When it is zero, \a sock_write_t can - * block indefinitely. The timeout value is in tick count, and + * \param timeout An upper bound on the amount of time elapsed before + * \a sock_write_t returns. When it is zero, \a sock_write_t can + * block indefinitely. The timeout value is in tick count, and * tick count of MiniGUI is in unit of 10 milliseconds. * \return SOCKERR_OK if all OK, < 0 on error. * @@ -1335,12 +1335,12 @@ MG_EXPORT int cli_conn (const char* name, char project); * \retval SOCKERR_INVARG You passed invalid arguments. * \retval SOCKERR_TIMEOUT Timeout. * - * \note The \a timeout only goes into effect when this function called - * by the server of MiniGUI-Processes, i.e. \a mginit. + * \note The \a timeout only goes into effect when this function called + * by the server of MiniGUI-Processes, i.e. \a mginit. * * \sa sock_read_t */ -MG_EXPORT int sock_write_t (int fd, const void* buff, +MG_EXPORT int sock_write_t (int fd, const void* buff, int count, unsigned int timeout); /** @@ -1353,8 +1353,8 @@ MG_EXPORT int sock_write_t (int fd, const void* buff, * \param fd The file descriptor of the socket. * \param buff The buffer used to save the data. * \param count The length in bytes of the buffer. - * \param timeout An upper bound on the amount of time elapsed before - * \a sock_read_t returns. When it is zero, \a sock_read_t can + * \param timeout An upper bound on the amount of time elapsed before + * \a sock_read_t returns. When it is zero, \a sock_read_t can * block indefinitely. The timeout value is in the tick count of MiniGUI, * and tick count of MiniGUI is in unit of 10 milliseconds. * \return SOCKERR_OK if all OK, < 0 on error. @@ -1365,8 +1365,8 @@ MG_EXPORT int sock_write_t (int fd, const void* buff, * \retval SOCKERR_INVARG You passed invalid arguments. * \retval SOCKERR_TIMEOUT Timeout. * - * \note The \a timeout only goes into effect when this function called - * by the server of MiniGUI-Processes, i.e. \a mginit. + * \note The \a timeout only goes into effect when this function called + * by the server of MiniGUI-Processes, i.e. \a mginit. * * \sa sock_write_t */ @@ -1400,7 +1400,7 @@ MG_EXPORT int sock_read_t (int fd, void* buff, int count, unsigned int timeout); * \defgroup init_fns Initialization and termination functions * * Normally, the only entry of any MiniGUI application is \a MiniGUIMain. - * The application will terminate when you call \a exit(3) or just + * The application will terminate when you call \a exit(3) or just * return from \a MiniGUIMain. * * Example 1: @@ -1449,7 +1449,7 @@ MG_EXPORT BOOL GUIAPI ReinitDesktopEx (BOOL init_sys_text); * \brief Exits your MiniGUI application safely. * * Calling this function will terminate your MiniGUI application. This - * function will restore console attributes and call \a exit() function and + * function will restore console attributes and call \a exit() function and * pass \a exitcode to it. * * \param exitcode The exit status will be passed to exit(3) function. @@ -1471,10 +1471,10 @@ MG_EXPORT void GUIAPI ExitGUISafely (int exitcode); * \def MiniGUIMain * \brief The main entry of a MiniGUI application. * - * This function should be defined by your application. Before Version 1.6.1, - * MiniGUI defines \a main() function in libminigui library for your - * application, and call \a MiniGUIMain() in this \a main() function. - * The \a main() defined by MiniGUI is responsible of initializing and + * This function should be defined by your application. Before Version 1.6.1, + * MiniGUI defines \a main() function in libminigui library for your + * application, and call \a MiniGUIMain() in this \a main() function. + * The \a main() defined by MiniGUI is responsible of initializing and * terminating MiniGUI. * * After version 1.6.1, MiniGUI defines MiniGUIMain as a macro. @@ -1507,29 +1507,29 @@ int MiniGUIAppMain /** Desktop operation set */ typedef struct _DESKTOPOPS { - + /** called when starting a new session, and return a context */ void* (*init) (void); - + /** called when terminating a seesion */ void (*deinit) (void* context); - + /** called when the desktop should be repainted */ - void (*paint_desktop) (void* context, + void (*paint_desktop) (void* context, HDC dc_desktop, const RECT* inv_rc); - + /** the keyboard event handler for the desktop */ - void (*keyboard_handler) (void* context, + void (*keyboard_handler) (void* context, int message, WPARAM wParam, LPARAM lParam); - + /** the mouse event handler for the desktop */ - void (*mouse_handler) (void* context, + void (*mouse_handler) (void* context, int message, WPARAM wParam, LPARAM lParam); - + /** the desktop menu customizer */ - void (*customize_desktop_menu) (void* context, + void (*customize_desktop_menu) (void* context, HMENU hmenu, int start_pos); - + /** the desktop menu command handler */ void (*desktop_menucmd_handler) (void* context, int id); } DESKTOPOPS; @@ -1599,9 +1599,9 @@ typedef struct _DESKTOPOPS { * \endcode * * \sa DESKTOPOPS - * + * */ -MG_EXPORT DESKTOPOPS* GUIAPI SetCustomDesktopOperationSet +MG_EXPORT DESKTOPOPS* GUIAPI SetCustomDesktopOperationSet (DESKTOPOPS* usr_dsk_ops); /** @@ -1633,13 +1633,13 @@ MG_EXPORT void GUIAPI DesktopUpdateAllWindow (void); * This function set the parameters for doing mouse calibration. * You should pass five source points and five destination points. * - * Normally, the points should be the upper-left, upper-right, lower-right, - * lower-left, and center points on the touch panel. The source point is - * the coordinates before calibrating, and the destination point is the + * Normally, the points should be the upper-left, upper-right, lower-right, + * lower-left, and center points on the touch panel. The source point is + * the coordinates before calibrating, and the destination point is the * desired coordinates after calibrating. * - * This function will try to evaluate a matrix to calibrate. If the points - * are okay, MiniGUI will do the calibration after getting a point from the + * This function will try to evaluate a matrix to calibrate. If the points + * are okay, MiniGUI will do the calibration after getting a point from the * underlay IAL engine. * * \param src_pts The pointer to an array of five source points. @@ -1647,33 +1647,33 @@ MG_EXPORT void GUIAPI DesktopUpdateAllWindow (void); * * \return TRUE for success, FALSE for bad arguments. * - * \note This function is available when _MGHAVE_MOUSECALIBRATE + * \note This function is available when _MGHAVE_MOUSECALIBRATE * (option: --enable-mousecalibrate) defined. * \note Only call this function in MiniGUI-Standalone, MiniGUI-Threads, * and the server (mginit) of MiniGUI-Processes. The behavior of this - * function will be undefined if you call it in a client of + * function will be undefined if you call it in a client of * MiniGUI-Processes. */ -MG_EXPORT BOOL GUIAPI SetMouseCalibrationParameters (const POINT* src_pts, +MG_EXPORT BOOL GUIAPI SetMouseCalibrationParameters (const POINT* src_pts, const POINT* dst_pts); /** * \fn void GUIAPI GetOriginalMousePosition (int* x, int* y) * \brief Gets the original mouse position. * - * \param x The pointer used to return the x coordinate of original mouse + * \param x The pointer used to return the x coordinate of original mouse * position. - * \param y The pointer used to return the y coordinate of original mouse + * \param y The pointer used to return the y coordinate of original mouse * position. * * \return none. * - * \note This function is available when _MGHAVE_MOUSECALIBRATE + * \note This function is available when _MGHAVE_MOUSECALIBRATE * (option: --enable-mousecalibrate) defined. * * \note Only call this function in MiniGUI-Standalone, MiniGUI-Threads, * and the server (mginit) of MiniGUI-Processes. The behavior of this - * function will be undefined if you call it in a client of + * function will be undefined if you call it in a client of * MiniGUI-Processes. */ MG_EXPORT void GUIAPI GetOriginalMousePosition (int* x, int* y); @@ -1692,15 +1692,15 @@ MG_EXPORT void GUIAPI GetOriginalMousePosition (int* x, int* y); * \fn HWND GUIAPI OpenAboutDialog (void) * \brief Opens or actives the 'About MiniGUI' dialog. * - * Calling this function will create a main window displaying - * copyright and license information of MiniGUI. When the about dialog - * is displaying, calling this function again will bring the dialog to be + * Calling this function will create a main window displaying + * copyright and license information of MiniGUI. When the about dialog + * is displaying, calling this function again will bring the dialog to be * the topmost main window, not create a new one. * * \return The handle to the about dialog box. * - * \note This function is available for MiniGUI-Threads and when - * _MGMISC_ABOUTDLG defined. For MiniGUI-Processes, you should + * \note This function is available for MiniGUI-Threads and when + * _MGMISC_ABOUTDLG defined. For MiniGUI-Processes, you should * call 'void GUIAPI OpenAboutDialog (HWND hHosting)' function instead. */ MG_EXPORT void GUIAPI OpenAboutDialog (void); @@ -1710,17 +1710,17 @@ MG_EXPORT void GUIAPI OpenAboutDialog (void); * \fn HWND GUIAPI OpenAboutDialog (HWND hHosting) * \brief Opens or actives the 'About MiniGUI' dialog. * - * Calling this function will create a main window displaying - * copyright and license information of MiniGUI. When the about dialog - * is displaying, calling this function again will bring the dialog to be + * Calling this function will create a main window displaying + * copyright and license information of MiniGUI. When the about dialog + * is displaying, calling this function again will bring the dialog to be * the topmost main window, not create a new one. * * \param hHosting The hosting main window of the about dialog. * * \return The handle to the about dialog box. * - * \note This function is available for MiniGUI-Processes and when - * _MGMISC_ABOUTDLG defined. For MiniGUI-Threads, you should + * \note This function is available for MiniGUI-Processes and when + * _MGMISC_ABOUTDLG defined. For MiniGUI-Threads, you should * call 'void GUIAPI OpenAboutDialog (void)' function instead. */ MG_EXPORT HWND GUIAPI OpenAboutDialog (HWND hHosting); @@ -1732,8 +1732,8 @@ MG_EXPORT HWND GUIAPI OpenAboutDialog (HWND hHosting); /** * \defgroup etc_fns Configuration file operations * - * The configuration file used by MiniGUI have a similiar format as - * M$ Windows INI file, i.e. the file consists of sections, and + * The configuration file used by MiniGUI have a similiar format as + * M$ Windows INI file, i.e. the file consists of sections, and * the section consists of key-value pairs, like this: * * \code @@ -1746,17 +1746,17 @@ MG_EXPORT HWND GUIAPI OpenAboutDialog (HWND hHosting); * * mdev=/dev/mouse * mtype=PS2 - * + * * [fbcon] * defaultmode=1024x768-16bpp - * + * * [qvfb] * defaultmode=640x480-16bpp * display=0 * \endcode * - * Assume that the configuration file named \a my.cfg, if you want get - * the value of \a mdev in \a system section, you can call + * Assume that the configuration file named \a my.cfg, if you want get + * the value of \a mdev in \a system section, you can call * \a GetValueFromEtcFile in the following way: * * \code @@ -1828,15 +1828,15 @@ MG_EXPORT HWND GUIAPI OpenAboutDialog (HWND hHosting); typedef struct _ETCSECTION { /** Allocated number of keys */ - int key_nr_alloc; + int key_nr_alloc; /** Key number in the section */ - int key_nr; + int key_nr; /** Name of the section */ - char *name; + char *name; /** Array of keys */ - char** keys; + char** keys; /** Array of values */ - char** values; + char** values; } ETCSECTION; /** Data type of pointer to a ETCSECTION */ typedef ETCSECTION* PETCSECTION; @@ -1845,11 +1845,11 @@ typedef ETCSECTION* PETCSECTION; typedef struct _ETC_S { /** Allocated number of sections */ - int sect_nr_alloc; + int sect_nr_alloc; /** Number of sections */ - int section_nr; + int section_nr; /** Pointer to section arrays */ - PETCSECTION sections; + PETCSECTION sections; } ETC_S; #ifndef _MGINCORE_RES @@ -1862,11 +1862,11 @@ typedef struct _ETC_S * /usr/local/etc or your home directory. When you install it in your * home directory, the name should be ".MiniGUI.cfg". * - * MiniGUI will try to use MiniGUI.cfg in the current directory, - * \a ~/.MiniGUI.cfg, then \a /usr/local/etc/MiniGUI.cfg, and + * MiniGUI will try to use MiniGUI.cfg in the current directory, + * \a ~/.MiniGUI.cfg, then \a /usr/local/etc/MiniGUI.cfg, and * \a /etc/MiniGUI.cfg last. * - * If MiniGUI can not find any \a MiniGUI.cfg file, or find a bad + * If MiniGUI can not find any \a MiniGUI.cfg file, or find a bad * formated configure file, the initialzation of MiniGUI will be canceled. */ extern MG_EXPORT char ETCFILEPATH []; @@ -1878,9 +1878,9 @@ extern MG_EXPORT char ETCFILEPATH []; const char* pSection, const char* pKey, char* pValue, int iLen) * \brief Gets value from a configuration file. * - * This function gets the value of the key \a pKey in the section \a pSection + * This function gets the value of the key \a pKey in the section \a pSection * of the configuration file \a pEtcFile, and saves the value to the buffer - * pointed to by \a pValue. + * pointed to by \a pValue. * * \param pEtcFile The path name of the configuration file. * \param pSection The section name in which the value located. @@ -1892,18 +1892,18 @@ extern MG_EXPORT char ETCFILEPATH []; * * \retval ETC_OK Gets value successfullly. * \retval ETC_FILENOTFOUND Can not find the specified configuration file. - * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the + * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the * configuration file. * \retval ETC_KEYNOTFOUND Can not find the specified key in the section. * \retval ETC_FILEIOFAILED File I/O operation error occurred. * - * \note MiniGUI use \a strncpy to copy actual value to \a pValue. Thus, - * if the length of the actual value is larger than \a iLen, the + * \note MiniGUI use \a strncpy to copy actual value to \a pValue. Thus, + * if the length of the actual value is larger than \a iLen, the * result copied to \a pValue will \em NOT be null-terminated. * * \sa GetIntValueFromEtcFile, SetValueToEtcFile, strncpy(3) */ -MG_EXPORT int GUIAPI GetValueFromEtcFile (const char* pEtcFile, +MG_EXPORT int GUIAPI GetValueFromEtcFile (const char* pEtcFile, const char* pSection, const char* pKey, char* pValue, int iLen); /** @@ -1911,9 +1911,9 @@ MG_EXPORT int GUIAPI GetValueFromEtcFile (const char* pEtcFile, const char* pSection, const char* pKey, int* value) * \brief Gets integer value from a configuration file. * - * This function gets the integer value of the key \a pKey in the section - * \a pSection of the configuration file \a pEtcFile, and returns the - * integer value through the buffer pointed to by \a value. + * This function gets the integer value of the key \a pKey in the section + * \a pSection of the configuration file \a pEtcFile, and returns the + * integer value through the buffer pointed to by \a value. * * \param pEtcFile The path name of the configuration file. * \param pSection The section name in which the value located. @@ -1924,14 +1924,14 @@ MG_EXPORT int GUIAPI GetValueFromEtcFile (const char* pEtcFile, * * \retval ETC_OK Gets value successfullly. * \retval ETC_FILENOTFOUND Can not find the specified configuration file. - * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the + * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the * configuration file. * \retval ETC_KEYNOTFOUND Can not find the specified key in the section. * \retval ETC_FILEIOFAILED File I/O operation error occurred. * \retval ETC_INTCONV Can not convert the value string to an integer. * - * \note MiniGUI uses \a strtol to convert the string value to an integer, - * and pass the base as 0. Thus, the valid string value can be + * \note MiniGUI uses \a strtol to convert the string value to an integer, + * and pass the base as 0. Thus, the valid string value can be * converted to integer should be in the following forms: * * - [+|-]0x[0-9|A-F]*\n @@ -1943,7 +1943,7 @@ MG_EXPORT int GUIAPI GetValueFromEtcFile (const char* pEtcFile, * * \sa GetValueFromEtcFile, SetValueToEtcFile, strtol(3) */ -MG_EXPORT int GUIAPI GetIntValueFromEtcFile (const char* pEtcFile, +MG_EXPORT int GUIAPI GetIntValueFromEtcFile (const char* pEtcFile, const char* pSection, const char* pKey, int* value); /** @@ -1952,7 +1952,7 @@ MG_EXPORT int GUIAPI GetIntValueFromEtcFile (const char* pEtcFile, * \brief Sets a value in a configuration file. * * This function sets the value of the key \a pKey in the section \a pSection - * of the configuration file \a pEtcFile to be the string pointed to by + * of the configuration file \a pEtcFile to be the string pointed to by * \a pValue. * * \param pEtcFile The path name of the configuration file. @@ -1966,12 +1966,12 @@ MG_EXPORT int GUIAPI GetIntValueFromEtcFile (const char* pEtcFile, * \retval ETC_FILEIOFAILED File I/O operation error occurred. * \retval ETC_TMPFILEFAILED Can not create temporary file. * - * \note If the specified configuration file does not exist, + * \note If the specified configuration file does not exist, * MiniGUI will try to create this file. * * \sa GetValueFromEtcFile, GetIntValueFromEtcFile */ -MG_EXPORT int GUIAPI SetValueToEtcFile (const char* pEtcFile, +MG_EXPORT int GUIAPI SetValueToEtcFile (const char* pEtcFile, const char* pSection, const char* pKey, char* pValue); /** @@ -1989,12 +1989,12 @@ MG_EXPORT int GUIAPI SetValueToEtcFile (const char* pEtcFile, * * \retval ETC_OK Gets value successfullly. * \retval ETC_FILEIOFAILED File I/O operation error occurred. - * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the + * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the * etc object. * * \sa RemoveSectionInEtc */ -MG_EXPORT int GUIAPI RemoveSectionInEtcFile (const char* pEtcFile, +MG_EXPORT int GUIAPI RemoveSectionInEtcFile (const char* pEtcFile, const char* pSection); /** @@ -2012,10 +2012,10 @@ MG_EXPORT int GUIAPI RemoveSectionInEtcFile (const char* pEtcFile, * * \retval ETC_OK Gets value successfullly. * \retval ETC_FILEIOFAILED File I/O operation error occurred. - * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the + * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the * etc object. */ -MG_EXPORT int GUIAPI SaveSectionToEtcFile (const char* pEtcFile, +MG_EXPORT int GUIAPI SaveSectionToEtcFile (const char* pEtcFile, PETCSECTION psect); /** * \fn GHANDLE GUIAPI LoadEtcFile (const char * pEtcFile) @@ -2056,7 +2056,7 @@ MG_EXPORT int GUIAPI SaveEtcToFile (GHANDLE hEtc, const char* file_name); * \fn GUIAPI UnloadEtcFile (GHANDLE hEtc) * \brief Unloads an etc file. * - * This function unloads the etc object generated by using \sa LoadEtcFile + * This function unloads the etc object generated by using \sa LoadEtcFile * function. * * \param hEtc Handle of the etc object. @@ -2073,9 +2073,9 @@ MG_EXPORT int GUIAPI UnloadEtcFile (GHANDLE hEtc); * \brief Gets value from a configuration etc object. * * This function gets value from an etc object, similar to GetValueFromEtcFile. - * This function gets the value of the key \a pKey in the section \a pSection - * of the etc object \a hEtc, and saves the value to the buffer pointed to - * by \a pValue. + * This function gets the value of the key \a pKey in the section \a pSection + * of the etc object \a hEtc, and saves the value to the buffer pointed to + * by \a pValue. * * \param hEtc Handle to the etc object. * \param pSection The section name in which the value located. @@ -2088,14 +2088,14 @@ MG_EXPORT int GUIAPI UnloadEtcFile (GHANDLE hEtc); * * \retval ETC_OK Gets value successfullly. * \retval ETC_INVALIDOBJ Invalid etc object. - * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the + * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the * configuration file. * \retval ETC_KEYNOTFOUND Can not find the specified key in the section. * \retval ETC_READONLYOBJ The etc object is read-only. * * \sa GetValueFromEtcFile, LoadEtcFile, UnloadEtcFile */ -MG_EXPORT int GUIAPI GetValueFromEtc (GHANDLE hEtc, const char* pSection, +MG_EXPORT int GUIAPI GetValueFromEtc (GHANDLE hEtc, const char* pSection, const char* pKey, char* pValue, int iLen); /** @@ -2113,7 +2113,7 @@ MG_EXPORT int GUIAPI GetIntValueFromEtc (GHANDLE hEtc, const char* pSection, const char* pKey, char* pValue) * \brief Sets the value in the etc object. * - * This fuctions sets the value in the etc object, somewhat similiar + * This fuctions sets the value in the etc object, somewhat similiar * to \sa SetValueToEtcFile. * * \sa SetValueToEtcFile, GetValueFromEtc @@ -2138,7 +2138,7 @@ MG_EXPORT int GUIAPI GetIntValueFromEtc (GHANDLE hEtc, const char* pSection, * * \sa GetValueFromEtcSec, GetIntValueFromEtcSec, SetValueInEtcSec */ -MG_EXPORT GHANDLE GUIAPI FindSectionInEtc (GHANDLE hEtc, +MG_EXPORT GHANDLE GUIAPI FindSectionInEtc (GHANDLE hEtc, const char* pSection, BOOL bCreateNew); /** @@ -2146,10 +2146,10 @@ MG_EXPORT GHANDLE GUIAPI FindSectionInEtc (GHANDLE hEtc, const char* pKey, char* pValue, int iLen) * \brief Gets value from an etc section object. * - * This function gets value from an etc section object, similar - * to GetValueFromEtc. It gets the value of the key \a pKey in the - * section \a hSect, and saves the value to the buffer pointed to - * by \a pValue. + * This function gets value from an etc section object, similar + * to GetValueFromEtc. It gets the value of the key \a pKey in the + * section \a hSect, and saves the value to the buffer pointed to + * by \a pValue. * * \param hSect The handle to the section. * \param pKey The key name of the value. @@ -2166,7 +2166,7 @@ MG_EXPORT GHANDLE GUIAPI FindSectionInEtc (GHANDLE hEtc, * * \sa GetValueFromEtcFile, GetValueFromEtc, FindSectionInEtc */ -MG_EXPORT int GUIAPI GetValueFromEtcSec (GHANDLE hSect, +MG_EXPORT int GUIAPI GetValueFromEtcSec (GHANDLE hSect, const char* pKey, char* pValue, int iLen); /** @@ -2174,10 +2174,10 @@ MG_EXPORT int GUIAPI GetValueFromEtcSec (GHANDLE hSect, const char* pKey, int* pValue) * \brief Gets an integer value from an etc section object. * - * This function gets an integer value from an etc section object, - * similar to GetIntValueFromEtc. It gets the value of the key \a pKey - * in the section \a hSect, and saves the value to the buffer pointed to - * by \a pValue. + * This function gets an integer value from an etc section object, + * similar to GetIntValueFromEtc. It gets the value of the key \a pKey + * in the section \a hSect, and saves the value to the buffer pointed to + * by \a pValue. * * \param hSect The handle to the section. * \param pKey The key name of the value. @@ -2192,7 +2192,7 @@ MG_EXPORT int GUIAPI GetValueFromEtcSec (GHANDLE hSect, * * \sa GetValueFromEtcFile, GetValueFromEtc, FindSectionInEtc */ -MG_EXPORT int GUIAPI GetIntValueFromEtcSec (GHANDLE hSect, +MG_EXPORT int GUIAPI GetIntValueFromEtcSec (GHANDLE hSect, const char* pKey, int* pValue); /** @@ -2200,12 +2200,12 @@ MG_EXPORT int GUIAPI GetIntValueFromEtcSec (GHANDLE hSect, const char* pKey, char* pValue) * \brief Sets the value in the etc section object. * - * This fuctions sets the value in the etc section object \a hSect, + * This fuctions sets the value in the etc section object \a hSect, * somewhat similiar to SetValueToEtc \sa SetValueToEtc. * * \sa GetValueFromEtc, FindSectionInEtc */ -MG_EXPORT int GUIAPI SetValueToEtcSec (GHANDLE hSect, +MG_EXPORT int GUIAPI SetValueToEtcSec (GHANDLE hSect, const char* pKey, char* pValue); /** @@ -2223,7 +2223,7 @@ MG_EXPORT int GUIAPI SetValueToEtcSec (GHANDLE hSect, * \retval ETC_OK Gets value successfullly. * \retval ETC_INVALIDOBJ Invalid etc object. * \retval ETC_READONLYOBJ The etc object is read-only. - * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the + * \retval ETC_SECTIONNOTFOUND Can not find the specified section in the * etc object. * * \sa RemoveSectionInEtcFile @@ -2235,15 +2235,15 @@ extern MG_EXPORT GHANDLE hMgEtc; /** * \fn static inline int GetMgEtcValue(const char* pSection,\ - const char *pKey, char *pValue, int iLen) - * \brief Gets value from MiniGUI configuration etc object + const char *pKey, char *pValue, int iLen) + * \brief Gets value from MiniGUI configuration etc object * - * This fuctions gets the value from MiniGUi configuration etc object, - * somewhat similiar to GetValueFromEtcFile and GetValueFromEtc + * This fuctions gets the value from MiniGUi configuration etc object, + * somewhat similiar to GetValueFromEtcFile and GetValueFromEtc * \sa GetValueFromEtcFile \sa GetValueFromEtc. */ -static inline int GetMgEtcValue(const char* pSection, - const char *pKey, char *pValue, int iLen) +static inline int GetMgEtcValue(const char* pSection, + const char *pKey, char *pValue, int iLen) { #ifndef _MGINCORE_RES if (!hMgEtc) @@ -2262,7 +2262,7 @@ static inline int GetMgEtcValue(const char* pSection, * some what similiar to GetIntValueFromEtcFile and GetIntValueFromEtc * \sa GetIntValueFromEtcFile \sa GetIntValueFromEtc */ -static inline int GetMgEtcIntValue (const char *pSection, +static inline int GetMgEtcIntValue (const char *pSection, const char* pKey, int *value) { #ifndef _MGINCORE_RES @@ -2301,7 +2301,7 @@ static inline int GetMgEtcIntValue (const char *pSection, /** * \def CBERR_OK -* \brief Operate clipboard success. +* \brief Operate clipboard success. * \sa CreateClipBoard **/ #define CBERR_OK 0 @@ -2313,19 +2313,19 @@ static inline int GetMgEtcIntValue (const char *pSection, #define CBERR_BADNAME 1 /** * \def CBERR_NOMEM -* \brief No enough memory to clipboard. +* \brief No enough memory to clipboard. * \sa CreateClipBoard **/ #define CBERR_NOMEM 2 /** * \def CBOP_NORMAL -* \brief Overwrite operation to clipboard. +* \brief Overwrite operation to clipboard. **/ #define CBOP_NORMAL 0 /** * \def CBOP_APPEND -* \brief Append the new data to clipboarda after the old data. +* \brief Append the new data to clipboarda after the old data. **/ #define CBOP_APPEND 1 @@ -2373,7 +2373,7 @@ MG_EXPORT int GUIAPI DestroyClipBoard (const char* cb_name); * \param cb_name The name of the clipboard. * \param data The pointer to the data. * \param n The length of the data. - * \param cbop Type of clipboard operations, can be one of + * \param cbop Type of clipboard operations, can be one of * the following values: * - CBOP_NORMAL\n * Overwrite the old data. @@ -2386,7 +2386,7 @@ MG_EXPORT int GUIAPI DestroyClipBoard (const char* cb_name); * * \sa GetClipBoardDataLen, GetClipBoardData */ -MG_EXPORT int GUIAPI SetClipBoardData (const char* cb_name, +MG_EXPORT int GUIAPI SetClipBoardData (const char* cb_name, void* data, size_t n, int cbop); /** @@ -2418,7 +2418,7 @@ MG_EXPORT size_t GUIAPI GetClipBoardDataLen (const char* cb_name); * * \sa GetClipBoardByte */ -MG_EXPORT size_t GUIAPI GetClipBoardData (const char* cb_name, +MG_EXPORT size_t GUIAPI GetClipBoardData (const char* cb_name, void* data, size_t n); /** @@ -2438,7 +2438,7 @@ MG_EXPORT size_t GUIAPI GetClipBoardData (const char* cb_name, * * \sa GetClipBoardData */ -MG_EXPORT int GUIAPI GetClipBoardByte (const char* cb_name, +MG_EXPORT int GUIAPI GetClipBoardByte (const char* cb_name, int index, unsigned char* byte); /** @} end of clipboard_fns */ @@ -2474,7 +2474,7 @@ MG_EXPORT void GUIAPI Ping (void); * \param frequency_hz The frequency of the tone in hertz. * \param duration_ms The duration of the tone in millisecond. * - * \bug When MiniGUI runs on X Window or RTOS, the tone can not be played + * \bug When MiniGUI runs on X Window or RTOS, the tone can not be played * correctly. * * \sa Ping @@ -2483,7 +2483,7 @@ MG_EXPORT void GUIAPI Tone (int frequency_hz, int duration_ms); /** * \fn void* GUIAPI GetOriginalTermIO (void) - * \brief Gets \a termios structure of the original terminal before + * \brief Gets \a termios structure of the original terminal before * initializing MiniGUI. * * \return The pointer to the original \a termios structure. @@ -2496,8 +2496,8 @@ MG_EXPORT void* GUIAPI GetOriginalTermIO (void); * \defgroup fixed_str Length-Fixed string operations * * MiniGUI maintains a private heap for length-fixed strings, and allocates - * length-fixed strings from this heap for window caption, menu item text, - * and so on. You can also use this private heap to allocate length-fixed + * length-fixed strings from this heap for window caption, menu item text, + * and so on. You can also use this private heap to allocate length-fixed * strings. * * \include fixstr.c @@ -2510,11 +2510,11 @@ MG_EXPORT void* GUIAPI GetOriginalTermIO (void); * \brief Allocates a buffer for a length-fixed string. * * This function allocates a buffer from the length-fixed string heap - * for a string which is \a len bytes long (does not include the null - * character of the string). + * for a string which is \a len bytes long (does not include the null + * character of the string). * - * \note You can change the content of the string, but do not change the - * length of this string (shorter is valid) via \a strcat function or + * \note You can change the content of the string, but do not change the + * length of this string (shorter is valid) via \a strcat function or * other equivalent functions or operations. * * \param len The length of the string. @@ -2532,8 +2532,8 @@ MG_EXPORT char* GUIAPI FixStrAlloc (int len); * This function allocates a buffer from the length-fixed string heap * and copy the string \a str to the buffer. * - * \note You can change the content of the string, but do not change the - * length of this string (shorter is valid) via \a strcat function or + * \note You can change the content of the string, but do not change the + * length of this string (shorter is valid) via \a strcat function or * other equivalent functions or operations. * * \param str The pointer to the string will be duplicated. @@ -2575,8 +2575,8 @@ static inline void do_nothing (void) { return; } * \fn HCURSOR GUIAPI LoadCursorFromFile (const char* filename) * \brief Loads a cursor from a M$ Windows cursor file. * - * This function loads a cursor from M$ Windows *.cur file - * named \a filename and returns the handle to loaded cursor. + * This function loads a cursor from M$ Windows *.cur file + * named \a filename and returns the handle to loaded cursor. * The returned handle can be used by \a SetCursor to set new mouse cursor. * * \param filename The path name of the cursor file. @@ -2593,7 +2593,7 @@ MG_EXPORT HCURSOR GUIAPI LoadCursorFromFile (const char* filename); * \fn HCURSOR GUIAPI LoadCursorFromMem (const void* area) * \brief Loads a cursor from a memory area. * - * This function loads a cursor from a memory area pointed to by \a area. + * This function loads a cursor from a memory area pointed to by \a area. * The memory has the same layout as a M$ Windows CURSOR file. * The returned handle can be used by \a SetCursor to set new mouse cursor. * @@ -2612,11 +2612,11 @@ MG_EXPORT HCURSOR GUIAPI LoadCursorFromMem (const void* area); const BYTE* pANDBits, const BYTE* pXORBits, int colornum) * \brief Creates a cursor from memory data. * - * This function creates a cursor from memory data rather than cursor file. - * \a xhotspot and \a yhotspot specify the hotpot of the cursor, \a w - * and \a h are the width and the height of the cursor respectively. - * \a pANDBits and \a pXORBits are AND bitmask and XOR bitmask of the cursor. - * MiniGUI currently support mono-color cursor and 16-color cursor, \a colornum + * This function creates a cursor from memory data rather than cursor file. + * \a xhotspot and \a yhotspot specify the hotpot of the cursor, \a w + * and \a h are the width and the height of the cursor respectively. + * \a pANDBits and \a pXORBits are AND bitmask and XOR bitmask of the cursor. + * MiniGUI currently support mono-color cursor and 16-color cursor, \a colornum * specifies the cursor's color depth. For mono-color, it should be 1, and for * 16-color cursor, it should be 4. * @@ -2641,10 +2641,10 @@ MG_EXPORT HCURSOR GUIAPI CreateCursor (int xhotspot, int yhotspot, int w, int h, * * This function copies the specified cursor. * - * \param hcsr Handle to the cursor to be copied. + * \param hcsr Handle to the cursor to be copied. * - * \return If the function succeeds, the return value is the - * handle to the duplicate cursor. If the function fails, + * \return If the function succeeds, the return value is the + * handle to the duplicate cursor. If the function fails, * the return value is 0. */ MG_EXPORT HCURSOR GUIAPI CopyCursor (HCURSOR hcsr); @@ -2668,7 +2668,7 @@ MG_EXPORT BOOL GUIAPI DestroyCursor (HCURSOR hcsr); * MiniGUI creates (MAX_SYSCURSORINDEX + 1) system cursors for application. * You can use \a GetSystemCursor to get the handle to these system cursors. * The identifier can be one of the following: - * + * * - IDC_ARROW\n * Normal arrow cursor. * - IDC_IBEAM\n @@ -2792,8 +2792,8 @@ MG_EXPORT HCURSOR GUIAPI GetCurrentCursor (void); * \fn void GUIAPI ClipCursor (const RECT* prc) * \brief Clips the cursor range. * - * This function sets cursor's clipping rectangle. \a prc - * is the new clipping rectangle in screen coordinates. If \a prc is NULL, + * This function sets cursor's clipping rectangle. \a prc + * is the new clipping rectangle in screen coordinates. If \a prc is NULL, * \a ClipCursor will disable cursor clipping. * * \param prc The clipping rectangle. @@ -2805,7 +2805,7 @@ MG_EXPORT void GUIAPI ClipCursor (const RECT* prc); * \fn void GUIAPI GetClipCursor (RECT* prc) * \brief Gets the current cursor clipping rectangle. * - * This function copies the current clipping rectangle to + * This function copies the current clipping rectangle to * a RECT pointed to by \a prc. * * \param prc The clipping rectangle will be saved to this rectangle. @@ -2817,7 +2817,7 @@ MG_EXPORT void GUIAPI GetClipCursor (RECT* prc); * \fn void GUIAPI GetCursorPos (POINT* ppt) * \brief Gets position of the current cursor. * - * This function copies the current mouse cursor position to + * This function copies the current mouse cursor position to * a POINT structure pointed to by \a ppt. * * \param ppt The position will be saved in this buffer. @@ -2831,7 +2831,7 @@ MG_EXPORT void GUIAPI GetCursorPos (POINT* ppt); * \fn void GUIAPI SetCursorPos (int x, int y) * \brief Sets position of the current cursor. * - * This function sets mouse cursor position with the given + * This function sets mouse cursor position with the given * arguments: \a (\a x,\a y). * * \param x The x-corrdinate of the expected poistion. @@ -2850,8 +2850,8 @@ MG_EXPORT void GUIAPI SetCursorPos (int x, int y); * This function changes the current cursor to be \a hcsr, * and/or sets it to be the default cursor. * - * If you pass \a set_def as TRUE, the expected cursor will be the default - * cursor. The default cursor will be used when you move the cursor to + * If you pass \a set_def as TRUE, the expected cursor will be the default + * cursor. The default cursor will be used when you move the cursor to * the desktop. * * \param hcsr The expected cursor handle. @@ -2872,7 +2872,7 @@ MG_EXPORT void GUIAPI SetCursorPos (int x, int y); * \param hcsr The expected cursor handle. * \return The old cursor handle. * - * \note This function defined as a macro calling \a SetCursorEx with + * \note This function defined as a macro calling \a SetCursorEx with * passing \a set_def as FALSE. * * \sa SetCursorEx, SetDefaultCursor @@ -2883,7 +2883,7 @@ MG_EXPORT void GUIAPI SetCursorPos (int x, int y); * \def SetDefaultCursor(hcsr) * \brief Changes the current cursor, and set it as the default cursor. * - * This function changes the current cursor to be \a hcsr, and set it as + * This function changes the current cursor to be \a hcsr, and set it as * the default cursor. * * \param hcsr The expected cursor handle. @@ -2921,15 +2921,15 @@ MG_EXPORT HCURSOR GUIAPI GetDefaultCursor (void); * \fn int GUIAPI ShowCursor (BOOL fShow) * \brief Shows or hides cursor. * - * This function shows or hides cursor according to the argument \a fShow. + * This function shows or hides cursor according to the argument \a fShow. * Show cursor when \a fShow is TRUE, and hide cursor when \a fShow is FALSE. - * MiniGUI maintains a showing count value. Calling \a ShowCursor once, the + * MiniGUI maintains a showing count value. Calling \a ShowCursor once, the * count will increase when \a fShow is TRUE, or decrease one when FALSE. * When the count is less than 0, the cursor will disapear actually. * * \param fShow Indicates show or hide the cursor. * - * \return Cursor showing count value. + * \return Cursor showing count value. */ MG_EXPORT int GUIAPI ShowCursor (BOOL fShow); #else @@ -2947,10 +2947,10 @@ MG_EXPORT int GUIAPI ShowCursor (BOOL fShow); * \fn BOOL GUIAPI GetKeyStatus (UINT uKey) * \brief Gets a key or a mouse button status. * - * This function gets a key or a mouse button status, returns TRUE - * when pressed, or FALSE when released. \a uKey indicates - * the key or mouse button. For keys on keyboard, \a uKey should be - * the scancode of the key, for mouse button, \a uKey should be one + * This function gets a key or a mouse button status, returns TRUE + * when pressed, or FALSE when released. \a uKey indicates + * the key or mouse button. For keys on keyboard, \a uKey should be + * the scancode of the key, for mouse button, \a uKey should be one * value of the following: * * - SCANCODE_LEFTBUTTON\n @@ -2962,7 +2962,7 @@ MG_EXPORT int GUIAPI ShowCursor (BOOL fShow); * * These constants and the scancodes of keys are defined in . * - * \param uKey Indicates the key or mouse button. + * \param uKey Indicates the key or mouse button. * * \return Returns TRUE when pressed, or FALSE when released. * @@ -2974,10 +2974,10 @@ MG_EXPORT BOOL GUIAPI GetKeyStatus (UINT uKey); * \fn DWORD GUIAPI GetShiftKeyStatus (void) * \brief Gets status of the shift keys. * - * This function gets ths status of the shift keys, the returned value - * indicates the status of shift keys -- CapsLock, ScrollLock, NumLock, - * Left Shift, Right Shift, Left Ctrl, Right Ctrl, Left Alt, and Right Alt. - * You can use KS_* ORed with the status value to determine one shift key's + * This function gets ths status of the shift keys, the returned value + * indicates the status of shift keys -- CapsLock, ScrollLock, NumLock, + * Left Shift, Right Shift, Left Ctrl, Right Ctrl, Left Alt, and Right Alt. + * You can use KS_* ORed with the status value to determine one shift key's * status: * * - KS_CAPSLOCK\n @@ -3016,12 +3016,12 @@ MG_EXPORT DWORD GUIAPI GetShiftKeyStatus (void); * \fn void GUIAPI GetKeyboardState (BYTE* kbd_state) * \brief Gets status of all keys on keyboard. * - * This function gets the status of all keys on keyboard. + * This function gets the status of all keys on keyboard. * * The scancodes of all keys are defined in . * * \param kbd_state The buffer returns the current status of all keys. - * Note that the length of the buffer should be larger than + * Note that the length of the buffer should be larger than * (MGUI_NR_KEYS + 1). * * \sa GetKeyStatus, MGUI_NR_KEYS @@ -3329,16 +3329,16 @@ MG_EXPORT void GUIAPI GetKeyboardState (BYTE* kbd_state); * \fn const char* GUIAPI GetSysText (unsigned int id); * \brief Translates system text to localized text. * - * When MiniGUI display some system messages, it will call \a GetSysText - * function to translate system text from English to other language. + * When MiniGUI display some system messages, it will call \a GetSysText + * function to translate system text from English to other language. * Global variable \a SysText contains all text used by MiniGUI in English. * - * \a GetSysText function returns localized text from \a local_SysText. - * MiniGUI have already defined localized sytem text for en_US, zh_CN.GB2312 - * and zh_TW.Big5 locales. MiniGUI initializes \a local_SysText to - * point one of above localized system text when startup. You can also + * \a GetSysText function returns localized text from \a local_SysText. + * MiniGUI have already defined localized sytem text for en_US, zh_CN.GB2312 + * and zh_TW.Big5 locales. MiniGUI initializes \a local_SysText to + * point one of above localized system text when startup. You can also * let \a local_SysText point to your customized string array. - * + * * \param id The system text id. * \return The localized text. * @@ -3418,9 +3418,9 @@ extern MG_EXPORT const char* SysText []; * \var const char** local_SysText * \brief The pointer to the current localized system text array. * - * Changing \a local_SysText will lead to \a GetSysText returns a different - * localized system text. Please set it when MiniGUI starts - * and send desktop a MSG_REINITSESSION message (call \a ReinitDesktop + * Changing \a local_SysText will lead to \a GetSysText returns a different + * localized system text. Please set it when MiniGUI starts + * and send desktop a MSG_REINITSESSION message (call \a ReinitDesktop * function) after assigned a different value to this variable. * * \sa GetSysText, SysText, ReinitDesktopEx @@ -3431,16 +3431,16 @@ extern MG_EXPORT const char** local_SysText; /** * \fn const char** GUIAPI GetSysTextInUTF8 (const char* language) - * \brief Gets the localized system text array in UTF-8 for + * \brief Gets the localized system text array in UTF-8 for * a specified language. * * This function returns the localized system text array in UTF-8 encode * for the specified language. You can use the returned localized system * text array to set \a local_SysText if your system logical fonts are using * UNICODE/UTF-8 charset. - * - * \param language The language name. So far, you can specify the language - * as 'zh_CN' (for simlified Chinese) + * + * \param language The language name. So far, you can specify the language + * as 'zh_CN' (for simlified Chinese) * or 'zh_TW' (for tranditional Chinese). * * \return The pointer to the localized system text array. @@ -3466,7 +3466,7 @@ extern MG_EXPORT const char** GUIAPI GetSysTextInUTF8 (const char* language); * \param n The number of first characters will be searched. * \param c The expected character. * - * \return Returns a pointer to the first occurrence of the character \a c + * \return Returns a pointer to the first occurrence of the character \a c * in the string \a s. * * \sa strchr(3) @@ -3476,13 +3476,13 @@ MG_EXPORT char* strnchr (const char* s, size_t n, int c); /** * \fn int substrlen (const char* text, int len, int delimiter,\ int* nr_delim) - * \brief Locates a substring delimited by one or more delimiters in the + * \brief Locates a substring delimited by one or more delimiters in the * first \a len characters of string \a text. * * \param text The pointer to the string. * \param len The number of first characters will be searched. * \param delimiter The delimiter which delimites the substring from other. - * \param nr_delim The number of continuous delimiters will be returned + * \param nr_delim The number of continuous delimiters will be returned * through this pointer. * * \return The length of the substring. @@ -3496,8 +3496,8 @@ MG_EXPORT int substrlen (const char* text, int len, int delimiter, * \fn char* strtrimall (char* src); * \brief Deletes all space characters. * - * This function deletes the blank space, form-feed('\\f'), newline('\\n'), - * carriage return('\\r'), horizontal tab('\\t'),and vertical tab('\\v') + * This function deletes the blank space, form-feed('\\f'), newline('\\n'), + * carriage return('\\r'), horizontal tab('\\t'),and vertical tab('\\v') * in the head and the tail of the string. * * \param src The pointer to the string. diff --git a/include/window.h b/include/window.h index 8c2dae99..d23da441 100644 --- a/include/window.h +++ b/include/window.h @@ -2,12 +2,12 @@ * \file window.h * \author Wei Yongming * \date 2002/01/26 - * + * * \brief This file includes windowing interfaces of MiniGUI. * \verbatim - This file is part of MiniGUI, a mature cross-platform windowing + This file is part of MiniGUI, a mature cross-platform windowing and Graphics User Interface (GUI) support system for embedded systems and smart IoT devices. @@ -42,10 +42,10 @@ \endverbatim */ -/* +/* * $Id: window.h 13674 2010-12-06 06:45:01Z wanzheng $ * - * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, + * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, * pSOS, ThreadX, NuCleus, OSE, and Win32. */ @@ -391,7 +391,7 @@ extern "C" { * \def MSG_KEYDOWN * \brief User presses a key down. * - * This message is posted to the current active window when the user + * This message is posted to the current active window when the user * presses a key down. * * \code @@ -415,7 +415,7 @@ extern "C" { * \def MSG_CHAR * \brief A character translated from MSG_KEYDOWN message. * - * This message is translated from a MSG_KEYDOWN message by \a TranslateMessage + * This message is translated from a MSG_KEYDOWN message by \a TranslateMessage * and sent to the current active window. * * \code @@ -443,7 +443,7 @@ extern "C" { * \def MSG_KEYUP * \brief User releases up a key. * - * This message is posted to the current active window when the user + * This message is posted to the current active window when the user * releases up a key. * * \code @@ -463,7 +463,7 @@ extern "C" { * \def MSG_SYSKEYDOWN * \brief User presses down a key when \ key is down. * - * This message is posted to the current active window when the user + * This message is posted to the current active window when the user * presses down a key as \ key is down. * * \code @@ -483,7 +483,7 @@ extern "C" { * \def MSG_SYSCHAR * \brief A system character translated from MSG_SYSKEYDOWN message. * - * This message is translated from a MSG_SYSKEYDOWN message by + * This message is translated from a MSG_SYSKEYDOWN message by * \a TranslateMessage and sent to the current active window. * * \code @@ -503,7 +503,7 @@ extern "C" { * \def MSG_SYSKEYUP * \brief User releases up a key when \ key is down. * - * This message is posted to the current active window when the user + * This message is posted to the current active window when the user * releases up a key as \ key is down. * * \code @@ -526,7 +526,7 @@ extern "C" { * \def MSG_KEYLONGPRESS * \brief A key is long pressed. * - * This message is sent when a key is pressed exceed user-defined long + * This message is sent when a key is pressed exceed user-defined long * time value. */ #define MSG_KEYLONGPRESS 0x0016 @@ -544,11 +544,11 @@ extern "C" { * \def MSG_KEYSYM * \brief A key symbol translated from MSG_KEYDOWN messages. * - * This message is translated from a MSG_KEYDOWN message by + * This message is translated from a MSG_KEYDOWN message by * \a TranslateMessage and sent to the current active window. * - * Note that one translation may generate a key symbol made by more than one - * character, e.g., when using default keymap, DEL key will generate the + * Note that one translation may generate a key symbol made by more than one + * character, e.g., when using default keymap, DEL key will generate the * key symbol "^[[3~". * * \code @@ -558,7 +558,7 @@ extern "C" { * DWORD key_flags = (DWORD)lParam; * \endcode * - * \param index The index of the key symbol in one translation, + * \param index The index of the key symbol in one translation, * zero for a new translation, and the \a keysym is the first symbol. * \param keysym The code of the key symbol. * \param key_flags The shift key status when this message occurred. @@ -608,7 +608,7 @@ extern "C" { #define DEF_APRESS_TIME 1000 /** * \def DEF_INTERVAL_TIME - * \brief Default send MSG_KEYLONGPRESS in interval value. + * \brief Default send MSG_KEYLONGPRESS in interval value. * */ #define DEF_INTERVAL_TIME 200 @@ -663,7 +663,7 @@ extern DWORD __mg_interval_time; * This message is posted to the window under the cursor when the user moves * the mouse in order to give the chance to change the cursor shape. * The default handler set the cursor shape to the default cursor of the window. - * If you set a new cursor shape, your message handler should return + * If you set a new cursor shape, your message handler should return * immediately. * * \code @@ -681,17 +681,17 @@ extern DWORD __mg_interval_time; * \sa MSG_NCSETCURSOR */ #define MSG_SETCURSOR 0x0020 - + #define HT_MASK 0xFF #define HT_UNKNOWN 0x00 #define HT_OUT 0x01 #define HT_MENUBAR 0x02 #define HT_TRANSPARENT 0x03 - + #define HT_BORDER 0x04 #define HT_CLIENT 0x0C - + #define HT_NEEDCAPTURE 0x10 #define HT_ICON 0x14 #define HT_CLOSEBUTTON 0x15 @@ -699,24 +699,24 @@ extern DWORD __mg_interval_time; #define HT_MINBUTTON 0x17 #define HT_HSCROLL 0x18 #define HT_VSCROLL 0x19 - + #define HT_DRAGGABLE 0x20 #define HT_CAPTION 0x20 - + /*indicate cursor at border */ #define HT_BORDER_MASK 0x28 #define HT_BORDER_TOP 0x28 #define HT_BORDER_BOTTOM 0x29 #define HT_BORDER_LEFT 0x2A #define HT_BORDER_RIGHT 0x2B - + /*indicate cursor at border corner*/ #define HT_CORNER_MASK 0x2C #define HT_CORNER_TL 0x2C #define HT_CORNER_TR 0x2D #define HT_CORNER_BL 0x2E #define HT_CORNER_BR 0x2F - + /*new scrollbar hittest value * can be AND'ed with HT_NEEDCAPTURE*/ #define HT_SB_MASK 0x50 @@ -726,7 +726,7 @@ extern DWORD __mg_interval_time; #define HT_SB_LEFTSPACE 0x52 #define HT_SB_RIGHTSPACE 0x53 #define HT_SB_HTHUMB 0x54 - + #define HT_SB_VMASK 0x58 #define HT_SB_UPARROW 0x58 @@ -734,23 +734,23 @@ extern DWORD __mg_interval_time; #define HT_SB_UPSPACE 0x5a #define HT_SB_DOWNSPACE 0x5b #define HT_SB_VTHUMB 0x5c - + #define HT_SB_UNKNOWN 0x5f - + /*user defined hittest code are 0x80 ~ 0x8F*/ #define HT_USER_MASK 0x80 /** * \def MSG_NCHITTEST - * \brief Hit test in non-client area. + * \brief Hit test in non-client area. * This is an async message. */ -#define MSG_NCHITTEST 0x0021 +#define MSG_NCHITTEST 0x0021 /** * \def MSG_HITTEST - * \brief Hit test in non-client area. + * \brief Hit test in non-client area. * * \sa MSG_NCHITTEST */ @@ -767,7 +767,7 @@ extern DWORD __mg_interval_time; /** * \def MSG_QUERYCLIENTAREA - * \brief Query client area. + * \brief Query client area. */ #define MSG_QUERYCLIENTAREA 0x0024 @@ -776,8 +776,8 @@ extern DWORD __mg_interval_time; * \brief Indicates the size of the window is being changed. * * This message is sent to the window when the size is being changed. - * If you want to control the actual position and size of the window when - * the size is being changed (this may be caused by \a MoveWindow or + * If you want to control the actual position and size of the window when + * the size is being changed (this may be caused by \a MoveWindow or * other functions), you should handle this message, and return the actual * position and size of the window through the second parameter. * @@ -801,9 +801,9 @@ extern DWORD __mg_interval_time; * \brief Indicates the size of the window has been changed. * * This message is sent to the window when the size has been changed. - * If you want adjust the size of the client area of the window, + * If you want adjust the size of the client area of the window, * you should handle this message, change the values of the client area, - * and return non-zero value to indicate that the client area has been + * and return non-zero value to indicate that the client area has been * modified. * * \code @@ -811,9 +811,9 @@ extern DWORD __mg_interval_time; * RECT* rcClient = (RECT*)lParam; * \endcode * - * \param rcClient The pointer to a RECT structure which contains + * \param rcClient The pointer to a RECT structure which contains * the new client area. - * + * * Example: * * \include msg_sizechanged.c @@ -824,15 +824,15 @@ extern DWORD __mg_interval_time; * \def MSG_CSIZECHANGED * \brief Indicates the size of the client area of the window has been changed. * - * This message is sent as a notification to the window when the size of - * the client area has been changed. + * This message is sent as a notification to the window when the size of + * the client area has been changed. * * \code * MSG_CSIZECHANGED * int client_width = (int)wParam; * int client_height = (int)lParam; * \endcode - * + * * \param client_width The width of the client area. * \param client_height The height of the client area. */ @@ -842,10 +842,10 @@ extern DWORD __mg_interval_time; * \def MSG_SETFOCUS * \brief Indicates that the window has gained the input focus. * - * \param lparam The parameter passed into used for pass setfocus + * \param lparam The parameter passed into used for pass setfocus * msg to child control if lparam > 0. * - * This message is sent to the window procedure + * This message is sent to the window procedure * after the window gains the input focus. */ #define MSG_SETFOCUS 0x0030 @@ -854,10 +854,10 @@ extern DWORD __mg_interval_time; * \def MSG_KILLFOCUS * \brief Indicates that the window has lost the input focus. * - * \param lparam The parameter passed into used for pass killfocus + * \param lparam The parameter passed into used for pass killfocus * msg to child control if lparam > 0. * - * This message is sent to the window procedure + * This message is sent to the window procedure * after the window losts the input focus. */ #define MSG_KILLFOCUS 0x0031 @@ -867,7 +867,7 @@ extern DWORD __mg_interval_time; * \brief Indicates that the window has gained the input focus because * the user clicked the window. * - * This message is sent to the window procedure + * This message is sent to the window procedure * after the user clicked the window and it has gained the input focus. */ #define MSG_MOUSEACTIVE 0x0032 @@ -877,7 +877,7 @@ extern DWORD __mg_interval_time; * \brief Indicates that the window has gained the input focus because * the user clicked the window. * - * This message is sent to the window procedure + * This message is sent to the window procedure * after the user clicked the window and it has gained the input focus. */ #define MSG_ACTIVE 0x0033 @@ -899,7 +899,7 @@ extern DWORD __mg_interval_time; * This message is sent to the window procedure when the user * activates the menu bar and tracks it. * - * If you want to change the states of menu items in the submenu + * If you want to change the states of menu items in the submenu * before displaying it, you can handle this message. * * \code @@ -907,8 +907,8 @@ extern DWORD __mg_interval_time; * int pos = (int)wParam; * HMENU submenu = (HMENU)lParam; * \endcode - * - * \param pos The position of the activated submenu. The position value of the + * + * \param pos The position of the activated submenu. The position value of the * first submenu is 0. * \param submenu The handle to the activated submenu. * @@ -931,7 +931,7 @@ extern DWORD __mg_interval_time; * HMENU submenu = (HMENU)lParam; * \endcode * - * \param menubar The handle to the menu bar. It will be zero when the + * \param menubar The handle to the menu bar. It will be zero when the * deactivated menu is a popup menu. * \param submenu The handle to the submenu. */ @@ -945,97 +945,97 @@ extern DWORD __mg_interval_time; /** * \def SB_LINEUP - * \brief The SB_LINEUP notification message is sent when the user clicked + * \brief The SB_LINEUP notification message is sent when the user clicked * the up arrow on the bar. */ #define SB_LINEUP 0x01a /** * \def SB_LINEDOWN - * \brief The SB_LINEDOWN notification message is sent when the user clicked + * \brief The SB_LINEDOWN notification message is sent when the user clicked * the down arrow on the bar. */ #define SB_LINEDOWN 0x02 /** * \def SB_LINELEFT - * \brief The SB_LINELEFT notification message is sent when the user clicked + * \brief The SB_LINELEFT notification message is sent when the user clicked * the left arrow on the bar. */ #define SB_LINELEFT 0x03 /** * \def SB_LINERIGHT - * \brief The SB_LINERIGHT notification message is sent when the user clicked + * \brief The SB_LINERIGHT notification message is sent when the user clicked * the right arrow on the bar. */ #define SB_LINERIGHT 0x04 /** * \def SB_PAGEUP - * \brief The SB_PAGEUP notification message is sent when the user clicked + * \brief The SB_PAGEUP notification message is sent when the user clicked * the page up area on the bar. */ #define SB_PAGEUP 0x05 /** * \def SB_PAGEDOWN - * \brief The SB_PAGEDOWN notification message is sent when the user clicked + * \brief The SB_PAGEDOWN notification message is sent when the user clicked * the page down area on the bar. */ #define SB_PAGEDOWN 0x06 /** * \def SB_PAGELEFT - * \brief The SB_PAGELEFT notification message is sent when the user clicked + * \brief The SB_PAGELEFT notification message is sent when the user clicked * the page left area on the bar. */ #define SB_PAGELEFT 0x07 /** * \def SB_PAGERIGHT - * \brief The SB_PAGERIGHT notification message is sent when the user clicked + * \brief The SB_PAGERIGHT notification message is sent when the user clicked * the page right area on the bar. */ #define SB_PAGERIGHT 0x08 /** * \def SB_THUMBPOSITION - * \brief The SB_THUMBPOSITION notification message is sent when the user set + * \brief The SB_THUMBPOSITION notification message is sent when the user set * a new thumb position. */ #define SB_THUMBPOSITION 0x09 /** * \def SB_THUMBTRACK - * \brief The SB_THUMBTRACK notification message is sent when the user is + * \brief The SB_THUMBTRACK notification message is sent when the user is * draging and tracking the thumb. */ #define SB_THUMBTRACK 0x0A /** * \def SB_TOP - * \brief The SB_TOP notification message is sent when the user move thumb - * to minimum position + * \brief The SB_TOP notification message is sent when the user move thumb + * to minimum position */ #define SB_TOP 0x0B /** * \def SB_BOTTOM - * \brief The SB_BOTTOM notification message is sent when the user move - * thumb to maximum position + * \brief The SB_BOTTOM notification message is sent when the user move + * thumb to maximum position */ #define SB_BOTTOM 0x0C /** * \def SB_ENDSCROLL - * \brief The SB_ENDSCROLL notification message is sent when the thumb at - * the end of bar + * \brief The SB_ENDSCROLL notification message is sent when the thumb at + * the end of bar */ #define SB_ENDSCROLL 0x0D /** @} end of ctrl_scrollbar_ncs */ - + /** * \def MSG_HSCROLL * \brief Indicates that the user has clicked the horizontal scroll bar. @@ -1103,7 +1103,7 @@ extern DWORD __mg_interval_time; * This message is posted to the window under the cursor when the user moves * the mouse in order to give the chance to change the cursor shape. * The default handler set the cursor shape to the default cursor of the window. - * If you set a new cursor shape, your message handler should return + * If you set a new cursor shape, your message handler should return * immediately. * * \sa MSG_SETCURSOR @@ -1127,10 +1127,10 @@ extern DWORD __mg_interval_time; */ #define MSG_MOUSEMOVEIN 0x0050 -/** +/** * \def MSG_WINDOWDROPPED * \brief Indicates that user dropped window. - * server to client; (wParam, lParam): result rectangle. + * server to client; (wParam, lParam): result rectangle. */ #define MSG_WINDOWDROPPED 0x0051 @@ -1150,11 +1150,11 @@ extern DWORD __mg_interval_time; * \def MSG_CREATE * \brief Indicates the window has been created, and gives you a chance to initialize your private objects. * - * This messages is sent to the window after the window has been created - * and registered to the system. You can initialize your own objects when - * you receive this message, and return zero to the system in order to - * indicates the success of your initialization. If you return non-zero to - * the system after handled this message, the created window will be + * This messages is sent to the window after the window has been created + * and registered to the system. You can initialize your own objects when + * you receive this message, and return zero to the system in order to + * indicates the success of your initialization. If you return non-zero to + * the system after handled this message, the created window will be * destroyed immediately. * * \code @@ -1166,7 +1166,7 @@ extern DWORD __mg_interval_time; * DWORD add_data = (DWORD)lParam; * \endcode * - * \param create_info The pointer to the MAINWINCREATE structure which is + * \param create_info The pointer to the MAINWINCREATE structure which is * passed to CreateMainWindow function. * \param parent The handle to the parent window of the control. * \param add_data The first additional data passed to CreateWindowEx function. @@ -1177,16 +1177,16 @@ extern DWORD __mg_interval_time; /** * \def MSG_NCCREATE - * \brief Indicates the window has been created, but has not registered to + * \brief Indicates the window has been created, but has not registered to * the system. * - * This message is sent to the window after the window has been created, - * but not registered the system. Like MSG_CREATE message, you can - * initialize your own objects when you receive this message, but can not - * create child windows of the window, and can not get a device context + * This message is sent to the window after the window has been created, + * but not registered the system. Like MSG_CREATE message, you can + * initialize your own objects when you receive this message, but can not + * create child windows of the window, and can not get a device context * to paint. * - * If you return non-zero to the system after handled this message, + * If you return non-zero to the system after handled this message, * the created window will be destroyed immediately. * * \code @@ -1197,7 +1197,7 @@ extern DWORD __mg_interval_time; * DWORD add_data = (DWORD)lParam; * \endcode * - * \param create_info The pointer to the MAINWINCREATE structure which is + * \param create_info The pointer to the MAINWINCREATE structure which is * passed to CreateMainWindow function. * \param add_data The first additional data passed to CreateWindowEx function. * @@ -1213,11 +1213,11 @@ extern DWORD __mg_interval_time; * \def MSG_DESTROY * \brief Indicates the window will be destroyed. * - * This message is sent to the window when \a DestroyMainWindow + * This message is sent to the window when \a DestroyMainWindow * or \a DestroyWindow is calling. You can destroy your private objects * when receiving this message. * - * If you return non-zero to the system after handle this message, the process + * If you return non-zero to the system after handle this message, the process * of \a DestroyMainWindow and \a DestroyWindow will return immediately. * * \sa DestroyMainWindow, DestroyWindow @@ -1239,7 +1239,7 @@ extern DWORD __mg_interval_time; /* Not use */ #define MSG_NCCALCSIZE 0x0067 -/* +/* * Not implemented, this message is reserved for future use. * * \def MSG_MAXIMIZE @@ -1256,7 +1256,7 @@ extern DWORD __mg_interval_time; * \def MSG_MINIMIZE * \brief Indicates the user has clicked the minimizing box on the caption. * - * This message is sent to the window when the user has clicked the + * This message is sent to the window when the user has clicked the * minimizing box on the caption of the window. */ #define MSG_MINIMIZE 0x0069 @@ -1267,7 +1267,7 @@ extern DWORD __mg_interval_time; * \def MSG_HELP * \brief Indicates the user has clicked the help box on the caption. * - * This message is sent to the window when the user has clicked the + * This message is sent to the window when the user has clicked the * help box on the caption of the window. */ #define MSG_HELP 0x006A @@ -1296,19 +1296,19 @@ extern DWORD __mg_interval_time; * int show_cmd = (int)wParam; * \endcode * - * \param show_cmd The command to show or hide, can be one of + * \param show_cmd The command to show or hide, can be one of * the following values: * - SW_SHOW\n * Shows the window. * - SW_HIDE\n * Hides the window. * - SW_SHOWNORMAL\n - * Shows the window, and if the window is a main window + * Shows the window, and if the window is a main window * sets it to be the topmost main window. * * \sa ShowWindow */ -#define MSG_SHOWWINDOW 0x00A0 +#define MSG_SHOWWINDOW 0x00A0 /** * \def MSG_ERASEBKGND @@ -1325,10 +1325,10 @@ extern DWORD __mg_interval_time; * * \param hdc The device context. * \param inv_rect The pointer to a RECT structure contains the rectangle - * should be erase. The rectangle is in client coordinates system. + * should be erase. The rectangle is in client coordinates system. * If it is NULL, the whole client area should be erased. */ -#define MSG_ERASEBKGND 0x00B0 /* this is an async message */ +#define MSG_ERASEBKGND 0x00B0 /* this is an async message */ /** * \def MSG_PAINT @@ -1347,7 +1347,7 @@ extern DWORD __mg_interval_time; /** * \def MSG_NCPAINT - * \brief Indicates that paints non-client area. + * \brief Indicates that paints non-client area. * * \code * MSG_NCPAINT @@ -1357,20 +1357,20 @@ extern DWORD __mg_interval_time; * * \param hdc The device context. * \param inv_rect The pointer to a RECT structure contains the rectangle - * should be paint. The rectangle is in client coordinates system. + * should be paint. The rectangle is in client coordinates system. * If it is NULL, the whole nc client area should be paint. */ #define MSG_NCPAINT 0x00B2 /** * \def MSG_NCACTIVATE - * \brief Indicates that active non-client area of main window. + * \brief Indicates that active non-client area of main window. */ #define MSG_NCACTIVATE 0x00B3 /** * \def MSG_SYNCPAINT - * \brief Indicates that actives and paints main window synchronously. + * \brief Indicates that actives and paints main window synchronously. */ #define MSG_SYNCPAINT 0x00B4 @@ -1430,7 +1430,7 @@ extern DWORD __mg_interval_time; * * \param x_pos,y_pos The position of the mouse in desktop coordinates. * - * \sa MSG_DT_LBUTTONDOWN, MSG_LBUTTONUP + * \sa MSG_DT_LBUTTONDOWN, MSG_LBUTTONUP */ #define MSG_DT_LBUTTONUP 0x00E2 @@ -1530,13 +1530,13 @@ extern DWORD __mg_interval_time; */ #define MSG_DT_RBUTTONDBLCLK 0x00E7 -#define MSG_DT_KEYOFF 0x00D8 +#define MSG_DT_KEYOFF 0x00D8 /** * \def MSG_DT_KEYDOWN * \brief User presses a key down on the desktop. * - * This message is posted to the desktop window when the user + * This message is posted to the desktop window when the user * presses a key down. * * \code @@ -1555,7 +1555,7 @@ extern DWORD __mg_interval_time; * \def MSG_DT_KEYUP * \brief User releases up a key on the desktop. * - * This message is posted to the desktop window when the user + * This message is posted to the desktop window when the user * releases up a key. * * \code @@ -1592,7 +1592,7 @@ extern DWORD __mg_interval_time; #define MSG_ADDNEWMAINWIN 0x00F0 #define MSG_REMOVEMAINWIN 0x00F1 -#define MSG_MOVETOTOPMOST 0x00F2 +#define MSG_MOVETOTOPMOST 0x00F2 #define MSG_SETACTIVEMAIN 0x00F3 #define MSG_GETACTIVEMAIN 0x00F4 #define MSG_SHOWMAINWIN 0x00F5 @@ -1644,7 +1644,7 @@ typedef struct _DRAGINFO { /** * \def MSG_COMMAND - * \brief The command message, indicates a notification message from child + * \brief The command message, indicates a notification message from child * window, or the user has selected a menu item. * * This message sent to the window when the user has selected a menu item, or @@ -1661,13 +1661,13 @@ typedef struct _DRAGINFO { * \param code The notification code. * \param hwnd The handle to the control. * - * \note If you use `MSG_COMMAND` message to handle the notification + * \note If you use `MSG_COMMAND` message to handle the notification * sent from children controls, you should make sure the identifier * value is small enough on 64-bit platform. If you use a pointer * as the the identifier of a control, the code above will not work. * - * Instead, we recommend strongly that you use a NOTIFYPOROC - * callback to handle the notification generated by controls. + * Instead, we recommend strongly that you use a NOTIFYPOROC + * callback to handle the notification generated by controls. * * \sa NotifyParentEx */ @@ -1689,7 +1689,7 @@ typedef struct _DRAGINFO { * \def MSG_INITDIALOG * \brief Ready to initialize the controls in a dialog box. * - * This message is sent to the dialog in order that you can initialize the + * This message is sent to the dialog in order that you can initialize the * controls in the dialog box. * * \code @@ -1699,10 +1699,10 @@ typedef struct _DRAGINFO { * \endcode * * \param focus_hwnd The handle to the control which will gain the input focus. - * \param lparam The parameter passed into the dialog box + * \param lparam The parameter passed into the dialog box * through \a DialogBoxIndirectParam function. * - * \return Returns non-zero value to set the input focus to \a focus_hwnd, + * \return Returns non-zero value to set the input focus to \a focus_hwnd, * else do not set focus. * * \sa DialogBoxIndirectParam @@ -1743,7 +1743,7 @@ typedef struct _DRAGINFO { * \def MSG_INITPAGE * \brief Ready to initialize the controls in a property page. * - * This message is sent to the page in order that you can initialize the + * This message is sent to the page in order that you can initialize the * controls in the page. * * \code @@ -1751,7 +1751,7 @@ typedef struct _DRAGINFO { * DWORD add_data = (DWORD)lParam; * \endcode * - * \param add_data The additional data in DLGTEMPLATE structure passed + * \param add_data The additional data in DLGTEMPLATE structure passed * through PSM_ADDPAGE message. * * \sa ctrl_propsheet @@ -1770,7 +1770,7 @@ typedef struct _DRAGINFO { * int show_cmd = (int)lParam; * \endcode * - * \param focus_hwnd The handle to the child which will gain the input focus + * \param focus_hwnd The handle to the child which will gain the input focus * if showing the page. * \param show_cmd The show command, can be one of the following values: * - SW_SHOW\n The page will be shown. @@ -1782,10 +1782,10 @@ typedef struct _DRAGINFO { /** * \def MSG_SHEETCMD - * \brief Indicates that a PSM_SHEETCMD message had been sent to the + * \brief Indicates that a PSM_SHEETCMD message had been sent to the * PropertySheet control. * - * This message is sent to the property page when the property sheet contains + * This message is sent to the property page when the property sheet contains * the page received the PSM_SHEETCMD message. * * \code @@ -1806,7 +1806,7 @@ typedef struct _DRAGINFO { * \brief This message will be sent to the container window procedure after * the container window is created. * - * This message is sent to the container in order that you can initialize the + * This message is sent to the container in order that you can initialize the * controls in the container. * * \code @@ -1814,8 +1814,8 @@ typedef struct _DRAGINFO { * DWORD add_data = (DWORD)lParam; * \endcode * - * \param add_data The additional data in \a CONTAINERINFO structure passed - * through the argument of \a dwAddData when creating the ScrollView + * \param add_data The additional data in \a CONTAINERINFO structure passed + * through the argument of \a dwAddData when creating the ScrollView * control by calling CreateWindowEx. * * \sa ctrl_scrollview, CONTAINERINFO @@ -1824,7 +1824,7 @@ typedef struct _DRAGINFO { /** * \def MSG_SVCONTCMD - * \brief This message will be sent to the parent of the ScrollView control + * \brief This message will be sent to the parent of the ScrollView control * when the container of the ScrollView control reveived a MSG_COMMAND * message. * @@ -1832,8 +1832,8 @@ typedef struct _DRAGINFO { * the container of the ScrollView control reveived a MSG_COMMAND message. * Generally, the notification of the child control in the container will be * sent via MSG_COMMAND to the container. If you have not defined your own - * window procedure for the container, this message gives a chance for the - * parent of the ScrollView control to handle the notifications come from + * window procedure for the container, this message gives a chance for the + * parent of the ScrollView control to handle the notifications come from * the controls in the container. * * Note that you can also define your window procedure for the container, and @@ -1854,7 +1854,7 @@ typedef struct _DRAGINFO { /** * \def MSG_FREEZECTRL - * \brief You can send this message to freeze or thaw the paint action of + * \brief You can send this message to freeze or thaw the paint action of * the control. * * \code @@ -1961,7 +1961,7 @@ typedef struct _DRAGINFO { * \endcode * * \param text_buf The pointer to a buffer contains the text. - * \return The return value is equal to zero if the text is set. + * \return The return value is equal to zero if the text is set. * * \sa SetWindowText */ @@ -2032,7 +2032,7 @@ typedef struct _DRAGINFO { * \def MSG_FDEVENT * \brief Indicates an event of registered file descriptor occurred. * - * You can use \a RegisterListenFD to register a file desciptor to + * You can use \a RegisterListenFD to register a file desciptor to * MiniGUI-Processes for listening. * * When there is a read/write/except event on the fd, MiniGUI @@ -2065,7 +2065,7 @@ typedef struct _DRAGINFO { * in a client process when the client receives a MSG_SRVNOTIFY message * from the server. * - * The server, i.e. 'mginit' defines the meaning of two parameters of + * The server, i.e. 'mginit' defines the meaning of two parameters of * this message. * * \note Only available on MiniGUI-Processes. @@ -2080,7 +2080,7 @@ typedef struct _DRAGINFO { /** * \def MSG_DOESNEEDIME - * \brief Sends to a window to query whether the window needs to open + * \brief Sends to a window to query whether the window needs to open * IME window. * * The system will send this message when the window gain the input focus @@ -2297,20 +2297,20 @@ typedef MSG* PMSG; * Remove it from the message queue. * - PM_NOYIELD * Nouse now. - * + * * \return TRUE if there is a message peeked, or FALSE. * * \sa GetMessage, PeekPostMessage, HavePendingMessage, PostMessage - */ -MG_EXPORT BOOL GUIAPI PeekMessageEx (PMSG pMsg, HWND hWnd, - UINT nMsgFilterMin, UINT nMsgFilterMax, + */ +MG_EXPORT BOOL GUIAPI PeekMessageEx (PMSG pMsg, HWND hWnd, + UINT nMsgFilterMin, UINT nMsgFilterMax, BOOL bWait, UINT uRemoveMsg); /** * \fn BOOL GetMessage (PMSG pMsg, HWND hMainWnd) * \brief Gets a message from the message queue of a main window. * - * This function gets a message from the message queue of the main window + * This function gets a message from the message queue of the main window * \a hMainWnd, and returns until there is a message in the message queue. * * \param pMsg Pointer to the result message. @@ -2333,9 +2333,9 @@ static inline BOOL GUIAPI GetMessage (PMSG pMsg, HWND hWnd) * \fn BOOL WaitMessage (PMSG pMsg, HWND hMainWnd) * \brief Waits for a message from the message queue of a main window. * - * This function waits for a message from the message queue of the main - * window \a hMainWnd, and returns until there is a message in the message - * queue. Unlike \a GetMessage, this function does not remove the message + * This function waits for a message from the message queue of the main + * window \a hMainWnd, and returns until there is a message in the message + * queue. Unlike \a GetMessage, this function does not remove the message * from the message queue. * * \param pMsg Pointer to the result message. @@ -2349,7 +2349,7 @@ MG_EXPORT BOOL GUIAPI WaitMessage (PMSG pMsg, HWND hMainWnd); /** * \fn BOOL HavePendingMessage (HWND hMainWnd) - * \brief Checks if there is any pending message in the message queue of + * \brief Checks if there is any pending message in the message queue of * a main window. * * This function checks whether there is any pending message in the @@ -2368,8 +2368,8 @@ MG_EXPORT BOOL GUIAPI HavePendingMessage (HWND hMainWnd); * UINT nMsgFilterMin, UINT nMsgFilterMax, UINT uRemoveMsg) * \brief Peeks a message from the message queue of a main window * - * This functions peek a message from the message queue of the window \a hWnd - * and returns immediatly. Unlike \a GetMessage, this function does not wait + * This functions peek a message from the message queue of the window \a hWnd + * and returns immediatly. Unlike \a GetMessage, this function does not wait * for a message. * * \param pMsg Pointer to the result message. @@ -2384,15 +2384,15 @@ MG_EXPORT BOOL GUIAPI HavePendingMessage (HWND hMainWnd); * Remove it from the message queue. * - PM_NOYIELD * Nouse now. - * + * * \return TRUE if there is a message peeked, or FALSE. * * \sa GetMessage, PeekPostMessage, HavePendingMessage, PostMessage - */ -static inline BOOL GUIAPI PeekMessage (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, + */ +static inline BOOL GUIAPI PeekMessage (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, UINT nMsgFilterMax, UINT uRemoveMsg) { - return PeekMessageEx (pMsg, hWnd, nMsgFilterMin, nMsgFilterMax, + return PeekMessageEx (pMsg, hWnd, nMsgFilterMin, nMsgFilterMax, FALSE, uRemoveMsg); } @@ -2401,8 +2401,8 @@ static inline BOOL GUIAPI PeekMessage (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, UINT nMsgFilterMin, UINT nMsgFilterMax, UINT uRemoveMsg) * \brief Peeks a post message from the message queue of a main window * - * This functions peek a message from the message queue of the window \a hWnd - * and returns immediatly. Unlike \a PeekMessage, this function only peek a + * This functions peek a message from the message queue of the window \a hWnd + * and returns immediatly. Unlike \a PeekMessage, this function only peek a * post message. * * \param pMsg Pointer to the result message. @@ -2417,20 +2417,20 @@ static inline BOOL GUIAPI PeekMessage (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, * Remove it from the message queue. * - PM_NOYIELD * Nouse now. - * + * * \return TRUE if there is a message peeked, or FALSE. * * \sa GetMessage, PeekMessage, HavePendingMessage, PostMessage - */ -MG_EXPORT BOOL GUIAPI PeekPostMessage (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, + */ +MG_EXPORT BOOL GUIAPI PeekPostMessage (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, UINT nMsgFilterMax, UINT uRemoveMsg); /** * \fn int PostMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) - * \brief Posts a message into the message queue of a window and returns + * \brief Posts a message into the message queue of a window and returns * immediatly. * - * This functions posts a message into the message queue of the window \a hWnd + * This functions posts a message into the message queue of the window \a hWnd * and returns immediately. * * \param hWnd The handle to the window. @@ -2445,15 +2445,15 @@ MG_EXPORT BOOL GUIAPI PeekPostMessage (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, * \retval ERR_INV_HWND Invalid window handle. * * \sa SendMessage - */ -MG_EXPORT int GUIAPI PostMessage (HWND hWnd, UINT nMsg, + */ +MG_EXPORT int GUIAPI PostMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam); /** * \fn LRESULT SendMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) * \brief Sends a message to a window. * - * This function sends a message to the window \a hWnd, and will return + * This function sends a message to the window \a hWnd, and will return * until the message-handling process returns. * * \param hWnd The handle to the window. @@ -2464,7 +2464,7 @@ MG_EXPORT int GUIAPI PostMessage (HWND hWnd, UINT nMsg, * * \sa PostMessage */ -MG_EXPORT LRESULT GUIAPI SendMessage (HWND hWnd, UINT nMsg, +MG_EXPORT LRESULT GUIAPI SendMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam); /** @@ -2482,17 +2482,17 @@ MG_EXPORT LRESULT GUIAPI SendMessage (HWND hWnd, UINT nMsg, * \param wParam The first parameter of the auto-repeat message. * \param lParam The second parameter of the auto-repeat message. */ -MG_EXPORT void GUIAPI SetAutoRepeatMessage (HWND hwnd, UINT msg, +MG_EXPORT void GUIAPI SetAutoRepeatMessage (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); #ifndef _MGRM_THREADS /** * \def SendAsyncMessage - * \brief Is an alias of \a SendMessage for MiniGUI-Processes + * \brief Is an alias of \a SendMessage for MiniGUI-Processes * and MiniGUI-Standalone. * \sa SendMessage - */ + */ #define SendAsyncMessage SendMessage #ifdef _MGRM_PROCESSES @@ -2509,7 +2509,7 @@ MG_EXPORT void GUIAPI SetAutoRepeatMessage (HWND hwnd, UINT msg, * This function sends a message to the specified client \a cli. * * \param msg The pointer to the message. - * \param cli Either be the identifier of the targe client or one of the + * \param cli Either be the identifier of the targe client or one of the * following values: * - CLIENT_ACTIVE\n * The current active client on the topmost layer. @@ -2538,7 +2538,7 @@ int GUIAPI Send2Client (const MSG* msg, int cli); * \fn BOOL Send2TopMostClients (UINT nMsg, WPARAM wParam, LPARAM lParam) * \brief Sends a message to all clients in the topmost layer. * - * This function sends the message specified by (\a nMsg, \a wParam, \a lParam) + * This function sends the message specified by (\a nMsg, \a wParam, \a lParam) * to all clients in the topmost layer. * * \param nMsg The message identifier. @@ -2560,7 +2560,7 @@ BOOL GUIAPI Send2TopMostClients (UINT nMsg, WPARAM wParam, LPARAM lParam); UINT nMsg, WPARAM wParam, LPARAM lParam); * \brief Sends a message to the active window in layer. * - * This function sends the message specified by (\a nMsg, \a wParam, \a lParam) + * This function sends the message specified by (\a nMsg, \a wParam, \a lParam) * to the current active window in the specific layer (\a layer). * * \param layer The pointer to the layer. @@ -2575,7 +2575,7 @@ BOOL GUIAPI Send2TopMostClients (UINT nMsg, WPARAM wParam, LPARAM lParam); * * \sa Send2Client */ -BOOL GUIAPI Send2ActiveWindow (const MG_Layer* layer, +BOOL GUIAPI Send2ActiveWindow (const MG_Layer* layer, UINT nMsg, WPARAM wParam, LPARAM lParam); #endif /* _MGRM_PROCESSES */ @@ -2586,9 +2586,9 @@ BOOL GUIAPI Send2ActiveWindow (const MG_Layer* layer, * \fn LRESULT PostSyncMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) * \brief Posts a synchronical message to a window which is in different thread. * - * This function posts the synchronical message specified by - * (\a nMsg, \a wParam, \a lParam) to the window \a hWnd which - * is in different thread. This function will return until + * This function posts the synchronical message specified by + * (\a nMsg, \a wParam, \a lParam) to the window \a hWnd which + * is in different thread. This function will return until * the message is handled by the window procedure. * * \note The destination window must belong to other thread. @@ -2608,9 +2608,9 @@ MG_EXPORT LRESULT GUIAPI PostSyncMessage (HWND hWnd, UINT nMsg, WPARAM wParam, L * \fn LRESULT SendAsyncMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) * \brief Sends an asynchronical message to a window. * - * This function sends the asynchronical message specified by - * (\a nMsg, \a wParam, \a lParam) to the window \a hWnd - * which is in different thread. This function calls + * This function sends the asynchronical message specified by + * (\a nMsg, \a wParam, \a lParam) to the window \a hWnd + * which is in different thread. This function calls * the window procedure immediately, so it is very dangerous. * * \param hWnd The handle to the window. @@ -2631,9 +2631,9 @@ MG_EXPORT LRESULT GUIAPI SendAsyncMessage (HWND hWnd, UINT nMsg, WPARAM wParam, * \fn int SendNotifyMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) * \brief Sends a notification message to a window. * - * This function sends the notification message specified by - * (\a nMsg, \a wParam, \a lParam) to the window \a hWnd. This function - * puts the notication message in the message queue and then returns + * This function sends the notification message specified by + * (\a nMsg, \a wParam, \a lParam) to the window \a hWnd. This function + * puts the notication message in the message queue and then returns * immediately. * * \param hWnd The handle to the window. @@ -2693,11 +2693,11 @@ MG_EXPORT int GUIAPI PostQuitMessage (HWND hWnd); * \brief Sets a new keyboard layout. * * This function sets the keymaps to translate key scancodes to MSG_CHAR - * or MSG_KEYSYM messages. The default keymaps is for US PC keyboard + * or MSG_KEYSYM messages. The default keymaps is for US PC keyboard * layout, you can call this function to set a different keyboard layout. * The argument of \a kbd_layout specifies the name of the keyboard layout. * - * \param kbd_layout The keyboard layout name. It can be + * \param kbd_layout The keyboard layout name. It can be * one of the following values: * * - KBD_LAYOUT_DEFAULT\n @@ -2732,22 +2732,22 @@ MG_EXPORT BOOL GUIAPI SetKeyboardLayout (const char* kbd_layout); #include #include -MG_EXPORT int GUIAPI ToUnicode (UINT keycode, const BYTE* kbd_state, +MG_EXPORT int GUIAPI ToUnicode (UINT keycode, const BYTE* kbd_state, wchar_t* wcs, int wcs_len, const char* kbd_layout); -MG_EXPORT int GUIAPI ToAscii (UINT keycode, const BYTE* kbd_state, +MG_EXPORT int GUIAPI ToAscii (UINT keycode, const BYTE* kbd_state, WORD* ch, const char* kbd_layout); #endif /* _MGCHARSET_UNICODE */ /** * \fn BOOL TranslateMessage (PMSG pMsg) - * \brief Translates key down and key up messages to MSG_CHAR + * \brief Translates key down and key up messages to MSG_CHAR * message and post it into the message queue. * - * This function translates key down and key up message to an MSG_CHAR - * message or some MSG_KEYSYM messages, and send the message(s) to - * the window procedure as a notification message. If the message is + * This function translates key down and key up message to an MSG_CHAR + * message or some MSG_KEYSYM messages, and send the message(s) to + * the window procedure as a notification message. If the message is * not a key message, this function does nothing. * * The behavior of this function is inflected by the current @@ -2784,7 +2784,7 @@ MG_EXPORT BOOL GUIAPI TranslateMessage (PMSG pMsg); * * \sa TranslateMessage */ -MG_EXPORT BOOL GUIAPI TranslateKeyMsgToChar (int message, +MG_EXPORT BOOL GUIAPI TranslateKeyMsgToChar (int message, WPARAM wParam, LPARAM lParam, WORD *ch); /** @@ -2809,7 +2809,7 @@ MG_EXPORT LRESULT GUIAPI DispatchMessage (PMSG pMsg); * \fn int ThrowAwayMessages (HWND pMainWnd) * \brief Removes all messages in the message queue associated with a window. * - * This function removes all messages which are associated with + * This function removes all messages which are associated with * the specified window \a pMainWnd. * * \param pMainWnd The handle to the window. @@ -2847,7 +2847,7 @@ MG_EXPORT BOOL GUIAPI EmptyMessageQueue (HWND hWnd); * * This function returns the message string of the message identifier \a message. * E.g. this function will return the string of "MSG_CHAR" for MSG_CHAR message. - * + * * \param message The message identifier. * \return The message string. * @@ -2873,7 +2873,7 @@ MG_EXPORT const char* GUIAPI Message2Str (UINT message); * * \sa Message2Str */ -MG_EXPORT void GUIAPI PrintMessage (FILE* fp, HWND hWnd, +MG_EXPORT void GUIAPI PrintMessage (FILE* fp, HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam); #endif @@ -2905,7 +2905,7 @@ MG_EXPORT void GUIAPI PrintMessage (FILE* fp, HWND hWnd, * * \brief Type of message hook function. */ -typedef int (* MSGHOOK)(void* context, HWND dst_wnd, +typedef int (* MSGHOOK)(void* context, HWND dst_wnd, UINT msg, WPARAM wparam, LPARAM lparam); /** @@ -2929,7 +2929,7 @@ typedef struct _HOOKINFO * and passes the \a context value to the hook as the first argument. * * \param context The context value will be passed to the hook. - * \param hook The hook. This function will unregister the old hook if + * \param hook The hook. This function will unregister the old hook if * \a hook is NULL. * \return The old hook. * @@ -2943,11 +2943,11 @@ MG_EXPORT MSGHOOK GUIAPI RegisterKeyMsgHook (void* context, MSGHOOK hook); * * This function registers a mouse message hook pointed to by \a hook. * - * When the desktop receives a mouse message, it will send it to the hook + * When the desktop receives a mouse message, it will send it to the hook * first, and passes the \a context value to the hook as the first argument. * * \param context The context value will be passed to the hook. - * \param hook The hook. This function will unregister the old hook if + * \param hook The hook. This function will unregister the old hook if * \a hook is NULL. * \return The old hook. * @@ -2978,7 +2978,7 @@ typedef int (* SRVEVTHOOK) (PMSG pMsg); * \fn void GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook) * \brief Sets an event hook in the server of MiniGUI-Processes. * - * This function sets the event hook as \a SrvEvtHook in the server, + * This function sets the event hook as \a SrvEvtHook in the server, * i.e. mginit, of MiniGUI-Processes. * * \param SrvEvtHook The pointer to the hook, NULL to cancel the hook. @@ -3000,7 +3000,7 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook); * When the desktop receives a key message, it will send it to the hook first, * and passes the \a context value to the hook as the first argument. * - * \param hwnd The hook hwnd. This function will unregister the old hook if + * \param hwnd The hook hwnd. This function will unregister the old hook if * \a hwnd is HWND_NULL. * \param flag Indicates whether stop or continue handling the hooked messages. * HOOK_GOON to continue, HOOK_STOP to stop. @@ -3010,7 +3010,7 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook); * \note This function be be called by a client of MiniGUI-Processes. * For the server, you can use SetServerEventHook. * - * \sa RegisterMouseHookWindow, SetServerEventHook + * \sa RegisterMouseHookWindow, SetServerEventHook */ MG_EXPORT HWND GUIAPI RegisterKeyHookWindow (HWND hwnd, DWORD flag); @@ -3020,10 +3020,10 @@ MG_EXPORT HWND GUIAPI RegisterKeyHookWindow (HWND hwnd, DWORD flag); * * This function registers a mouse message hook pointed to by \a hook. * - * When the desktop receives a mouse message, it will send it to the hook + * When the desktop receives a mouse message, it will send it to the hook * first, and passes the \a context value to the hook as the first argument. * - * \param hwnd The hook hwnd. This function will unregister the old hook if + * \param hwnd The hook hwnd. This function will unregister the old hook if * \a hook is HWND_NULL. * \param flag Indicates whether stop or continue handling the hooked messages. * HOOK_GOON to continue, HOOK_STOP to stop. @@ -3033,7 +3033,7 @@ MG_EXPORT HWND GUIAPI RegisterKeyHookWindow (HWND hwnd, DWORD flag); * \note This function be be called by a client of MiniGUI-Processes. * For the server, you can use SetServerEventHook. * - * \sa RegisterKeyHookWindow, SetServerEventHook + * \sa RegisterKeyHookWindow, SetServerEventHook */ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); @@ -3096,7 +3096,7 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); /** * \def WS_DLGFRAME - * \brief The window has a fixed frame, i.e. user can not + * \brief The window has a fixed frame, i.e. user can not * drag the border of the window. */ #define WS_DLGFRAME 0x00800000L @@ -3140,7 +3140,7 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); /** * \def WS_TABSTOP - * \brief Indicates the user can set the input focus to the control by + * \brief Indicates the user can set the input focus to the control by * using Tab key. * \note This style is valid only for controls. */ @@ -3310,15 +3310,15 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); /** * \def WS_EX_LFRDR_CUSTOM1 - * \brief The user-defined extended style. It's often used to process - * user-defined hotspot area. + * \brief The user-defined extended style. It's often used to process + * user-defined hotspot area. */ #define WS_EX_LFRDR_CUSTOM1 0x01000000L /** * \def WS_EX_LFRDR_CUSTOM2 - * \brief The user-defined extended style. - * + * \brief The user-defined extended style. + * * \sa WS_EX_LFRDR_CUSTOM1 */ #define WS_EX_LFRDR_CUSTOM2 0x02000000L @@ -3326,7 +3326,7 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); /** * \def WS_EX_LFRDR_CUSTOM3 * \brief The user-defined extended style. - * + * * \sa WS_EX_LFRDR_CUSTOM1 */ #define WS_EX_LFRDR_CUSTOM3 0x04000000L @@ -3334,7 +3334,7 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); /** * \def WS_EX_LFRDR_CUSTOM4 * \brief The user-defined extended style. - * + * * \sa WS_EX_LFRDR_CUSTOM1 */ #define WS_EX_LFRDR_CUSTOM4 0x08000000L @@ -3350,7 +3350,7 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); */ /** - * \defgroup lf_fns Look and Feel Renderer management functions + * \defgroup lf_fns Look and Feel Renderer management functions * @{ */ @@ -3358,7 +3358,7 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); * \def WE_FONTS_NUMBER * \brief The number of window element font attributes. */ -#define WE_FONTS_NUMBER 4 +#define WE_FONTS_NUMBER 4 /** * \def WE_METRICS_NUMBER @@ -3380,13 +3380,13 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); #define WE_ATTR_TYPE_FONT 0x1000 #define WE_ATTR_TYPE_METRICS 0x2000 -#define WE_ATTR_TYPE_COLOR 0x3000 +#define WE_ATTR_TYPE_COLOR 0x3000 #define WE_ATTR_TYPE_FGC 0x3000 #define WE_ATTR_TYPE_BGCA 0x3100 #define WE_ATTR_TYPE_BGCB 0x3200 /* window element id */ -#define WE_CAPTION 0 +#define WE_CAPTION 0 #define WE_MENU 1 #define WE_MESSAGEBOX 2 #define WE_TOOLTIP 3 @@ -3466,7 +3466,7 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); /* Desktop */ #define WE_BGC_DESKTOP (WE_DESKTOP | WE_ATTR_TYPE_BGCA) -#define WE_ATTR_TYPE_ICON 0x4000 +#define WE_ATTR_TYPE_ICON 0x4000 #define WE_ATTR_TYPE_ICON_MASK 0x0F00 #define WE_ATTR_TYPE_SMALLICON 0x4000 #define WE_ATTR_TYPE_LARGEICON 0x4100 @@ -3491,7 +3491,7 @@ MG_EXPORT HWND GUIAPI RegisterMouseHookWindow (HWND hwnd, DWORD flag); * \def WE_ATTR_TYPE_RDR * \brief The specific type for LF renderer. */ -#define WE_ATTR_TYPE_RDR 0x5000 +#define WE_ATTR_TYPE_RDR 0x5000 #define WE_LFFLAT_NUMBER 1 #ifdef _MGLF_RDR_FLAT @@ -3560,21 +3560,21 @@ typedef struct _WINDOW_ELEMENT_RENDERER* PWERENDERER; */ typedef struct _LFSCROLLBARINFO { /** The minimum value of scrollbar range. */ - int minPos; + int minPos; /** The max value of scrollbar range. */ - int maxPos; - /** The current scrollbar pos. */ - int curPos; - /** The step per page. */ - int pageStep; - /** The length of arrow. */ - int arrowLen; - /** The start pixel of thumb. */ - int barStart; - /** The length of thumb. */ - int barLen; - /** The status of scrollbar. */ - int status; + int maxPos; + /** The current scrollbar pos. */ + int curPos; + /** The step per page. */ + int pageStep; + /** The length of arrow. */ + int arrowLen; + /** The start pixel of thumb. */ + int barStart; + /** The length of thumb. */ + int barLen; + /** The status of scrollbar. */ + int status; } LFSCROLLBARINFO; typedef LFSCROLLBARINFO* PLFSCROLLBARINFO; @@ -3587,24 +3587,24 @@ typedef struct _SCROLLBARDATA { int minPos; /** The max value of scrollbar range. */ int maxPos; - /** The current scrollbar pos. */ + /** The current scrollbar pos. */ int curPos; - /** The step per page. */ + /** The step per page. */ int pageStep; - /** The length of arrow. */ + /** The length of arrow. */ int arrowLen; - /** The start pixel of thumb. */ + /** The start pixel of thumb. */ int barStart; - /** The length of thumb. */ - int barLen; + /** The length of thumb. */ + int barLen; /* mouse position before tracking thumb. - * it represents the distance from x mouse postion to barStart + * it represents the distance from x mouse postion to barStart * for horizontal scrollbar. - * it represents the distance from y mouse postion to barStart + * it represents the distance from y mouse postion to barStart * for vertical scrollbar. */ int track_pos; - /** The status of scrollbar. */ + /** The status of scrollbar. */ int status; } SCROLLBARDATA; @@ -3640,36 +3640,36 @@ typedef SCROLLBARDATA* PSCROLLBARDATA; #define LFRDR_WINTYPE_MAINWIN 2 #define LFRDR_WINTYPE_CONTROL 3 -/** The window style information structure. Used by - * \a calc_we_metrics renderer function. - */ +/** The window style information structure. Used by + * \a calc_we_metrics renderer function. + */ typedef struct _LFRDR_WINSTYLEINFO { /** The styles of window.*/ - int dwStyle; + int dwStyle; /** The window type, can be one of the values: * - LFRDR_WINTYPE_DIALOG\n - * For dialog. + * For dialog. * - LFRDR_WINTYPE_MAINWIN\n - * For main window. + * For main window. * - LFRDR_WINTYPE_CONTROL\n - * For control. + * For control. */ - int winType; + int winType; } LFRDR_WINSTYLEINFO; /** * The scrollbar information structure. Used by - * \a draw_scrollbar and \a get_scrollbar_rect + * \a draw_scrollbar and \a get_scrollbar_rect * renderer function. */ typedef struct _LFRDR_TRACKBARINFO -{ - int nMin; - int nMax; +{ + int nMin; + int nMax; int nPos; - int nTickFreq; + int nTickFreq; }LFRDR_TRACKBARINFO; #define LFRDR_METRICS_MASK 0xFF00 @@ -3697,27 +3697,27 @@ typedef struct _LFRDR_TRACKBARINFO #define LFRDR_BTN_STATUS_HILITE 0x01 #define LFRDR_BTN_STATUS_PRESSED 0x02 #define LFRDR_BTN_STATUS_DISABLED 0x03 - + /* a flag used by radio button and check button. */ #define LFRDR_BTN_STATUS_SELECTED 0x04 /* a flag used by button on capton bar. */ #define LFRDR_BTN_STATUS_INACTIVE 0x08 - + /* thick or thin frame used by 3dbox. */ #define LFRDR_3DBOX_THICKFRAME 0x20 - + /* filled 3dbox */ #define LFRDR_3DBOX_FILLED 0x40 - + /*select status used by checkmark or radio.*/ #define LFRDR_MARK_SELECTED_MASK 0x05 #define LFRDR_MARK_ALL_SELECTED 0x01 #define LFRDR_MARK_HALF_SELECTED 0x04 - + /* a flag whether a checkmark or radio has a shell or not.*/ #define LFRDR_MARK_HAVESHELL 0x02 - + /*the direction of arrow.*/ #define LFRDR_ARROW_DIRECT_MASK 0x0F00 #define LFRDR_ARROW_LEFT 0x0000 @@ -3757,7 +3757,7 @@ typedef struct _WINDOW_ELEMENT_RENDERER { /** The renderer name. */ const char name[LEN_RENDERER_NAME+1]; - /** The pointer to initialize function. It is used to initialize basic + /** The pointer to initialize function. It is used to initialize basic * renderer information (metrics, color, font, icon, etc) and private * information. */ @@ -3769,24 +3769,24 @@ typedef struct _WINDOW_ELEMENT_RENDERER { */ int (*deinit) (PWERENDERER renderer); - /** The function pointer to calculate lighter, lightest, darker + /** The function pointer to calculate lighter, lightest, darker * and darkest color according to main color. * * \param color The main color. * \param flag The color type, can be one of the values: * - LFRDR_3DBOX_COLOR_DARKER \n - * darker color. + * darker color. * - LFRDR_3DBOX_COLOR_DARKEST \n - * darkest color. + * darkest color. * - LFRDR_3DBOX_COLOR_LIGHTER \n - * lighter color. + * lighter color. * - LFRDR_3DBOX_COLOR_LIGHTEST \n - * lightest color. + * lightest color. */ DWORD (*calc_3dbox_color) (DWORD color, int flag); /** The pointer to draw 3dbox function. - * + * * \param flag, can be OR'ed by the following values: * - LFRDR_BTN_STATUS_NORMAL\n * Normal status. @@ -3807,7 +3807,7 @@ typedef struct _WINDOW_ELEMENT_RENDERER { void (*draw_3dbox) (HDC hdc, const RECT* pRect, DWORD color, DWORD flag); - /** The pointer to draw radio function. + /** The pointer to draw radio function. * * \param status, can be OR'ed by the following values: * - LFRDR_MARK_ALL_SELECTED\n @@ -3819,16 +3819,16 @@ typedef struct _WINDOW_ELEMENT_RENDERER { */ void (*draw_radio) (HDC hdc, const RECT* pRect, DWORD color, int status); - /** The pointer to draw checkbox function. + /** The pointer to draw checkbox function. * \sa draw_radio */ - void (*draw_checkbox) (HDC hdc, const RECT* pRect, DWORD color, + void (*draw_checkbox) (HDC hdc, const RECT* pRect, DWORD color, int status); /** The pointer to draw checkmark function. * \sa draw_radio */ - void (*draw_checkmark) (HDC hdc, const RECT* pRect, DWORD color, + void (*draw_checkmark) (HDC hdc, const RECT* pRect, DWORD color, int status); /** The pointer to draw arrow function. @@ -3849,7 +3849,7 @@ typedef struct _WINDOW_ELEMENT_RENDERER { */ void (*draw_arrow) (HWND hWnd, HDC hdc, const RECT* pRect, DWORD color, int status); - /** The pointer to draw fold function, this function used + /** The pointer to draw fold function, this function used * by listview and treeview. * * \param status, can be OR'ed by the following values: @@ -3862,30 +3862,30 @@ typedef struct _WINDOW_ELEMENT_RENDERER { * * \param next The number of child node. */ - void (*draw_fold) (HWND hWnd, HDC hdc, const RECT* pRect, DWORD color, + void (*draw_fold) (HWND hWnd, HDC hdc, const RECT* pRect, DWORD color, int status, int next); /** The pointer to draw focus frame function.*/ void (*draw_focus_frame) (HDC hdc, const RECT *pRect, DWORD color); /** The pointer to draw normal item function, this function used by listbox.*/ - void (*draw_normal_item) (HWND hWnd, HDC hdc, const RECT* pRect, - DWORD color); - - /** The pointer to draw highlight item function, this function used by listbox.*/ - void (*draw_hilite_item) (HWND hWnd, HDC hdc, const RECT* pRect, - DWORD color); - - /** The pointer to draw disabled item function, this function used by listbox. */ - void (*draw_disabled_item) (HWND hWnd, HDC hdc, const RECT* pRect, - DWORD color); - - /** The pointer to draw significant item function, this function used by listbox.*/ - void (*draw_significant_item) (HWND hWnd, HDC hdc, const RECT* pRect, + void (*draw_normal_item) (HWND hWnd, HDC hdc, const RECT* pRect, DWORD color); - /** The pointer to draw push button function, this function used - * by button. + /** The pointer to draw highlight item function, this function used by listbox.*/ + void (*draw_hilite_item) (HWND hWnd, HDC hdc, const RECT* pRect, + DWORD color); + + /** The pointer to draw disabled item function, this function used by listbox. */ + void (*draw_disabled_item) (HWND hWnd, HDC hdc, const RECT* pRect, + DWORD color); + + /** The pointer to draw significant item function, this function used by listbox.*/ + void (*draw_significant_item) (HWND hWnd, HDC hdc, const RECT* pRect, + DWORD color); + + /** The pointer to draw push button function, this function used + * by button. * * \param status, can be OR'ed by the following values: * - BST_NORMAL\n @@ -3901,7 +3901,7 @@ typedef struct _WINDOW_ELEMENT_RENDERER { DWORD color1, DWORD color2, int status); /** The pointer to draw radio button function, the function ued - * by button. + * by button. * * \param status, can be OR'ed by the following values: * - LFRDR_BTN_STATUS_NORMAL\n @@ -3957,9 +3957,9 @@ typedef struct _WINDOW_ELEMENT_RENDERER { */ void (*draw_caption_button) (HWND hwnd, HDC hdc, int ht_code, int state); - /** The pointer to draw scrollbar function. - * - * \param sb_pos The position need to be paint. + /** The pointer to draw scrollbar function. + * + * \param sb_pos The position need to be paint. * If 0, it should draw all the scrollbar. * \param status, which is one of the value: * - LFRDR_BTN_STATUS_NORMAL\n @@ -3974,8 +3974,8 @@ typedef struct _WINDOW_ELEMENT_RENDERER { void (*draw_scrollbar) (HWND hWnd, HDC hdc, int sb_pos); /** The pointer to get trackbar rect function. */ - void (*calc_trackbar_rect) (HWND hWnd, LFRDR_TRACKBARINFO *info, - DWORD dwStyle, const RECT* rcClient, RECT* rcRuler, + void (*calc_trackbar_rect) (HWND hWnd, LFRDR_TRACKBARINFO *info, + DWORD dwStyle, const RECT* rcClient, RECT* rcRuler, RECT* rcBar, RECT* rcBorder); /** The pointer to draw trackbar function. */ @@ -4011,10 +4011,10 @@ typedef struct _WINDOW_ELEMENT_RENDERER { * - LFRDR_METRICS_MINWIN_HEIGHT\n * The minimize height of window. */ - int (*calc_we_metrics) (HWND hWnd, + int (*calc_we_metrics) (HWND hWnd, LFRDR_WINSTYLEINFO* style_info, int which); - /** The pointer to hittest function. + /** The pointer to hittest function. * * \param x, y The position of the mouse in screen coordinates. * \return HT_XXX or HT_USER_XXX, hittest value. @@ -4026,7 +4026,7 @@ typedef struct _WINDOW_ELEMENT_RENDERER { /** The pointer to draw user-defined hotspot function. * - * \param ht_code The hittest code. If 0, it should draw all + * \param ht_code The hittest code. If 0, it should draw all * user-defined hotspot. * \param state The button state, can be one of the values: * - LFRDR_BTN_STATUS_NORMAL\n @@ -4036,12 +4036,12 @@ typedef struct _WINDOW_ELEMENT_RENDERER { void (*draw_custom_hotspot) (HWND hWnd, HDC hdc, int ht_code, int state); /** The pointer to calculate scrollbar's thumb area function. - * + * * \param vertical Vertical scrollbar or Horizontal scrollbar. * \param sb_info The scrollbar information for calculating result. * */ - void (*calc_thumb_area) (HWND hWnd, BOOL vertical, + void (*calc_thumb_area) (HWND hWnd, BOOL vertical, LFSCROLLBARINFO* sb_info); /** The pointer to output disabled text function.*/ @@ -4058,28 +4058,28 @@ typedef struct _WINDOW_ELEMENT_RENDERER { * - LFRDR_TAB_ICON\n * With icon. */ - void (*draw_tab) (HWND hWnd, HDC hdc, RECT *rect, char *title, + void (*draw_tab) (HWND hWnd, HDC hdc, RECT *rect, char *title, DWORD color, int flag, HICON icon); /** The pointer to draw progressbar's chunk/bar function.*/ - void (*draw_progress) (HWND hWnd, HDC hdc, + void (*draw_progress) (HWND hWnd, HDC hdc, int nMax, int nMin, int nPos, BOOL fVertical); - - /** The pointer to draw table header function. + + /** The pointer to draw table header function. * this function used by listview and gridview. */ void (*draw_header) (HWND hWnd, HDC hdc, const RECT* pRect, DWORD color); - /** The pointer to get renderer private data function. + /** The pointer to get renderer private data function. * - * \param we_attr_id The id pointed renderer private data. + * \param we_attr_id The id pointed renderer private data. */ DWORD (*on_get_rdr_attr) (struct _WINDOW_ELEMENT_RENDERER*, int we_attr_id); - /** The pointer to set renderer private data function. - * - * \param we_attr_id The id pointed renderer private data. - * \param we_attr The new renderer private data. + /** The pointer to set renderer private data function. + * + * \param we_attr_id The id pointed renderer private data. + * \param we_attr The new renderer private data. * */ DWORD (*on_set_rdr_attr) (struct _WINDOW_ELEMENT_RENDERER*, int we_attr_id, DWORD we_attr, BOOL change); @@ -4124,7 +4124,7 @@ typedef struct _WINDOW_ELEMENT_RENDERER { typedef struct _WINDOWINFO { /** The position and size of window.*/ - int left, top; + int left, top; int right, bottom; /** The position and size of client area.*/ @@ -4137,24 +4137,24 @@ typedef struct _WINDOWINFO DWORD dwExStyle; /** The foreground color (not used).*/ - gal_pixel iFgColor; + gal_pixel iFgColor; /** The background color.*/ - gal_pixel iBkColor; + gal_pixel iBkColor; /** The handle of menu.*/ - HMENU hMenu; + HMENU hMenu; /** The handle of accelerator table.*/ HACCEL hAccel; /** The handle of cursor.*/ HCURSOR hCursor; /** The handle of icon.*/ - HICON hIcon; + HICON hIcon; /** The handle of system menu.*/ - HMENU hSysMenu; + HMENU hSysMenu; /** The pointer to logical font.*/ PLOGFONT pLogFont; /** The caption of window.*/ - char* spCaption; + char* spCaption; /** The identifier of window. * \note The type changed from int to LINT since v3.2. */ @@ -4176,7 +4176,7 @@ typedef struct _WINDOWINFO * This function gets the handle to the window information \ * from the specified window handle \a hWnd. * - * \param hWnd The handle to the window. + * \param hWnd The handle to the window. * * \return The handle to the window information. */ @@ -4185,16 +4185,16 @@ static inline const WINDOWINFO* GUIAPI GetWindowInfo (HWND hWnd) return (WINDOWINFO*)hWnd; } -/** +/** * \fn BOOL GUIAPI InitWindowElementAttrs (PWERENDERER rdr) * - * This function initializes window element attributes of the + * This function initializes window element attributes of the * specified renderer \a rdr according to the appropriate section * in configuration file. * * \param rdr The pointer to the specified renderer. * - * \return If succeed, return TRUE; otherwise return FALSE. + * \return If succeed, return TRUE; otherwise return FALSE. */ MG_EXPORT BOOL GUIAPI InitWindowElementAttrs (PWERENDERER rdr); @@ -4202,11 +4202,11 @@ MG_EXPORT BOOL GUIAPI InitWindowElementAttrs (PWERENDERER rdr); * \fn DWORD GUIAPI GetWindowElementAttr (HWND hwnd, int we_attr_id) * \brief Get a window element data. * - * This function gets a window element data which is identified by + * This function gets a window element data which is identified by * \a we_attr_id. * - * \param hwnd The handle to the window. - * \param we_attr_id The window element id number, can be one of the + * \param hwnd The handle to the window. + * \param we_attr_id The window element id number, can be one of the * following values: * * - WE_FONT_CAPTION\n @@ -4260,10 +4260,10 @@ MG_EXPORT BOOL GUIAPI InitWindowElementAttrs (PWERENDERER rdr); * - WE_BGC_WINDOW\n * The window background color. Used by window and control. * - WE_FGC_THREED_BODY\n - * The 3dbox foreground color. Mainly used by drawing 3dbox + * The 3dbox foreground color. Mainly used by drawing 3dbox * object, such as dialog and button, etc. * - WE_MAINC_THREED_BODY\n - * The 3dbox background color. Mainly used by drawing menubar, + * The 3dbox background color. Mainly used by drawing menubar, * dialog, header and button, etc. * - WE_FGC_SELECTED_ITEM\n * The selected item foreground color. Used by menu and control. @@ -4300,15 +4300,15 @@ MG_EXPORT DWORD GUIAPI GetWindowElementAttr (HWND hwnd, int we_attr_id); * This function sets a new window element data \a we_attr to MiniGUI, * which is identified by \a we_attr_id. * - * \param hwnd The handle to the window. - * \param we_attr_id The window element id. - * \param we_attr The new window element data. + * \param hwnd The handle to the window. + * \param we_attr_id The window element id. + * \param we_attr The new window element data. * * \return If succeed, return the old window element data; otherwise return -1. * * \sa GetWindowElementAttr */ -MG_EXPORT DWORD GUIAPI SetWindowElementAttr (HWND hwnd, int we_attr_id, +MG_EXPORT DWORD GUIAPI SetWindowElementAttr (HWND hwnd, int we_attr_id, DWORD we_attr); /** @@ -4316,30 +4316,30 @@ MG_EXPORT DWORD GUIAPI SetWindowElementAttr (HWND hwnd, int we_attr_id, HDC hdc, int we_attr_id) * \brief Get a window element gal_pixel color. * - * This function gets a window element gal_pixel color which is identified + * This function gets a window element gal_pixel color which is identified * by \a we_attr_id and \a hdc. * - * \param hwnd The handle to the window. - * \param hdc The device context. If -1, it will return pixel value according + * \param hwnd The handle to the window. + * \param hdc The device context. If -1, it will return pixel value according * to window handle \a hwnd; otherwise return pixel value according - * to pixel format in \a hdc. - * \param we_attr_id The window element id number. + * to pixel format in \a hdc. + * \param we_attr_id The window element id number. * - * \return If succeed, return the window element pixel color data; otherwise + * \return If succeed, return the window element pixel color data; otherwise * return -1. * * \sa GetWindowElementAttr */ -MG_EXPORT gal_pixel GUIAPI GetWindowElementPixelEx (HWND hwnd, +MG_EXPORT gal_pixel GUIAPI GetWindowElementPixelEx (HWND hwnd, HDC hdc, int we_attr_id); /** * \fn WINDOW_ELEMENT_RENDERER* GUIAPI GetWindowRendererFromName (const char* name) * \brief Get window renderer from name. - * + * * \param name The renderer name. * - * This function gets window renderer from the specified name \a name, + * This function gets window renderer from the specified name \a name, * which is case-insensitive. * * \return The pointer to the window renderer for success, NULL for failure. @@ -4347,30 +4347,30 @@ MG_EXPORT gal_pixel GUIAPI GetWindowElementPixelEx (HWND hwnd, * \note The prototype had changed since MiniGUI v3.2; the old one returns * a const value. */ -MG_EXPORT WINDOW_ELEMENT_RENDERER* +MG_EXPORT WINDOW_ELEMENT_RENDERER* GUIAPI GetWindowRendererFromName (const char* name); /** * \fn BOOL GUIAPI AddWindowElementRenderer (const char* name, \ const WINDOW_ELEMENT_RENDERER* we_rdr) * \brief Add a window element renderer to the system. - * + * * This function adds a new window renderer to MiniGUI system. - * + * * \param name The renderer name. * \param we_rdr The pointer to a new renderer. * * \return TRUE for success, FALSE for failure. */ -MG_EXPORT BOOL GUIAPI AddWindowElementRenderer (const char* name, +MG_EXPORT BOOL GUIAPI AddWindowElementRenderer (const char* name, const WINDOW_ELEMENT_RENDERER* we_rdr); /** * \fn BOOL BOOL GUIAPI RemoveWindowElementRenderer (const char* name) * \brief Remove a window renderer from MiniGUI. - * + * * This function only removes a window renderer named by \a name. - * + * * \param name The renderer name. * * \return TRUE for success, FALSE for failure. @@ -4379,25 +4379,25 @@ MG_EXPORT BOOL GUIAPI RemoveWindowElementRenderer (const char* name); /** * \fn WINDOW_ELEMENT_RENDERER* GUIAPI GetDefaultWindowElementRenderer (void) - * \brief Get the default window renderer. - * - * This function gets the default window renderer in MiniGUI. + * \brief Get the default window renderer. + * + * This function gets the default window renderer in MiniGUI. * * \return the pointer to the default renderer. * * \note The prototype had changed since MiniGUI v3.2; the old one returns * a const value. */ -MG_EXPORT WINDOW_ELEMENT_RENDERER* +MG_EXPORT WINDOW_ELEMENT_RENDERER* GUIAPI GetDefaultWindowElementRenderer (void); /** * \fn const char* GUIAPI SetDefaultWindowElementRenderer (const char* name) - * \brief Set a window element renderer as the default system renderer. - * + * \brief Set a window element renderer as the default system renderer. + * * This function sets a window element renderer as the default system - * renderer. - * + * renderer. + * * \param name The renderer name. * * \return the old renderer's name for success, NULL for failure. @@ -4409,20 +4409,20 @@ MG_EXPORT const char* GUIAPI SetDefaultWindowElementRenderer (const char* name); const char* werdr_name, \ const WINDOW_ELEMENT_ATTR* we_attrs) * - * \brief Set a window element renderer and window element attributes + * \brief Set a window element renderer and window element attributes * for window specified by \a hwnd. - * - * This function sets the window handled by \a hWnd to use a different - * window element renderer OR'ed window element attributes and updates + * + * This function sets the window handled by \a hWnd to use a different + * window element renderer OR'ed window element attributes and updates * window in time. - * - * \param hwnd The handle to the window. + * + * \param hwnd The handle to the window. * \param werdr_name The renderer name. * \param we_attrs The pointer to new window element attributes. * * \return TRUE for success, FALSE for failure. */ -MG_EXPORT BOOL GUIAPI SetWindowElementRenderer (HWND hWnd, +MG_EXPORT BOOL GUIAPI SetWindowElementRenderer (HWND hWnd, const char* werdr_name, const WINDOW_ELEMENT_ATTR* we_attrs); /** @@ -4437,7 +4437,7 @@ MG_EXPORT BOOL GUIAPI SetWindowElementRenderer (HWND hWnd, * * \return TRUE for success, FALSE for failure. */ -MG_EXPORT BOOL InitRendererSystemIcon (const char* rdr_name, +MG_EXPORT BOOL InitRendererSystemIcon (const char* rdr_name, HICON *small_icon, HICON *large_icon); /** @@ -4450,7 +4450,7 @@ MG_EXPORT BOOL InitRendererSystemIcon (const char* rdr_name, * * \sa InitRendererSystemIcon */ -MG_EXPORT void TermRendererSystemIcon (HICON *small_icon, +MG_EXPORT void TermRendererSystemIcon (HICON *small_icon, HICON *large_icon); /** @} end of lf_fns */ @@ -4459,54 +4459,54 @@ MG_EXPORT void TermRendererSystemIcon (HICON *small_icon, * \defgroup res_manage Resource managment functions * @{ */ -/** +/** * \fn BOOL GUIAPI RegisterResFromFile (HDC hdc, const char* file); * \brief Register a device-dependent bitmap from a file. - * - * This function load a device-dependent bitmap from a file and register it to - * bitmap cache. - * + * + * This function load a device-dependent bitmap from a file and register it to + * bitmap cache. + * * \param hdc The device context. - * \param file The name of image file. The suffix indicates image type such as + * \param file The name of image file. The suffix indicates image type such as * bmp, png, jpg etc. - * + * * \return TRUE on success, FALSE on error. * */ MG_EXPORT BOOL GUIAPI RegisterResFromFile (HDC hdc, const char* file); -/** +/** * \fn BOOL GUIAPI RegisterResFromMem (HDC hdc, const char* file, \ * const unsigned char* data, size_t data_size); * * \brief Register a device-dependent bitmap to bitmap cache from memory. - * - * This function load a device-dependent bitmap from memory and register it to - * bitmap cache. - * + * + * This function load a device-dependent bitmap from memory and register it to + * bitmap cache. + * * \param hdc The device context. - * \param file The name of image file. The suffix indicates image type such as + * \param file The name of image file. The suffix indicates image type such as * bmp, png, jpg etc. * \param data The pointer to image data. * \param data_size The size of image data. - * + * * \return TRUE on success, FALSE on error. * */ -MG_EXPORT BOOL GUIAPI RegisterResFromMem (HDC hdc, const char* file, +MG_EXPORT BOOL GUIAPI RegisterResFromMem (HDC hdc, const char* file, const unsigned char* data, size_t data_size); -/** +/** * \fn BOOL GUIAPI RegisterResFromBitmap (const char* file, const BITMAP* bmp); * \brief Register a device-dependent bitmap to bitmap cache. - * - * This function register a device-dependent bitmap to bitmap cache. - * - * \param file The name of image file. The suffix indicates image type such as + * + * This function register a device-dependent bitmap to bitmap cache. + * + * \param file The name of image file. The suffix indicates image type such as * bmp, png, jpg etc. * \param bmp The pointer to a BITMAP object. - * + * * \return TRUE on success, FALSE on error. * */ @@ -4514,12 +4514,12 @@ MG_EXPORT BOOL GUIAPI RegisterResFromBitmap (const char* file, const BITMAP* bmp /** * \fn MG_EXPORT const BITMAP* RetrieveRes (const char *file) - * \brief Get a BITMAP object from cache according to the specified resource + * \brief Get a BITMAP object from cache according to the specified resource * file name. - * - * This function gets a BITMAP object from cache according to the specified + * + * This function gets a BITMAP object from cache according to the specified * resource file name \a file. - * + * * \param file The specified file name. * * \return a BITMAP object for success, NULL for error. @@ -4528,12 +4528,12 @@ MG_EXPORT const BITMAP* GUIAPI RetrieveRes (const char *file); /** * \fn void UnregisterRes (const char *file) - * \brief Unregister the BITMAP object from cache according to the specified + * \brief Unregister the BITMAP object from cache according to the specified * resource file name. - * - * This function unregister the BITMAP object from cache according to the + * + * This function unregister the BITMAP object from cache according to the * specified resource file name \a file and the BITMAP \a bmp. - * + * * \param file The specified file name. * * \return None. @@ -4541,40 +4541,40 @@ MG_EXPORT const BITMAP* GUIAPI RetrieveRes (const char *file); */ MG_EXPORT void GUIAPI UnregisterRes (const char *file); -/** +/** * \fn BOOL GUIAPI RegisterSystemBitmap (HDC hdc, const char* rdr_name, \ * const char* id); * \brief Register a device-dependent bitmap from id to BITMAP cache. - * - * This function load a device-dependent bitmap from id and register it to - * BITMAP cache. + * + * This function load a device-dependent bitmap from id and register it to + * BITMAP cache. * * \param hdc The device context. - * \param rdr_name The name of window element renderer. NULL for default + * \param rdr_name The name of window element renderer. NULL for default * renderer. * \param id The id of system image. - * + * * \return TRUE on success, FALSE on error. * */ -MG_EXPORT BOOL GUIAPI RegisterSystemBitmap (HDC hdc, const char* rdr_name, +MG_EXPORT BOOL GUIAPI RegisterSystemBitmap (HDC hdc, const char* rdr_name, const char* id); -/** +/** * \fn void GUIAPI UnregisterSystemBitmap (HDC hdc, const char* rdr_name, \ * const char* id); * \brief Unregister a BITMAP object from BITMAP cache. - * - * This function unregister a BITMAP object from BITMAP cache. + * + * This function unregister a BITMAP object from BITMAP cache. * * \param hdc The device context. - * \param rdr_name The name of window element renderer. NULL for default + * \param rdr_name The name of window element renderer. NULL for default * renderer. * \param id The id of system image. - * + * * */ -MG_EXPORT void GUIAPI UnregisterSystemBitmap (HDC hdc, const char* rdr_name, +MG_EXPORT void GUIAPI UnregisterSystemBitmap (HDC hdc, const char* rdr_name, const char* id); /* define the key of resource */ @@ -4588,10 +4588,10 @@ typedef struct _INNER_RES { int data_len; /* special param recognized by the TYPE_OPS - * normal is null. + * normal is null. * is the data is a mem of raw png, jpeg, bmp * and so on, it should be the extention name - * of the filename. eg. + * of the filename. eg. * INNER_RES res[]= { ... { ..., ... ,.., "png" } .. }; * */ void* additional; @@ -4639,15 +4639,15 @@ enum emResType{ /* NOT IMPLEMENT */ RES_TYPE_WINDOW, - /* Make the LoadResource return the + /* Make the LoadResource return the * raw data of INNER_RES, it's a pointer * of MEM_RES * only support incore Resource, * if the resource is stored in disk, LoadResource will return NULL */ - RES_TYPE_MEM_RES, + RES_TYPE_MEM_RES, - RES_TYPE_FONT, + RES_TYPE_FONT, /* the beginning of user defined type */ @@ -4670,7 +4670,7 @@ typedef struct _FONT_RES { RES_KEY key; } FONT_RES; -/* the original source of resource +/* the original source of resource * depend on the values, the res manager * would select corrent loader to * load resource form disk or mem @@ -4725,7 +4725,7 @@ enum emResReturn { RES_RET_OK = 0, RES_RET_INVALID_PARAM, RES_RET_NOT_EXIST_KEY, //RES_KEY is not exist - RES_RET_LOAD_FILE_FAILED, + RES_RET_LOAD_FILE_FAILED, RES_RET_LOAD_MEM_FAILED, RES_RET_UNKNOWN_TYPE, RES_RET_NOT_IMPLEMENTED, @@ -4760,13 +4760,13 @@ MG_EXPORT int SetResPath (const char* path); /** * \fn int AddInnerRes (INNER_RES* inner_res, int count, BOOL copy) - * \brief Add some incore resource into the resource manager in order to + * \brief Add some incore resource into the resource manager in order to * call LoadResource to get those resource. * * \param inner_res The pointer to the incore resource. * \param count The bytes count of inner_res. - * \param copy TRUE indicate that resource manager will copy the value of - * inner_res array, otherwise, resource manager just save the + * \param copy TRUE indicate that resource manager will copy the value of + * inner_res array, otherwise, resource manager just save the * pointer to inner_res. * * \return RES_RET_OK for success or error code. @@ -4780,7 +4780,7 @@ MG_EXPORT int AddSharedRes (const char* shared_name); /** * \fn int RegisterResType (int type, RES_TYPE_OPS* ops) - * \brief Register a new user-defined type into resource manager, + * \brief Register a new user-defined type into resource manager, * so that the LoadResource can load the special resource automatically. * * \param type The user-defined type. It must >=RES_TYPE_USER and