mikroSDK Reference Manual
gl_types.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2023 MikroElektronika d.o.o.
4 ** Contact: https://www.mikroe.com/contact
5 **
6 ** This file is part of the mikroSDK package
7 **
8 ** Commercial License Usage
9 **
10 ** Licensees holding valid commercial NECTO compilers AI licenses may use this
11 ** file in accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The MikroElektronika Company.
14 ** For licensing terms and conditions see
15 ** https://www.mikroe.com/legal/software-license-agreement.
16 ** For further information use the contact form at
17 ** https://www.mikroe.com/contact.
18 **
19 **
20 ** GNU Lesser General Public License Usage
21 **
22 ** Alternatively, this file may be used for
23 ** non-commercial projects under the terms of the GNU Lesser
24 ** General Public License version 3 as published by the Free Software
25 ** Foundation: https://www.gnu.org/licenses/lgpl-3.0.html.
26 **
27 ** The above copyright notice and this permission notice shall be
28 ** included in all copies or substantial portions of the Software.
29 **
30 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31 ** OF MERCHANTABILITY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
32 ** TO THE WARRANTIES FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
34 ** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
35 ** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36 ** OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 **
38 ****************************************************************************/
39 
45 #ifndef _GL_TYPES_H_
46 #define _GL_TYPES_H_
47 
48 #include "gl_colors.h"
49 #include <stdbool.h>
50 
51 #ifdef __cplusplus
52 extern "C"{
53 #endif
54 
58 typedef enum
59 {
64  // GL_BRUSH_STYLE_IMAGE_PATTERN //TODO: Implement in drawing function.
65  // GL_BRUSH_STYLE_GRADIENT_LINEAR //TODO: Implement in drawing function.
67 
68 
72 typedef enum
73 {
78  GL_IMAGE_FORMAT_JPEG = 0x20
80 
84 typedef enum
85 {
90 
91 typedef int16_t gl_int_t;
92 typedef uint16_t gl_uint_t;
93 typedef int32_t gl_long_int_t;
94 typedef uint32_t gl_long_uint_t;
96 typedef uint16_t gl_angle_t;
103 typedef int16_t gl_coord_t;
109 typedef struct
110 {
112  gl_int_t y;
113 } gl_point_t;
114 
119 typedef struct
120 {
121  gl_uint_t width;
122  gl_uint_t height;
123 } gl_size_t;
124 
129 typedef struct
130 {
131  gl_point_t top_left;
132  uint16_t width;
133  uint16_t height;
135 
136 
137 typedef void (*gl_fill_t)(gl_rectangle_t *rect, gl_color_t color);
138 typedef void (*gl_begin_frame_t)(gl_rectangle_t *rect);
139 typedef void (*gl_frame_data_t)(gl_color_t color);
140 typedef void (*gl_end_frame_t)();
146 typedef struct
147 {
148  uint16_t display_width;
149  uint16_t display_height;
151  gl_fill_t fill_f;
152  gl_begin_frame_t begin_frame_f;
153  gl_frame_data_t frame_data_f;
154  gl_end_frame_t end_frame_f;
155 } gl_driver_t;
156 
157 #ifdef __cplusplus
158 } // extern "C"
159 #endif
160 
161 #endif // _GL_TYPES_H_
162 // ------------------------------------------------------------------------- END
GL_FONT_VERTICAL_COLUMN
Definition: gl_types.h:87
GL_BRUSH_STYLE_GRADIENT_TOP_DOWN
Definition: gl_types.h:61
gl_brush_style_t
gl_brush_style_t
Definition: gl_types.h:57
GL_IMAGE_FORMAT_BITMAP_4BPP
Definition: gl_types.h:74
gl_driver_t
The context structure for storing driver configuration.
Definition: gl_types.h:145
gl_long_int_t
int32_t gl_long_int_t
Definition: gl_types.h:92
GL_IMAGE_FORMAT_BITMAP_16BPP
Definition: gl_types.h:76
GL_FONT_HORIZONTAL
Definition: gl_types.h:85
gl_rectangle_t
The context structure for storing rectangle by its top left point and width and height (in pixels).
Definition: gl_types.h:128
GL_IMAGE_FORMAT_BITMAP_1BPP
Definition: gl_types.h:73
gl_end_frame_t
void(* gl_end_frame_t)()
Definition: gl_types.h:139
gl_image_format_t
gl_image_format_t
Definition: gl_types.h:71
GL_IMAGE_FORMAT_BITMAP_8BPP
Definition: gl_types.h:75
gl_coord_t
int16_t gl_coord_t
Definition: gl_types.h:102
GL_BRUSH_STYLE_GRADIENT_LEFT_RIGHT
Definition: gl_types.h:62
gl_point_t
The context structure for storing coordinates of the point.
Definition: gl_types.h:108
gl_fill_t
void(* gl_fill_t)(gl_rectangle_t *rect, gl_color_t color)
Definition: gl_types.h:136
gl_long_uint_t
uint32_t gl_long_uint_t
Definition: gl_types.h:93
GL_IMAGE_FORMAT_JPEG
Definition: gl_types.h:77
gl_color_t
uint16_t gl_color_t
Definition: gl_colors.h:55
GL_BRUSH_STYLE_NONE
Definition: gl_types.h:59
gl_int_t
int16_t gl_int_t
Definition: gl_types.h:90
GL_FONT_VERTICAL
Definition: gl_types.h:86
GL_BRUSH_STYLE_FILL
Definition: gl_types.h:60
gl_font_orientation_t
gl_font_orientation_t
Definition: gl_types.h:83
gl_uint_t
uint16_t gl_uint_t
Definition: gl_types.h:91
gl_angle_t
uint16_t gl_angle_t
Definition: gl_types.h:95
gl_begin_frame_t
void(* gl_begin_frame_t)(gl_rectangle_t *rect)
Definition: gl_types.h:137
gl_colors.h
Definition of colors. Here predefined colors can be found.
gl_frame_data_t
void(* gl_frame_data_t)(gl_color_t color)
Definition: gl_types.h:138
gl_size_t
The context structure for storing width and height in number of pixels on the screen.
Definition: gl_types.h:118