mGNCS4Touch API Reference  v1.5.0
A set of mGNCS-compliant controls for devices with a touch screen.
mtouchcomm.h
1 //
3 // IMPORTANT NOTICE
4 //
5 // The following open source license statement does not apply to any
6 // entity in the Exception List published by FMSoft.
7 //
8 // For more information, please visit:
9 //
10 // https://www.fmsoft.cn/exception-list
11 //
13 /*
14  * \file mtouchcomm.h
15  * \author miniStudio team of FMSoft
16  * \date 2010/10/09
17  *
18  \verbatim
19 
20  This file is part of mGNCS4Touch, one of MiniGUI components.
21 
22  Copyright (C) 2008-2018 FMSoft (http://www.fmsoft.cn).
23 
24  This program is free software: you can redistribute it and/or modify
25  it under the terms of the GNU General Public License as published by
26  the Free Software Foundation, either version 3 of the License, or
27  (at your option) any later version.
28 
29  This program is distributed in the hope that it will be useful,
30  but WITHOUT ANY WARRANTY; without even the implied warranty of
31  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32  GNU General Public License for more details.
33 
34  You should have received a copy of the GNU General Public License
35  along with this program. If not, see <http://www.gnu.org/licenses/>.
36 
37  Or,
38 
39  As this program is a library, any link to this program must follow
40  GNU General Public License version 3 (GPLv3). If you cannot accept
41  GPLv3, you need to be licensed from FMSoft.
42 
43  If you have got a commercial license of this program, please use it
44  under the terms and conditions of the commercial license.
45 
46  For more information about the commercial license, please refer to
47  <http://www.minigui.com/blog/minigui-licensing-policy/>.
48 
49  \endverbatim
50 */
51 #ifndef __MGNCS4TOUCH_COMMON_H__
52 #define __MGNCS4TOUCH_COMMON_H__
53 
54 #ifdef __cplusplus
55 extern "C"{
56 #endif
57 
58 #ifdef WIN32
59 # ifdef __MGNCS4TOUCH_LIB__
60 # define MTOUCH_EXPORT __declspec(dllexport)
61 # else
62 # define MTOUCH_EXPORT __declspec(dllimport)
63 # endif
64 #else
65 # define MTOUCH_EXPORT
66 #endif
67 
68 #ifndef MGNCS4TOUCH_MAJOR_VERSION
69 # undef PACKAGE
70 # undef VERSION
71 # undef PACKAGE_BUGREPORT
72 # undef PACKAGE_NAME
73 # undef PACKAGE_STRING
74 # undef PACKAGE_TARNAME
75 # undef PACKAGE_VERSION
76 # ifdef __MGNCS4TOUCH_LIB__
77 # if defined(__CMAKE_PROJECT__) || defined(WIN32)
78 # include "mgncs4touchconfig.h"
79 # else
80 # include "../mgncs4touchconfig.h"
81 # endif
82 # else
83 # include "mgncs4touchconfig.h"
84 # endif
85 #endif
86 
87 #define ABGR2ARGB(c) (((c) & 0xFF00FF00) | (((c) & 0x000000FF)<<16) | (((c) & 0x00FF0000)>>16))
88 
89 typedef enum _eCornerType {
90  ECT_NORMAL = 0,
91  ECT_TOPR,
92  ECT_BOTTOMR,
93  ECT_LEFTR,
94  ECT_RIGHTR,
95  ECT_BOTH,
96 } ECONER;
97 
98 
99 MTOUCH_EXPORT void DrawGradientRroundRect(HDC hdc,
100  DWORD color , PRECT pRc, unsigned int r, BOOL isConvex);
101 
102 MTOUCH_EXPORT int DrawPickerRect(HDC hdc, RECT *prc, DWORD beginColor, DWORD endColor, int corner);
103 
104 MTOUCH_EXPORT int DrawSharpButton(HDC hdc, RECT *prc, DWORD color, BOOL left);
105 
106 MTOUCH_EXPORT int DrawRoundRectButton(HDC hdc, RECT *prc, DWORD color, unsigned int r);
107 
108 MTOUCH_EXPORT int DrawTouchTick(HDC hdc, RECT* prc, DWORD color);
109 
110 MTOUCH_EXPORT int DrawTouchAngle(HDC hdc, RECT* prc, DWORD color);
111 
112 MTOUCH_EXPORT int Draw3DCircle(HDC hdc, PRECT prc, DWORD color);
113 
114 MTOUCH_EXPORT BOOL DrawVariableRoundRect(HDC hdc, PRECT prc, DWORD color, int r, ECONER con);
115 
116 MTOUCH_EXPORT int DrawRectRing(HDC hdc, PRECT pRcOutside, PRECT pRcInside, DWORD color);
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif //__MGNCS4TOUCH_COMMON_H__
123