GUIDEMO.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. /*********************************************************************
  2. * Portions COPYRIGHT(c) 2016 STMicroelectronics *
  3. * Portions SEGGER Microcontroller GmbH & Co. KG *
  4. * Solutions for real time microcontroller applications *
  5. **********************************************************************
  6. * *
  7. * (c) 1996 - 2015 SEGGER Microcontroller GmbH & Co. KG *
  8. * *
  9. * Internet: www.segger.com Support: support@segger.com *
  10. * *
  11. **********************************************************************
  12. ** emWin V5.28 - Graphical user interface for embedded applications **
  13. All Intellectual Property rights in the Software belongs to SEGGER.
  14. emWin is protected by international copyright laws. Knowledge of the
  15. source code may not be used to write a similar product. This file may
  16. only be used in accordance with the following terms:
  17. The software has been licensed to STMicroelectronics International
  18. N.V. a Dutch company with a Swiss branch and its headquarters in Plan-
  19. les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the
  20. purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_
  21. troller products commercialized by Licensee only, sublicensed and dis_
  22. tributed under the terms and conditions of the End User License Agree_
  23. ment supplied by STMicroelectronics International N.V.
  24. Full source code is available at: www.segger.com
  25. We appreciate your understanding and fairness.
  26. ----------------------------------------------------------------------
  27. File : GUIDEMO.h
  28. Purpose : Configuration file of GUIDemo
  29. ----------------------------------------------------------------------
  30. */
  31. /**
  32. ******************************************************************************
  33. * @file GUIDEMO.c
  34. * @author MCD Application Team
  35. * @brief Configuration file of GUIDemo
  36. ******************************************************************************
  37. * @attention
  38. *
  39. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics International N.V.
  40. * All rights reserved.</center></h2>
  41. *
  42. * Redistribution and use in source and binary forms, with or without
  43. * modification, are permitted, provided that the following conditions are met:
  44. *
  45. * 1. Redistribution of source code must retain the above copyright notice,
  46. * this list of conditions and the following disclaimer.
  47. * 2. Redistributions in binary form must reproduce the above copyright notice,
  48. * this list of conditions and the following disclaimer in the documentation
  49. * and/or other materials provided with the distribution.
  50. * 3. Neither the name of STMicroelectronics nor the names of other
  51. * contributors to this software may be used to endorse or promote products
  52. * derived from this software without specific written permission.
  53. * 4. This software, including modifications and/or derivative works of this
  54. * software, must execute solely and exclusively on microcontroller or
  55. * microprocessor devices manufactured by or for STMicroelectronics.
  56. * 5. Redistribution and use of this software other than as permitted under
  57. * this license is void and will automatically terminate your rights under
  58. * this license.
  59. *
  60. * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
  61. * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
  62. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  63. * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
  64. * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
  65. * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  66. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  67. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  68. * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  69. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  70. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  71. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  72. *
  73. ******************************************************************************
  74. */
  75. #ifndef GUIDEMO_H
  76. #define GUIDEMO_H
  77. #if defined(__cplusplus)
  78. extern "C" { /* Make sure we have C-declarations in C++ programs */
  79. #endif
  80. #include "GUI.h"
  81. #if GUI_WINSUPPORT
  82. #include "WM.h"
  83. #include "CHECKBOX.h"
  84. #include "FRAMEWIN.h"
  85. #include "PROGBAR.h"
  86. #include "TEXT.h"
  87. #include "BUTTON.h"
  88. #include "SLIDER.h"
  89. #include "HEADER.h"
  90. #include "GRAPH.h"
  91. #include "ICONVIEW.h"
  92. #include "LISTVIEW.h"
  93. #include "TREEVIEW.h"
  94. #endif
  95. /*********************************************************************
  96. *
  97. * Defines
  98. *
  99. **********************************************************************
  100. */
  101. #define CONTROL_SIZE_X 80
  102. #define CONTROL_SIZE_Y 61
  103. #define INFO_SIZE_Y 65
  104. #define BUTTON_SIZE_X 32
  105. #define BUTTON_SIZE_Y 20
  106. #define PROGBAR_SIZE_X 66
  107. #define PROGBAR_SIZE_Y 12
  108. #define TEXT_SIZE_X 69
  109. #define TEXT_SIZE_Y 7
  110. #define SHOW_PROGBAR_AT 100
  111. #define GUI_ID_HALT (GUI_ID_USER + 0)
  112. #define GUI_ID_NEXT (GUI_ID_USER + 1)
  113. #define BK_COLOR_0 0xFF5555
  114. #define BK_COLOR_1 0x880000
  115. #define NUMBYTES_NEEDED 0x200000
  116. #define CIRCLE_RADIUS 100
  117. #define LOGO_DIST_BORDER 5
  118. #define CHAR_READING_TIME 80
  119. /*********************************************************************
  120. *
  121. * Configuration of modules to be used
  122. *
  123. **********************************************************************
  124. */
  125. #ifndef SHOW_GUIDEMO_BITMAP
  126. #define SHOW_GUIDEMO_BITMAP (1)
  127. #endif
  128. #ifndef SHOW_GUIDEMO_COLORBAR
  129. #define SHOW_GUIDEMO_COLORBAR (1)
  130. #endif
  131. #ifndef SHOW_GUIDEMO_CURSOR
  132. #define SHOW_GUIDEMO_CURSOR (1)
  133. #endif
  134. #ifndef SHOW_GUIDEMO_GRAPH
  135. #define SHOW_GUIDEMO_GRAPH (1)
  136. #endif
  137. #ifndef SHOW_GUIDEMO_LISTVIEW
  138. #define SHOW_GUIDEMO_LISTVIEW (1)
  139. #endif
  140. #ifndef SHOW_GUIDEMO_SPEED
  141. #define SHOW_GUIDEMO_SPEED (1)
  142. #endif
  143. #ifndef SHOW_GUIDEMO_TREEVIEW
  144. #define SHOW_GUIDEMO_TREEVIEW (1)
  145. #endif
  146. #ifndef SHOW_GUIDEMO_ICONVIEW
  147. #define SHOW_GUIDEMO_ICONVIEW (1)
  148. #endif
  149. #ifndef SHOW_GUIDEMO_AUTOMOTIVE
  150. #define SHOW_GUIDEMO_AUTOMOTIVE (1)
  151. #endif
  152. #ifndef SHOW_GUIDEMO_TRANSPARENTDIALOG
  153. #define SHOW_GUIDEMO_TRANSPARENTDIALOG (1)
  154. #endif
  155. /*********************************************************************
  156. *
  157. * Configuration macros
  158. *
  159. **********************************************************************
  160. */
  161. #ifndef GUIDEMO_SHOW_SPRITES
  162. #define GUIDEMO_SHOW_SPRITES (1)
  163. #endif
  164. #ifndef GUIDEMO_USE_VNC
  165. #define GUIDEMO_USE_VNC (0)
  166. #endif
  167. #ifndef GUIDEMO_USE_AUTO_BK
  168. #define GUIDEMO_USE_AUTO_BK (1)
  169. #endif
  170. #define GUIDEMO_CF_SHOW_SPRITES (GUIDEMO_SHOW_SPRITES << 0)
  171. #define GUIDEMO_CF_USE_VNC (GUIDEMO_USE_VNC << 1)
  172. #define GUIDEMO_CF_USE_AUTO_BK (GUIDEMO_USE_AUTO_BK << 2)
  173. /*********************************************************************
  174. *
  175. * GUIDEMO_CONFIG
  176. */
  177. typedef struct GUIDEMO_CONFIG {
  178. void (* * apFunc)(void);
  179. int NumDemos;
  180. U16 Flags;
  181. #if GUIDEMO_USE_VNC
  182. int (* pGUI_VNC_X_StartServer)(int LayerIndex, int ServerIndex);
  183. #endif
  184. } GUIDEMO_CONFIG;
  185. /*********************************************************************
  186. *
  187. * Internal functions
  188. *
  189. **********************************************************************
  190. */
  191. void GUIDEMO_AddIntToString (char * acText, unsigned int Number);
  192. void GUIDEMO_AddStringToString(char * acText, const char * acAdd);
  193. int GUIDEMO_CheckCancel (void);
  194. void GUIDEMO_ClearText (char * acText);
  195. void GUIDEMO_Config (GUIDEMO_CONFIG * pConfig);
  196. void GUIDEMO_Delay (int t);
  197. void GUIDEMO_DrawBk (int DrawLogo);
  198. U16 GUIDEMO_GetConfFlag (U16 Flag);
  199. int GUIDEMO_GetTime (void);
  200. void GUIDEMO_HideControlWin (void);
  201. void GUIDEMO_HideInfoWin (void);
  202. void GUIDEMO_NotifyStartNext (void);
  203. void GUIDEMO_SetDrawLogo (U8 OnOff);
  204. void GUIDEMO_ShowControlWin (void);
  205. void GUIDEMO_ShowInfo (const char * acInfo);
  206. void GUIDEMO_ShowInfoWin (void);
  207. void GUIDEMO_ShowIntro (const char * acText, const char * acDescription);
  208. void GUIDEMO_UpdateControlText(void);
  209. void GUIDEMO_Wait (int TimeWait);
  210. void GUIDEMO_Main (void);
  211. /*********************************************************************
  212. *
  213. * Demo modules
  214. *
  215. **********************************************************************
  216. */
  217. void GUIDEMO_AntialiasedText (void);
  218. void GUIDEMO_Automotive (void);
  219. void GUIDEMO_BarGraph (void);
  220. void GUIDEMO_Bitmap (void);
  221. void GUIDEMO_ColorBar (void);
  222. void GUIDEMO_Cursor (void);
  223. void GUIDEMO_Fading (void);
  224. void GUIDEMO_Graph (void);
  225. void GUIDEMO_IconView (void);
  226. void GUIDEMO_ImageFlow (void);
  227. void GUIDEMO_Intro (void);
  228. void GUIDEMO_Listview (void);
  229. void GUIDEMO_RadialMenu (void);
  230. void GUIDEMO_Skinning (void);
  231. void GUIDEMO_Speed (void);
  232. void GUIDEMO_Speedometer (void);
  233. void GUIDEMO_TransparentDialog(void);
  234. void GUIDEMO_Treeview (void);
  235. void GUIDEMO_VScreen (void);
  236. void GUIDEMO_WashingMachine (void);
  237. void GUIDEMO_ZoomAndRotate (void);
  238. /*********************************************************************
  239. *
  240. * Externs
  241. *
  242. **********************************************************************
  243. */
  244. extern GUI_CONST_STORAGE GUI_BITMAP bmSTLogo;
  245. extern GUI_CONST_STORAGE GUI_BITMAP bmSeggerLogo;
  246. extern GUI_CONST_STORAGE GUI_BITMAP bmSeggerLogo70x35;
  247. extern GUI_CONST_STORAGE GUI_BITMAP bmSTLogo70x35;
  248. extern GUI_CONST_STORAGE GUI_FONT GUI_FontRounded16;
  249. extern GUI_CONST_STORAGE GUI_FONT GUI_FontRounded22;
  250. extern GUI_CONST_STORAGE GUI_FONT GUI_FontSouvenir18;
  251. extern GUI_CONST_STORAGE GUI_FONT GUI_FontD6x8;
  252. extern GUI_CONST_STORAGE GUI_FONT GUI_FontAA2_32;
  253. extern GUI_CONST_STORAGE GUI_FONT GUI_FontAA4_32;
  254. #if defined(__cplusplus)
  255. }
  256. #endif
  257. #endif // avoid multiple inclusion
  258. /*************************** End of file ****************************/