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

📄 window.h

📁 MiniGui在ucOS-ii下的一个例子
💻 H
📖 第 1 页 / 共 5 页
字号:
/** * \file window.h * \author Wei Yongming <ymwei@minigui.org> * \date 2002/01/26 *  * This file includes windowing interfaces of MiniGUI. * \verbatim    Copyright (C) 1998-2002 Wei Yongming.    Copyright (C) 2002-2003 Feynman Software.    This file is part of MiniGUI, a lightweight Graphics User Interface     support library for real-time embedded Linux.    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \endverbatim *//*  * $Id: window.h,v 1.120 2004/02/25 02:34:49 weiym Exp $ * *             MiniGUI for Linux, uClinux, eCos, and uC/OS-II version 1.5.x *             Copyright (C) 1998-2002 Wei Yongming. *             Copyright (C) 2002-2004 Feynman Software. */#ifndef _MGUI_WINDOW_H    #define _MGUI_WINDOW_H#ifdef __cplusplusextern "C" {#endif  /* __cplusplus */    /**     * \defgroup msgs Messages     * @{     *//* definitions of common messages. */#define MSG_SYNCMSG         0x0000#define MSG_NULLMSG         0x0000    /**     * \defgroup mouse_msgs Mouse event messages     * @{     */    /* Group 1 from 0x0001 to 0x000F, the mouse messages. */#define MSG_FIRSTMOUSEMSG   0x0001/** * \def MSG_LBUTTONDOWN * \brief Left mouse button down message. * * This message is posted to the window when the user presses down * the left button of the mouse in the client area of the window. * * \code * MSG_LBUTTONDOWN * DWORD key_flags = (DWORD)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param key_flags The shift key status when this message occurred. * \param x_pos,y_pos The position of the mouse in client coordinates. * * \sa MSG_LBUTTONUP, key_defs * * Example: * \include buttondown.c */#define MSG_LBUTTONDOWN     0x0001/** * \def MSG_LBUTTONUP * \brief Left mouse button up message. * * This message is posted to the window when the user releases up * the left button of the mouse in the client area of the window. * * \code * MSG_LBUTTONUP * DWORD key_flags = (DWORD)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param key_flags The shift key status when this message occurred. * \param x_pos,y_pos The position of the mouse in client coordinates. * * \sa MSG_LBUTTONDOWN, key_defs */#define MSG_LBUTTONUP       0x0002/** * \def MSG_LBUTTONDBLCLK * \brief Left mouse button double clicked message. * * This message is posted to the window when the user double clicks * the left button of the mouse in the client area of the window. * * \code * MSG_LBUTTONDBLCLK * DWORD key_flags = (DWORD)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param key_flags The shift key status when this message occurred. * \param x_pos,y_pos The position of the mouse in client coordinates. * * \sa MSG_RBUTTONDBLCLK, key_defs */#define MSG_LBUTTONDBLCLK   0x0003/** * \def MSG_MOUSEMOVE * \brief The mouse moved message. * * This message is posted to the window when the user moves the mouse * in the client area of the window. * * \code * MSG_MOUSEMOVE * DWORD key_flags = (DWORD)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param key_flags The shift key status when this message occurred. * \param x_pos,y_pos The position of the mouse in client coordinates. * * \sa key_defs */#define MSG_MOUSEMOVE       0x0004/** * \def MSG_RBUTTONDOWN * \brief Right mouse button down message. * * This message is posted to the window when the user presses down * the right button of the mouse in the client area of the window. * * \code * MSG_RBUTTONDOWN * DWORD key_flags = (DWORD)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param key_flags The shift key status when this message occurred. * \param x_pos,y_pos The position of the mouse in client coordinates. * * \sa MSG_RBUTTONUP, key_defs * * Example: * \include buttondown.c */#define MSG_RBUTTONDOWN     0x0005/** * \def MSG_RBUTTONUP * \brief Right mouse button up message. * * This message is posted to the window when the user releases up * the right button of the mouse in the client area of the window. * * \code * MSG_RBUTTONUP * DWORD key_flags = (DWORD)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param key_flags The shift key status when this message occurred. * \param x_pos,y_pos The position of the mouse in client coordinates. * * \sa MSG_RBUTTONDOWN, key_defs */#define MSG_RBUTTONUP       0x0006/** * \def MSG_RBUTTONDBLCLK * \brief Right mouse button double clicked message. * * This message is posted to the window when the user double clicks * the right button of the mouse in the client area of the window. * * \code * MSG_RBUTTONDBLCLK * DWORD key_flags = (DWORD)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param key_flags The shift key status when this message occurred. * \param x_pos,y_pos The position of the mouse in client coordinates. * * \sa MSG_LBUTTONDBLCLK, key_defs */#define MSG_RBUTTONDBLCLK   0x0007#define MSG_NCMOUSEOFF      0x0007/** * \def MSG_NCLBUTTONDOWN * \brief Left mouse button down message in the non-client area. * * This message is posted to the window when the user presses down * the left button of the mouse in the non-client area of the window. * * \code * MSG_NCLBUTTONDOWN * int hit_code = (int)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param hit_code The hit test code which tells the area of the mouse. * \param x_pos,y_pos The position of the mouse in window coordinates. * * \sa MSG_NCLBUTTONUP, MSG_NCHITTEST */#define MSG_NCLBUTTONDOWN   0x0008/** * \def MSG_NCLBUTTONUP * \brief Left mouse button up message in the non-client area. * * This message is posted to the window when the user releases up * the left button of the mouse in the non-client area of the window. * * \code * MSG_NCLBUTTONUP * int hit_code = (int)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param hit_code The hit test code which tells the area of the mouse. * \param x_pos,y_pos The position of the mouse in window coordinates. * * \sa MSG_NCLBUTTONDOWN, MSG_NCHITTEST */#define MSG_NCLBUTTONUP     0x0009/** * \def MSG_NCLBUTTONDBLCLK * \brief Left mouse button double clicked in the non-client area. * * This message is posted to the window when the user double clicks * the left button of the mouse in the non-client area of the window. * * \code * MSG_NCLBUTTONDBLCLK * int hit_code = (int)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param hit_code The hit test code which tells the area of the mouse. * \param x_pos,y_pos The position of the mouse in window coordinates. * * \sa MSG_NCRBUTTONDBLCLK, MSG_NCHITTEST */#define MSG_NCLBUTTONDBLCLK 0x000A/** * \def MSG_NCMOUSEMOVE * \brief Mouse moves in the non-client area. * * This message is posted to the window when the user moves the mouse * in the non-client area of the window. * * \code * MSG_NCMOUSEMOVE * int hit_code = (int)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param hit_code The hit test code which tells the area of the mouse. * \param x_pos,y_pos The position of the mouse in window coordinates. * * \sa MSG_NCHITTEST */#define MSG_NCMOUSEMOVE     0x000B/** * \def MSG_NCRBUTTONDOWN * \brief Right mouse button down message in the non-client area. * * This message is posted to the window when the user presses down * the right button of the mouse in the non-client area of the window. * * \code * MSG_NCRBUTTONDOWN * int hit_code = (int)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param hit_code The hit test code which tells the area of the mouse. * \param x_pos,y_pos The position of the mouse in window coordinates. * * \sa MSG_NCRBUTTONUP, MSG_NCHITTEST */#define MSG_NCRBUTTONDOWN   0x000C/** * \def MSG_NCRBUTTONUP * \brief Right mouse button up message in the non-client area. * * This message is posted to the window when the user releases  up * the right button of the mouse in the non-client area of the window. * * \code * MSG_NCRBUTTONUP * int hit_code = (int)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param hit_code The hit test code which tells the area of the mouse. * \param x_pos,y_pos The position of the mouse in window coordinates. * * \sa MSG_NCRBUTTONDOWN, MSG_NCHITTEST */#define MSG_NCRBUTTONUP     0x000D/** * \def MSG_NCRBUTTONDBLCLK * \brief Right mouse button double clicked in the non-client area. * * This message is posted to the window when the user double clicks * the right button of the mouse in the non-client area of the window. * * \code * MSG_NCRBUTTONDBLCLK * int hit_code = (int)wParam; * int x_pos = LOSWORD (lParam); * int y_pos = HISWORD (lParam); * \endcode * * \param hit_code The hit test code which tells the area of the mouse. * \param x_pos,y_pos The position of the mouse in window coordinates. * * \sa MSG_NCLBUTTONDBLCLK, MSG_NCHITTEST */#define MSG_NCRBUTTONDBLCLK 0x000E#define MSG_LASTMOUSEMSG    0x000F    /** @} end of mouse_msgs */    /**     * \defgroup key_msgs Key event messages     * @{     */    /* Group 2 from 0x0010 to 0x001F, the key messages. */#define MSG_FIRSTKEYMSG     0x0010/** * \def MSG_KEYDOWN * \brief User presses a key down. * * This message is posted to the current active window when the user  * presses a key down. * * \code * MSG_KEYDOWN * int scancode = (int)wParam; * DWORD key_flags = (DWORD)lParam; * \endcode * * \param scancode The scan code of the pressed key. * \param key_flags The shift key status when this message occurred. * * \sa MSG_KEYUP, key_defs * * Example: * * \include keydown.c */#define MSG_KEYDOWN         0x0010/** * \def MSG_CHAR * \brief A character translated from MSG_KEYDOWN message. * * This message is translated from a MSG_KEYDOWN message by \a TranslateMessage  * and sent to the current active window. * * \code * MSG_CHAR * int ch = (int)wParam; * DWORD key_flags = (DWORD)lParam; * \endcode * * \param ch The ASCII code of the pressed key. * \param key_flags The shift key status when this message occurred. * * \sa MSG_SYSCHAR, TranslateMessage, key_defs */#define MSG_CHAR            0x0011/** * \def MSG_KEYUP * \brief User releases up a key. * * This message is posted to the current active window when the user  * releases up a key. * * \code * MSG_KEYUP * int scancode = (int)wParam; * DWORD key_flags = (DWORD)lParam; * \endcode * * \param scancode The scan code of the released key. * \param key_flags The shift key status when this message occurred. * * \sa MSG_KEYDOWN, key_defs */#define MSG_KEYUP           0x0012/** * \def MSG_SYSKEYDOWN * \brief User presses down a key when <Alt> key is down. * * This message is posted to the current active window when the user  * presses down a key as <Alt> key is down. * * \code * MSG_SYSKEYDOWN * int scancode = (int)wParam; * DWORD key_flags = (DWORD)lParam; * \endcode * * \param scancode The scan code of the pressed key. * \param key_flags The shift key status when this message occurred. * * \sa MSG_SYSKEYUP, MSG_SYSCHAR, key_defs */#define MSG_SYSKEYDOWN      0x0013/** * \def MSG_SYSCHAR * \brief A system character translated from MSG_SYSKEYDOWN message. * * This message is translated from a MSG_SYSKEYDOWN message by \a TranslateMessage  * and sent to the current active window. * * \code * MSG_SYSCHAR

⌨️ 快捷键说明

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