Lines Matching refs:style

58 static void report_style_change_core(void * style, lv_obj_t * obj);
68 static bool style_has_flag(const lv_style_t * style, uint32_t flag);
98 void lv_obj_add_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector) in lv_obj_add_style() argument
106 if(style && part == LV_PART_MAIN && style_has_flag(style, LV_STYLE_PROP_FLAG_TRANSFORM)) { in lv_obj_add_style()
111 lv_obj_remove_style(obj, style, selector); in lv_obj_add_style()
135 obj->styles[i].style = style; in lv_obj_add_style()
140 if(lv_style_is_const(style)) { in lv_obj_add_style()
141 lv_style_const_prop_t * props = style->values_and_props; in lv_obj_add_style()
147 …lv_style_prop_t * props = (lv_style_prop_t *)style->values_and_props + style->prop_cnt * sizeof(lv… in lv_obj_add_style()
148 for(i = 0; i < style->prop_cnt; i++) { in lv_obj_add_style()
185 (old_style != obj->styles[i].style)) { in lv_obj_replace_style()
190 obj->styles[i].style = new_style; in lv_obj_replace_style()
203 void lv_obj_remove_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector) in lv_obj_remove_style() argument
208 if(style && style->prop_cnt == 0) prop = LV_STYLE_PROP_INV; in lv_obj_remove_style()
210 if(style && part == LV_PART_MAIN && style_has_flag(style, LV_STYLE_PROP_FLAG_TRANSFORM)) { in lv_obj_remove_style()
221 (style != NULL && style != obj->styles[i].style)) { in lv_obj_remove_style()
231 if(obj->styles[i].style) lv_style_reset((lv_style_t *)obj->styles[i].style); in lv_obj_remove_style()
232 lv_free((lv_style_t *)obj->styles[i].style); in lv_obj_remove_style()
233 obj->styles[i].style = NULL; in lv_obj_remove_style()
261 void lv_obj_report_style_change(lv_style_t * style) in lv_obj_report_style_change() argument
269 report_style_change_core(style, d->screens[i]); in lv_obj_report_style_change()
365 lv_style_t * style = get_local_style(obj, selector); in lv_obj_set_local_style_prop() local
370 lv_style_set_prop(style, prop, value); in lv_obj_set_local_style_prop()
393 return lv_style_get_prop(obj->styles[i].style, prop, value); in lv_obj_get_local_style_prop()
416 lv_result_t res = lv_style_remove_prop((lv_style_t *)obj->styles[i].style, prop); in lv_obj_remove_local_style_prop()
444 …lv_style_set_prop((lv_style_t *)style_trans->style, tr_dsc->prop, v1); /*Be sure `trans_style` ha… in lv_obj_style_create_transition()
505 const lv_style_t * style = obj->styles[i].style; in lv_obj_style_state_compare() local
509 if(lv_style_get_prop(style, LV_STYLE_PAD_TOP, &v))layout_diff = true; in lv_obj_style_state_compare()
510 else if(lv_style_get_prop(style, LV_STYLE_PAD_BOTTOM, &v)) layout_diff = true; in lv_obj_style_state_compare()
511 else if(lv_style_get_prop(style, LV_STYLE_PAD_LEFT, &v)) layout_diff = true; in lv_obj_style_state_compare()
512 else if(lv_style_get_prop(style, LV_STYLE_PAD_RIGHT, &v)) layout_diff = true; in lv_obj_style_state_compare()
513 else if(lv_style_get_prop(style, LV_STYLE_PAD_COLUMN, &v)) layout_diff = true; in lv_obj_style_state_compare()
514 else if(lv_style_get_prop(style, LV_STYLE_PAD_ROW, &v)) layout_diff = true; in lv_obj_style_state_compare()
515 else if(lv_style_get_prop(style, LV_STYLE_LAYOUT, &v)) layout_diff = true; in lv_obj_style_state_compare()
516 else if(lv_style_get_prop(style, LV_STYLE_TRANSLATE_X, &v)) layout_diff = true; in lv_obj_style_state_compare()
517 else if(lv_style_get_prop(style, LV_STYLE_TRANSLATE_Y, &v)) layout_diff = true; in lv_obj_style_state_compare()
518 else if(lv_style_get_prop(style, LV_STYLE_WIDTH, &v)) layout_diff = true; in lv_obj_style_state_compare()
519 else if(lv_style_get_prop(style, LV_STYLE_HEIGHT, &v)) layout_diff = true; in lv_obj_style_state_compare()
520 else if(lv_style_get_prop(style, LV_STYLE_MIN_WIDTH, &v)) layout_diff = true; in lv_obj_style_state_compare()
521 else if(lv_style_get_prop(style, LV_STYLE_MAX_WIDTH, &v)) layout_diff = true; in lv_obj_style_state_compare()
522 else if(lv_style_get_prop(style, LV_STYLE_MIN_HEIGHT, &v)) layout_diff = true; in lv_obj_style_state_compare()
523 else if(lv_style_get_prop(style, LV_STYLE_MAX_HEIGHT, &v)) layout_diff = true; in lv_obj_style_state_compare()
524 else if(lv_style_get_prop(style, LV_STYLE_BORDER_WIDTH, &v)) layout_diff = true; in lv_obj_style_state_compare()
531 … if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_WIDTH, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
532 …else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_HEIGHT, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRA… in lv_obj_style_state_compare()
533 …else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_ROTATION, &v)) res = LV_STYLE_STATE_CMP_DIFF_D… in lv_obj_style_state_compare()
534 …else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_SCALE_X, &v)) res = LV_STYLE_STATE_CMP_DIFF_DR… in lv_obj_style_state_compare()
535 …else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_SCALE_Y, &v)) res = LV_STYLE_STATE_CMP_DIFF_DR… in lv_obj_style_state_compare()
536 …else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_OPA, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
537 …else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_PAD, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
538 …else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_WIDTH, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_P… in lv_obj_style_state_compare()
539 …else if(lv_style_get_prop(style, LV_STYLE_SHADOW_WIDTH, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PA… in lv_obj_style_state_compare()
540 … else if(lv_style_get_prop(style, LV_STYLE_SHADOW_OPA, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
541 …else if(lv_style_get_prop(style, LV_STYLE_SHADOW_OFFSET_X, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW… in lv_obj_style_state_compare()
542 …else if(lv_style_get_prop(style, LV_STYLE_SHADOW_OFFSET_Y, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW… in lv_obj_style_state_compare()
543 …else if(lv_style_get_prop(style, LV_STYLE_SHADOW_SPREAD, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_P… in lv_obj_style_state_compare()
544 … else if(lv_style_get_prop(style, LV_STYLE_LINE_WIDTH, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
660 return (lv_style_t *)obj->styles[i].style; in get_local_style()
677 obj->styles[i].style = lv_malloc_zeroed(sizeof(lv_style_t)); in get_local_style()
678 lv_style_init((lv_style_t *)obj->styles[i].style); in get_local_style()
682 return (lv_style_t *)obj->styles[i].style; in get_local_style()
711 obj->styles[0].style = lv_malloc(sizeof(lv_style_t)); in get_trans_style()
712 lv_style_init((lv_style_t *)obj->styles[0].style); in get_trans_style()
739 if((obj_style->style->has_group & group) == 0) continue; in get_prop_core()
740 found = lv_style_get_prop_inlined(obj_style->style, prop, v); in get_prop_core()
747 if((obj->styles[i].style->has_group & group) == 0) continue; in get_prop_core()
760 found = lv_style_get_prop_inlined(obj_style->style, prop, v); in get_prop_core()
778 static void report_style_change_core(void * style, lv_obj_t * obj) in report_style_change_core() argument
782 if(style == NULL || obj->styles[i].style == style) { in report_style_change_core()
791 report_style_change_core(style, obj->spec_attr->children[i]); in report_style_change_core()
841 lv_style_remove_prop((lv_style_t *)obj->styles[i].style, tr->prop); in trans_delete()
907 if(lv_style_get_prop(obj->styles[i].style, tr->prop, &old_value)) { in trans_anim_cb()
913 lv_style_set_prop((lv_style_t *)obj->styles[i].style, tr->prop, value_final); in trans_anim_cb()
939 lv_style_set_prop((lv_style_t *)style_trans->style, tr->prop, tr->start_value); in trans_anim_start_cb()
970 lv_style_remove_prop((lv_style_t *)obj_style->style, prop); in trans_anim_completed_cb()
972 if(lv_style_is_empty(obj->styles[i].style)) { in trans_anim_completed_cb()
973 lv_obj_remove_style(obj, (lv_style_t *)obj_style->style, obj_style->selector); in trans_anim_completed_cb()
1006 lv_style_t * style = (lv_style_t *)obj->styles[i].style; in full_cache_refresh() local
1008 if(lv_style_is_const(style)) { in full_cache_refresh()
1009 lv_style_const_prop_t * props = style->values_and_props; in full_cache_refresh()
1015 …lv_style_prop_t * props = (lv_style_prop_t *)style->values_and_props + style->prop_cnt * sizeof(lv… in full_cache_refresh()
1016 for(j = 0; j < style->prop_cnt; j++) { in full_cache_refresh()
1026 lv_style_t * style = (lv_style_t *)obj->styles[i].style; in full_cache_refresh() local
1028 if(lv_style_is_const(style)) { in full_cache_refresh()
1029 lv_style_const_prop_t * props = style->values_and_props; in full_cache_refresh()
1035 …lv_style_prop_t * props = (lv_style_prop_t *)style->values_and_props + style->prop_cnt * sizeof(lv… in full_cache_refresh()
1036 for(j = 0; j < style->prop_cnt; j++) { in full_cache_refresh()
1058 static bool style_has_flag(const lv_style_t * style, uint32_t flag) in style_has_flag() argument
1060 if(lv_style_is_const(style)) { in style_has_flag()
1061 lv_style_const_prop_t * props = style->values_and_props; in style_has_flag()
1070 …lv_style_prop_t * props = (lv_style_prop_t *)style->values_and_props + style->prop_cnt * sizeof(lv… in style_has_flag()
1072 for(i = 0; i < style->prop_cnt; i++) { in style_has_flag()