1 
2 /**
3  * @file lv_obj_style_dec.h
4  *
5  */
6 
7 #ifndef LV_OBJ_STYLE_DEC_H
8 #define LV_OBJ_STYLE_DEC_H
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /*********************
15  *      DEFINES
16  *********************/
17 
18 /**
19  * Macro to declare the most important style set/get API functions.
20  *
21  * Get the value of a style property from an object in the object's current state
22  * -----------------------------------------------------------------------------
23  *  - Get the value of a style property from an object in the object's current state.
24  *  - Transition animation is taken into account.
25  *  - If the property is not set in the object's styles check the parent(s) if the property can be inherited
26  *  - If still not found return a default value.
27  *  - For example:
28  *      `lv_style_int_t w = lv_obj_get_style_border_width(btn1, LV_BTN_PART_MAIN);`
29  *
30  * Set a local style property for an object in a given state
31  * ---------------------------------------------------------
32  *  - For example:
33  *      `lv_obj_set_style_local_border_width(btn1, LV_BTN_PART_MAIN, LV_STATE_PRESSED, 2);`
34  *
35  * Get a local style property's value of an object in a given state
36  * ----------------------------------------------------------------
37  *  - Return the best matching property in the given state.
38  *  - E.g. if `state` parameter is LV_STATE_PRESSED | LV_STATE_CHECKED` but the property defined only in
39  *    `LV_STATE_PRESSED` and `LV_STATE_DEFAULT` the best matching state is `LV_STATE_PRESSED`
40  *    (because it has higher precedence) and it will be returned.
41  *  - If the property is not found even in `LV_STATE_DEFAULT` `-1` is returned.
42  *  - For example:
43  *      `//Type of result should be lv_style_int_t/lv_opa_t/lv_color_t/const void * according to the type of the property`
44  *      `lv_style_int_t result;`
45  *      `lv_obj_get_style_local_border_width(btn1, LV_BTN_PART_MAIN, LV_STATE_PRESSED, &result);`
46  *      `if(weight > 0) ...the property is found and loaded into result...`
47  *
48  * Get the value from a style in a given state
49  * -------------------------------------------
50  * - The same rules applies to the return value then for "lv_obj_get_style_local_...()" above
51  * - For example
52  *      `int16_t weight = lv_style_get_border_width(&style1, LV_STATE_PRESSED, &result);`
53  *      `if(weight > 0) ...the property is found and loaded into result...`
54 
55  * Set a value in a style in a given state
56  * ---------------------------------------
57  * - For example
58  *      `lv_style_set_border_width(&style1, LV_STATE_PRESSED, 2);`
59  */
60 
61 #define _OBJ_GET_STYLE_scalar(prop_name, func_name, value_type, style_type)                         \
62     static inline value_type lv_obj_get_style_##func_name (const lv_obj_t * obj, uint8_t part)      \
63     {                                                                                               \
64         return (value_type) _lv_obj_get_style##style_type (obj, part, LV_STYLE_##prop_name);        \
65     }
66 
67 #define _OBJ_GET_STYLE_nonscalar(prop_name, func_name, value_type, style_type)                      \
68     static inline value_type lv_obj_get_style_##func_name (const lv_obj_t * obj, uint8_t part)      \
69     {                                                                                               \
70         return _lv_obj_get_style##style_type (obj, part, LV_STYLE_##prop_name);                     \
71     }
72 
73 #define _OBJ_SET_STYLE_LOCAL_scalar(prop_name, func_name, value_type, style_type)                                               \
74     static inline void lv_obj_set_style_local_##func_name (lv_obj_t * obj, uint8_t part, lv_state_t state, value_type value)    \
75     {                                                                                                                           \
76         _lv_obj_set_style_local##style_type (obj, part, LV_STYLE_##prop_name | (state << LV_STYLE_STATE_POS), value);           \
77     }
78 
79 #define _OBJ_SET_STYLE_LOCAL_nonscalar(prop_name, func_name, value_type, style_type)                                            \
80     static inline void lv_obj_set_style_local_##func_name (lv_obj_t * obj, uint8_t part, lv_state_t state, value_type value)    \
81     {                                                                                                                           \
82         _lv_obj_set_style_local##style_type (obj, part, LV_STYLE_##prop_name | (state << LV_STYLE_STATE_POS), value);           \
83     }
84 
85 #define _OBJ_SET_STYLE_scalar(prop_name, func_name, value_type, style_type)                                             \
86     static inline void lv_style_set_##func_name (lv_style_t * style, lv_state_t state, value_type value)                 \
87     {                                                                                                                    \
88         _lv_style_set##style_type (style, LV_STYLE_##prop_name | (state << LV_STYLE_STATE_POS), value);                  \
89     }
90 
91 #define _OBJ_SET_STYLE_nonscalar(prop_name, func_name, value_type, style_type)                                          \
92     static inline void lv_style_set_##func_name (lv_style_t * style, lv_state_t state, value_type value)                 \
93     {                                                                                                                    \
94         _lv_style_set##style_type (style, LV_STYLE_##prop_name | (state << LV_STYLE_STATE_POS), value);                  \
95     }
96 
97 #define _LV_OBJ_STYLE_SET_GET_DECLARE(prop_name, func_name, value_type, style_type, scalar)                             \
98     _OBJ_GET_STYLE_##scalar(prop_name, func_name, value_type, style_type)                                               \
99     _OBJ_SET_STYLE_LOCAL_##scalar(prop_name, func_name, value_type, style_type)                                         \
100     _OBJ_SET_STYLE_##scalar(prop_name, func_name, value_type, style_type)
101 
_LV_OBJ_STYLE_SET_GET_DECLARE(RADIUS,radius,lv_style_int_t,_int,scalar)102 _LV_OBJ_STYLE_SET_GET_DECLARE(RADIUS, radius, lv_style_int_t, _int, scalar)
103 _LV_OBJ_STYLE_SET_GET_DECLARE(CLIP_CORNER, clip_corner, bool, _int, scalar)
104 _LV_OBJ_STYLE_SET_GET_DECLARE(SIZE, size, lv_style_int_t, _int, scalar)
105 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSFORM_WIDTH, transform_width, lv_style_int_t, _int, scalar)
106 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSFORM_HEIGHT, transform_height, lv_style_int_t, _int, scalar)
107 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSFORM_ANGLE, transform_angle, lv_style_int_t, _int, scalar)
108 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSFORM_ZOOM, transform_zoom, lv_style_int_t, _int, scalar)
109 _LV_OBJ_STYLE_SET_GET_DECLARE(OPA_SCALE, opa_scale, lv_opa_t, _opa, scalar)
110 _LV_OBJ_STYLE_SET_GET_DECLARE(PAD_TOP, pad_top, lv_style_int_t, _int, scalar)
111 _LV_OBJ_STYLE_SET_GET_DECLARE(PAD_BOTTOM, pad_bottom, lv_style_int_t, _int, scalar)
112 _LV_OBJ_STYLE_SET_GET_DECLARE(PAD_LEFT, pad_left, lv_style_int_t, _int, scalar)
113 _LV_OBJ_STYLE_SET_GET_DECLARE(PAD_RIGHT, pad_right, lv_style_int_t, _int, scalar)
114 _LV_OBJ_STYLE_SET_GET_DECLARE(PAD_INNER, pad_inner, lv_style_int_t, _int, scalar)
115 _LV_OBJ_STYLE_SET_GET_DECLARE(MARGIN_TOP, margin_top, lv_style_int_t, _int, scalar)
116 _LV_OBJ_STYLE_SET_GET_DECLARE(MARGIN_BOTTOM, margin_bottom, lv_style_int_t, _int, scalar)
117 _LV_OBJ_STYLE_SET_GET_DECLARE(MARGIN_LEFT, margin_left, lv_style_int_t, _int, scalar)
118 _LV_OBJ_STYLE_SET_GET_DECLARE(MARGIN_RIGHT, margin_right, lv_style_int_t, _int, scalar)
119 _LV_OBJ_STYLE_SET_GET_DECLARE(BG_BLEND_MODE, bg_blend_mode, lv_blend_mode_t, _int, scalar)
120 _LV_OBJ_STYLE_SET_GET_DECLARE(BG_MAIN_STOP, bg_main_stop, lv_style_int_t, _int, scalar)
121 _LV_OBJ_STYLE_SET_GET_DECLARE(BG_GRAD_STOP, bg_grad_stop, lv_style_int_t, _int, scalar)
122 _LV_OBJ_STYLE_SET_GET_DECLARE(BG_GRAD_DIR, bg_grad_dir, lv_grad_dir_t, _int, scalar)
123 _LV_OBJ_STYLE_SET_GET_DECLARE(BG_COLOR, bg_color, lv_color_t, _color, nonscalar)
124 _LV_OBJ_STYLE_SET_GET_DECLARE(BG_GRAD_COLOR, bg_grad_color, lv_color_t, _color, nonscalar)
125 _LV_OBJ_STYLE_SET_GET_DECLARE(BG_OPA, bg_opa, lv_opa_t, _opa, scalar)
126 _LV_OBJ_STYLE_SET_GET_DECLARE(BORDER_WIDTH, border_width, lv_style_int_t, _int, scalar)
127 _LV_OBJ_STYLE_SET_GET_DECLARE(BORDER_SIDE, border_side, lv_border_side_t, _int, scalar)
128 _LV_OBJ_STYLE_SET_GET_DECLARE(BORDER_BLEND_MODE, border_blend_mode, lv_blend_mode_t, _int, scalar)
129 _LV_OBJ_STYLE_SET_GET_DECLARE(BORDER_POST, border_post, bool, _int, scalar)
130 _LV_OBJ_STYLE_SET_GET_DECLARE(BORDER_COLOR, border_color, lv_color_t, _color, nonscalar)
131 _LV_OBJ_STYLE_SET_GET_DECLARE(BORDER_OPA, border_opa, lv_opa_t, _opa, scalar)
132 _LV_OBJ_STYLE_SET_GET_DECLARE(OUTLINE_WIDTH, outline_width, lv_style_int_t, _int, scalar)
133 _LV_OBJ_STYLE_SET_GET_DECLARE(OUTLINE_PAD, outline_pad, lv_style_int_t, _int, scalar)
134 _LV_OBJ_STYLE_SET_GET_DECLARE(OUTLINE_BLEND_MODE, outline_blend_mode, lv_blend_mode_t, _int, scalar)
135 _LV_OBJ_STYLE_SET_GET_DECLARE(OUTLINE_COLOR, outline_color, lv_color_t, _color, nonscalar)
136 _LV_OBJ_STYLE_SET_GET_DECLARE(OUTLINE_OPA, outline_opa, lv_opa_t, _opa, scalar)
137 _LV_OBJ_STYLE_SET_GET_DECLARE(SHADOW_WIDTH, shadow_width, lv_style_int_t, _int, scalar)
138 _LV_OBJ_STYLE_SET_GET_DECLARE(SHADOW_OFS_X, shadow_ofs_x, lv_style_int_t, _int, scalar)
139 _LV_OBJ_STYLE_SET_GET_DECLARE(SHADOW_OFS_Y, shadow_ofs_y, lv_style_int_t, _int, scalar)
140 _LV_OBJ_STYLE_SET_GET_DECLARE(SHADOW_SPREAD, shadow_spread, lv_style_int_t, _int, scalar)
141 _LV_OBJ_STYLE_SET_GET_DECLARE(SHADOW_BLEND_MODE, shadow_blend_mode, lv_blend_mode_t, _int, scalar)
142 _LV_OBJ_STYLE_SET_GET_DECLARE(SHADOW_COLOR, shadow_color, lv_color_t, _color, nonscalar)
143 _LV_OBJ_STYLE_SET_GET_DECLARE(SHADOW_OPA, shadow_opa, lv_opa_t, _opa, scalar)
144 _LV_OBJ_STYLE_SET_GET_DECLARE(PATTERN_REPEAT, pattern_repeat, bool, _int, scalar)
145 _LV_OBJ_STYLE_SET_GET_DECLARE(PATTERN_BLEND_MODE, pattern_blend_mode, lv_blend_mode_t, _int, scalar)
146 _LV_OBJ_STYLE_SET_GET_DECLARE(PATTERN_RECOLOR, pattern_recolor, lv_color_t, _color, nonscalar)
147 _LV_OBJ_STYLE_SET_GET_DECLARE(PATTERN_OPA, pattern_opa, lv_opa_t, _opa, scalar)
148 _LV_OBJ_STYLE_SET_GET_DECLARE(PATTERN_RECOLOR_OPA, pattern_recolor_opa, lv_opa_t, _opa, scalar)
149 _LV_OBJ_STYLE_SET_GET_DECLARE(PATTERN_IMAGE, pattern_image, const void *, _ptr, scalar)
150 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_LETTER_SPACE, value_letter_space, lv_style_int_t, _int, scalar)
151 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_LINE_SPACE, value_line_space, lv_style_int_t, _int, scalar)
152 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_BLEND_MODE, value_blend_mode, lv_blend_mode_t, _int, scalar)
153 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_OFS_X, value_ofs_x, lv_style_int_t, _int, scalar)
154 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_OFS_Y, value_ofs_y, lv_style_int_t, _int, scalar)
155 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_ALIGN, value_align, lv_align_t, _int, scalar)
156 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_COLOR, value_color, lv_color_t, _color, nonscalar)
157 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_OPA, value_opa, lv_opa_t, _opa, scalar)
158 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_FONT, value_font, const lv_font_t *, _ptr, scalar)
159 _LV_OBJ_STYLE_SET_GET_DECLARE(VALUE_STR, value_str, const char *, _ptr, scalar)
160 _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_LETTER_SPACE, text_letter_space, lv_style_int_t, _int, scalar)
161 _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_LINE_SPACE, text_line_space, lv_style_int_t, _int, scalar)
162 _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_DECOR, text_decor, lv_text_decor_t, _int, scalar)
163 _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_BLEND_MODE, text_blend_mode, lv_blend_mode_t, _int, scalar)
164 _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_COLOR, text_color, lv_color_t, _color, nonscalar)
165 _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_SEL_COLOR, text_sel_color, lv_color_t, _color, nonscalar)
166 _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_OPA, text_opa, lv_opa_t, _opa, scalar)
167 _LV_OBJ_STYLE_SET_GET_DECLARE(TEXT_FONT, text_font, const lv_font_t *, _ptr, scalar)
168 _LV_OBJ_STYLE_SET_GET_DECLARE(LINE_WIDTH, line_width, lv_style_int_t, _int, scalar)
169 _LV_OBJ_STYLE_SET_GET_DECLARE(LINE_BLEND_MODE, line_blend_mode, lv_blend_mode_t, _int, scalar)
170 _LV_OBJ_STYLE_SET_GET_DECLARE(LINE_DASH_WIDTH, line_dash_width, lv_style_int_t, _int, scalar)
171 _LV_OBJ_STYLE_SET_GET_DECLARE(LINE_DASH_GAP, line_dash_gap, lv_style_int_t, _int, scalar)
172 _LV_OBJ_STYLE_SET_GET_DECLARE(LINE_ROUNDED, line_rounded, bool, _int, scalar)
173 _LV_OBJ_STYLE_SET_GET_DECLARE(LINE_COLOR, line_color, lv_color_t, _color, nonscalar)
174 _LV_OBJ_STYLE_SET_GET_DECLARE(LINE_OPA, line_opa, lv_opa_t, _opa, scalar)
175 _LV_OBJ_STYLE_SET_GET_DECLARE(IMAGE_BLEND_MODE, image_blend_mode, lv_blend_mode_t, _int, scalar)
176 _LV_OBJ_STYLE_SET_GET_DECLARE(IMAGE_RECOLOR, image_recolor, lv_color_t, _color, nonscalar)
177 _LV_OBJ_STYLE_SET_GET_DECLARE(IMAGE_OPA, image_opa, lv_opa_t, _opa, scalar)
178 _LV_OBJ_STYLE_SET_GET_DECLARE(IMAGE_RECOLOR_OPA, image_recolor_opa, lv_opa_t, _opa, scalar)
179 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_TIME, transition_time, lv_style_int_t, _int, scalar)
180 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_DELAY, transition_delay, lv_style_int_t, _int, scalar)
181 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_PROP_1, transition_prop_1, lv_style_int_t, _int, scalar)
182 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_PROP_2, transition_prop_2, lv_style_int_t, _int, scalar)
183 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_PROP_3, transition_prop_3, lv_style_int_t, _int, scalar)
184 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_PROP_4, transition_prop_4, lv_style_int_t, _int, scalar)
185 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_PROP_5, transition_prop_5, lv_style_int_t, _int, scalar)
186 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_PROP_6, transition_prop_6, lv_style_int_t, _int, scalar)
187 #if LV_USE_ANIMATION
188 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_PATH, transition_path, lv_anim_path_t *, _ptr, scalar)
189 #else
190 /*For compatibility*/
191 _LV_OBJ_STYLE_SET_GET_DECLARE(TRANSITION_PATH, transition_path, const void *, _ptr, scalar)
192 #endif
193 _LV_OBJ_STYLE_SET_GET_DECLARE(SCALE_WIDTH, scale_width, lv_style_int_t, _int, scalar)
194 _LV_OBJ_STYLE_SET_GET_DECLARE(SCALE_BORDER_WIDTH, scale_border_width, lv_style_int_t, _int, scalar)
195 _LV_OBJ_STYLE_SET_GET_DECLARE(SCALE_END_BORDER_WIDTH, scale_end_border_width, lv_style_int_t, _int, scalar)
196 _LV_OBJ_STYLE_SET_GET_DECLARE(SCALE_END_LINE_WIDTH, scale_end_line_width, lv_style_int_t, _int, scalar)
197 _LV_OBJ_STYLE_SET_GET_DECLARE(SCALE_GRAD_COLOR, scale_grad_color, lv_color_t, _color, nonscalar)
198 _LV_OBJ_STYLE_SET_GET_DECLARE(SCALE_END_COLOR, scale_end_color, lv_color_t, _color, nonscalar)
199 
200 #undef _LV_OBJ_STYLE_SET_GET_DECLARE
201 
202 
203 static inline void lv_obj_set_style_local_pad_all(lv_obj_t * obj, uint8_t part, lv_state_t state, lv_style_int_t value)
204 {
205     lv_obj_set_style_local_pad_top(obj, part, state, value);
206     lv_obj_set_style_local_pad_bottom(obj, part, state, value);
207     lv_obj_set_style_local_pad_left(obj, part, state, value);
208     lv_obj_set_style_local_pad_right(obj, part, state, value);
209 }
210 
211 
lv_style_set_pad_all(lv_style_t * style,lv_state_t state,lv_style_int_t value)212 static inline void lv_style_set_pad_all(lv_style_t * style, lv_state_t state, lv_style_int_t value)
213 {
214     lv_style_set_pad_top(style, state, value);
215     lv_style_set_pad_bottom(style, state, value);
216     lv_style_set_pad_left(style, state, value);
217     lv_style_set_pad_right(style, state, value);
218 }
219 
220 
lv_obj_set_style_local_pad_hor(lv_obj_t * obj,uint8_t part,lv_state_t state,lv_style_int_t value)221 static inline void lv_obj_set_style_local_pad_hor(lv_obj_t * obj, uint8_t part, lv_state_t state, lv_style_int_t value)
222 {
223     lv_obj_set_style_local_pad_left(obj, part, state, value);
224     lv_obj_set_style_local_pad_right(obj, part, state, value);
225 }
226 
227 
lv_style_set_pad_hor(lv_style_t * style,lv_state_t state,lv_style_int_t value)228 static inline void lv_style_set_pad_hor(lv_style_t * style, lv_state_t state, lv_style_int_t value)
229 {
230     lv_style_set_pad_left(style, state, value);
231     lv_style_set_pad_right(style, state, value);
232 }
233 
234 
lv_obj_set_style_local_pad_ver(lv_obj_t * obj,uint8_t part,lv_state_t state,lv_style_int_t value)235 static inline void lv_obj_set_style_local_pad_ver(lv_obj_t * obj, uint8_t part, lv_state_t state, lv_style_int_t value)
236 {
237     lv_obj_set_style_local_pad_top(obj, part, state, value);
238     lv_obj_set_style_local_pad_bottom(obj, part, state, value);
239 }
240 
241 
lv_style_set_pad_ver(lv_style_t * style,lv_state_t state,lv_style_int_t value)242 static inline void lv_style_set_pad_ver(lv_style_t * style, lv_state_t state, lv_style_int_t value)
243 {
244     lv_style_set_pad_top(style, state, value);
245     lv_style_set_pad_bottom(style, state, value);
246 }
247 
248 
lv_obj_set_style_local_margin_all(lv_obj_t * obj,uint8_t part,lv_state_t state,lv_style_int_t value)249 static inline void lv_obj_set_style_local_margin_all(lv_obj_t * obj, uint8_t part, lv_state_t state,
250                                                      lv_style_int_t value)
251 {
252     lv_obj_set_style_local_margin_top(obj, part, state, value);
253     lv_obj_set_style_local_margin_bottom(obj, part, state, value);
254     lv_obj_set_style_local_margin_left(obj, part, state, value);
255     lv_obj_set_style_local_margin_right(obj, part, state, value);
256 }
257 
258 
lv_style_set_margin_all(lv_style_t * style,lv_state_t state,lv_style_int_t value)259 static inline void lv_style_set_margin_all(lv_style_t * style, lv_state_t state, lv_style_int_t value)
260 {
261     lv_style_set_margin_top(style, state, value);
262     lv_style_set_margin_bottom(style, state, value);
263     lv_style_set_margin_left(style, state, value);
264     lv_style_set_margin_right(style, state, value);
265 }
266 
267 
lv_obj_set_style_local_margin_hor(lv_obj_t * obj,uint8_t part,lv_state_t state,lv_style_int_t value)268 static inline void lv_obj_set_style_local_margin_hor(lv_obj_t * obj, uint8_t part, lv_state_t state,
269                                                      lv_style_int_t value)
270 {
271     lv_obj_set_style_local_margin_left(obj, part, state, value);
272     lv_obj_set_style_local_margin_right(obj, part, state, value);
273 }
274 
275 
lv_style_set_margin_hor(lv_style_t * style,lv_state_t state,lv_style_int_t value)276 static inline void lv_style_set_margin_hor(lv_style_t * style, lv_state_t state, lv_style_int_t value)
277 {
278     lv_style_set_margin_left(style, state, value);
279     lv_style_set_margin_right(style, state, value);
280 }
281 
282 
lv_obj_set_style_local_margin_ver(lv_obj_t * obj,uint8_t part,lv_state_t state,lv_style_int_t value)283 static inline void lv_obj_set_style_local_margin_ver(lv_obj_t * obj, uint8_t part, lv_state_t state,
284                                                      lv_style_int_t value)
285 {
286     lv_obj_set_style_local_margin_top(obj, part, state, value);
287     lv_obj_set_style_local_margin_bottom(obj, part, state, value);
288 }
289 
290 
lv_style_set_margin_ver(lv_style_t * style,lv_state_t state,lv_style_int_t value)291 static inline void lv_style_set_margin_ver(lv_style_t * style, lv_state_t state, lv_style_int_t value)
292 {
293     lv_style_set_margin_top(style, state, value);
294     lv_style_set_margin_bottom(style, state, value);
295 }
296 
297 
298 #ifdef __cplusplus
299 } /* extern "C" */
300 #endif
301 
302 #endif /*LV_OBJ_H*/
303