Files
LCUI/lib/ui/src/ui_diff.h
T

38 lines
1.3 KiB
C

/*
* lib/ui/src/ui_diff.h
*
* Copyright (c) 2023-2026, Liu Chao <hello@lcui.dev> All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* This file is part of LCUI, distributed under the MIT License found
* in the LICENSE.TXT file in the root directory of this source tree.
*/
typedef struct ui_diff_item {
ui_widget_t *widget;
ui_rect_t border_box;
ui_rect_t canvas_box;
bool visible;
bool should_add_dirty_rect;
} ui_diff_item_t;
/** for check widget difference */
typedef struct ui_widget_style_diff_t_ {
css_computed_style_t style;
css_computed_style_t specified_style;
/* Union of every direct child's dependency bitmap, computed before the
* parent cascades so propagation and the owning-pointer snapshot are
* both gated by exactly the properties children depend on. */
uint32_t dep_union[(STYLE_KEY_TOTAL + 31) / 32];
ui_rect_t padding_box;
ui_rect_t canvas_box;
bool visible;
bool should_add_dirty_rect;
bool has_style_snapshot;
} ui_style_diff_t;
void ui_style_diff_init(ui_style_diff_t *diff, ui_widget_t *w);
void ui_style_diff_begin(ui_style_diff_t *diff, ui_widget_t *w);
void ui_style_diff_end(ui_style_diff_t *diff, ui_widget_t *w);