Andrew Reed / Mbed OS CITY1082-i2c_master_wifi_mqtt
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers VSCREEN_RealTime.c Source File

VSCREEN_RealTime.c

00001 /*********************************************************************
00002 *                SEGGER Microcontroller GmbH                         *
00003 *        Solutions for real time microcontroller applications        *
00004 **********************************************************************
00005 *                                                                    *
00006 *        (c) 1996 - 2018  SEGGER Microcontroller GmbH                *
00007 *                                                                    *
00008 *        Internet: www.segger.com    Support:  support@segger.com    *
00009 *                                                                    *
00010 **********************************************************************
00011 
00012 ** emWin V5.48 - Graphical user interface for embedded applications **
00013 All  Intellectual Property rights  in the Software belongs to  SEGGER.
00014 emWin is protected by  international copyright laws.  Knowledge of the
00015 source code may not be used to write a similar product.  This file may
00016 only be used in accordance with the following terms:
00017 
00018 The software  has been licensed to  Cypress Semiconductor Corporation,
00019 whose registered  office is situated  at 198 Champion Ct. San Jose, CA 
00020 95134 USA  solely for the  purposes of creating  libraries for Cypress
00021 PSoC3 and  PSoC5 processor-based devices,  sublicensed and distributed
00022 under  the  terms  and  conditions  of  the  Cypress  End User License
00023 Agreement.
00024 Full source code is available at: www.segger.com
00025 
00026 We appreciate your understanding and fairness.
00027 ----------------------------------------------------------------------
00028 Licensing information
00029 Licensor:                 SEGGER Microcontroller Systems LLC
00030 Licensed to:              Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA
00031 Licensed SEGGER software: emWin
00032 License number:           GUI-00319
00033 License model:            Services and License Agreement, signed June 10th, 2009
00034 Licensed platform:        Any Cypress platform (Initial targets are: PSoC3, PSoC5)
00035 ----------------------------------------------------------------------
00036 Support and Update Agreement (SUA)
00037 SUA period:               2009-06-12 - 2022-07-27
00038 Contact to extend SUA:    sales@segger.com
00039 ----------------------------------------------------------------------
00040 File        : VSCREEN_RealTime.c
00041 Purpose     : Demonstrates how to use virtual screens.
00042 
00043               The sample requires a display size of 320 x 240 and at
00044               least a virtual Y size of 480 pixels. The reccomended
00045               color depth is 8bpp.
00046               
00047               Required configuration:
00048               
00049               #define LCD_XSIZE        320
00050               #define LCD_YSIZE        240
00051               #define LCD_VYSIZE       480
00052               #define LCD_BITSPERPIXEL   8
00053 
00054               To find the part of the code, which switches between the
00055               screens, please search the function GUI_SetOrg().
00056 Requirements: WindowManager - (x)
00057               MemoryDevices - (x)
00058               AntiAliasing  - ( )
00059               VNC-Server    - ( )
00060               PNG-Library   - ( )
00061               TrueTypeFonts - ( )
00062 ----------------------------------------------------------------------
00063 */
00064 
00065 #include <stddef.h>
00066 #include <stdlib.h>
00067 #include <string.h>
00068 #include "DIALOG.h"
00069 #include "PROGBAR.h"
00070 #include "LCDConf.h"
00071 
00072 /*********************************************************************
00073 *
00074 *       Defines
00075 *
00076 **********************************************************************
00077 */
00078 #define ID_TEMPERATURE (GUI_ID_USER + 0)
00079 
00080 //
00081 // Recommended memory to run the sample with adequate performance
00082 //
00083 #define RECOMMENDED_MEMORY (1024L * 30)
00084 
00085 /*********************************************************************
00086 *
00087 *          Static data
00088 *
00089 **********************************************************************
00090 */
00091 //
00092 // Logo bitmap: colors
00093 //
00094 static GUI_CONST_STORAGE GUI_COLOR _ColorsLogoSegger[] = {
00095 #if (GUI_USE_ARGB == 1)
00096    0xFFFF0000,0xFF000028,0xFF000050,0xFF000078
00097   ,0xFF0000A0,0xFFCDCDCC,0xFFF4F4F4,0xFFFFFFFF
00098   ,0xFFCACAFF,0xFF0000FF,0xFF9191FF,0xFF5656FF
00099   ,0xFFA2A09F,0xFF646260,0xFF000000,0xFF1F1F1F
00100 #else
00101    0x0000FF,0x280000,0x500000,0x780000
00102   ,0xA00000,0xCCCDCD,0xF4F4F4,0xFFFFFF
00103   ,0xFFCACA,0xFF0000,0xFF9191,0xFF5656
00104   ,0x9FA0A2,0x606264,0x000000,0x1F1F1F
00105 #endif
00106 };
00107 
00108 //
00109 // Logo bitmap: palette
00110 //
00111 static GUI_CONST_STORAGE GUI_LOGPALETTE _PalLogoSegger = {
00112   16,   // number of entries
00113   1,    // Has transparency
00114   &_ColorsLogoSegger[0]
00115 };
00116 
00117 //
00118 // Logo bitmap: pixel data
00119 //
00120 static GUI_CONST_STORAGE unsigned char _acLogoSegger[] = {
00121   0x00, 0x12, 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x43, 0x21, 0x00,
00122   0x02, 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x43, 0x20,
00123   0x13, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x31,
00124   0x24, 0x44, 0x56, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x65, 0x44, 0x42,
00125   0x34, 0x45, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x54, 0x43,
00126   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00127   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00128   0x44, 0x46, 0x77, 0x77, 0x76, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00129   0x44, 0x46, 0x77, 0x77, 0x89, 0x9A, 0x77, 0x77, 0x77, 0x77, 0x77, 0x69, 0x9A, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00130   0x44, 0x46, 0x77, 0x76, 0x99, 0x99, 0x87, 0x77, 0x77, 0x77, 0x77, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00131   0x44, 0x46, 0x77, 0x76, 0x99, 0x99, 0x96, 0x77, 0x77, 0x77, 0x77, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00132   0x44, 0x46, 0x77, 0x77, 0xA9, 0x99, 0x9B, 0x77, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00133   0x44, 0x46, 0x77, 0x77, 0x7B, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00134   0x44, 0x46, 0x77, 0x77, 0x76, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00135   0x44, 0x46, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00136   0x44, 0x46, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00137   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00138   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x69, 0x99, 0x99, 0x87, 0x77, 0x77, 0x77, 0x69, 0x99, 0x99, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00139   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x78, 0x99, 0x99, 0x96, 0x77, 0x77, 0x77, 0x78, 0x99, 0x99, 0xB6, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00140   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x77, 0xA9, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x77, 0xA9, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00141   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x77, 0x6B, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x6B, 0x99, 0x99, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00142   0x44, 0x46, 0x77, 0x66, 0x77, 0x77, 0x77, 0x76, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x78, 0x99, 0x99, 0x96, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00143   0x44, 0x46, 0x77, 0x6B, 0x67, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0xA9, 0x99, 0x9B, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00144   0x44, 0x46, 0x77, 0x69, 0xB6, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x7B, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00145   0x44, 0x46, 0x77, 0x79, 0x9A, 0x77, 0x77, 0x77, 0x76, 0xB9, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x76, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00146   0x44, 0x46, 0x77, 0x69, 0x99, 0x87, 0x77, 0x77, 0x77, 0x69, 0x99, 0x99, 0x87, 0x77, 0x77, 0x77, 0x89, 0x99, 0x9B, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00147   0x44, 0x46, 0x77, 0x79, 0x99, 0x96, 0x77, 0x77, 0x77, 0x78, 0x99, 0x99, 0x96, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00148   0x44, 0x46, 0x77, 0x69, 0x99, 0x9B, 0x77, 0x77, 0x77, 0x77, 0xA9, 0x99, 0x9B, 0x77, 0x77, 0x77, 0x76, 0xB9, 0x99, 0x98, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x77, 0x77, 0x77, 0x64, 0x44,
00149   0x44, 0x46, 0x77, 0x79, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x6B, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x98, 0x77, 0x77, 0x64, 0x44,
00150   0x44, 0x46, 0x77, 0x69, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x76, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x67, 0x77, 0x64, 0x44,
00151   0x44, 0x46, 0x77, 0x79, 0x99, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x67, 0x77, 0x64, 0x44,
00152   0x44, 0x46, 0x77, 0x69, 0x99, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x69, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x9A, 0x77, 0x77, 0x64, 0x44,
00153   0x44, 0x46, 0x77, 0x79, 0x99, 0x99, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x76, 0xB9, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x67, 0x77, 0x77, 0x64, 0x44,
00154   0x44, 0x46, 0x77, 0x69, 0x99, 0x99, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x64, 0x44,
00155   0x44, 0x46, 0x77, 0x79, 0x99, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x6B, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x9A, 0x77, 0x77, 0x64, 0x44,
00156   0x44, 0x46, 0x77, 0x69, 0x99, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x67, 0x77, 0x64, 0x44,
00157   0x44, 0x46, 0x77, 0x79, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x76, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x67, 0x77, 0x64, 0x44,
00158   0x44, 0x46, 0x77, 0x69, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x7B, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x98, 0x77, 0x77, 0x64, 0x44,
00159   0x44, 0x46, 0x77, 0x79, 0x99, 0x9B, 0x77, 0x77, 0x77, 0x77, 0xA9, 0x99, 0x9B, 0x77, 0x77, 0x77, 0x76, 0xB9, 0x99, 0x98, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x77, 0x77, 0x77, 0x64, 0x44,
00160   0x44, 0x46, 0x77, 0x69, 0x99, 0x96, 0x77, 0x77, 0x77, 0x78, 0x99, 0x99, 0x97, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00161   0x44, 0x46, 0x77, 0x79, 0x99, 0x87, 0x77, 0x77, 0x77, 0x69, 0x99, 0x99, 0x87, 0x77, 0x77, 0x77, 0x89, 0x99, 0x9B, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00162   0x44, 0x46, 0x77, 0x69, 0x9A, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x76, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00163   0x44, 0x46, 0x77, 0x79, 0xB7, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x7B, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00164   0x44, 0x46, 0x77, 0x6B, 0x67, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0xA9, 0x99, 0x9B, 0x77, 0x77, 0x77, 0x75, 0xCC, 0xDC, 0xC6, 0x77, 0x77, 0x77, 0x55, 0x55, 0x55, 0x55, 0x55, 0x67, 0x77, 0x77, 0x75, 0xCC, 0xDC, 0xC6, 0x77, 0x77, 0x77, 0x77, 0x76, 0x5C, 0xDC, 0xCC, 0x67, 0x77, 0x77, 0x77, 0x55, 0x55, 0x55, 0x55, 0x55, 0x77, 0x77, 0x55, 0x55, 0x55, 0x55, 0x67, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00165   0x44, 0x46, 0x77, 0x66, 0x77, 0x77, 0x77, 0x76, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x78, 0x99, 0x99, 0x96, 0x77, 0x77, 0x75, 0xDE, 0xEE, 0xEE, 0xEE, 0xC6, 0x77, 0x7C, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xD7, 0x77, 0x75, 0xDE, 0xEE, 0xEE, 0xEE, 0xD6, 0x77, 0x77, 0x77, 0xCE, 0xEE, 0xEE, 0xEE, 0xEC, 0x77, 0x77, 0x7D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xC7, 0x7C, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, 0x57, 0x77, 0x77, 0x77, 0x64, 0x44,
00166   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x77, 0x7B, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x6B, 0x99, 0x99, 0x87, 0x77, 0x77, 0x6E, 0xEE, 0xED, 0xDD, 0xEE, 0xED, 0x77, 0x7D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xD7, 0x77, 0xCE, 0xEE, 0xED, 0xDE, 0xEE, 0xED, 0x67, 0x77, 0x7D, 0xEE, 0xEE, 0xDD, 0xEE, 0xEE, 0xD7, 0x77, 0x6F, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xC7, 0x7D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, 0x77, 0x77, 0x77, 0x64, 0x44,
00167   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x77, 0xA9, 0x99, 0x9B, 0x77, 0x77, 0x77, 0x77, 0xA9, 0x99, 0x9A, 0x77, 0x77, 0x77, 0xCE, 0xED, 0x67, 0x76, 0xCE, 0xEE, 0x67, 0x7D, 0xEE, 0xD5, 0x55, 0x55, 0x55, 0x77, 0x75, 0xEE, 0xED, 0x56, 0x76, 0xCE, 0xEE, 0xC7, 0x77, 0xCE, 0xEE, 0xD6, 0x67, 0x6C, 0xEE, 0xE5, 0x77, 0x6D, 0xEE, 0xC5, 0x55, 0x55, 0x56, 0x77, 0x6D, 0xEE, 0xC5, 0x55, 0x5C, 0xEE, 0xED, 0x77, 0x77, 0x77, 0x64, 0x44,
00168   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x78, 0x99, 0x99, 0x96, 0x77, 0x77, 0x77, 0x78, 0x99, 0x99, 0xB6, 0x77, 0x77, 0x77, 0xDE, 0xED, 0x77, 0x77, 0x75, 0xDC, 0x77, 0x7D, 0xEE, 0xC7, 0x77, 0x77, 0x77, 0x77, 0x7D, 0xEE, 0xD7, 0x77, 0x77, 0x7C, 0xED, 0x57, 0x76, 0xDE, 0xED, 0x77, 0x77, 0x77, 0xCE, 0xD6, 0x77, 0x6F, 0xEE, 0x57, 0x77, 0x77, 0x77, 0x77, 0x7D, 0xEE, 0xC7, 0x77, 0x77, 0xCE, 0xED, 0x77, 0x77, 0x77, 0x64, 0x44,
00169   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x69, 0x99, 0x99, 0x87, 0x77, 0x77, 0x77, 0x69, 0x99, 0x99, 0x87, 0x77, 0x77, 0x77, 0xCE, 0xEE, 0xDC, 0x56, 0x77, 0x77, 0x77, 0x7D, 0xEE, 0xC6, 0x66, 0x66, 0x67, 0x77, 0x6E, 0xEE, 0xC7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x75, 0xEE, 0xE5, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x7F, 0xEE, 0xC6, 0x66, 0x66, 0x67, 0x77, 0x6D, 0xEE, 0xC7, 0x77, 0x77, 0xDE, 0xED, 0x77, 0x77, 0x77, 0x64, 0x44,
00170   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x9A, 0x77, 0x77, 0x77, 0x77, 0x6D, 0xEE, 0xEE, 0xED, 0xDC, 0x67, 0x77, 0x7D, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, 0x67, 0x5E, 0xEE, 0x67, 0x77, 0x76, 0x66, 0x66, 0x67, 0x7C, 0xEE, 0xE7, 0x77, 0x77, 0x66, 0x66, 0x67, 0x77, 0x6D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEC, 0x67, 0x7D, 0xEE, 0xDC, 0xCC, 0xCD, 0xEE, 0xE5, 0x77, 0x77, 0x77, 0x64, 0x44,
00171   0x44, 0x46, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xB7, 0x77, 0x77, 0x77, 0x77, 0x75, 0xCE, 0xEE, 0xEE, 0xEE, 0xEC, 0x77, 0x7D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEF, 0x67, 0xCE, 0xEE, 0x67, 0x77, 0x5E, 0xEE, 0xEE, 0xD6, 0x7C, 0xEE, 0xD7, 0x77, 0x7C, 0xEE, 0xEE, 0xED, 0x67, 0x6F, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, 0x77, 0x6D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x57, 0x77, 0x77, 0x77, 0x64, 0x44,
00172   0x44, 0x46, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x76, 0x5C, 0xDE, 0xEE, 0xEE, 0xC7, 0x7D, 0xEE, 0xD5, 0xC5, 0xC5, 0x55, 0x77, 0x5E, 0xEE, 0x57, 0x77, 0xCE, 0xEE, 0xEE, 0xE5, 0x7C, 0xEE, 0xE6, 0x77, 0x7C, 0xEE, 0xEE, 0xEE, 0x67, 0x6F, 0xEE, 0xCC, 0x55, 0xC5, 0x56, 0x77, 0x7D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xC6, 0x77, 0x77, 0x77, 0x64, 0x44,
00173   0x44, 0x46, 0x77, 0x77, 0x76, 0x99, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0x77, 0x75, 0x57, 0x77, 0x77, 0xCE, 0xEE, 0xD7, 0x7D, 0xEE, 0xC7, 0x77, 0x77, 0x77, 0x77, 0x6E, 0xEE, 0xC7, 0x77, 0x75, 0x55, 0xDE, 0xE5, 0x75, 0xEE, 0xE5, 0x77, 0x76, 0x55, 0x5F, 0xEE, 0x67, 0x6D, 0xEE, 0x57, 0x77, 0x77, 0x77, 0x77, 0x6D, 0xEE, 0xC6, 0x66, 0x6C, 0xEE, 0xE5, 0x77, 0x77, 0x77, 0x64, 0x44,
00174   0x44, 0x46, 0x77, 0x77, 0x7B, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x7A, 0x99, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x77, 0x77, 0xCE, 0xEC, 0x77, 0x77, 0x7C, 0xEE, 0xD6, 0x7D, 0xEE, 0xC7, 0x77, 0x77, 0x77, 0x77, 0x7D, 0xEE, 0xD6, 0x77, 0x77, 0x75, 0xEE, 0xE5, 0x77, 0xDE, 0xED, 0x67, 0x77, 0x77, 0xCE, 0xEE, 0x67, 0x6F, 0xEE, 0x57, 0x77, 0x77, 0x77, 0x77, 0x7D, 0xEE, 0xC7, 0x77, 0x76, 0xEE, 0xEC, 0x77, 0x77, 0x77, 0x64, 0x44,
00175   0x44, 0x46, 0x77, 0x77, 0xA9, 0x99, 0x9B, 0x77, 0x77, 0x77, 0x77, 0x89, 0x99, 0x99, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0xCE, 0xEE, 0xC6, 0x76, 0x5D, 0xEE, 0xD7, 0x7D, 0xEE, 0xDC, 0xCC, 0xCC, 0xCC, 0x57, 0x75, 0xEE, 0xED, 0xC6, 0x66, 0xCE, 0xEE, 0xE5, 0x77, 0x5E, 0xEE, 0xD5, 0x66, 0x5C, 0xEE, 0xEE, 0x67, 0x7F, 0xEE, 0xCC, 0xCC, 0xCC, 0xCC, 0x67, 0x6D, 0xEE, 0xC7, 0x77, 0x77, 0xEE, 0xEC, 0x77, 0x77, 0x77, 0x64, 0x44,
00176   0x44, 0x46, 0x77, 0x76, 0x99, 0x99, 0x96, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x6D, 0xEE, 0xEE, 0xDE, 0xEE, 0xEE, 0x67, 0x7D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xF5, 0x77, 0x5E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, 0x77, 0x7C, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x67, 0x6D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xF7, 0x7F, 0xEE, 0xC7, 0x77, 0x77, 0xDE, 0xED, 0x77, 0x77, 0x77, 0x64, 0x44,
00177   0x44, 0x46, 0x77, 0x76, 0x99, 0x99, 0x87, 0x77, 0x77, 0x77, 0x77, 0xB9, 0x99, 0xA7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x76, 0xCE, 0xEE, 0xEE, 0xEE, 0xD5, 0x77, 0x75, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xF5, 0x77, 0x75, 0xDE, 0xEE, 0xEE, 0xEC, 0x5E, 0xE5, 0x77, 0x77, 0xCD, 0xEE, 0xEE, 0xEE, 0xC5, 0xEE, 0x67, 0x7D, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xD7, 0x7D, 0xEE, 0x57, 0x77, 0x77, 0xCE, 0xEC, 0x77, 0x77, 0x77, 0x64, 0x44,
00178   0x44, 0x46, 0x77, 0x77, 0x89, 0x9A, 0x77, 0x77, 0x77, 0x77, 0x77, 0x6B, 0x9B, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x76, 0xCC, 0xCC, 0xC5, 0x77, 0x77, 0x77, 0x65, 0x55, 0x55, 0x55, 0x55, 0x67, 0x77, 0x77, 0x75, 0xCC, 0xCC, 0x67, 0x75, 0xC7, 0x77, 0x77, 0x77, 0x5C, 0xCC, 0xC6, 0x76, 0xC5, 0x77, 0x77, 0x65, 0x55, 0x55, 0x55, 0x55, 0x77, 0x76, 0x55, 0x77, 0x77, 0x77, 0x65, 0x56, 0x77, 0x77, 0x77, 0x64, 0x44,
00179   0x44, 0x46, 0x77, 0x77, 0x76, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00180   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00181   0x44, 0x46, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x64, 0x44,
00182   0x34, 0x45, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x54, 0x43,
00183   0x24, 0x44, 0x56, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x65, 0x44, 0x42,
00184   0x13, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x31,
00185   0x02, 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x43, 0x20,
00186   0x00, 0x12, 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x43, 0x21, 0x00
00187 };
00188 
00189 //
00190 // Logo bitmap
00191 //
00192 static GUI_CONST_STORAGE GUI_BITMAP _bmLogoBitmap = {
00193   140, // XSize
00194   66,  // YSize
00195   70,  // BytesPerLine
00196   4,   // BitsPerPixel
00197   _acLogoSegger,   // Pointer to picture data (indices)
00198   &_PalLogoSegger  // Pointer to palette
00199 };
00200 
00201 //
00202 // Resource for DialogIntro (0, 0) - (319, 239)
00203 //
00204 static const GUI_WIDGET_CREATE_INFO _aDialogIntro[] = {
00205   { WINDOW_CreateIndirect,    "",                    0,                  0,   0, 320, 240, 0},
00206   { BUTTON_CreateIndirect,    "Start",               GUI_ID_BUTTON0,   100, 200, 120, 20},
00207 };
00208 
00209 //
00210 // Resource for DialogMain (0, 0) - (319, 239)
00211 //
00212 static const GUI_WIDGET_CREATE_INFO _aDialogMain[] = {
00213   { WINDOW_CreateIndirect,    "",                    0,                  0,   0, 320, 240, 0},
00214   { FRAMEWIN_CreateIndirect,  "Temperature",         ID_TEMPERATURE,     5,   5, 310, 150, 0},
00215   { TEXT_CreateIndirect,      "Temperature 1:",      GUI_ID_TEXT0,      10, 162,  80,   0},
00216   { TEXT_CreateIndirect,      "Temperature 2:",      GUI_ID_TEXT1,      10, 187,  80,   0},
00217   { TEXT_CreateIndirect,      "Min:",                GUI_ID_TEXT2,      10, 210,  50,   0},
00218   { TEXT_CreateIndirect,      "Max:",                GUI_ID_TEXT3,     110, 210,  50,   0},
00219   { PROGBAR_CreateIndirect,   "",                    GUI_ID_PROGBAR0,   90, 160, 100,  18},
00220   { PROGBAR_CreateIndirect,   "",                    GUI_ID_PROGBAR1,   90, 185, 100,  18},
00221   { EDIT_CreateIndirect,      "",                    GUI_ID_EDIT0,      50, 210,  40,  18, 3, 3},
00222   { EDIT_CreateIndirect,      "",                    GUI_ID_EDIT1,     150, 210,  40,  18, 3, 3},
00223   { BUTTON_CreateIndirect,    "Set color",           GUI_ID_BUTTON0,   210, 185, 100,  20},
00224   { BUTTON_CreateIndirect,    "Start",               GUI_ID_BUTTON1,   210, 210, 100,  20},
00225 };
00226 
00227 //
00228 // Resource for DialogColor (0, 240) - (319, 479)
00229 //
00230 static const GUI_WIDGET_CREATE_INFO _aDialogColor[] = {
00231   { FRAMEWIN_CreateIndirect, "Adjust color",         0,                 10, 260, 300, 200},
00232   { TEXT_CreateIndirect,     "Color to be changed:", 0,                  5,  15, 100,  20, TEXT_CF_LEFT },
00233   { DROPDOWN_CreateIndirect,  "",                    GUI_ID_DROPDOWN0, 120,  15, 150,  60},
00234   { TEXT_CreateIndirect,     "Red:" ,                0,                  5,  60,  35,  20, TEXT_CF_LEFT },
00235   { TEXT_CreateIndirect,     "Green:",               0,                  5,  90,  35,  20, TEXT_CF_LEFT },
00236   { TEXT_CreateIndirect,     "Blue:",                0,                  5, 120,  35,  20, TEXT_CF_LEFT },
00237   { TEXT_CreateIndirect,     "Preview",              0,                205,  44,  81,  15, TEXT_CF_HCENTER },
00238   { SLIDER_CreateIndirect,   NULL,                   GUI_ID_SLIDER0,    40,  60, 100,  20 },
00239   { SLIDER_CreateIndirect,   NULL,                   GUI_ID_SLIDER1,    40,  90, 100,  20 },
00240   { SLIDER_CreateIndirect,   NULL,                   GUI_ID_SLIDER2,    40, 120, 100,  20 },
00241   { EDIT_CreateIndirect,     NULL,                   GUI_ID_EDIT0,     145,  60,  30,  20, 0, 3 },
00242   { EDIT_CreateIndirect,     NULL,                   GUI_ID_EDIT1,     145,  90,  30,  20, 0, 3 },
00243   { EDIT_CreateIndirect,     NULL,                   GUI_ID_EDIT2,     145, 120,  30,  20, 0, 3 },
00244   { BUTTON_CreateIndirect,   "Ok",                   GUI_ID_OK,         90, 150, 120,  20 },
00245 };
00246 
00247 //
00248 // Text shown in the DialogIntro dialog
00249 //
00250 static const char * _apDialogIntro[] = {
00251   "This sample demonstrates how to use virtual screens.",
00252   "Virtual screens require additional video memory and",
00253   "and allow instantanious switching between different",
00254   "screens, even on slow CPUs.",
00255   "Press the <Start> button..."
00256 };
00257 
00258 //
00259 // Dialog handles
00260 //
00261 WM_HWIN _hDialogMain;
00262 WM_HWIN _hDialogColor;
00263 
00264 //
00265 // Red, green and blue components of color dialog
00266 //
00267 static U8 _aColorSep[3] = {255, 127, 0};
00268 
00269 //
00270 // Pointer to original callback routine of the temperature window
00271 //
00272 static WM_CALLBACK * _pcbCallbackTemperature;
00273 
00274 //
00275 // Maximum ranges of temperature
00276 //
00277 static int _TempMin = 120, _TempMax = 220;
00278 
00279 //
00280 // Colors to be used in temperature window
00281 //
00282 GUI_COLOR _ColorBackGround = GUI_RED;
00283 GUI_COLOR _ColorGrid       = GUI_DARKGRAY;
00284 GUI_COLOR _ColorLabel      = GUI_WHITE;
00285 GUI_COLOR _ColorTemp1      = GUI_DARKGREEN;
00286 GUI_COLOR _ColorTemp2      = GUI_BLUE;
00287 
00288 //
00289 // Index of color modified in color dialog
00290 //
00291 static int _ColorIndex;
00292 
00293 //
00294 // Arrays of temperature values
00295 //
00296 static I16 _aTemp1[277], _aTemp2[277];
00297 
00298 /*********************************************************************
00299 *
00300 *          Static code
00301 *
00302 **********************************************************************
00303 */
00304 static I16 _GetRandomValue(I16 Old) {
00305   int MaxValue;
00306   int yD;
00307   int MaxDiff;
00308   I16 yNew;
00309 
00310   MaxDiff  = 2;
00311   MaxValue = _TempMax - _TempMin;
00312   yD       = MaxDiff - (rand() % MaxDiff);
00313   if (rand() & 1) {
00314     yNew = Old + yD;
00315   } else {
00316     yNew = Old - yD;
00317   }
00318   if (yNew > MaxValue) {
00319     yNew -= yD;
00320   } else { if (yNew < 0)
00321     yNew += yD;
00322   }
00323   return yNew;
00324 }
00325 
00326 /*********************************************************************
00327 *
00328 *       _InitRandomData
00329 */
00330 static void _InitRandomData(I16 * paY, int n) {
00331   int i;
00332   int MaxValue;
00333 
00334   MaxValue = _TempMax - _TempMin;
00335   for (i = 0; i < n; i++) {
00336     if (!i) {
00337       paY[i] = rand() % MaxValue;
00338     } else {
00339       paY[i] = _GetRandomValue(paY[i-1]);
00340     }
00341   }
00342 }
00343 
00344 /*********************************************************************
00345 *
00346 *       _SaveColorSep
00347 */
00348 static void _SaveCurrentColor(void) {
00349   GUI_COLOR Color;
00350 
00351   Color = GUI_MAKE_COLOR(_aColorSep[0] | (((U32)_aColorSep[1]) << 8) | (((U32)_aColorSep[2]) << 16));
00352   switch (_ColorIndex) {
00353   case 0: _ColorBackGround = Color; break;
00354   case 1: _ColorGrid       = Color; break;
00355   case 2: _ColorLabel      = Color; break;
00356   case 3: _ColorTemp1      = Color; break;
00357   case 4: _ColorTemp2      = Color; break;
00358   }
00359 }
00360 
00361 /*********************************************************************
00362 *
00363 *       _UpdateTextColors
00364 */
00365 static void _UpdateTextColors(WM_HWIN hDlg) {
00366   WM_HWIN hItem;
00367 
00368   hItem = WM_GetDialogItem(hDlg, GUI_ID_TEXT0);
00369   TEXT_SetTextColor(hItem, _ColorTemp1);
00370   hItem = WM_GetDialogItem(hDlg, GUI_ID_TEXT1);
00371   TEXT_SetTextColor(hItem, _ColorTemp2);
00372 }
00373 
00374 /*******************************************************************
00375 *
00376 *       _DrawGraph
00377 */
00378 static void _DrawGraph(void) {
00379   GUI_RECT Rect;
00380   int      xSize;
00381   int      ySize;
00382   int      x;
00383   int      y;
00384 
00385   WM_GetClientRect(&Rect);
00386   xSize = Rect.x1;
00387   ySize = Rect.y1;
00388   GUI_SetBkColor(GUI_BLACK);
00389   GUI_ClearRect(26, 1, 302, ySize - 21);
00390   GUI_SetColor(_ColorGrid);
00391   for (y = 20; y < (ySize - 21); y += 20) {
00392     int yPos = ySize - 20 - y;
00393     GUI_DrawHLine(yPos, 26, 302);
00394   }
00395   for (x = 40; x < (xSize - 25); x += 40) {
00396     int xPos = x + 25;
00397     GUI_DrawVLine(xPos, 1, ySize - 21);
00398   }
00399   GUI_SetColor(_ColorTemp1);
00400   GUI_DrawGraph(_aTemp1, GUI_COUNTOF(_aTemp1), 26, ySize - 121);
00401   GUI_SetColor(_ColorTemp2);
00402   GUI_DrawGraph(_aTemp2, GUI_COUNTOF(_aTemp2), 26, ySize - 121);
00403 }
00404 
00405 /*********************************************************************
00406 *
00407 *       _LabelGraph
00408 */
00409 static void _LabelGraph(void) {
00410   GUI_RECT Rect;
00411   int      x;
00412   int      y;
00413   int      xSize;
00414   int      ySize;
00415 
00416   WM_GetClientRect(&Rect);
00417   xSize = Rect.x1;
00418   ySize = Rect.y1;
00419   GUI_SetBkColor(_ColorBackGround);
00420   GUI_Clear();
00421   GUI_SetColor(_ColorLabel);
00422   GUI_SetPenSize(1);
00423   GUI_ClearRect(0, (ySize - 21) - ySize, (xSize - 1), (ySize - 1));
00424   GUI_DrawRect(25, 0, xSize, ySize - 20);
00425   GUI_SetFont(&GUI_Font6x8);
00426   for (x = 0; x < (xSize - 20); x += 40) {
00427     int xPos = x + 25;
00428     GUI_DrawVLine(xPos, (ySize - 20), (ySize - 14));
00429     GUI_DispDecAt(x / 40, xPos - 2, (ySize - 9), 1);
00430   }
00431   for (y = 0; y < ySize - 20; y += 20) {
00432     int yPos = ySize - 20 - y;
00433     GUI_DrawHLine(yPos, 20, 25);
00434     GUI_GotoXY(1, yPos - 4);
00435     GUI_DispDecSpace(_TempMin + y, 3);
00436   }
00437 }
00438 
00439 /*********************************************************************
00440 *
00441 *       _SetProgbarValue
00442 */
00443 static void _SetProgbarValue(int Id, I16 Value) {
00444   char    acBuffer[6] = {"   "};
00445   WM_HWIN hItem;
00446 
00447   hItem = WM_GetDialogItem(_hDialogMain, Id);
00448   PROGBAR_SetValue(hItem, 100 - Value);
00449   Value = 100 - Value + _TempMin;
00450   acBuffer[2] = '0' + Value % 10;
00451   acBuffer[1] = (Value >=  10) ? '0' + (Value % 100) /  10 : ' ';
00452   acBuffer[0] = (Value >= 100) ? '0' + Value / 100 : ' ';
00453   PROGBAR_SetText(hItem, acBuffer);
00454 }
00455 
00456 /*********************************************************************
00457 *
00458 *       _cbDialogIntro
00459 *
00460 * Function description
00461 *   Callback routine of DialogIntro
00462 */
00463 static void _cbDialogIntro(WM_MESSAGE * pMsg) {
00464   GUI_RECT Rect;
00465   WM_HWIN  hDlg;
00466   int      Id;
00467   unsigned i;
00468   int      ySizeText;
00469   int      yPos;
00470 
00471   yPos = 40;
00472   hDlg = pMsg->hWin;
00473   switch (pMsg->MsgId) {
00474   case WM_PAINT:
00475     WM_GetClientRect(&Rect);
00476     GUI_SetBkColor(GUI_WHITE);
00477     GUI_SetColor(GUI_BLACK);
00478     GUI_Clear();
00479     GUI_SetFont(&GUI_Font24_ASCII);
00480     GUI_DispStringHCenterAt("Virtual screens", 160, 5);
00481     GUI_SetFont(&GUI_Font13B_ASCII);
00482     GUI_DrawBitmap(&_bmLogoBitmap, (Rect.x1 - _bmLogoBitmap.XSize) / 2, yPos);
00483     ySizeText = GUI_GetFontSizeY();
00484     yPos += _bmLogoBitmap.YSize + 15;
00485     for (i = 0; i < GUI_COUNTOF(_apDialogIntro); i++) {
00486       GUI_DispStringHCenterAt(_apDialogIntro[i], Rect.x1 / 2, yPos);
00487       yPos += ySizeText;
00488     }
00489     break;
00490   case WM_NOTIFY_PARENT:
00491     if (pMsg->Data.v == WM_NOTIFICATION_RELEASED) {
00492       Id = WM_GetId(pMsg->hWinSrc);      // Id of widget
00493       if (Id == GUI_ID_BUTTON0) {
00494         GUI_EndDialog(hDlg, 0);
00495       }
00496     }
00497     break;
00498   default:
00499     WM_DefaultProc(pMsg);
00500   }
00501 }
00502 
00503 /*********************************************************************
00504 *
00505 *       _cbDialogColor
00506 *
00507 * Function description
00508 *   Callback routine of DialogColor
00509 */
00510 static void _cbDialogColor(WM_MESSAGE * pMsg) {
00511   GUI_COLOR Color;
00512   WM_HWIN   hDlg;
00513   WM_HWIN   hItem;
00514   int       i;
00515   int       NCode;
00516   int       Id;
00517 
00518   hDlg = pMsg->hWin;
00519   Color = 0;
00520   switch (pMsg->MsgId) {
00521   case WM_PAINT:
00522     //
00523     // Draw RGB values
00524     //
00525     GUI_SetColor(GUI_MAKE_COLOR(_aColorSep[0]));
00526     GUI_FillRect(180,  60, 199,  79);
00527     GUI_SetColor(GUI_MAKE_COLOR(_aColorSep[1] << 8));
00528     GUI_FillRect(180,  90, 199, 109);
00529     GUI_SetColor(GUI_MAKE_COLOR(((U32)_aColorSep[2]) << 16));
00530     GUI_FillRect(180, 120, 199, 139);
00531     //
00532     // Draw resulting color
00533     //
00534     GUI_SetColor(GUI_MAKE_COLOR(_aColorSep[0] | (((U32)_aColorSep[1]) << 8) | (((U32)_aColorSep[2]) << 16)));
00535     GUI_FillRect(205,  60, 285, 139);
00536     return;
00537   case WM_INIT_DIALOG:
00538     _ColorIndex = 0;
00539     for (i = 0; i < 3; i++) {
00540       hItem = WM_GetDialogItem(hDlg, GUI_ID_SLIDER0 + i);
00541       _aColorSep[i] = (_ColorBackGround & (0xff << (i * 8))) >> (i * 8);
00542       SLIDER_SetRange(hItem, 0, 255);
00543       SLIDER_SetValue(hItem, _aColorSep[i]);
00544       //
00545       // Init EDIT-widgets
00546       //
00547       hItem = WM_GetDialogItem(hDlg, GUI_ID_EDIT0 + i);
00548       EDIT_SetDecMode(hItem, _aColorSep[i],   0, 255, 0, 0);
00549     }
00550     //
00551     // Init dropdown widgets
00552     //
00553     hItem = WM_GetDialogItem(hDlg, GUI_ID_DROPDOWN0);
00554     DROPDOWN_SetAutoScroll(hItem, 1);
00555     DROPDOWN_AddString(hItem, "Background");
00556     DROPDOWN_AddString(hItem, "Grid");
00557     DROPDOWN_AddString(hItem, "Label");
00558     DROPDOWN_AddString(hItem, "Temperature 1");
00559     DROPDOWN_AddString(hItem, "Temperature 2");
00560     break;
00561   case WM_NOTIFY_PARENT:
00562     Id    = WM_GetId(pMsg->hWinSrc);    // Id of widget
00563     NCode = pMsg->Data.v;               // Notification code
00564     switch (NCode) {
00565     case WM_NOTIFICATION_RELEASED:      // React only if released
00566       if (Id == GUI_ID_OK) {            // OK Button
00567         _SaveCurrentColor();
00568         _UpdateTextColors(_hDialogMain);
00569         hItem = WM_GetClientWindow(WM_GetDialogItem(_hDialogMain, ID_TEMPERATURE));
00570         WM_InvalidateWindow(hItem);
00571         WM_SetFocus(WM_GetDialogItem(_hDialogMain, ID_TEMPERATURE));
00572         GUI_SetOrg(0, 0);
00573       }
00574       break;
00575     case WM_NOTIFICATION_SEL_CHANGED:
00576       _SaveCurrentColor();
00577       if (Id == GUI_ID_DROPDOWN0) {
00578         for (i = 0; i < 3; i++) {
00579           hItem = WM_GetDialogItem(hDlg, GUI_ID_DROPDOWN0);
00580           _ColorIndex = DROPDOWN_GetSel(hItem);
00581           hItem = WM_GetDialogItem(hDlg, GUI_ID_SLIDER0 + i);
00582           switch (_ColorIndex) {
00583           case 0: Color = _ColorBackGround; break;
00584           case 1: Color = _ColorGrid;       break;
00585           case 2: Color = _ColorLabel;      break;
00586           case 3: Color = _ColorTemp1;      break;
00587           case 4: Color = _ColorTemp2;      break;
00588           }
00589           _aColorSep[i] = (Color & (0xff << (i * 8))) >> (i * 8);
00590           SLIDER_SetRange(hItem, 0, 255);
00591           SLIDER_SetValue(hItem, _aColorSep[i]);
00592           //
00593           // Init EDIT-widgets
00594           //
00595           hItem = WM_GetDialogItem(hDlg, GUI_ID_EDIT0 + i);
00596           EDIT_SetDecMode(hItem, _aColorSep[i],   0, 255, 0, 0);
00597         }
00598       }
00599       break;
00600     case WM_NOTIFICATION_VALUE_CHANGED: // Value has changed
00601       {
00602         unsigned Index, v;
00603         WM_HWIN hSlider, hEdit;
00604         Index = 0;
00605         v     = 0;
00606         if ((Id >= GUI_ID_SLIDER0) && (Id <= GUI_ID_SLIDER2)) {
00607           Index = Id - GUI_ID_SLIDER0;
00608           //
00609           // SLIDER-widget has changed, update EDIT-widget
00610           //
00611           hSlider = WM_GetDialogItem(hDlg, GUI_ID_SLIDER0 + Index);
00612           hEdit   = WM_GetDialogItem(hDlg, GUI_ID_EDIT0 + Index);
00613           v = SLIDER_GetValue(hSlider);
00614           EDIT_SetValue(hEdit, v);
00615         } else if ((Id >= GUI_ID_EDIT0) && (Id <= GUI_ID_EDIT2)) {
00616           Index = Id - GUI_ID_EDIT0;
00617           //
00618           // If EDIT-widget has changed, update SLIDER-widget
00619           //
00620           hSlider = WM_GetDialogItem(hDlg, GUI_ID_SLIDER0 + Index);
00621           hEdit   = WM_GetDialogItem(hDlg, GUI_ID_EDIT0 + Index);
00622           v = EDIT_GetValue(hEdit);
00623           SLIDER_SetValue(hSlider, v);
00624         }
00625         _aColorSep[Index] = v;
00626         //
00627         // At last invalidate dialog client window
00628         //
00629         WM_InvalidateWindow(WM_GetClientWindow(hDlg));
00630       }
00631       break;
00632     }
00633     break;
00634   default:
00635     WM_DefaultProc(pMsg);
00636   }
00637 }
00638 
00639 /*********************************************************************
00640 *
00641 *       _cbTemperature
00642 *
00643 * Function description
00644 *   Callback routine of temperature window
00645 */
00646 static void _cbTemperature(WM_MESSAGE * pMsg) {
00647   switch (pMsg->MsgId) {
00648   case WM_PAINT:
00649     _LabelGraph();
00650     _DrawGraph();
00651     return;
00652   }
00653   if (_pcbCallbackTemperature) {
00654     _pcbCallbackTemperature(pMsg);
00655   }
00656 }
00657 
00658 /*********************************************************************
00659 *
00660 *       _cbDialogMain
00661 *
00662 * Function description
00663 *   Callback routine of DialogMain
00664 */
00665 static void _cbDialogMain(WM_MESSAGE * pMsg) {
00666   WM_HWIN hDlg;
00667   WM_HWIN hItem;
00668   int     Id;
00669 
00670   hDlg = pMsg->hWin;
00671   switch (pMsg->MsgId) {
00672   case WM_PAINT:
00673     break;
00674   case WM_INIT_DIALOG:
00675     //
00676     // Init progress bars
00677     //
00678     hItem = WM_GetDialogItem(hDlg, GUI_ID_PROGBAR0);
00679     WIDGET_SetEffect(hItem, &WIDGET_Effect_3D);
00680     _SetProgbarValue(GUI_ID_PROGBAR0, _aTemp1[GUI_COUNTOF(_aTemp1) - 1]);
00681     hItem = WM_GetDialogItem(hDlg, GUI_ID_PROGBAR1);
00682     WIDGET_SetEffect(hItem, &WIDGET_Effect_3D);
00683     _SetProgbarValue(GUI_ID_PROGBAR1, _aTemp2[GUI_COUNTOF(_aTemp2) - 1]);
00684     //
00685     // Init edit widgets
00686     //
00687     hItem = WM_GetDialogItem(hDlg, GUI_ID_EDIT0);
00688     EDIT_SetDecMode(hItem, _TempMin, 0, 999, 0, 0);
00689     WM_DisableWindow(hItem);
00690     hItem = WM_GetDialogItem(hDlg, GUI_ID_EDIT1);
00691     EDIT_SetDecMode(hItem, _TempMax, 0, 999, 0, 0);
00692     WM_DisableWindow(hItem);
00693     //
00694     // Init temperature window *
00695     //
00696     hItem = WM_GetClientWindow(WM_GetDialogItem(hDlg, ID_TEMPERATURE));
00697     _pcbCallbackTemperature = WM_SetCallback(hItem, _cbTemperature);
00698     _UpdateTextColors(hDlg);
00699     break;
00700   case WM_NOTIFY_PARENT:
00701     if (pMsg->Data.v == WM_NOTIFICATION_RELEASED) {
00702       Id = WM_GetId(pMsg->hWinSrc);      // Id of widget
00703       switch (Id) {
00704       case GUI_ID_BUTTON0:
00705         WM_SetFocus(_hDialogColor);
00706         GUI_SetOrg(0, 240);
00707         break;
00708       }
00709     }
00710     break;
00711   default:
00712     WM_DefaultProc(pMsg);
00713   }
00714 }
00715 
00716 /*********************************************************************
00717 *
00718 *          Public code
00719 *
00720 **********************************************************************
00721 */
00722 /*********************************************************************
00723 *
00724 *          MainTask
00725 */
00726 void MainTask(void) {
00727   int Index;
00728 
00729   GUI_Init();
00730   //
00731   // Check if recommended memory for the sample is available
00732   //
00733   if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
00734     GUI_ErrorOut("Not enough memory available."); 
00735     return;
00736   }
00737   #if GUI_SUPPORT_MEMDEV
00738     WM_SetCreateFlags(WM_CF_MEMDEV);
00739   #endif
00740   WM_SetDesktopColor(GUI_BLACK);
00741   //
00742   // Initialize the temperature arrays
00743   //
00744   _InitRandomData(_aTemp1, GUI_COUNTOF(_aTemp1));
00745   _InitRandomData(_aTemp2, GUI_COUNTOF(_aTemp2));
00746   //
00747   // Execute the intro dialog
00748   //
00749   GUI_ExecDialogBox(_aDialogIntro, GUI_COUNTOF(_aDialogIntro), _cbDialogIntro, WM_HBKWIN, 0, 0);
00750   //
00751   // Execute the color and the temperature dialog
00752   //
00753   _hDialogColor = GUI_CreateDialogBox(_aDialogColor, GUI_COUNTOF(_aDialogColor), _cbDialogColor, WM_HBKWIN, 0, 0);
00754   _hDialogMain  = GUI_CreateDialogBox(_aDialogMain,  GUI_COUNTOF(_aDialogMain),  _cbDialogMain,  WM_HBKWIN, 0, 0);
00755   //
00756   // Add new temperatures...
00757   //
00758   Index = GUI_COUNTOF(_aTemp1) - 1;
00759   while (1) {
00760     WM_HWIN hItem;
00761     GUI_Delay(100); // Wait a while
00762     //
00763     // Shift the color arrays
00764     //
00765     memmove(_aTemp1, _aTemp1 + 1, sizeof(_aTemp1) - 2);
00766     memmove(_aTemp2, _aTemp2 + 1, sizeof(_aTemp2) - 2);
00767     //
00768     // Add new values
00769     //
00770     _aTemp1[Index] = _GetRandomValue(_aTemp1[Index - 1]);
00771     _aTemp2[Index] = _GetRandomValue(_aTemp2[Index - 1]);
00772     //
00773     // Update windows
00774     //
00775     hItem = WM_GetClientWindow(WM_GetDialogItem(_hDialogMain, ID_TEMPERATURE));
00776     WM_InvalidateWindow(hItem);
00777     _SetProgbarValue(GUI_ID_PROGBAR0, _aTemp1[Index]);
00778     _SetProgbarValue(GUI_ID_PROGBAR1, _aTemp2[Index]);
00779   }
00780 }
00781 
00782 /*************************** End of file ****************************/