From b374182616536439c01a2c8b0282ae04c58b181b Mon Sep 17 00:00:00 2001 From: Ting Zhu Date: Tue, 26 Dec 2023 09:47:22 +0800 Subject: [PATCH] Improve logic of GUIX Studio generated gx_studio_auto_event_handler. (#95) --- guix_studio/screen_generator.cpp | 41 +++++++++++-------- ...emo_guix_car_infotainment_specifications.c | 32 +++++++-------- ...demo_guix_home_automation_specifications.c | 32 +++++++-------- .../demo_guix_industrial_specifications.c | 32 +++++++-------- .../guix_medical_specifications.c | 32 +++++++-------- .../guix_widget_types_specifications.c | 32 +++++++-------- .../all_widgets/all_widgets_specifications.c | 30 ++++++-------- .../all_widgets_32argb_specifications.c | 32 +++++++-------- .../all_widgets_565bgr_specifications.c | 32 +++++++-------- .../all_widgets_5_4_0_specifications.c | 32 +++++++-------- .../all_widgets_5_4_1_specifications.c | 32 +++++++-------- .../all_widgets_5_4_2_specifications.c | 32 +++++++-------- .../all_widgets_5_5_1_specifications.c | 32 +++++++-------- ...fined_5_4_0_compatibility_specifications.c | 32 +++++++-------- .../all_widgets_execute_specifications.c | 32 +++++++-------- .../all_widgets_synergy_specifications.c | 32 +++++++-------- ...idgets_synergy_16bpp_flip_specifications.c | 32 +++++++-------- ...ets_synergy_dave_disabled_specifications.c | 32 +++++++-------- ...ll_widgets_synergy_565rgb_specifications.c | 32 +++++++-------- ...all_widgets_synergy_5_4_2_specifications.c | 32 +++++++-------- ...uix_medical_mouse_support_specifications.c | 32 +++++++-------- ...artial_frame_buffer_16bpp_specifications.c | 32 +++++++-------- ...ndalone_binres_load_16bpp_specifications.c | 32 +++++++-------- .../system_screen_stack_specifications.c | 32 +++++++-------- .../template/template_specifications.c | 32 +++++++-------- .../all_widgets_execute_specifications.c | 32 +++++++-------- .../golden_files/template_specifications.c | 32 +++++++-------- .../trigger_target_rename_specifications.c | 32 +++++++-------- .../demo_guix_menu_specifications.c | 32 +++++++-------- .../demo_guix_transitions_specifications.c | 32 +++++++-------- 30 files changed, 428 insertions(+), 539 deletions(-) diff --git a/guix_studio/screen_generator.cpp b/guix_studio/screen_generator.cpp index d64e4ae2..add4ec51 100644 --- a/guix_studio/screen_generator.cpp +++ b/guix_studio/screen_generator.cpp @@ -1381,21 +1381,6 @@ CString out(""); /* Set output file to the default file: Empty means default output file. */ SetOutFile(out); - - out = "static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2)\n" - "{\n" - " GX_WIDGET *parent = target1->gx_widget_parent;\n" - " if (parent)\n" - " {\n" - " gx_widget_detach(target1);\n" - " gx_widget_attach(parent, target2);\n" - " if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED)\n" - " {\n" - " gx_widget_delete(target1);\n" - " }\n" - " }\n" - "}\n\n"; - FileWrite(out); out = "static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action)\n" "{\n" @@ -1586,7 +1571,17 @@ CString out(""); " break;\n\n" " case GX_ACTION_TYPE_TOGGLE:\n" " target = gx_studio_action_target_get(widget, action);\n" - " gx_studio_screen_toggle(widget, target);\n" + " parent = widget->gx_widget_parent;\n" + " if (parent)\n" + " {\n" + " gx_widget_detach(widget);\n" + " gx_widget_attach(parent, target);\n" + " if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED)\n" + " {\n" + " gx_widget_delete(widget);\n" + " widget = GX_NULL;\n" + " }\n" + " }\n" " break;\n\n" " case GX_ACTION_TYPE_SHOW:\n" " target = gx_studio_action_target_get(widget, action);\n" @@ -1663,7 +1658,17 @@ CString out(""); " {\n" " target = gx_studio_action_target_get(widget, action);\n" " }\n" - " gx_studio_screen_toggle(widget, target);\n" + " parent = widget->gx_widget_parent;\n" + " if (parent)\n" + " {\n" + " gx_widget_detach(widget);\n" + " gx_widget_attach(parent, target);\n" + " if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED)\n" + " {\n" + " gx_widget_delete(widget);\n" + " widget = GX_NULL;\n" + " }\n" + " }\n" " break;\n\n" " case GX_ACTION_TYPE_SHOW:\n" " target = gx_studio_action_target_get(widget, action);\n" @@ -1728,7 +1733,7 @@ CString out(""); " entry++;\n" " }\n\n" - " if (record->chain_event_handler)\n" + " if (widget && record->chain_event_handler)\n" " {\n" " status = record->chain_event_handler(widget, event_ptr);\n" " }\n" diff --git a/samples/demo_guix_car_infotainment/demo_guix_car_infotainment_specifications.c b/samples/demo_guix_car_infotainment/demo_guix_car_infotainment_specifications.c index 189bd4f3..8ed09853 100644 --- a/samples/demo_guix_car_infotainment/demo_guix_car_infotainment_specifications.c +++ b/samples/demo_guix_car_infotainment/demo_guix_car_infotainment_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:33 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:01 */ /*******************************************************************************/ @@ -51,20 +51,6 @@ GX_STUDIO_DISPLAY_INFO demo_guix_car_infotainment_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -267,7 +253,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -340,7 +336,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/samples/demo_guix_home_automation/demo_guix_home_automation_specifications.c b/samples/demo_guix_home_automation/demo_guix_home_automation_specifications.c index 4b7d3783..5bfdd24a 100644 --- a/samples/demo_guix_home_automation/demo_guix_home_automation_specifications.c +++ b/samples/demo_guix_home_automation/demo_guix_home_automation_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:33 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:01 */ /*******************************************************************************/ @@ -65,20 +65,6 @@ GX_STUDIO_DISPLAY_INFO demo_guix_home_automation_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -281,7 +267,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -354,7 +350,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/samples/demo_guix_industrial/demo_guix_industrial_specifications.c b/samples/demo_guix_industrial/demo_guix_industrial_specifications.c index 3ff5c54f..bd50d5d3 100644 --- a/samples/demo_guix_industrial/demo_guix_industrial_specifications.c +++ b/samples/demo_guix_industrial/demo_guix_industrial_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:33 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:01 */ /*******************************************************************************/ @@ -49,20 +49,6 @@ GX_STUDIO_DISPLAY_INFO demo_guix_industrial_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -265,7 +251,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -338,7 +334,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/samples/demo_guix_medical/guix_medical_specifications.c b/samples/demo_guix_medical/guix_medical_specifications.c index b6cbecc0..e354ed29 100644 --- a/samples/demo_guix_medical/guix_medical_specifications.c +++ b/samples/demo_guix_medical/guix_medical_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:33 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:01 */ /*******************************************************************************/ @@ -48,20 +48,6 @@ GX_STUDIO_DISPLAY_INFO guix_medical_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -264,7 +250,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -337,7 +333,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/samples/demo_guix_widget_types/guix_widget_types_specifications.c b/samples/demo_guix_widget_types/guix_widget_types_specifications.c index 903f931e..9b6af3cf 100644 --- a/samples/demo_guix_widget_types/guix_widget_types_specifications.c +++ b/samples/demo_guix_widget_types/guix_widget_types_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:33 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:01 */ /*******************************************************************************/ @@ -52,20 +52,6 @@ GX_STUDIO_DISPLAY_INFO guix_widget_types_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -268,7 +254,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -341,7 +337,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets/all_widgets_specifications.c b/test/example_internal/all_widgets/all_widgets_specifications.c index 70835a55..137dc3fb 100644 --- a/test/example_internal/all_widgets/all_widgets_specifications.c +++ b/test/example_internal/all_widgets/all_widgets_specifications.c @@ -6,7 +6,7 @@ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ /* GUIX Studio Revision 6.3.0.1 */ -/* Date (dd.mm.yyyy): 14.12.2023 Time (hh:mm): 14:17 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:01 */ /*******************************************************************************/ @@ -58,20 +58,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -274,7 +260,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -347,7 +343,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_32argb/all_widgets_32argb_specifications.c b/test/example_internal/all_widgets_32argb/all_widgets_32argb_specifications.c index d215d764..1ffef981 100644 --- a/test/example_internal/all_widgets_32argb/all_widgets_32argb_specifications.c +++ b/test/example_internal/all_widgets_32argb/all_widgets_32argb_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:54 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:02 */ /*******************************************************************************/ @@ -56,20 +56,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_32argb_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -272,7 +258,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -345,7 +341,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_565bgr/all_widgets_565bgr_specifications.c b/test/example_internal/all_widgets_565bgr/all_widgets_565bgr_specifications.c index 0f893971..4f5cd55e 100644 --- a/test/example_internal/all_widgets_565bgr/all_widgets_565bgr_specifications.c +++ b/test/example_internal/all_widgets_565bgr/all_widgets_565bgr_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:54 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:02 */ /*******************************************************************************/ @@ -57,20 +57,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_565bgr_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -273,7 +259,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -346,7 +342,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_5_4_0/all_widgets_5_4_0_specifications.c b/test/example_internal/all_widgets_5_4_0/all_widgets_5_4_0_specifications.c index f17c44ff..f460ce50 100644 --- a/test/example_internal/all_widgets_5_4_0/all_widgets_5_4_0_specifications.c +++ b/test/example_internal/all_widgets_5_4_0/all_widgets_5_4_0_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 21.11.2023 Time (hh:mm): 15:23 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:02 */ /*******************************************************************************/ @@ -54,20 +54,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_5_4_0_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -234,7 +220,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON case GX_ACTION_TYPE_TOGGLE: target = gx_studio_action_target_get(widget, action); - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -279,7 +275,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_5_4_1/all_widgets_5_4_1_specifications.c b/test/example_internal/all_widgets_5_4_1/all_widgets_5_4_1_specifications.c index a3e2c949..24426702 100644 --- a/test/example_internal/all_widgets_5_4_1/all_widgets_5_4_1_specifications.c +++ b/test/example_internal/all_widgets_5_4_1/all_widgets_5_4_1_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 21.11.2023 Time (hh:mm): 15:23 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:02 */ /*******************************************************************************/ @@ -54,20 +54,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_5_4_1_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -234,7 +220,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON case GX_ACTION_TYPE_TOGGLE: target = gx_studio_action_target_get(widget, action); - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -279,7 +275,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_5_4_2/all_widgets_5_4_2_specifications.c b/test/example_internal/all_widgets_5_4_2/all_widgets_5_4_2_specifications.c index db8253b6..1929094c 100644 --- a/test/example_internal/all_widgets_5_4_2/all_widgets_5_4_2_specifications.c +++ b/test/example_internal/all_widgets_5_4_2/all_widgets_5_4_2_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 21.11.2023 Time (hh:mm): 15:23 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:02 */ /*******************************************************************************/ @@ -54,20 +54,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_5_4_2_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -234,7 +220,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON case GX_ACTION_TYPE_TOGGLE: target = gx_studio_action_target_get(widget, action); - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -279,7 +275,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_5_5_1/all_widgets_5_5_1_specifications.c b/test/example_internal/all_widgets_5_5_1/all_widgets_5_5_1_specifications.c index 38ef2dd4..a9ef32b8 100644 --- a/test/example_internal/all_widgets_5_5_1/all_widgets_5_5_1_specifications.c +++ b/test/example_internal/all_widgets_5_5_1/all_widgets_5_5_1_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 21.11.2023 Time (hh:mm): 15:23 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:02 */ /*******************************************************************************/ @@ -55,20 +55,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_5_5_1_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -271,7 +257,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -344,7 +340,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_defined_5_4_0_compatibility/all_widgets_defined_5_4_0_compatibility_specifications.c b/test/example_internal/all_widgets_defined_5_4_0_compatibility/all_widgets_defined_5_4_0_compatibility_specifications.c index b7314eaf..6898c370 100644 --- a/test/example_internal/all_widgets_defined_5_4_0_compatibility/all_widgets_defined_5_4_0_compatibility_specifications.c +++ b/test/example_internal/all_widgets_defined_5_4_0_compatibility/all_widgets_defined_5_4_0_compatibility_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:54 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:03 */ /*******************************************************************************/ @@ -56,20 +56,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_defined_5_4_0_compatibility_display_table[1] } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -272,7 +258,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -345,7 +341,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_execute/all_widgets_execute_specifications.c b/test/example_internal/all_widgets_execute/all_widgets_execute_specifications.c index e376206e..6ad50f26 100644 --- a/test/example_internal/all_widgets_execute/all_widgets_execute_specifications.c +++ b/test/example_internal/all_widgets_execute/all_widgets_execute_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:54 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:03 */ /*******************************************************************************/ @@ -54,20 +54,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_execute_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -270,7 +256,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -343,7 +339,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_synergy/all_widgets_synergy_specifications.c b/test/example_internal/all_widgets_synergy/all_widgets_synergy_specifications.c index f8c8b785..48aab3af 100644 --- a/test/example_internal/all_widgets_synergy/all_widgets_synergy_specifications.c +++ b/test/example_internal/all_widgets_synergy/all_widgets_synergy_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:54 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:03 */ /*******************************************************************************/ @@ -55,20 +55,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_synergy_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -271,7 +257,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -344,7 +340,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_synergy_16bpp_flip/all_widgets_synergy_16bpp_flip_specifications.c b/test/example_internal/all_widgets_synergy_16bpp_flip/all_widgets_synergy_16bpp_flip_specifications.c index e0687aae..7ee058ca 100644 --- a/test/example_internal/all_widgets_synergy_16bpp_flip/all_widgets_synergy_16bpp_flip_specifications.c +++ b/test/example_internal/all_widgets_synergy_16bpp_flip/all_widgets_synergy_16bpp_flip_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:54 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:03 */ /*******************************************************************************/ @@ -55,20 +55,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_synergy_16bpp_flip_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -271,7 +257,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -344,7 +340,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_synergy_24BPP_Dave_Disabled/all_widgets_synergy_dave_disabled_specifications.c b/test/example_internal/all_widgets_synergy_24BPP_Dave_Disabled/all_widgets_synergy_dave_disabled_specifications.c index 22b3c50f..a04f350d 100644 --- a/test/example_internal/all_widgets_synergy_24BPP_Dave_Disabled/all_widgets_synergy_dave_disabled_specifications.c +++ b/test/example_internal/all_widgets_synergy_24BPP_Dave_Disabled/all_widgets_synergy_dave_disabled_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:55 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:03 */ /*******************************************************************************/ @@ -54,20 +54,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_synergy_dave_disabled_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -270,7 +256,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -343,7 +339,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_synergy_565rgb/all_widgets_synergy_565rgb_specifications.c b/test/example_internal/all_widgets_synergy_565rgb/all_widgets_synergy_565rgb_specifications.c index 37577ee5..32e8fe87 100644 --- a/test/example_internal/all_widgets_synergy_565rgb/all_widgets_synergy_565rgb_specifications.c +++ b/test/example_internal/all_widgets_synergy_565rgb/all_widgets_synergy_565rgb_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:55 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:03 */ /*******************************************************************************/ @@ -55,20 +55,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_synergy_565rgb_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -271,7 +257,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -344,7 +340,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/all_widgets_synergy_5_4_2/all_widgets_synergy_5_4_2_specifications.c b/test/example_internal/all_widgets_synergy_5_4_2/all_widgets_synergy_5_4_2_specifications.c index 1cc7d917..a33159ca 100644 --- a/test/example_internal/all_widgets_synergy_5_4_2/all_widgets_synergy_5_4_2_specifications.c +++ b/test/example_internal/all_widgets_synergy_5_4_2/all_widgets_synergy_5_4_2_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 21.11.2023 Time (hh:mm): 15:24 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:03 */ /*******************************************************************************/ @@ -53,20 +53,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_synergy_5_4_2_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -233,7 +219,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON case GX_ACTION_TYPE_TOGGLE: target = gx_studio_action_target_get(widget, action); - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -278,7 +274,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/guix_medical_mouse_support/guix_medical_mouse_support_specifications.c b/test/example_internal/guix_medical_mouse_support/guix_medical_mouse_support_specifications.c index 8af0f401..d02b6278 100644 --- a/test/example_internal/guix_medical_mouse_support/guix_medical_mouse_support_specifications.c +++ b/test/example_internal/guix_medical_mouse_support/guix_medical_mouse_support_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:56 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:04 */ /*******************************************************************************/ @@ -48,20 +48,6 @@ GX_STUDIO_DISPLAY_INFO guix_medical_mouse_support_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -264,7 +250,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -337,7 +333,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/partial_frame_buffer_16bpp/partial_frame_buffer_16bpp_specifications.c b/test/example_internal/partial_frame_buffer_16bpp/partial_frame_buffer_16bpp_specifications.c index ca9d20e6..48e6b2cd 100644 --- a/test/example_internal/partial_frame_buffer_16bpp/partial_frame_buffer_16bpp_specifications.c +++ b/test/example_internal/partial_frame_buffer_16bpp/partial_frame_buffer_16bpp_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:57 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:05 */ /*******************************************************************************/ @@ -60,20 +60,6 @@ GX_STUDIO_DISPLAY_INFO partial_frame_buffer_16bpp_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -276,7 +262,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -349,7 +345,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/standalone_binres_load_16bpp/standalone_binres_load_16bpp_specifications.c b/test/example_internal/standalone_binres_load_16bpp/standalone_binres_load_16bpp_specifications.c index f79a3f48..3d86839f 100644 --- a/test/example_internal/standalone_binres_load_16bpp/standalone_binres_load_16bpp_specifications.c +++ b/test/example_internal/standalone_binres_load_16bpp/standalone_binres_load_16bpp_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:58 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:06 */ /*******************************************************************************/ @@ -49,20 +49,6 @@ GX_STUDIO_DISPLAY_INFO standalone_binres_load_16bpp_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -265,7 +251,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -338,7 +334,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/system_screen_stack/system_screen_stack_specifications.c b/test/example_internal/system_screen_stack/system_screen_stack_specifications.c index 7c0085c9..a7fca790 100644 --- a/test/example_internal/system_screen_stack/system_screen_stack_specifications.c +++ b/test/example_internal/system_screen_stack/system_screen_stack_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:58 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:06 */ /*******************************************************************************/ @@ -50,20 +50,6 @@ GX_STUDIO_DISPLAY_INFO system_screen_stack_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -266,7 +252,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -339,7 +335,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/example_internal/template/template_specifications.c b/test/example_internal/template/template_specifications.c index 14585f53..8bd86721 100644 --- a/test/example_internal/template/template_specifications.c +++ b/test/example_internal/template/template_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:58 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:06 */ /*******************************************************************************/ @@ -48,20 +48,6 @@ GX_STUDIO_DISPLAY_INFO template_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -264,7 +250,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -337,7 +333,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/guix_studio_test/test_view/golden_files/all_widgets_execute_specifications.c b/test/guix_studio_test/test_view/golden_files/all_widgets_execute_specifications.c index 57310978..b2983e05 100644 --- a/test/guix_studio_test/test_view/golden_files/all_widgets_execute_specifications.c +++ b/test/guix_studio_test/test_view/golden_files/all_widgets_execute_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 22.11.2023 Time (hh:mm): 10:45 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 14.12.2023 Time (hh:mm): 15:56 */ /*******************************************************************************/ @@ -52,20 +52,6 @@ GX_STUDIO_DISPLAY_INFO all_widgets_execute_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -232,7 +218,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON case GX_ACTION_TYPE_TOGGLE: target = gx_studio_action_target_get(widget, action); - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -277,7 +273,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/guix_studio_test/test_view/golden_files/template_specifications.c b/test/guix_studio_test/test_view/golden_files/template_specifications.c index 9786506f..c71283fe 100644 --- a/test/guix_studio_test/test_view/golden_files/template_specifications.c +++ b/test/guix_studio_test/test_view/golden_files/template_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 21.11.2023 Time (hh:mm): 18:19 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 14.12.2023 Time (hh:mm): 16:00 */ /*******************************************************************************/ @@ -50,20 +50,6 @@ GX_STUDIO_DISPLAY_INFO template_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -266,7 +252,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -339,7 +335,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/test/guix_studio_test/test_view/golden_files/trigger_target_rename_specifications.c b/test/guix_studio_test/test_view/golden_files/trigger_target_rename_specifications.c index a5afe4a1..03ee043a 100644 --- a/test/guix_studio_test/test_view/golden_files/trigger_target_rename_specifications.c +++ b/test/guix_studio_test/test_view/golden_files/trigger_target_rename_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 21.11.2023 Time (hh:mm): 18:01 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 14.12.2023 Time (hh:mm): 15:57 */ /*******************************************************************************/ @@ -46,20 +46,6 @@ GX_STUDIO_DISPLAY_INFO trigger_target_rename_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -226,7 +212,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON case GX_ACTION_TYPE_TOGGLE: target = gx_studio_action_target_get(widget, action); - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -271,7 +267,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/tutorials/demo_guix_menu/demo_guix_menu_specifications.c b/tutorials/demo_guix_menu/demo_guix_menu_specifications.c index f8200f6e..d5ce977b 100644 --- a/tutorials/demo_guix_menu/demo_guix_menu_specifications.c +++ b/tutorials/demo_guix_menu/demo_guix_menu_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:34 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:07 */ /*******************************************************************************/ @@ -49,20 +49,6 @@ GX_STUDIO_DISPLAY_INFO demo_guix_menu_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -265,7 +251,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -338,7 +334,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); } diff --git a/tutorials/demo_guix_transitions/demo_guix_transitions_specifications.c b/tutorials/demo_guix_transitions/demo_guix_transitions_specifications.c index 3ea8da0f..9bd39066 100644 --- a/tutorials/demo_guix_transitions/demo_guix_transitions_specifications.c +++ b/tutorials/demo_guix_transitions/demo_guix_transitions_specifications.c @@ -5,8 +5,8 @@ /* specification file(s). For more information please refer to the Azure RTOS */ /* GUIX Studio User Guide, or visit our web site at azure.com/rtos */ /* */ -/* GUIX Studio Revision 6.3.0.0 */ -/* Date (dd.mm.yyyy): 24.11.2023 Time (hh:mm): 16:34 */ +/* GUIX Studio Revision 6.3.0.1 */ +/* Date (dd.mm.yyyy): 22.12.2023 Time (hh:mm): 16:07 */ /*******************************************************************************/ @@ -51,20 +51,6 @@ GX_STUDIO_DISPLAY_INFO demo_guix_transitions_display_table[1] = } }; -static VOID gx_studio_screen_toggle(GX_WIDGET *target1, GX_WIDGET *target2) -{ - GX_WIDGET *parent = target1->gx_widget_parent; - if (parent) - { - gx_widget_detach(target1); - gx_widget_attach(parent, target2); - if (target1->gx_widget_status & GX_STATUS_STUDIO_CREATED) - { - gx_widget_delete(target1); - } - } -} - static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action) { GX_WIDGET *parent = GX_NULL; @@ -267,7 +253,17 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON { target = gx_studio_action_target_get(widget, action); } - gx_studio_screen_toggle(widget, target); + parent = widget->gx_widget_parent; + if (parent) + { + gx_widget_detach(widget); + gx_widget_attach(parent, target); + if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED) + { + gx_widget_delete(widget); + widget = GX_NULL; + } + } break; case GX_ACTION_TYPE_SHOW: @@ -340,7 +336,7 @@ UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CON entry++; } - if (record->chain_event_handler) + if (widget && record->chain_event_handler) { status = record->chain_event_handler(widget, event_ptr); }