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

« Back to documentation index

Show/hide line numbers ICONVIEW_Private.h Source File

ICONVIEW_Private.h

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        : ICONVIEW_Private.h
00041 Purpose     : ICONVIEW private header file
00042 --------------------END-OF-HEADER-------------------------------------
00043 */
00044 
00045 #ifndef ICONVIEW_PRIVATE_H
00046 #define ICONVIEW_PRIVATE_H
00047 
00048 #include "WM.h"
00049 #include "GUI_ARRAY.h"
00050 #include "ICONVIEW.h"
00051 
00052 #if GUI_WINSUPPORT
00053 
00054 #if defined(__cplusplus)
00055   extern "C" {             // Make sure we have C-declarations in C++ programs
00056 #endif
00057 
00058 /*********************************************************************
00059 *
00060 *       Types
00061 *
00062 **********************************************************************
00063 */
00064 typedef struct {
00065   const GUI_FONT * pFont;
00066   GUI_COLOR        aBkColor[3];
00067   GUI_COLOR        aTextColor[3];
00068   int              FrameX, FrameY;
00069   int              SpaceX, SpaceY;
00070   int              TextAlign;
00071   int              IconAlign;
00072   GUI_WRAPMODE     WrapMode;
00073 } ICONVIEW_PROPS;
00074 
00075 typedef struct {
00076   WIDGET                  Widget;
00077   WM_SCROLL_STATE         ScrollStateV;
00078   WM_SCROLL_STATE         ScrollStateH;
00079   ICONVIEW_PROPS          Props;
00080   GUI_ARRAY               ItemArray;
00081   int                     xSizeItems;
00082   int                     ySizeItems;
00083   int                     Sel;
00084   U16                     Flags;
00085   WIDGET_DRAW_ITEM_FUNC * pfDrawItem;
00086   int                     ReleasedItem;
00087 } ICONVIEW_OBJ;
00088 
00089 typedef void tDrawImage    (const void * pData, GUI_GET_DATA_FUNC * pfGetData, int xPos, int yPos);
00090 typedef void tDrawText     (ICONVIEW_OBJ * pObj, GUI_RECT * pRect, const char * s);
00091 typedef void tGetImageSizes(const void * pData, GUI_GET_DATA_FUNC * pfGetData, int * xSize, int * ySize);
00092 
00093 typedef struct {
00094   tDrawImage        * pfDrawImage;
00095   tDrawText         * pfDrawText;
00096   tGetImageSizes    * pfGetImageSizes;
00097   GUI_GET_DATA_FUNC * pfGetData;
00098   const void        * pData;
00099   U32                 UserData;
00100   int                 SizeOfData;
00101   char                acText[1];
00102 } ICONVIEW_ITEM;
00103 
00104 /*********************************************************************
00105 *
00106 *       Macros for internal use
00107 *
00108 **********************************************************************
00109 */
00110 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00111   #define ICONVIEW_INIT_ID(p) (p->Widget.DebugId = ICONVIEW_ID)
00112 #else
00113   #define ICONVIEW_INIT_ID(p)
00114 #endif
00115 
00116 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00117   ICONVIEW_OBJ * ICONVIEW_LockH(ICONVIEW_Handle h);
00118   #define ICONVIEW_LOCK_H(h)   ICONVIEW_LockH(h)
00119 #else
00120   #define ICONVIEW_LOCK_H(h)   (ICONVIEW_OBJ *)GUI_LOCK_H(h)
00121 #endif
00122 
00123 /*********************************************************************
00124 *
00125 *       Private functions
00126 *
00127 **********************************************************************
00128 */
00129 void ICONVIEW__DrawText        (ICONVIEW_OBJ    * pObj, GUI_RECT * pRect, const char * pText);
00130 void ICONVIEW__ManageAutoScroll(ICONVIEW_Handle   hObj);
00131 
00132 #if defined(__cplusplus)
00133   }
00134 #endif
00135 
00136 #endif  // GUI_WINSUPPORT
00137 #endif  // ICONVIEW_H
00138 
00139 /*************************** End of file ****************************/