1 void lv_style_set_width(lv_style_t * style, lv_coord_t value); 2 void lv_style_set_min_width(lv_style_t * style, lv_coord_t value); 3 void lv_style_set_max_width(lv_style_t * style, lv_coord_t value); 4 void lv_style_set_height(lv_style_t * style, lv_coord_t value); 5 void lv_style_set_min_height(lv_style_t * style, lv_coord_t value); 6 void lv_style_set_max_height(lv_style_t * style, lv_coord_t value); 7 void lv_style_set_x(lv_style_t * style, lv_coord_t value); 8 void lv_style_set_y(lv_style_t * style, lv_coord_t value); 9 void lv_style_set_align(lv_style_t * style, lv_align_t value); 10 void lv_style_set_transform_width(lv_style_t * style, lv_coord_t value); 11 void lv_style_set_transform_height(lv_style_t * style, lv_coord_t value); 12 void lv_style_set_translate_x(lv_style_t * style, lv_coord_t value); 13 void lv_style_set_translate_y(lv_style_t * style, lv_coord_t value); 14 void lv_style_set_transform_zoom(lv_style_t * style, lv_coord_t value); 15 void lv_style_set_transform_angle(lv_style_t * style, lv_coord_t value); 16 void lv_style_set_transform_pivot_x(lv_style_t * style, lv_coord_t value); 17 void lv_style_set_transform_pivot_y(lv_style_t * style, lv_coord_t value); 18 void lv_style_set_pad_top(lv_style_t * style, lv_coord_t value); 19 void lv_style_set_pad_bottom(lv_style_t * style, lv_coord_t value); 20 void lv_style_set_pad_left(lv_style_t * style, lv_coord_t value); 21 void lv_style_set_pad_right(lv_style_t * style, lv_coord_t value); 22 void lv_style_set_pad_row(lv_style_t * style, lv_coord_t value); 23 void lv_style_set_pad_column(lv_style_t * style, lv_coord_t value); 24 void lv_style_set_bg_color(lv_style_t * style, lv_color_t value); 25 void lv_style_set_bg_opa(lv_style_t * style, lv_opa_t value); 26 void lv_style_set_bg_grad_color(lv_style_t * style, lv_color_t value); 27 void lv_style_set_bg_grad_dir(lv_style_t * style, lv_grad_dir_t value); 28 void lv_style_set_bg_main_stop(lv_style_t * style, lv_coord_t value); 29 void lv_style_set_bg_grad_stop(lv_style_t * style, lv_coord_t value); 30 void lv_style_set_bg_grad(lv_style_t * style, const lv_grad_dsc_t * value); 31 void lv_style_set_bg_dither_mode(lv_style_t * style, lv_dither_mode_t value); 32 void lv_style_set_bg_img_src(lv_style_t * style, const void * value); 33 void lv_style_set_bg_img_opa(lv_style_t * style, lv_opa_t value); 34 void lv_style_set_bg_img_recolor(lv_style_t * style, lv_color_t value); 35 void lv_style_set_bg_img_recolor_opa(lv_style_t * style, lv_opa_t value); 36 void lv_style_set_bg_img_tiled(lv_style_t * style, bool value); 37 void lv_style_set_border_color(lv_style_t * style, lv_color_t value); 38 void lv_style_set_border_opa(lv_style_t * style, lv_opa_t value); 39 void lv_style_set_border_width(lv_style_t * style, lv_coord_t value); 40 void lv_style_set_border_side(lv_style_t * style, lv_border_side_t value); 41 void lv_style_set_border_post(lv_style_t * style, bool value); 42 void lv_style_set_outline_width(lv_style_t * style, lv_coord_t value); 43 void lv_style_set_outline_color(lv_style_t * style, lv_color_t value); 44 void lv_style_set_outline_opa(lv_style_t * style, lv_opa_t value); 45 void lv_style_set_outline_pad(lv_style_t * style, lv_coord_t value); 46 void lv_style_set_shadow_width(lv_style_t * style, lv_coord_t value); 47 void lv_style_set_shadow_ofs_x(lv_style_t * style, lv_coord_t value); 48 void lv_style_set_shadow_ofs_y(lv_style_t * style, lv_coord_t value); 49 void lv_style_set_shadow_spread(lv_style_t * style, lv_coord_t value); 50 void lv_style_set_shadow_color(lv_style_t * style, lv_color_t value); 51 void lv_style_set_shadow_opa(lv_style_t * style, lv_opa_t value); 52 void lv_style_set_img_opa(lv_style_t * style, lv_opa_t value); 53 void lv_style_set_img_recolor(lv_style_t * style, lv_color_t value); 54 void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value); 55 void lv_style_set_line_width(lv_style_t * style, lv_coord_t value); 56 void lv_style_set_line_dash_width(lv_style_t * style, lv_coord_t value); 57 void lv_style_set_line_dash_gap(lv_style_t * style, lv_coord_t value); 58 void lv_style_set_line_rounded(lv_style_t * style, bool value); 59 void lv_style_set_line_color(lv_style_t * style, lv_color_t value); 60 void lv_style_set_line_opa(lv_style_t * style, lv_opa_t value); 61 void lv_style_set_arc_width(lv_style_t * style, lv_coord_t value); 62 void lv_style_set_arc_rounded(lv_style_t * style, bool value); 63 void lv_style_set_arc_color(lv_style_t * style, lv_color_t value); 64 void lv_style_set_arc_opa(lv_style_t * style, lv_opa_t value); 65 void lv_style_set_arc_img_src(lv_style_t * style, const void * value); 66 void lv_style_set_text_color(lv_style_t * style, lv_color_t value); 67 void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value); 68 void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value); 69 void lv_style_set_text_letter_space(lv_style_t * style, lv_coord_t value); 70 void lv_style_set_text_line_space(lv_style_t * style, lv_coord_t value); 71 void lv_style_set_text_decor(lv_style_t * style, lv_text_decor_t value); 72 void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value); 73 void lv_style_set_radius(lv_style_t * style, lv_coord_t value); 74 void lv_style_set_clip_corner(lv_style_t * style, bool value); 75 void lv_style_set_opa(lv_style_t * style, lv_opa_t value); 76 void lv_style_set_opa_layered(lv_style_t * style, lv_opa_t value); 77 void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value); 78 void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value); 79 void lv_style_set_anim(lv_style_t * style, const lv_anim_t * value); 80 void lv_style_set_anim_time(lv_style_t * style, uint32_t value); 81 void lv_style_set_anim_speed(lv_style_t * style, uint32_t value); 82 void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value); 83 void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value); 84 void lv_style_set_layout(lv_style_t * style, uint16_t value); 85 void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value); 86 87 #define LV_STYLE_CONST_WIDTH(val) \ 88 { \ 89 .prop = LV_STYLE_WIDTH, .value = { .num = (int32_t)val } \ 90 } 91 92 #define LV_STYLE_CONST_MIN_WIDTH(val) \ 93 { \ 94 .prop = LV_STYLE_MIN_WIDTH, .value = { .num = (int32_t)val } \ 95 } 96 97 #define LV_STYLE_CONST_MAX_WIDTH(val) \ 98 { \ 99 .prop = LV_STYLE_MAX_WIDTH, .value = { .num = (int32_t)val } \ 100 } 101 102 #define LV_STYLE_CONST_HEIGHT(val) \ 103 { \ 104 .prop = LV_STYLE_HEIGHT, .value = { .num = (int32_t)val } \ 105 } 106 107 #define LV_STYLE_CONST_MIN_HEIGHT(val) \ 108 { \ 109 .prop = LV_STYLE_MIN_HEIGHT, .value = { .num = (int32_t)val } \ 110 } 111 112 #define LV_STYLE_CONST_MAX_HEIGHT(val) \ 113 { \ 114 .prop = LV_STYLE_MAX_HEIGHT, .value = { .num = (int32_t)val } \ 115 } 116 117 #define LV_STYLE_CONST_X(val) \ 118 { \ 119 .prop = LV_STYLE_X, .value = { .num = (int32_t)val } \ 120 } 121 122 #define LV_STYLE_CONST_Y(val) \ 123 { \ 124 .prop = LV_STYLE_Y, .value = { .num = (int32_t)val } \ 125 } 126 127 #define LV_STYLE_CONST_ALIGN(val) \ 128 { \ 129 .prop = LV_STYLE_ALIGN, .value = { .num = (int32_t)val } \ 130 } 131 132 #define LV_STYLE_CONST_TRANSFORM_WIDTH(val) \ 133 { \ 134 .prop = LV_STYLE_TRANSFORM_WIDTH, .value = { .num = (int32_t)val } \ 135 } 136 137 #define LV_STYLE_CONST_TRANSFORM_HEIGHT(val) \ 138 { \ 139 .prop = LV_STYLE_TRANSFORM_HEIGHT, .value = { .num = (int32_t)val } \ 140 } 141 142 #define LV_STYLE_CONST_TRANSLATE_X(val) \ 143 { \ 144 .prop = LV_STYLE_TRANSLATE_X, .value = { .num = (int32_t)val } \ 145 } 146 147 #define LV_STYLE_CONST_TRANSLATE_Y(val) \ 148 { \ 149 .prop = LV_STYLE_TRANSLATE_Y, .value = { .num = (int32_t)val } \ 150 } 151 152 #define LV_STYLE_CONST_TRANSFORM_ZOOM(val) \ 153 { \ 154 .prop = LV_STYLE_TRANSFORM_ZOOM, .value = { .num = (int32_t)val } \ 155 } 156 157 #define LV_STYLE_CONST_TRANSFORM_ANGLE(val) \ 158 { \ 159 .prop = LV_STYLE_TRANSFORM_ANGLE, .value = { .num = (int32_t)val } \ 160 } 161 162 #define LV_STYLE_CONST_TRANSFORM_PIVOT_X(val) \ 163 { \ 164 .prop = LV_STYLE_TRANSFORM_PIVOT_X, .value = { .num = (int32_t)val } \ 165 } 166 167 #define LV_STYLE_CONST_TRANSFORM_PIVOT_Y(val) \ 168 { \ 169 .prop = LV_STYLE_TRANSFORM_PIVOT_Y, .value = { .num = (int32_t)val } \ 170 } 171 172 #define LV_STYLE_CONST_PAD_TOP(val) \ 173 { \ 174 .prop = LV_STYLE_PAD_TOP, .value = { .num = (int32_t)val } \ 175 } 176 177 #define LV_STYLE_CONST_PAD_BOTTOM(val) \ 178 { \ 179 .prop = LV_STYLE_PAD_BOTTOM, .value = { .num = (int32_t)val } \ 180 } 181 182 #define LV_STYLE_CONST_PAD_LEFT(val) \ 183 { \ 184 .prop = LV_STYLE_PAD_LEFT, .value = { .num = (int32_t)val } \ 185 } 186 187 #define LV_STYLE_CONST_PAD_RIGHT(val) \ 188 { \ 189 .prop = LV_STYLE_PAD_RIGHT, .value = { .num = (int32_t)val } \ 190 } 191 192 #define LV_STYLE_CONST_PAD_ROW(val) \ 193 { \ 194 .prop = LV_STYLE_PAD_ROW, .value = { .num = (int32_t)val } \ 195 } 196 197 #define LV_STYLE_CONST_PAD_COLUMN(val) \ 198 { \ 199 .prop = LV_STYLE_PAD_COLUMN, .value = { .num = (int32_t)val } \ 200 } 201 202 #define LV_STYLE_CONST_BG_COLOR(val) \ 203 { \ 204 .prop = LV_STYLE_BG_COLOR, .value = { .color = val } \ 205 } 206 207 #define LV_STYLE_CONST_BG_OPA(val) \ 208 { \ 209 .prop = LV_STYLE_BG_OPA, .value = { .num = (int32_t)val } \ 210 } 211 212 #define LV_STYLE_CONST_BG_GRAD_COLOR(val) \ 213 { \ 214 .prop = LV_STYLE_BG_GRAD_COLOR, .value = { .color = val } \ 215 } 216 217 #define LV_STYLE_CONST_BG_GRAD_DIR(val) \ 218 { \ 219 .prop = LV_STYLE_BG_GRAD_DIR, .value = { .num = (int32_t)val } \ 220 } 221 222 #define LV_STYLE_CONST_BG_MAIN_STOP(val) \ 223 { \ 224 .prop = LV_STYLE_BG_MAIN_STOP, .value = { .num = (int32_t)val } \ 225 } 226 227 #define LV_STYLE_CONST_BG_GRAD_STOP(val) \ 228 { \ 229 .prop = LV_STYLE_BG_GRAD_STOP, .value = { .num = (int32_t)val } \ 230 } 231 232 #define LV_STYLE_CONST_BG_GRAD(val) \ 233 { \ 234 .prop = LV_STYLE_BG_GRAD, .value = { .ptr = val } \ 235 } 236 237 #define LV_STYLE_CONST_BG_DITHER_MODE(val) \ 238 { \ 239 .prop = LV_STYLE_BG_DITHER_MODE, .value = { .num = (int32_t)val } \ 240 } 241 242 #define LV_STYLE_CONST_BG_IMG_SRC(val) \ 243 { \ 244 .prop = LV_STYLE_BG_IMG_SRC, .value = { .ptr = val } \ 245 } 246 247 #define LV_STYLE_CONST_BG_IMG_OPA(val) \ 248 { \ 249 .prop = LV_STYLE_BG_IMG_OPA, .value = { .num = (int32_t)val } \ 250 } 251 252 #define LV_STYLE_CONST_BG_IMG_RECOLOR(val) \ 253 { \ 254 .prop = LV_STYLE_BG_IMG_RECOLOR, .value = { .color = val } \ 255 } 256 257 #define LV_STYLE_CONST_BG_IMG_RECOLOR_OPA(val) \ 258 { \ 259 .prop = LV_STYLE_BG_IMG_RECOLOR_OPA, .value = { .num = (int32_t)val } \ 260 } 261 262 #define LV_STYLE_CONST_BG_IMG_TILED(val) \ 263 { \ 264 .prop = LV_STYLE_BG_IMG_TILED, .value = { .num = (int32_t)val } \ 265 } 266 267 #define LV_STYLE_CONST_BORDER_COLOR(val) \ 268 { \ 269 .prop = LV_STYLE_BORDER_COLOR, .value = { .color = val } \ 270 } 271 272 #define LV_STYLE_CONST_BORDER_OPA(val) \ 273 { \ 274 .prop = LV_STYLE_BORDER_OPA, .value = { .num = (int32_t)val } \ 275 } 276 277 #define LV_STYLE_CONST_BORDER_WIDTH(val) \ 278 { \ 279 .prop = LV_STYLE_BORDER_WIDTH, .value = { .num = (int32_t)val } \ 280 } 281 282 #define LV_STYLE_CONST_BORDER_SIDE(val) \ 283 { \ 284 .prop = LV_STYLE_BORDER_SIDE, .value = { .num = (int32_t)val } \ 285 } 286 287 #define LV_STYLE_CONST_BORDER_POST(val) \ 288 { \ 289 .prop = LV_STYLE_BORDER_POST, .value = { .num = (int32_t)val } \ 290 } 291 292 #define LV_STYLE_CONST_OUTLINE_WIDTH(val) \ 293 { \ 294 .prop = LV_STYLE_OUTLINE_WIDTH, .value = { .num = (int32_t)val } \ 295 } 296 297 #define LV_STYLE_CONST_OUTLINE_COLOR(val) \ 298 { \ 299 .prop = LV_STYLE_OUTLINE_COLOR, .value = { .color = val } \ 300 } 301 302 #define LV_STYLE_CONST_OUTLINE_OPA(val) \ 303 { \ 304 .prop = LV_STYLE_OUTLINE_OPA, .value = { .num = (int32_t)val } \ 305 } 306 307 #define LV_STYLE_CONST_OUTLINE_PAD(val) \ 308 { \ 309 .prop = LV_STYLE_OUTLINE_PAD, .value = { .num = (int32_t)val } \ 310 } 311 312 #define LV_STYLE_CONST_SHADOW_WIDTH(val) \ 313 { \ 314 .prop = LV_STYLE_SHADOW_WIDTH, .value = { .num = (int32_t)val } \ 315 } 316 317 #define LV_STYLE_CONST_SHADOW_OFS_X(val) \ 318 { \ 319 .prop = LV_STYLE_SHADOW_OFS_X, .value = { .num = (int32_t)val } \ 320 } 321 322 #define LV_STYLE_CONST_SHADOW_OFS_Y(val) \ 323 { \ 324 .prop = LV_STYLE_SHADOW_OFS_Y, .value = { .num = (int32_t)val } \ 325 } 326 327 #define LV_STYLE_CONST_SHADOW_SPREAD(val) \ 328 { \ 329 .prop = LV_STYLE_SHADOW_SPREAD, .value = { .num = (int32_t)val } \ 330 } 331 332 #define LV_STYLE_CONST_SHADOW_COLOR(val) \ 333 { \ 334 .prop = LV_STYLE_SHADOW_COLOR, .value = { .color = val } \ 335 } 336 337 #define LV_STYLE_CONST_SHADOW_OPA(val) \ 338 { \ 339 .prop = LV_STYLE_SHADOW_OPA, .value = { .num = (int32_t)val } \ 340 } 341 342 #define LV_STYLE_CONST_IMG_OPA(val) \ 343 { \ 344 .prop = LV_STYLE_IMG_OPA, .value = { .num = (int32_t)val } \ 345 } 346 347 #define LV_STYLE_CONST_IMG_RECOLOR(val) \ 348 { \ 349 .prop = LV_STYLE_IMG_RECOLOR, .value = { .color = val } \ 350 } 351 352 #define LV_STYLE_CONST_IMG_RECOLOR_OPA(val) \ 353 { \ 354 .prop = LV_STYLE_IMG_RECOLOR_OPA, .value = { .num = (int32_t)val } \ 355 } 356 357 #define LV_STYLE_CONST_LINE_WIDTH(val) \ 358 { \ 359 .prop = LV_STYLE_LINE_WIDTH, .value = { .num = (int32_t)val } \ 360 } 361 362 #define LV_STYLE_CONST_LINE_DASH_WIDTH(val) \ 363 { \ 364 .prop = LV_STYLE_LINE_DASH_WIDTH, .value = { .num = (int32_t)val } \ 365 } 366 367 #define LV_STYLE_CONST_LINE_DASH_GAP(val) \ 368 { \ 369 .prop = LV_STYLE_LINE_DASH_GAP, .value = { .num = (int32_t)val } \ 370 } 371 372 #define LV_STYLE_CONST_LINE_ROUNDED(val) \ 373 { \ 374 .prop = LV_STYLE_LINE_ROUNDED, .value = { .num = (int32_t)val } \ 375 } 376 377 #define LV_STYLE_CONST_LINE_COLOR(val) \ 378 { \ 379 .prop = LV_STYLE_LINE_COLOR, .value = { .color = val } \ 380 } 381 382 #define LV_STYLE_CONST_LINE_OPA(val) \ 383 { \ 384 .prop = LV_STYLE_LINE_OPA, .value = { .num = (int32_t)val } \ 385 } 386 387 #define LV_STYLE_CONST_ARC_WIDTH(val) \ 388 { \ 389 .prop = LV_STYLE_ARC_WIDTH, .value = { .num = (int32_t)val } \ 390 } 391 392 #define LV_STYLE_CONST_ARC_ROUNDED(val) \ 393 { \ 394 .prop = LV_STYLE_ARC_ROUNDED, .value = { .num = (int32_t)val } \ 395 } 396 397 #define LV_STYLE_CONST_ARC_COLOR(val) \ 398 { \ 399 .prop = LV_STYLE_ARC_COLOR, .value = { .color = val } \ 400 } 401 402 #define LV_STYLE_CONST_ARC_OPA(val) \ 403 { \ 404 .prop = LV_STYLE_ARC_OPA, .value = { .num = (int32_t)val } \ 405 } 406 407 #define LV_STYLE_CONST_ARC_IMG_SRC(val) \ 408 { \ 409 .prop = LV_STYLE_ARC_IMG_SRC, .value = { .ptr = val } \ 410 } 411 412 #define LV_STYLE_CONST_TEXT_COLOR(val) \ 413 { \ 414 .prop = LV_STYLE_TEXT_COLOR, .value = { .color = val } \ 415 } 416 417 #define LV_STYLE_CONST_TEXT_OPA(val) \ 418 { \ 419 .prop = LV_STYLE_TEXT_OPA, .value = { .num = (int32_t)val } \ 420 } 421 422 #define LV_STYLE_CONST_TEXT_FONT(val) \ 423 { \ 424 .prop = LV_STYLE_TEXT_FONT, .value = { .ptr = val } \ 425 } 426 427 #define LV_STYLE_CONST_TEXT_LETTER_SPACE(val) \ 428 { \ 429 .prop = LV_STYLE_TEXT_LETTER_SPACE, .value = { .num = (int32_t)val } \ 430 } 431 432 #define LV_STYLE_CONST_TEXT_LINE_SPACE(val) \ 433 { \ 434 .prop = LV_STYLE_TEXT_LINE_SPACE, .value = { .num = (int32_t)val } \ 435 } 436 437 #define LV_STYLE_CONST_TEXT_DECOR(val) \ 438 { \ 439 .prop = LV_STYLE_TEXT_DECOR, .value = { .num = (int32_t)val } \ 440 } 441 442 #define LV_STYLE_CONST_TEXT_ALIGN(val) \ 443 { \ 444 .prop = LV_STYLE_TEXT_ALIGN, .value = { .num = (int32_t)val } \ 445 } 446 447 #define LV_STYLE_CONST_RADIUS(val) \ 448 { \ 449 .prop = LV_STYLE_RADIUS, .value = { .num = (int32_t)val } \ 450 } 451 452 #define LV_STYLE_CONST_CLIP_CORNER(val) \ 453 { \ 454 .prop = LV_STYLE_CLIP_CORNER, .value = { .num = (int32_t)val } \ 455 } 456 457 #define LV_STYLE_CONST_OPA(val) \ 458 { \ 459 .prop = LV_STYLE_OPA, .value = { .num = (int32_t)val } \ 460 } 461 462 #define LV_STYLE_CONST_OPA_LAYERED(val) \ 463 { \ 464 .prop = LV_STYLE_OPA_LAYERED, .value = { .num = (int32_t)val } \ 465 } 466 467 #define LV_STYLE_CONST_COLOR_FILTER_DSC(val) \ 468 { \ 469 .prop = LV_STYLE_COLOR_FILTER_DSC, .value = { .ptr = val } \ 470 } 471 472 #define LV_STYLE_CONST_COLOR_FILTER_OPA(val) \ 473 { \ 474 .prop = LV_STYLE_COLOR_FILTER_OPA, .value = { .num = (int32_t)val } \ 475 } 476 477 #define LV_STYLE_CONST_ANIM(val) \ 478 { \ 479 .prop = LV_STYLE_ANIM, .value = { .ptr = val } \ 480 } 481 482 #define LV_STYLE_CONST_ANIM_TIME(val) \ 483 { \ 484 .prop = LV_STYLE_ANIM_TIME, .value = { .num = (int32_t)val } \ 485 } 486 487 #define LV_STYLE_CONST_ANIM_SPEED(val) \ 488 { \ 489 .prop = LV_STYLE_ANIM_SPEED, .value = { .num = (int32_t)val } \ 490 } 491 492 #define LV_STYLE_CONST_TRANSITION(val) \ 493 { \ 494 .prop = LV_STYLE_TRANSITION, .value = { .ptr = val } \ 495 } 496 497 #define LV_STYLE_CONST_BLEND_MODE(val) \ 498 { \ 499 .prop = LV_STYLE_BLEND_MODE, .value = { .num = (int32_t)val } \ 500 } 501 502 #define LV_STYLE_CONST_LAYOUT(val) \ 503 { \ 504 .prop = LV_STYLE_LAYOUT, .value = { .num = (int32_t)val } \ 505 } 506 507 #define LV_STYLE_CONST_BASE_DIR(val) \ 508 { \ 509 .prop = LV_STYLE_BASE_DIR, .value = { .num = (int32_t)val } \ 510 } 511