MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_widget_gradient.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries.
3 *
4 * Subject to your compliance with these terms, you may use Microchip software
5 * and any derivatives exclusively with Microchip products. It is your
6 * responsibility to comply with third party license terms applicable to your
7 * use of third party software (including open source software) that may
8 * accompany Microchip software.
9 *
10 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 * PARTICULAR PURPOSE.
14 *
15 * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 *******************************************************************************/
23 
24 /*******************************************************************************
25  Module for Microchip Graphics Library - Legato User Interface Library
26 
27  Company:
28  Microchip Technology Inc.
29 
30  File Name:
31  legato_widget_gradient.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements gradient drawing widget functions.
38 *******************************************************************************/
45 #ifndef LEGATO_GRADIENT_H
46 #define LEGATO_GRADIENT_H
47 
49 
50 #if LE_GRADIENT_WIDGET_ENABLED == 1
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
57 
58 // *****************************************************************************
59 // *****************************************************************************
60 // Section: Data Types and Constants
61 // *****************************************************************************
62 // *****************************************************************************
63 
64 // *****************************************************************************
65 
66 /* internal use only */
71 typedef struct leGradientWidget leGradientWidget;
72 
73 #define LE_GRADIENTWIDGET_VTABLE(THIS_TYPE) \
74  LE_WIDGET_VTABLE(THIS_TYPE) \
75  \
76  leDirection (*getDirection)(const THIS_TYPE* _this); \
77  leResult (*setDirection)(THIS_TYPE* _this, leDirection dir); \
78 
79 typedef struct leGradientWidgetVTable
80 {
81  LE_GRADIENTWIDGET_VTABLE(leGradientWidget)
82 } leGradientWidgetVTable;
83 
93 typedef struct leGradientWidget
94 {
95  leWidget widget; // widget base class
96 
97  const leGradientWidgetVTable* fn;
98 
99  leDirection dir; // gradient direction
100 } leGradientWidget;
101 
102 // *****************************************************************************
103 // *****************************************************************************
104 // Section: Routines
105 // *****************************************************************************
106 // *****************************************************************************
107 
119 leGradientWidget* leGradientWidget_New(void);
120 
131 void leGradientWidget_Constructor(leGradientWidget* grad);
132 
133 #ifdef _DOXYGEN_
134 #define THIS_TYPE struct leWidget
135 
136 
137 // *****************************************************************************/
149 virtual leDirection getDirection(leGradientWidget* _this);
150 
151 
152 // *****************************************************************************
166 virtual leResult setDirection(leGradientWidget* _this,
167  leDirection dir);
168 
169 #undef THIS_TYPE
170 #endif
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #endif // LE_GRADIENT_WIDGET_ENABLED
177 #endif /* LEGATO_RECTANGLE_H */
Common macros and definitions used by Legato.
leResult
This enum represents function call results.
Definition: legato_common.h:123
leDirection
This enum represents the four directions modes for objects.
Definition: legato_common.h:252
Used to define a widget.
Definition: legato_widget.h:624
Legato widget definitions.
Definition: widget.py:1