RT1050 GUI demo using emWin library

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LCD_SIM.h Source File

LCD_SIM.h

00001 /*********************************************************************
00002 *                SEGGER Microcontroller GmbH & Co. KG                *
00003 *        Solutions for real time microcontroller applications        *
00004 **********************************************************************
00005 *                                                                    *
00006 *        (c) 1996 - 2016  SEGGER Microcontroller GmbH & Co. KG       *
00007 *                                                                    *
00008 *        Internet: www.segger.com    Support:  support@segger.com    *
00009 *                                                                    *
00010 **********************************************************************
00011 
00012 ** emWin V5.38 - 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  NXP Semiconductors USA, Inc.  whose
00019 registered  office  is  situated  at 411 E. Plumeria Drive, San  Jose,
00020 CA 95134, USA  solely for  the  purposes  of  creating  libraries  for
00021 NXPs M0, M3/M4 and  ARM7/9 processor-based  devices,  sublicensed  and
00022 distributed under the terms and conditions of the NXP 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 
00030 Licensor:                 SEGGER Microcontroller Systems LLC
00031 Licensed to:              NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA
00032 Licensed SEGGER software: emWin
00033 License number:           GUI-00186
00034 License model:            emWin License Agreement, dated August 20th 2011
00035 Licensed product:         -
00036 Licensed platform:        NXP's ARM 7/9, Cortex-M0,M3,M4
00037 Licensed number of seats: -
00038 ----------------------------------------------------------------------
00039 File        : LCD_SIM.h
00040 Purpose     : Declares LCD interface functions
00041 ----------------------------------------------------------------------
00042 */
00043 
00044 #ifndef LCDSIM_H
00045 #define LCDSIM_H
00046 
00047 #include "LCD.h"
00048 
00049 /************************************************************
00050 *
00051 *       Defines
00052 *
00053 *************************************************************
00054 */
00055 #define LCDSIM_MAX_DISPLAYS GUI_NUM_LAYERS
00056 
00057 #define GUI_TRANSMODE_PIXELALPHA 0
00058 #define GUI_TRANSMODE_CHROMA     1
00059 #define GUI_TRANSMODE_ZERO       2
00060 
00061 /************************************************************
00062 *
00063 *       LCDSIM_      General declarations
00064 *
00065 *************************************************************
00066 */
00067 void  LCDSIM_PreInit(void);
00068 char* LCDSIM_Init(void);
00069 void  LCDSIM_Exit(void);
00070 int   LCDSIM_GetMouseState(LCD_tMouseState *pState);
00071 void  LCDSIM_SetMouseState(int x, int y, int KeyStat, int LayerIndex);
00072 void  LCDSIM_CheckMouseState(int LayerIndex);
00073 int   LCDSIM_SaveSBMP  (const char * sFileName);
00074 int   LCDSIM_SaveSBMPEx(const char * sFileName, int x0, int y0, int xSize, int ySize);
00075 void  LCDSIM_SetRGBOrder(unsigned RGBOrder);
00076 
00077 /************************************************************
00078 *
00079 *       LCDSIM_     Functions for each display
00080 *
00081 *************************************************************
00082 */
00083 void LCDSIM_FillRect(int x0, int y0, int x1, int y1, int Index, int LayerIndex);
00084 int  LCDSIM_GetModifyCnt(int LayerIndex);
00085 int  LCDSIM_GetModifyCntInfo(int LayerIndex);
00086 int  LCDSIM_GetPixelColor(int x, int y, int LayerIndex);
00087 int  LCDSIM_GetPixelIndex(int x, int y, int LayerIndex);
00088 int  LCDSIM_Index2Color(int Index, int LayerIndex);
00089 int  LCDSIM_RLUT_GetPixelIndex(int x, int y, int LayerIndex);
00090 void LCDSIM_RLUT_SetPixelIndex(int x, int y, int Index, int LayerIndex);
00091 void LCDSIM_SetLUTEntry(U8 Pos, LCD_COLOR color, int LayerIndex);
00092 void LCDSIM_SetPixelIndex(int x, int y, int Index, int LayerIndex);
00093 void LCDSIM_SetPixelColor(int x, int y, LCD_COLOR PixelColor, int LayerIndex);
00094 void LCDSIM_SetSubPixel(int x, int y, U8 Value, int LayerIndex);
00095 void LCDSIM_SetPixelPhys(int x, int y, int Index, int LayerIndex);
00096 int  LCDSIM_GetPixelPhys(int xPhys, int yPhys, int LayerIndex);
00097 void LCDSIM_FillRectPhys(int x0Phys, int y0Phys, int x1Phys, int y1Phys, int Index, int LayerIndex);
00098 void LCDSIM_SetOrg(int x, int y, int LayerIndex);
00099 void LCDSIM_SetAlpha(int Alpha, int LayerIndex);
00100 int  LCDSIM_GetAlpha(int LayerIndex);
00101 void LCDSIM_SetLayerPos(int xPos, int yPos, int LayerIndex);
00102 void LCDSIM_SetLayerVis(int OnOff, int LayerIndex);
00103 void LCDSIM_SetSize(int LayerIndex, int xSize, int ySize);
00104 void LCDSIM_SetTransMode(int LayerIndex, int TransMode);
00105 void LCDSIM_SetChroma(int LayerIndex, LCD_COLOR ChromaMin, LCD_COLOR ChromaMax);
00106 void LCDSIM_SetCompositeColor(U32 Color);
00107 void LCDSIM_SetCompositeSize(int xSize, int ySize);
00108 void LCDSIM_CopyBuffer(int LayerIndex, int IndexSrc, int IndexDst);
00109 void LCDSIM_Invalidate(int LayerIndex);
00110 
00111 /********************************************************************
00112 *
00113 *       Publics for LCD
00114 *
00115 *********************************************************************
00116 */
00117 void SIM_GUI_SetCompositeSize(int xSize, int ySize);
00118 void SIM_GUI_SetCompositeColor(U32 Color);
00119 U32  SIM_GUI_GetCompositeColor(void);
00120 void SIM_GUI_SetLCDPos(int xPos, int yPos);
00121 int  SIM_GUI_SaveBMP(const char * sFileName);
00122 int  SIM_GUI_SaveBMPEx(const char * sFileName, int x0, int y0, int xSize, int ySize);
00123 int  SIM_GUI_SetTransColor(int Color);
00124 int  SIM_GUI_SetLCDColorBlack (unsigned int Index, int Color);
00125 int  SIM_GUI_SetLCDColorWhite (unsigned int Index, int Color);
00126 void SIM_GUI_SetMag(int MagX, int MagY);
00127 int  SIM_GUI_GetMagX(void);
00128 int  SIM_GUI_GetMagY(void);
00129 int  SIM_GUI_GetForwardRButton(void);
00130 void SIM_GUI_SetForwardRButton(int OnOff);
00131 void SIM_GUI_SetTransMode(int LayerIndex, int TransMode);
00132 void SIM_GUI_SetChroma(int LayerIndex, unsigned long ChromaMin, unsigned long ChromaMax);
00133 void SIM_GUI_UseCustomBitmaps(void);
00134 void SIM_GUI_SetAccellerator(int Accellerator);
00135 void SIM_GUI_SetMainScreenOffset(int x, int y);
00136 void SIM_GUI_SetCompositeTouch(int LayerIndex);
00137 int  SIM_GUI_GetCompositeTouch(void);
00138 
00139 /********************************************************************
00140 *
00141 *       Routine(s) in user application
00142 *
00143 *********************************************************************
00144 */
00145 void SIM_X_Config(void);   /* Allow init before application starts ... Use it to set LCD offset etc */
00146 
00147 /********************************************************************
00148 *
00149 *       Publics used by GUI_X module
00150 *
00151 *********************************************************************
00152 */
00153 void SIM_GUI_Delay (int ms);
00154 void SIM_GUI_ExecIdle(void);
00155 int  SIM_GUI_GetTime(void);
00156 int  SIM_GUI_GetKey(void);
00157 int  SIM_GUI_WaitKey(void);
00158 void SIM_GUI_StoreKey(int);
00159 
00160 /********************************************************************
00161 *
00162 *       Publics for logging, warning, errorout
00163 *
00164 *********************************************************************
00165 */
00166 void SIM_GUI_Log(const char *s);
00167 void SIM_GUI_Log1(const char *s, int p0);
00168 void SIM_GUI_Log2(const char *s, int p0, int p1);
00169 void SIM_GUI_Log3(const char *s, int p0, int p1, int p2);
00170 void SIM_GUI_Log4(const char *s, int p0, int p1, int p2,int p3);
00171 void SIM_GUI_Warn(const char *s);
00172 void SIM_GUI_Warn1(const char *s, int p0);
00173 void SIM_GUI_Warn2(const char *s, int p0, int p1);
00174 void SIM_GUI_Warn3(const char *s, int p0, int p1, int p2);
00175 void SIM_GUI_Warn4(const char *s, int p0, int p1, int p2, int p3);
00176 void SIM_GUI_ErrorOut(const char *s);
00177 void SIM_GUI_ErrorOut1(const char *s, int p0);
00178 void SIM_GUI_ErrorOut2(const char *s, int p0, int p1);
00179 void SIM_GUI_ErrorOut3(const char *s, int p0, int p1, int p2);
00180 void SIM_GUI_ErrorOut4(const char *s, int p0, int p1, int p2, int p3);
00181 void SIM_GUI_EnableMessageBoxOnError(int Status);
00182 
00183 /********************************************************************
00184 *
00185 *       Commandline support
00186 *
00187 *********************************************************************
00188 */
00189 const char *SIM_GUI_GetCmdLine(void);
00190 
00191 /********************************************************************
00192 *
00193 *       Multitasking support
00194 *
00195 *********************************************************************
00196 */
00197 void SIM_GUI_CreateTask(char * pName, void * pFunc);
00198 void SIM_GUI_Start(void);
00199 unsigned long SIM_GUI_GetTaskID(void);
00200 void SIM_GUI_Lock(void);
00201 void SIM_GUI_Unlock(void);
00202 void SIM_GUI_InitOS(void);
00203 
00204 #endif /* LCD_H */
00205 
00206 
00207 
00208