mikroSDK Reference Manual
gl_types.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** Copyright (C) 2024 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
46#ifndef _GL_TYPES_H_
47#define _GL_TYPES_H_
48
49#include "gl_colors.h"
50#include <stdbool.h>
51
52#ifdef __cplusplus
53extern "C"{
54#endif
55
59typedef enum
60{
65 // GL_BRUSH_STYLE_IMAGE_PATTERN //TODO: Implement in drawing function.
66 // GL_BRUSH_STYLE_GRADIENT_LINEAR //TODO: Implement in drawing function.
68
69
81
91
92typedef int16_t gl_int_t;
93typedef uint16_t gl_uint_t;
94typedef int32_t gl_long_int_t;
95typedef uint32_t gl_long_uint_t;
97typedef uint16_t gl_angle_t;
104typedef int16_t gl_coord_t;
110typedef struct
111{
114} gl_point_t;
115
125
130typedef struct
131{
133 uint16_t width;
134 uint16_t height;
136
137
138typedef void (*gl_fill_t)(gl_rectangle_t *rect, gl_color_t color);
139typedef void (*gl_begin_frame_t)(gl_rectangle_t *rect);
140typedef void (*gl_frame_data_t)(gl_color_t color);
141typedef void (*gl_end_frame_t)();
157
158#ifdef __cplusplus
159} // extern "C"
160#endif
161
162#endif // _GL_TYPES_H_
163// ------------------------------------------------------------------------- END
Definition of colors. Here predefined colors can be found.
uint16_t gl_color_t
Definition gl_colors.h:56
void(* gl_end_frame_t)()
Definition gl_types.h:141
void(* gl_frame_data_t)(gl_color_t color)
Definition gl_types.h:140
int16_t gl_coord_t
Definition gl_types.h:104
int16_t gl_int_t
Definition gl_types.h:92
gl_font_orientation_t
Definition gl_types.h:86
@ GL_FONT_VERTICAL_COLUMN
Definition gl_types.h:89
@ GL_FONT_VERTICAL
Definition gl_types.h:88
@ GL_FONT_HORIZONTAL
Definition gl_types.h:87
gl_image_format_t
Definition gl_types.h:74
@ GL_IMAGE_FORMAT_BITMAP_4BPP
Definition gl_types.h:76
@ GL_IMAGE_FORMAT_BITMAP_16BPP
Definition gl_types.h:78
@ GL_IMAGE_FORMAT_BITMAP_8BPP
Definition gl_types.h:77
@ GL_IMAGE_FORMAT_BITMAP_1BPP
Definition gl_types.h:75
@ GL_IMAGE_FORMAT_JPEG
Definition gl_types.h:79
gl_brush_style_t
Definition gl_types.h:60
@ GL_BRUSH_STYLE_FILL
Definition gl_types.h:62
@ GL_BRUSH_STYLE_GRADIENT_TOP_DOWN
Definition gl_types.h:63
@ GL_BRUSH_STYLE_NONE
Definition gl_types.h:61
@ GL_BRUSH_STYLE_GRADIENT_LEFT_RIGHT
Definition gl_types.h:64
void(* gl_fill_t)(gl_rectangle_t *rect, gl_color_t color)
Definition gl_types.h:138
uint16_t gl_uint_t
Definition gl_types.h:93
uint32_t gl_long_uint_t
Definition gl_types.h:95
void(* gl_begin_frame_t)(gl_rectangle_t *rect)
Definition gl_types.h:139
int32_t gl_long_int_t
Definition gl_types.h:94
uint16_t gl_angle_t
Definition gl_types.h:97
The context structure for storing driver configuration.
Definition gl_types.h:148
gl_fill_t fill_f
Definition gl_types.h:152
uint16_t display_height
Definition gl_types.h:150
gl_frame_data_t frame_data_f
Definition gl_types.h:154
gl_begin_frame_t begin_frame_f
Definition gl_types.h:153
gl_end_frame_t end_frame_f
Definition gl_types.h:155
uint16_t display_width
Definition gl_types.h:149
The context structure for storing coordinates of the point.
Definition gl_types.h:111
gl_int_t y
Definition gl_types.h:113
gl_int_t x
Definition gl_types.h:112
The context structure for storing rectangle by its top left point and width and height (in pixels).
Definition gl_types.h:131
uint16_t width
Definition gl_types.h:133
gl_point_t top_left
Definition gl_types.h:132
uint16_t height
Definition gl_types.h:134
The context structure for storing width and height in number of pixels on the screen.
Definition gl_types.h:121
gl_uint_t width
Definition gl_types.h:122
gl_uint_t height
Definition gl_types.h:123