Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/libs/lvgl/lv_objx/lv_arc.h
1476 views
1
/**
2
* @file lv_arc.h
3
*
4
*/
5
6
7
#ifndef LV_ARC_H
8
#define LV_ARC_H
9
10
#ifdef __cplusplus
11
extern "C" {
12
#endif
13
14
/*********************
15
* INCLUDES
16
*********************/
17
#ifdef LV_CONF_INCLUDE_SIMPLE
18
#include "lv_conf.h"
19
#else
20
#include "../../lv_conf.h"
21
#endif
22
23
#if USE_LV_ARC != 0
24
25
#include "../lv_core/lv_obj.h"
26
27
/*********************
28
* DEFINES
29
*********************/
30
31
/**********************
32
* TYPEDEFS
33
**********************/
34
/*Data of arc*/
35
typedef struct {
36
/*New data for this type */
37
lv_coord_t angle_start;
38
lv_coord_t angle_end;
39
} lv_arc_ext_t;
40
41
42
/*Styles*/
43
enum {
44
LV_ARC_STYLE_MAIN,
45
};
46
typedef uint8_t lv_arc_style_t;
47
48
49
50
/**********************
51
* GLOBAL PROTOTYPES
52
**********************/
53
54
/**
55
* Create a arc objects
56
* @param par pointer to an object, it will be the parent of the new arc
57
* @param copy pointer to a arc object, if not NULL then the new object will be copied from it
58
* @return pointer to the created arc
59
*/
60
lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy);
61
62
/*======================
63
* Add/remove functions
64
*=====================*/
65
66
67
/*=====================
68
* Setter functions
69
*====================*/
70
71
/**
72
* Set the start and end angles of an arc. 0 deg: bottom, 90 deg: right etc.
73
* @param arc pointer to an arc object
74
* @param start the start angle [0..360]
75
* @param end the end angle [0..360]
76
*/
77
void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end);
78
79
/**
80
* Set a style of a arc.
81
* @param arc pointer to arc object
82
* @param type which style should be set
83
* @param style pointer to a style
84
* */
85
void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, lv_style_t *style);
86
87
/*=====================
88
* Getter functions
89
*====================*/
90
91
/**
92
* Get the start angle of an arc.
93
* @param arc pointer to an arc object
94
* @return the start angle [0..360]
95
*/
96
uint16_t lv_arc_get_angle_start(lv_obj_t * arc);
97
98
/**
99
* Get the end angle of an arc.
100
* @param arc pointer to an arc object
101
* @return the end angle [0..360]
102
*/
103
uint16_t lv_arc_get_angle_end(lv_obj_t * arc);
104
105
/**
106
* Get style of a arc.
107
* @param arc pointer to arc object
108
* @param type which style should be get
109
* @return style pointer to the style
110
* */
111
lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type);
112
113
/*=====================
114
* Other functions
115
*====================*/
116
117
/**********************
118
* MACROS
119
**********************/
120
121
#endif /*USE_LV_ARC*/
122
123
#ifdef __cplusplus
124
} /* extern "C" */
125
#endif
126
127
#endif /*LV_ARC_H*/
128
129