diff --git a/src/base/dialog.c b/src/base/dialog.c index c392f6019..b3e446aa2 100644 --- a/src/base/dialog.c +++ b/src/base/dialog.c @@ -43,13 +43,7 @@ static ret_t dialog_on_add_child(widget_t* widget, widget_t* child) { return RET_CONTINUE; } -static const char* const s_dialog_properties[] = {WIDGET_PROP_ANIM_HINT, - WIDGET_PROP_OPEN_ANIM_HINT, - WIDGET_PROP_MOVE_FOCUS_PREV_KEY, - WIDGET_PROP_MOVE_FOCUS_NEXT_KEY, - WIDGET_PROP_CLOSE_ANIM_HINT, - WIDGET_PROP_THEME, - NULL}; +static const char* const s_dialog_properties[] = {NULL}; static ret_t dialog_set_prop(widget_t* widget, const char* name, const value_t* v) { dialog_t* dialog = DIALOG(widget); diff --git a/src/base/window.c b/src/base/window.c index 34e19058e..705b5a87f 100644 --- a/src/base/window.c +++ b/src/base/window.c @@ -25,14 +25,7 @@ #include "base/window.h" #include "base/window_manager.h" -static const char* s_window_properties[] = {WIDGET_PROP_ANIM_HINT, - WIDGET_PROP_OPEN_ANIM_HINT, - WIDGET_PROP_FULLSCREEN, - WIDGET_PROP_CLOSE_ANIM_HINT, - WIDGET_PROP_MOVE_FOCUS_PREV_KEY, - WIDGET_PROP_MOVE_FOCUS_NEXT_KEY, - WIDGET_PROP_THEME, - NULL}; +static const char* s_window_properties[] = {WIDGET_PROP_FULLSCREEN, NULL}; static ret_t window_set_prop(widget_t* widget, const char* name, const value_t* v) { if (tk_str_eq(name, WIDGET_PROP_FULLSCREEN)) { diff --git a/src/base/window_base.c b/src/base/window_base.c index a18660080..d7b59f6a8 100644 --- a/src/base/window_base.c +++ b/src/base/window_base.c @@ -503,7 +503,34 @@ ret_t window_close(widget_t* widget) { return window_manager_close_window(widget->parent, widget); } -TK_DECL_VTABLE(window_base) = {.size = sizeof(window_base_t), .parent = TK_PARENT_VTABLE(widget)}; +static const char* s_window_base_properties[] = {WIDGET_PROP_ANIM_HINT, + WIDGET_PROP_OPEN_ANIM_HINT, + WIDGET_PROP_DISABLE_ANIM, + WIDGET_PROP_NATIVE_WINDOW, + WIDGET_PROP_CLOSE_ANIM_HINT, + WIDGET_PROP_THEME, + WIDGET_PROP_MOVE_FOCUS_PREV_KEY, + WIDGET_PROP_MOVE_FOCUS_NEXT_KEY, + WIDGET_PROP_MOVE_FOCUS_UP_KEY, + WIDGET_PROP_MOVE_FOCUS_DOWN_KEY, + WIDGET_PROP_MOVE_FOCUS_LEFT_KEY, + WIDGET_PROP_MOVE_FOCUS_RIGHT_KEY, + WIDGET_PROP_SINGLE_INSTANCE, + WIDGET_PROP_DESIGN_W, + WIDGET_PROP_DESIGN_H, + WIDGET_PROP_AUTO_SCALE_CHILDREN_X, + WIDGET_PROP_AUTO_SCALE_CHILDREN_Y, + WIDGET_PROP_AUTO_SCALE_CHILDREN_W, + WIDGET_PROP_AUTO_SCALE_CHILDREN_H, + WIDGET_PROP_CLOSABLE, + NULL}; + +TK_DECL_VTABLE(window_base) = { + .size = sizeof(window_base_t), + .parent = TK_PARENT_VTABLE(widget), + .clone_properties = s_window_base_properties, + .persistent_properties = s_window_base_properties, +}; widget_t* window_base_cast(widget_t* widget) { return_value_if_fail(WIDGET_IS_INSTANCE_OF(widget, window_base), NULL); diff --git a/src/widgets/overlay.c b/src/widgets/overlay.c index b6344f8c4..6d5d54d45 100644 --- a/src/widgets/overlay.c +++ b/src/widgets/overlay.c @@ -72,9 +72,8 @@ static bool_t overlay_is_point_in(widget_t* widget, xy_t x, xy_t y) { } } -static const char* const s_overlay_properties[] = { - WIDGET_PROP_MOVE_FOCUS_PREV_KEY, WIDGET_PROP_MOVE_FOCUS_NEXT_KEY, WIDGET_PROP_THEME, - WIDGET_PROP_CLICK_THROUGH, WIDGET_PROP_ALWAYS_ON_TOP, NULL}; +static const char* const s_overlay_properties[] = {WIDGET_PROP_CLICK_THROUGH, + WIDGET_PROP_ALWAYS_ON_TOP, NULL}; TK_DECL_VTABLE(overlay) = {.type = WIDGET_TYPE_OVERLAY, .size = sizeof(overlay_t), diff --git a/src/widgets/popup.c b/src/widgets/popup.c index ab8fb13ff..aab8a9814 100644 --- a/src/widgets/popup.c +++ b/src/widgets/popup.c @@ -168,15 +168,9 @@ static ret_t popup_on_event(widget_t* widget, event_t* e) { return window_base_on_event(widget, e); } -static const char* const s_popup_properties[] = {WIDGET_PROP_ANIM_HINT, - WIDGET_PROP_OPEN_ANIM_HINT, - WIDGET_PROP_CLOSE_ANIM_HINT, - WIDGET_PROP_THEME, - WIDGET_PROP_CLOSE_WHEN_CLICK, +static const char* const s_popup_properties[] = {WIDGET_PROP_CLOSE_WHEN_CLICK, WIDGET_PROP_CLOSE_WHEN_CLICK_OUTSIDE, - WIDGET_PROP_MOVE_FOCUS_PREV_KEY, - WIDGET_PROP_MOVE_FOCUS_NEXT_KEY, - NULL}; + WIDGET_PROP_CLOSE_WHEN_TIMEOUT, NULL}; TK_DECL_VTABLE(popup) = {.size = sizeof(popup_t), .type = WIDGET_TYPE_POPUP, diff --git a/src/widgets/system_bar.c b/src/widgets/system_bar.c index 7df1d94db..9ef00765e 100644 --- a/src/widgets/system_bar.c +++ b/src/widgets/system_bar.c @@ -29,7 +29,7 @@ #include "widgets/system_bar.h" #include "base/window_manager.h" -static const char* s_system_bar_properties[] = {WIDGET_PROP_THEME, NULL}; +static const char* s_system_bar_properties[] = {NULL}; static ret_t system_bar_on_request_close_window(void* ctx, event_t* e) { widget_t* widget = WIDGET(ctx);