1
0
mirror of https://github.com/azure-rtos/guix.git synced 2025-01-28 07:03:11 +08:00

Release 6.1.11

This commit is contained in:
Yuxin Zhou 2022-04-20 05:09:15 +00:00
parent b638e8c609
commit 0798b7020f
131 changed files with 113039 additions and 73016 deletions

View File

@ -24,7 +24,7 @@
/* APPLICATION INTERFACE DEFINITION RELEASE */
/* */
/* gx_api.h PORTABLE C */
/* 6.1.10 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -86,6 +86,12 @@
/* vertical and horizontal */
/* list control blocks, */
/* resulting in version 6.1.10 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added new member to struct */
/* GX_DISPLAY_LAYER_SERVICES, */
/* added new animation flag */
/* GX_ANIMATION_BLOCK_MOVE, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
@ -109,7 +115,7 @@ extern "C" {
#define AZURE_RTOS_GUIX
#define GUIX_MAJOR_VERSION 6
#define GUIX_MINOR_VERSION 1
#define GUIX_PATCH_VERSION 10
#define GUIX_PATCH_VERSION 11
/* The following symbols are defined for backward compatibility reasons.*/
#define __PRODUCT_GUIX__
@ -882,6 +888,7 @@ typedef struct GX_STRING_STRUCT
#define GX_ANIMATION_NONE 0x0000U
#define GX_ANIMATION_TRANSLATE 0x0001U
#define GX_ANIMATION_SCREEN_DRAG 0x0002U
#define GX_ANIMATION_BLOCK_MOVE 0x0004U
/* flags that can be used in combination with screen drag animation */
#define GX_ANIMATION_WRAP 0x0100U
@ -1525,6 +1532,7 @@ typedef struct GX_DISPLAY_LAYER_SERVICES_STRUCT
VOID (*gx_display_layer_hide)(INT layer);
VOID (*gx_display_layer_alpha_set)(INT layer, GX_UBYTE alpha);
VOID (*gx_display_layer_offset_set)(INT layer, GX_VALUE xoffset, GX_VALUE yoffset);
VOID (*gx_display_layer_active_display_area_set)(INT layer, GX_RECTANGLE *size);
} GX_DISPLAY_LAYER_SERVICES;
#if defined(GX_MOUSE_SUPPORT)
@ -3028,6 +3036,7 @@ typedef struct GX_FIXED_POINT_STRUCT
#define gx_canvas_rotated_text_draw_ext _gx_canvas_rotated_text_draw_ext
#define gx_canvas_shift _gx_canvas_shift
#define gx_canvas_show _gx_canvas_show
#define gx_canvas_aligned_text_draw _gx_canvas_aligned_text_draw
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
#define gx_canvas_text_draw _gx_canvas_text_draw
#endif
@ -3694,6 +3703,7 @@ UINT _gx_canvas_rotated_text_draw_ext(GX_CONST GX_STRING *text, GX_VALUE xcenter
UINT _gx_canvas_shift(GX_CANVAS *canvas, GX_VALUE x, GX_VALUE y);
UINT _gx_canvas_show(GX_CANVAS *canvas);
UINT _gx_canvas_aligned_text_draw(GX_CONST GX_STRING *string, GX_RECTANGLE *rectangle, ULONG alignment);
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
UINT _gx_canvas_text_draw(GX_VALUE x_start, GX_VALUE y_start, GX_CONST GX_CHAR *string, INT length);
#endif
@ -4508,6 +4518,7 @@ UINT _gx_window_wallpaper_set(GX_WINDOW *window, GX_RESOURCE_ID wallpaper_id, GX
#define gx_canvas_rotated_text_draw_ext _gxe_canvas_rotated_text_draw_ext
#define gx_canvas_shift _gxe_canvas_shift
#define gx_canvas_show _gxe_canvas_show
#define gx_canvas_aligned_text_draw _gxe_canvas_aligned_text_draw
#if defined (GX_ENABLE_DEPRECATED_STRING_API)
#define gx_canvas_text_draw _gxe_canvas_text_draw
#endif
@ -5171,6 +5182,7 @@ UINT _gxe_canvas_rotated_text_draw_ext(GX_CONST GX_STRING *text, GX_VALUE xcente
UINT _gxe_canvas_shift(GX_CANVAS *canvas, GX_VALUE x, GX_VALUE y);
UINT _gxe_canvas_show(GX_CANVAS *canvas);
UINT _gxe_canvas_aligned_text_draw(GX_CONST GX_STRING *string, GX_RECTANGLE *rectangle, ULONG alignment);
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
UINT _gxe_canvas_text_draw(GX_VALUE x_start, GX_VALUE y_start, GX_CONST GX_CHAR *string, INT length);
#endif

View File

@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* gx_canvas.h PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -44,6 +44,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added new declarations, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
@ -107,6 +110,7 @@ UINT _gx_canvas_rotated_text_draw_ext(GX_CONST GX_STRING *text, GX_VALUE xcenter
UINT _gx_canvas_shift(GX_CANVAS *canvas, GX_VALUE x, GX_VALUE y);
UINT _gx_canvas_show(GX_CANVAS *canvas);
UINT _gx_canvas_aligned_text_draw(GX_CONST GX_STRING *string, GX_RECTANGLE *rectangle, ULONG alignment);
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
UINT _gx_canvas_text_draw(GX_VALUE x_start, GX_VALUE y_start, GX_CONST GX_CHAR *string, INT length);
#endif
@ -153,6 +157,7 @@ UINT _gxe_canvas_rotated_text_draw(GX_CONST GX_CHAR *text, GX_VALUE xcenter, GX
UINT _gxe_canvas_rotated_text_draw_ext(GX_CONST GX_STRING *text, GX_VALUE xcenter, GX_VALUE ycenter, INT angle);
UINT _gxe_canvas_shift(GX_CANVAS *canvas, GX_VALUE x, GX_VALUE y);
UINT _gxe_canvas_show(GX_CANVAS *canvas);
UINT _gxe_canvas_aligned_text_draw(GX_CONST GX_STRING *string, GX_RECTANGLE *rectangle, ULONG alignment);
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
UINT _gxe_canvas_text_draw(GX_VALUE x_start, GX_VALUE y_start, GX_CONST GX_CHAR *string, INT length);
#endif

View File

@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* gx_system.h PORTABLE C */
/* 6.1.3 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -50,6 +50,10 @@
/* added GX_DISABLE_THREADX_ */
/* TIMER_SOURCE configuration, */
/* resulting in version 6.1.3 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added new parameter to */
/* _gx_system_pen_flick_test, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
@ -116,7 +120,7 @@ VOID _gx_system_input_unlock(VOID);
VOID _gx_system_pen_speed_init(GX_POINT *current);
VOID _gx_system_pen_speed_update(GX_POINT *current);
VOID _gx_system_pen_flick_test(VOID);
VOID _gx_system_pen_flick_test(GX_WIDGET *target);
UINT _gx_system_pen_configure(GX_PEN_CONFIGURATION *pen_configuration);
UINT _gx_system_private_string_copy(GX_STRING *ptr_address, GX_CONST GX_STRING *text);

View File

@ -27,14 +27,14 @@
#include "gx_api.h"
#include "gx_widget.h"
#include "gx_animation.h"
#include "gx_canvas.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _gx_animation_drag_tracking PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -73,25 +73,32 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added canvas and block move */
/* support, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_animation_drag_tracking(GX_ANIMATION *animation, GX_POINT penpos)
{
GX_VALUE delta_x = 0;
GX_VALUE delta_y = 0;
GX_VALUE shift_x = 0;
GX_VALUE shift_y = 0;
GX_VALUE last_pos;
GX_VALUE start_pos;
GX_VALUE pen_pos;
GX_WIDGET *target_1 = GX_NULL;
GX_WIDGET *target_2 = GX_NULL;
GX_VALUE delta_x = 0;
GX_VALUE delta_y = 0;
GX_VALUE shift_x = 0;
GX_VALUE shift_y = 0;
GX_VALUE last_pos;
GX_VALUE start_pos;
GX_VALUE pen_pos;
GX_WIDGET *target_1 = GX_NULL;
GX_WIDGET *target_2 = GX_NULL;
GX_WIDGET *parent;
GX_RECTANGLE block;
GX_VALUE border_width;
if (animation -> gx_animation_slide_target_index_1 >= 0)
{
target_1 = animation -> gx_animation_info.gx_animation_slide_screen_list[animation -> gx_animation_slide_target_index_1];
}
if (target_1 == GX_NULL)
{
return GX_SUCCESS;
@ -131,6 +138,13 @@ GX_WIDGET *target_2 = GX_NULL;
_gx_widget_detach(target_2);
}
if (animation -> gx_animation_canvas)
{
_gx_widget_shift(target_1,
animation -> gx_animation_canvas -> gx_canvas_display_offset_x,
animation -> gx_animation_canvas -> gx_canvas_display_offset_y, GX_TRUE);
}
_gx_animation_drag_tracking_start(animation, penpos);
if (animation -> gx_animation_slide_target_index_2 >= 0)
@ -154,11 +168,7 @@ GX_WIDGET *target_2 = GX_NULL;
}
}
if (target_2)
{
_gx_widget_shift(target_2, (GX_VALUE)(shift_x + delta_x), (GX_VALUE)(shift_y + delta_y), GX_TRUE);
}
else
if (!target_2)
{
if (animation -> gx_animation_info.gx_animation_style & GX_ANIMATION_VERTICAL)
{
@ -172,7 +182,39 @@ GX_WIDGET *target_2 = GX_NULL;
}
}
_gx_widget_shift(target_1, (GX_VALUE)(shift_x + delta_x), (GX_VALUE)(shift_y + delta_y), GX_TRUE);
if (animation -> gx_animation_canvas)
{
/* adjust canvas offset */
_gx_canvas_offset_set(animation -> gx_animation_canvas,
(GX_VALUE)(animation -> gx_animation_canvas -> gx_canvas_display_offset_x + shift_x + delta_x),
(GX_VALUE)(animation -> gx_animation_canvas -> gx_canvas_display_offset_y + shift_y + delta_y));
}
else
{
if (animation -> gx_animation_info.gx_animation_style & GX_ANIMATION_BLOCK_MOVE)
{
if (target_2)
{
_gx_widget_scroll_shift(target_2, (GX_VALUE)(shift_x + delta_x), (GX_VALUE)(shift_y + delta_y), GX_TRUE);
}
_gx_widget_scroll_shift(target_1, (GX_VALUE)(shift_x + delta_x), (GX_VALUE)(shift_y + delta_y), GX_TRUE);
parent = animation -> gx_animation_info.gx_animation_parent;
_gx_widget_border_width_get(parent, &border_width);
_gx_widget_client_get(parent, border_width, &block);
_gx_widget_block_move(parent, &block, (GX_VALUE)(shift_x + delta_x), (GX_VALUE)(shift_y + delta_y));
}
else
{
if (target_2)
{
_gx_widget_shift(target_2, (GX_VALUE)(shift_x + delta_x), (GX_VALUE)(shift_y + delta_y), GX_TRUE);
}
_gx_widget_shift(target_1, (GX_VALUE)(shift_x + delta_x), (GX_VALUE)(shift_y + delta_y), GX_TRUE);
}
}
animation -> gx_animation_slide_tracking_current_pos = pen_pos;
}

View File

@ -27,14 +27,15 @@
#include "gx_api.h"
#include "gx_widget.h"
#include "gx_animation.h"
#include "gx_system.h"
#include "gx_canvas.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _gx_animation_drag_tracking_start PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -68,6 +69,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added canvas support, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_animation_drag_tracking_start(GX_ANIMATION *animation, GX_POINT penpos)
@ -76,9 +80,13 @@ GX_ANIMATION_INFO *info;
GX_RECTANGLE size;
INT width;
GX_WIDGET *target_1;
GX_WIDGET *target_2;
GX_WIDGET *target_2 = GX_NULL;
INT index;
INT current_pos;
GX_WINDOW_ROOT *root;
GX_VALUE left;
GX_VALUE top;
VOID (*active_display_area_set)(INT layer, GX_RECTANGLE *size);
info = &animation -> gx_animation_info;
@ -158,11 +166,12 @@ INT current_pos;
}
}
target_1 = info -> gx_animation_slide_screen_list[animation -> gx_animation_slide_target_index_1];
if ((index >= 0) && (index < animation -> gx_animation_slide_screen_list_size))
{
animation -> gx_animation_slide_target_index_2 = (GX_VALUE)(index);
target_1 = info -> gx_animation_slide_screen_list[animation -> gx_animation_slide_target_index_1];
target_2 = info -> gx_animation_slide_screen_list[index];
size = target_2 -> gx_widget_size;
@ -214,14 +223,86 @@ INT current_pos;
/* Resize the second animation target. */
_gx_widget_resize(target_2, &size);
/* Attach the second target to animation parent. */
_gx_widget_attach(info -> gx_animation_parent, target_2);
if (!animation -> gx_animation_canvas)
{
/* Attach the second target to animation parent. */
_gx_widget_attach(info -> gx_animation_parent, target_2);
}
}
else
{
animation -> gx_animation_slide_target_index_2 = -1;
}
if (animation -> gx_animation_canvas)
{
/* Find animation root. */
root = _gx_system_root_window_created_list;
while (root && root -> gx_window_root_canvas != animation -> gx_animation_canvas)
{
root = (GX_WINDOW_ROOT *)root -> gx_widget_next;
}
if (animation -> gx_animation_slide_direction == GX_ANIMATION_SLIDE_UP ||
animation -> gx_animation_slide_direction == GX_ANIMATION_SLIDE_LEFT ||
(!target_2))
{
left = target_1 -> gx_widget_size.gx_rectangle_left;
top = target_1 -> gx_widget_size.gx_rectangle_top;
}
else
{
left = target_2 -> gx_widget_size.gx_rectangle_left;
top = target_2 -> gx_widget_size.gx_rectangle_top;
}
if (left || top)
{
_gx_widget_shift(target_1, (GX_VALUE)-left, (GX_VALUE)-top, GX_TRUE);
if (target_2)
{
_gx_widget_shift(target_2, (GX_VALUE)-left, (GX_VALUE)-top, GX_TRUE);
}
}
/* Position the canvas at the animation starting position. */
_gx_canvas_offset_set(animation -> gx_animation_canvas, left, top);
if (animation -> gx_animation_canvas -> gx_canvas_hardware_layer >= 0)
{
active_display_area_set = animation -> gx_animation_canvas -> gx_canvas_display -> gx_display_layer_services -> gx_display_layer_active_display_area_set;
if (active_display_area_set)
{
/* Set active display area as the animation parent widget size. */
active_display_area_set(animation -> gx_animation_canvas -> gx_canvas_hardware_layer, &info -> gx_animation_parent -> gx_widget_size);
}
}
if (root)
{
/* Link the target to the animation root window. */
_gx_widget_attach((GX_WIDGET *)root, target_1);
if (target_2)
{
_gx_widget_attach((GX_WIDGET *)root, target_2);
}
/* and show the animation root window to make everything visible */
_gx_widget_show((GX_WIDGET *)root);
_gx_canvas_drawing_initiate(animation -> gx_animation_canvas, (GX_WIDGET *)root, &root -> gx_widget_size);
_gx_widget_children_draw((GX_WIDGET *)root);
_gx_canvas_drawing_complete(animation -> gx_animation_canvas, GX_FALSE);
/* set the initial alpha and make our canvas visible */
_gx_canvas_alpha_set(animation -> gx_animation_canvas, info -> gx_animation_start_alpha);
_gx_canvas_show(animation -> gx_animation_canvas);
}
}
/* Return completion status code. */
return(GX_SUCCESS);
}

View File

@ -29,13 +29,14 @@
#include "gx_system.h"
#include "gx_animation.h"
#include "gx_utility.h"
#include "gx_canvas.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _gx_animation_slide_landing PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -73,6 +74,10 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added canvas and block move */
/* support, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_animation_slide_landing(GX_ANIMATION *animation)
@ -84,6 +89,8 @@ GX_WIDGET *target_2 = GX_NULL;
INT x_shift = 0;
INT y_shift = 0;
GX_RECTANGLE target_size;
GX_RECTANGLE block;
GX_VALUE border_width;
parent = animation -> gx_animation_info.gx_animation_parent;
@ -116,6 +123,12 @@ GX_RECTANGLE target_size;
target_size = target_1 -> gx_widget_size;
}
if (animation -> gx_animation_canvas)
{
_gx_utility_rectangle_shift(&target_size, animation -> gx_animation_canvas -> gx_canvas_display_offset_x,
animation -> gx_animation_canvas -> gx_canvas_display_offset_y);
}
if (info -> gx_animation_style & GX_ANIMATION_EASING_FUNC_MASK)
{
info -> gx_animation_steps = (GX_UBYTE)(info -> gx_animation_steps - 1);
@ -173,12 +186,34 @@ GX_RECTANGLE target_size;
((y_shift < 0) && ((GX_VALUE)(target_size.gx_rectangle_top + y_shift) > parent -> gx_widget_size.gx_rectangle_top)) ||
((y_shift > 0) && ((GX_VALUE)(target_size.gx_rectangle_top + y_shift) < parent -> gx_widget_size.gx_rectangle_top)))
{
/* Shift animation targets one step toward target position. */
_gx_widget_shift(target_1, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
if (target_2)
if (animation -> gx_animation_canvas)
{
_gx_widget_shift(target_2, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
_gx_canvas_offset_set(animation -> gx_animation_canvas,
(GX_VALUE)(animation -> gx_animation_canvas -> gx_canvas_display_offset_x + x_shift),
(GX_VALUE)(animation -> gx_animation_canvas -> gx_canvas_display_offset_y + y_shift));
}
else
{
/* Shift animation targets one step toward target position. */
if (info -> gx_animation_style & GX_ANIMATION_BLOCK_MOVE)
{
_gx_widget_scroll_shift(target_1, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
if (target_2)
{
_gx_widget_scroll_shift(target_2, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
}
}
else
{
_gx_widget_shift(target_1, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
if (target_2)
{
_gx_widget_shift(target_2, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
}
}
}
}
else
@ -198,18 +233,49 @@ GX_RECTANGLE target_size;
x_shift = parent -> gx_widget_size.gx_rectangle_left - target_size.gx_rectangle_left;
}
if (target_2)
if (animation -> gx_animation_canvas)
{
/* Detach the first target. */
_gx_widget_detach(target_1);
/* hide the animation root */
if (target_1 -> gx_widget_parent)
{
_gx_widget_hide(target_1 -> gx_widget_parent);
}
/* Move the second target to its final position. */
_gx_widget_shift(target_2, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
/* attach the widget to it's parent */
if (target_2)
{
_gx_widget_detach(target_1);
target_1 = target_2;
}
_gx_widget_shift(target_1,
(GX_VALUE)(x_shift + animation -> gx_animation_canvas -> gx_canvas_display_offset_x),
(GX_VALUE)(y_shift + animation -> gx_animation_canvas -> gx_canvas_display_offset_y), GX_TRUE);
_gx_widget_attach(parent, target_1);
_gx_canvas_hide(animation -> gx_animation_canvas);
_gx_system_canvas_refresh();
}
else
{
if (target_2)
{
/* Detach the first target. */
_gx_widget_detach(target_1);
target_1 = target_2;
}
/* No second target, just move the first target to its final position. */
_gx_widget_shift(target_1, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
if (info -> gx_animation_style & GX_ANIMATION_BLOCK_MOVE)
{
_gx_widget_scroll_shift(target_1, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
}
else
{
_gx_widget_shift(target_1, (GX_VALUE)x_shift, (GX_VALUE)y_shift, GX_TRUE);
}
}
/* Reset animation information. */
@ -221,6 +287,13 @@ GX_RECTANGLE target_size;
_gx_animation_complete_event_send(animation);
}
if (info -> gx_animation_style & GX_ANIMATION_BLOCK_MOVE)
{
_gx_widget_border_width_get(parent, &border_width);
_gx_widget_client_get(parent, border_width, &block);
_gx_widget_block_move(parent, &block, (GX_VALUE)x_shift, (GX_VALUE)y_shift);
}
/* Return completion status code. */
return(GX_SUCCESS);
}

View File

@ -28,14 +28,14 @@
#include "gx_widget.h"
#include "gx_system.h"
#include "gx_animation.h"
#include "gx_utility.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _gx_animation_slide_landing_start PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -69,6 +69,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added canvas support, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_animation_slide_landing_start(GX_ANIMATION *animation)
@ -93,8 +96,16 @@ GX_RECTANGLE *target_size;
target_size = &target -> gx_widget_size;
info -> gx_animation_start_position.gx_point_x = target_size -> gx_rectangle_left;
info -> gx_animation_start_position.gx_point_y = target_size -> gx_rectangle_top;
if (animation -> gx_animation_canvas)
{
info -> gx_animation_start_position.gx_point_x = (GX_VALUE)(target_size -> gx_rectangle_left + animation -> gx_animation_canvas -> gx_canvas_display_offset_x);
info -> gx_animation_start_position.gx_point_y = (GX_VALUE)(target_size -> gx_rectangle_top + animation -> gx_animation_canvas -> gx_canvas_display_offset_y);
}
else
{
info -> gx_animation_start_position.gx_point_x = target_size -> gx_rectangle_left;
info -> gx_animation_start_position.gx_point_y = target_size -> gx_rectangle_top;
}
/* Start a landing timer. */
_gx_system_timer_start(info -> gx_animation_parent, GX_ANIMATION_SLIDE_TIMER,

View File

@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_animation_update PORTABLE C */
/* 6.1.3 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -77,6 +77,9 @@
/* 12-31-2020 Kenneth Maxwell Modified comment(s), improve */
/* linear animation accuracy, */
/* resulting in version 6.1.3 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added block move support, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
VOID _gx_animation_update(VOID)
@ -90,6 +93,8 @@ INT y_current;
INT x_trans = 0;
INT y_trans = 0;
GX_ANIMATION_INFO *info;
GX_WIDGET *parent;
GX_RECTANGLE block;
animation = _gx_system_animation_list;
@ -219,7 +224,23 @@ GX_ANIMATION_INFO *info;
else
{
/* adjust target position */
_gx_widget_shift(target, (GX_VALUE)x_trans, (GX_VALUE)y_trans, GX_TRUE);
if (animation -> gx_animation_info.gx_animation_style & GX_ANIMATION_BLOCK_MOVE)
{
parent = animation -> gx_animation_info.gx_animation_parent;
if (_gx_utility_rectangle_overlap_detect(&target -> gx_widget_size, &parent -> gx_widget_size, &block))
{
_gx_widget_scroll_shift(target, (GX_VALUE)x_trans, (GX_VALUE)y_trans, GX_TRUE);
_gx_widget_block_move(parent, &block, (GX_VALUE)x_trans, (GX_VALUE)y_trans);
}
else
{
_gx_widget_shift(target, (GX_VALUE)x_trans, (GX_VALUE)y_trans, GX_TRUE);
}
}
else
{
_gx_widget_shift(target, (GX_VALUE)x_trans, (GX_VALUE)y_trans, GX_TRUE);
}
}
}
animation = next;

View File

@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_canvas_offset_set PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -70,6 +70,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), fixed */
/* canvas dirty mark logic, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_canvas_offset_set(GX_CANVAS *canvas, GX_VALUE xoffset, GX_VALUE yoffset)
@ -116,6 +119,11 @@ VOID (*offset_function)(INT layer, GX_VALUE x, GX_VALUE y);
oldpos.gx_rectangle_right = (GX_VALUE)(oldpos.gx_rectangle_left + canvas -> gx_canvas_x_resolution - 1);
oldpos.gx_rectangle_bottom = (GX_VALUE)(oldpos.gx_rectangle_top + canvas -> gx_canvas_y_resolution - 1);
if (backcanvas -> gx_canvas_draw_count > 0)
{
_gx_utility_rectangle_combine(&oldpos, &backcanvas -> gx_canvas_dirty_area);
}
/* mark the background as dirty */
_gx_canvas_dirty_mark(backcanvas, &oldpos);
}

View File

@ -28,7 +28,7 @@
#include "gx_system.h"
#include "gx_utility.h"
#include "gx_canvas.h"
#include "gx_context.h"
/**************************************************************************/
/* */
@ -289,3 +289,92 @@ GX_FONT *font = context -> gx_draw_context_brush.gx_brush_font;
return(status);
}
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _gx_canvas_aligned_text_draw PORTABLE C */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Ting Zhu, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This function draws text to canvas with specified alignment style. */
/* */
/* INPUT */
/* */
/* string String to draw */
/* rectangle Drawing area */
/* alignment Alignment style */
/* */
/* OUTPUT */
/* */
/* status Completion status */
/* */
/* CALLS */
/* */
/* _gx_context_brush_get Get context brush */
/* _gx_system_string_width_get_ext Get string width */
/* _gx_canvas_text_draw_ext Actual text draw function */
/* */
/* CALLED BY */
/* */
/* Application Code */
/* GUIX Internal Code */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 04-25-2022 Ting Zhu Initial Version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_canvas_aligned_text_draw(GX_CONST GX_STRING *string, GX_RECTANGLE *rectangle, ULONG alignment)
{
GX_VALUE text_width;
GX_VALUE text_height;
GX_VALUE x_pos;
GX_VALUE y_pos;
GX_BRUSH *brush;
GX_VALUE rect_width;
GX_VALUE rect_height;
_gx_context_brush_get(&brush);
if (!brush -> gx_brush_font)
{
return GX_INVALID_FONT;
}
text_height = brush -> gx_brush_font -> gx_font_line_height;
rect_width = (GX_VALUE)(rectangle -> gx_rectangle_right - rectangle -> gx_rectangle_left + 1);
rect_height = (GX_VALUE)(rectangle -> gx_rectangle_bottom - rectangle -> gx_rectangle_top + 1);
x_pos = rectangle -> gx_rectangle_left;
y_pos = rectangle -> gx_rectangle_top;
y_pos = (GX_VALUE)(y_pos + (rect_height - text_height) / 2);
switch (alignment & GX_STYLE_TEXT_ALIGNMENT_MASK)
{
case GX_STYLE_TEXT_RIGHT:
_gx_system_string_width_get_ext(brush -> gx_brush_font, string, &text_width);
x_pos = (GX_VALUE)(x_pos + rect_width - 1);
x_pos = (GX_VALUE)(x_pos - text_width);
break;
case GX_STYLE_TEXT_LEFT:
break;
default:
_gx_system_string_width_get_ext(brush -> gx_brush_font, string, &text_width);
x_pos = (GX_VALUE)(x_pos + ((rect_width - text_width) / 2));
break;
}
/* Draw the text. */
return _gx_canvas_text_draw_ext(x_pos, y_pos, string);
}

View File

@ -50,7 +50,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_display_driver_32bpp_glyph_1bit_draw PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -89,6 +89,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* fixed access violation bug, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
VOID _gx_display_driver_32bpp_glyph_1bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, GX_CONST GX_GLYPH *glyph)
@ -182,11 +185,12 @@ INT xval, yval;
{
xval = draw_area -> gx_rectangle_left;
glyph_data = glyph_row;
alpha = *(glyph_data);
mask = init_mask;
num_bits = pixel_in_first_byte;
for (i = 0; i < num_bytes; i++)
{
alpha = *(glyph_data++);
if ((i == (num_bytes - 1)) && (num_bytes > 1))
{
num_bits = pixel_in_last_byte;
@ -222,8 +226,6 @@ INT xval, yval;
xval++;
break;
}
glyph_data++;
alpha = *(glyph_data);
num_bits = 8;
mask = 0x80;
}
@ -242,12 +244,13 @@ INT xval, yval;
for (row = 0; row < y_height; row++)
{
glyph_data = glyph_row;
alpha = *(glyph_data);
mask = init_mask;
num_bits = pixel_in_first_byte;
put = line_start;
for (i = 0; i < num_bytes; i++)
{
alpha = *(glyph_data++);
if ((i == (num_bytes - 1)) && (num_bytes > 1))
{
num_bits = pixel_in_last_byte;
@ -283,8 +286,6 @@ INT xval, yval;
put++;
break;
}
glyph_data++;
alpha = *(glyph_data);
num_bits = 8;
mask = 0x80;
}

View File

@ -50,7 +50,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_display_driver_16bpp_glyph_1bit_draw PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -89,6 +89,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* fixed access violation bug, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
VOID _gx_display_driver_16bpp_glyph_1bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, GX_CONST GX_GLYPH *glyph)
@ -196,11 +199,12 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *, INT, INT, GX_COLOR, GX_UBYTE);
{
xval = draw_area -> gx_rectangle_left;
glyph_data = glyph_row;
alpha = *(glyph_data);
mask = init_mask;
num_bits = pixel_in_first_byte;
for (i = 0; i < num_bytes; i++)
{
alpha = *(glyph_data++);
if ((i == (num_bytes - 1)) && (num_bytes > 1))
{
num_bits = pixel_in_last_byte;
@ -236,8 +240,6 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *, INT, INT, GX_COLOR, GX_UBYTE);
xval++;
break;
}
glyph_data++;
alpha = *(glyph_data);
num_bits = 8;
mask = 0x80;
}
@ -252,12 +254,13 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *, INT, INT, GX_COLOR, GX_UBYTE);
for (row = 0; row < y_height; row++)
{
glyph_data = glyph_row;
alpha = *(glyph_data);
mask = init_mask;
num_bits = pixel_in_first_byte;
put = line_start;
for (i = 0; i < num_bytes; i++)
{
alpha = *(glyph_data++);
if ((i == (num_bytes - 1)) && (num_bytes > 1))
{
num_bits = pixel_in_last_byte;
@ -293,8 +296,6 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *, INT, INT, GX_COLOR, GX_UBYTE);
put++;
break;
}
glyph_data++;
alpha = *(glyph_data);
num_bits = 8;
mask = 0x80;
}

View File

@ -51,7 +51,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_display_driver_8bpp_glyph_1bit_draw PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -90,6 +90,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* fixed access violation bug, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
VOID _gx_display_driver_8bpp_glyph_1bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, GX_CONST GX_GLYPH *glyph)
@ -195,13 +198,14 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *, INT, INT, GX_COLOR, GX_UBYTE);
for (row = 0; row < y_height; row++)
{
glyph_data = glyph_row;
alpha = *(glyph_data);
mask = init_mask;
num_bits = pixel_in_first_byte;
put = line_start;
for (i = 0; i < num_bytes; i++)
{
alpha = *(glyph_data++);
if ((i == (num_bytes - 1)) && (num_bytes > 1))
{
num_bits = pixel_in_last_byte;
@ -238,8 +242,6 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *, INT, INT, GX_COLOR, GX_UBYTE);
put++;
break;
}
glyph_data++;
alpha = *(glyph_data);
num_bits = 8;
mask = 0x80;
}
@ -256,11 +258,11 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *, INT, INT, GX_COLOR, GX_UBYTE);
{
xval = draw_area -> gx_rectangle_left;
glyph_data = glyph_row;
alpha = *(glyph_data);
mask = init_mask;
num_bits = pixel_in_first_byte;
for (i = 0; i < num_bytes; i++)
{
alpha = *(glyph_data);
if ((i == (num_bytes - 1)) && (num_bytes > 1))
{
num_bits = pixel_in_last_byte;
@ -297,7 +299,6 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *, INT, INT, GX_COLOR, GX_UBYTE);
break;
}
glyph_data++;
alpha = *(glyph_data);
num_bits = 8;
mask = 0x80;
}

View File

@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_radial_slider_animation_update PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -73,6 +73,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added animation step test, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_radial_slider_animation_update(GX_RADIAL_SLIDER *slider)
@ -80,34 +83,37 @@ UINT _gx_radial_slider_animation_update(GX_RADIAL_SLIDER *slider)
GX_RADIAL_SLIDER_INFO *info = &slider -> gx_radial_slider_info;
INT current_val = info -> gx_radial_slider_info_current_angle;
slider -> gx_radial_slider_animation_step--;
if (slider -> gx_radial_slider_animation_step > 0)
{
slider -> gx_radial_slider_animation_step--;
_gx_utility_easing_function_calculate(slider -> gx_radial_slider_animation_style,
_gx_utility_easing_function_calculate(slider -> gx_radial_slider_animation_style,
slider -> gx_radial_slider_start_angle,
slider -> gx_radial_slider_target_angle,
slider -> gx_radial_slider_animation_total_steps - slider -> gx_radial_slider_animation_step,
slider -> gx_radial_slider_animation_total_steps,
&current_val);
/* set radial slider value. */
_gx_radial_slider_angle_set(slider, (GX_VALUE)current_val);
/* set radial slider value. */
_gx_radial_slider_angle_set(slider, (GX_VALUE)current_val);
if (slider -> gx_radial_slider_animation_update_callback)
{
/* Call callback function. */
slider -> gx_radial_slider_animation_update_callback(slider);
}
if (slider -> gx_radial_slider_animation_update_callback)
{
/* Call callback function. */
slider -> gx_radial_slider_animation_update_callback(slider);
}
if (slider -> gx_radial_slider_animation_step == 0)
{
_gx_system_timer_stop((GX_WIDGET *)slider, GX_RADIAL_SLIDER_TIMER);
if (slider -> gx_radial_slider_animation_step == 0)
{
_gx_system_timer_stop((GX_WIDGET *)slider, GX_RADIAL_SLIDER_TIMER);
_gx_widget_event_generate((GX_WIDGET *)slider, GX_EVENT_ANIMATION_COMPLETE, current_val);
}
_gx_widget_event_generate((GX_WIDGET *)slider, GX_EVENT_ANIMATION_COMPLETE, current_val);
}
if (slider -> gx_widget_status & GX_STATUS_VISIBLE)
{
_gx_system_dirty_mark((GX_WIDGET *)slider);
if (slider -> gx_widget_status & GX_STATUS_VISIBLE)
{
_gx_system_dirty_mark((GX_WIDGET *)slider);
}
}
return GX_SUCCESS;

View File

@ -33,7 +33,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_system_event_dispatch PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -70,18 +70,22 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* improved logic, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_system_event_dispatch(GX_EVENT *in_event)
{
GX_WIDGET *target = GX_NULL;
GX_WINDOW_ROOT *root_window;
GX_EVENT out_event;
GX_POINT pen_pos;
UINT return_code = 0;
#if defined (GX_MOUSE_SUPPORT)
GX_DISPLAY *display;
GX_WIDGET *target = GX_NULL;
GX_WINDOW_ROOT *root_window;
GX_EVENT out_event;
GX_POINT pen_pos;
UINT return_code = 0;
#if defined(GX_MOUSE_SUPPORT)
GX_DISPLAY *display;
#endif
/* check for NULL event. This happens when an event is purged */
if (in_event -> gx_event_type == 0)
@ -102,7 +106,7 @@ GX_DISPLAY *display;
{
switch (out_event.gx_event_type)
{
#if defined(GX_MOUSE_SUPPORT)
#if defined(GX_MOUSE_SUPPORT)
case GX_EVENT_PEN_MOVE:
/* Find the top root window under this click position */
pen_pos = out_event.gx_event_payload.gx_event_pointdata;
@ -110,9 +114,9 @@ GX_DISPLAY *display;
if (root_window)
{
/* mouse cursor coordinates are display relative, not canvas relative,
/* mouse cursor coordinates are display relative, not canvas relative,
so set cursor position before canvas offset is applied
*/
*/
display = root_window -> gx_window_root_canvas -> gx_canvas_display;
if (display -> gx_display_mouse_position_set)
{
@ -120,7 +124,7 @@ GX_DISPLAY *display;
}
}
break;
#endif
#endif
case GX_EVENT_PEN_DOWN:
case GX_EVENT_PEN_UP:
@ -129,15 +133,34 @@ GX_DISPLAY *display;
/* get absolute click position */
pen_pos = out_event.gx_event_payload.gx_event_pointdata;
/* Find the top root window under this click position */
root_window = _gx_system_top_root_find(&out_event);
if (_gx_system_capture_count > 0)
{
/* Get the widget that owns the system input. */
target = *_gx_system_input_capture_stack;
if (target)
{
/* Find the root window of the widget that owns the system input. */
root_window = (GX_WINDOW_ROOT *)target -> gx_widget_parent;
while (root_window && root_window -> gx_widget_parent)
{
root_window = (GX_WINDOW_ROOT *)root_window -> gx_widget_parent;
}
}
}
else
{
/* Find the top root window under this click position */
root_window = _gx_system_top_root_find(&out_event);
}
if (root_window)
{
#if defined(GX_MOUSE_SUPPORT)
/* mouse cursor coordinates are display relative, not canvas relative,
/* mouse cursor coordinates are display relative, not canvas relative,
so set cursor position before canvas offset is applied
*/
*/
display = root_window -> gx_window_root_canvas -> gx_canvas_display;
if (display -> gx_display_mouse_position_set)
{
@ -150,14 +173,8 @@ GX_DISPLAY *display;
(GX_VALUE)(pen_pos.gx_point_x - root_window -> gx_window_root_canvas -> gx_canvas_display_offset_x);
pen_pos.gx_point_y =
(GX_VALUE)(pen_pos.gx_point_y - root_window -> gx_window_root_canvas -> gx_canvas_display_offset_y);
}
if (_gx_system_capture_count > 0)
{
target = *_gx_system_input_capture_stack;
}
else
{
if (root_window)
if (!target)
{
/* find the child of this root under the click position */
target = _gx_system_top_widget_find((GX_WIDGET *)root_window, pen_pos, GX_STATUS_SELECTABLE);

View File

@ -32,7 +32,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_system_event_send PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -70,12 +70,16 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* improved logic, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_system_event_send(GX_EVENT *in_event)
{
UINT status = GX_SYSTEM_ERROR;
GX_BOOL check_send_flick = GX_FALSE;
UINT status = GX_SYSTEM_ERROR;
GX_BOOL check_send_flick = GX_FALSE;
GX_WIDGET *target = GX_NULL;
switch (in_event -> gx_event_type)
{
@ -89,6 +93,12 @@ GX_BOOL check_send_flick = GX_FALSE;
case GX_EVENT_PEN_UP:
check_send_flick = GX_TRUE;
if (_gx_system_capture_count > 0)
{
/* Get the widget that owns the system input. */
target = *_gx_system_input_capture_stack;
}
break;
}
@ -105,7 +115,7 @@ GX_BOOL check_send_flick = GX_FALSE;
if (check_send_flick)
{
_gx_system_pen_flick_test();
_gx_system_pen_flick_test(target);
}
return status;
}

View File

@ -32,7 +32,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_system_pen_flick_test PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -67,9 +67,12 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 04-25-2022 Ting Zhu Modified comment(s), */
/* added a new parameter, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
VOID _gx_system_pen_flick_test(VOID)
VOID _gx_system_pen_flick_test(GX_WIDGET *target)
{
GX_EVENT flick_event;
INT abs_speed_x;
@ -110,7 +113,7 @@ ULONG current_clock;
}
if (flick_event.gx_event_type)
{
flick_event.gx_event_target = GX_NULL;
flick_event.gx_event_target = target;
flick_event.gx_event_sender = 0;
#ifdef GX_THREADX_BINDING

View File

@ -127,7 +127,7 @@ GX_WIDGET *end = GX_NULL;
/* FUNCTION RELEASE */
/* */
/* _gx_widget_event_process PORTABLE C */
/* 6.1.3 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -171,6 +171,10 @@ GX_WIDGET *end = GX_NULL;
/* avoid pass widget delete */
/* event to parent, */
/* resulting in version 6.1.3 */
/* 04-25-2022 Ting Zhu Modified comment(s), modified */
/* system input release logic */
/* on widget hide event, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
UINT _gx_widget_event_process(GX_WIDGET *widget, GX_EVENT *event_ptr)
@ -178,6 +182,7 @@ UINT _gx_widget_event_process(GX_WIDGET *widget, GX_EVENT *event_ptr)
GX_WIDGET *child;
GX_EVENT new_event;
UINT status = GX_SUCCESS;
GX_EVENT input_release_event;
/* Process relative to the type of event. */
switch (event_ptr -> gx_event_type)
@ -198,7 +203,10 @@ UINT status = GX_SUCCESS;
/* Check if the widget still owns system input. */
if (widget -> gx_widget_status & GX_STATUS_OWNS_INPUT)
{
_gx_system_input_release(widget);
memset(&input_release_event, 0, sizeof(GX_EVENT));
input_release_event.gx_event_target = widget;
input_release_event.gx_event_type = GX_EVENT_INPUT_RELEASE;
widget -> gx_widget_event_process_function(widget, &input_release_event);
}
_gx_widget_children_event_process(widget, event_ptr);
}

View File

@ -180,3 +180,81 @@ UINT text_length = 0;
return(status);
}
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _gxe_canvas_aligned_text_draw_ext PORTABLE C */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Ting Zhu, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This function checks errors in the canvas aligned text draw */
/* function call. */
/* */
/* INPUT */
/* */
/* string String to draw */
/* rectangle Drawing area */
/* alignment Alignment style */
/* */
/* OUTPUT */
/* */
/* status Completion status */
/* */
/* CALLS */
/* */
/* _gx_canvas_aligned_text_draw_ext The actual function */
/* */
/* CALLED BY */
/* */
/* Application Code */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 04-25-2022 Ting Zhu Initial Version 6.1.11 */
/* */
/**************************************************************************/
UINT _gxe_canvas_aligned_text_draw(GX_CONST GX_STRING *string, GX_RECTANGLE *rectangle, ULONG alignment)
{
UINT status;
UINT text_length = 0;
/* Check for appropriate caller. */
GX_INIT_AND_THREADS_CALLER_CHECKING
/* Check for invalid input pointers. */
if ((string == GX_NULL) || (rectangle == GX_NULL) || (string -> gx_string_ptr == GX_NULL))
{
return GX_PTR_ERROR;
}
if (_gx_system_current_draw_context == GX_NULL)
{
return GX_INVALID_CONTEXT;
}
status = _gx_utility_string_length_check(string -> gx_string_ptr, &text_length, string -> gx_string_length);
if (status != GX_SUCCESS)
{
return status;
}
if (text_length < string -> gx_string_length)
{
return GX_INVALID_STRING_LENGTH;
}
/* Call actual widget height get function. */
status = _gx_canvas_aligned_text_draw(string, rectangle, alignment);
/* Return successful completion. */
return(status);
}

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARCv2_EM/MetaWare Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARCv2_EM/MetaWare Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARC_HS/MetaWare Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARC_HS/MetaWare Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARM9/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARM9/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARM9/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARM9/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARM9/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX ARM9/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX C6xxx/TI Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX C6xxx/TI Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -146,7 +146,7 @@ typedef unsigned char GX_UCHAR;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A15/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A15/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A5/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A5/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A5/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A5/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A5/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A5/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A5x/AC6 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A5x/AC6 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A7/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A7/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A7/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A7/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A7/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A7/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A8/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A8/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -137,7 +137,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A8/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A8/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -137,7 +137,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A8/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A8/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A9/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A9/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A9/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A9/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A9/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A9/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M0/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M0/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -143,7 +143,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M0/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M0/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M0/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M0/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M3/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M3/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -143,7 +143,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M3/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M3/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M3/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M3/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M3/KEIL Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M3/KEIL Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M4/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M4/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -143,7 +143,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M4/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M4/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -137,7 +137,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M4/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M4/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M4/KEIL Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M4/KEIL Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -137,7 +137,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M7/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M7/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -143,7 +143,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M7/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M7/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M7/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-M7/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R4/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R4/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R4/AC6 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R4/AC6 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R4/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R4/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -137,7 +137,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R4/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R4/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R5/AC5 Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R5/AC5 Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R5/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R5/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -139,7 +139,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R5/IAR Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-R5/IAR Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -144,7 +144,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -137,7 +137,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Linux/GNU Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Linux/GNU Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -53,6 +53,7 @@
<ClCompile Include="..\..\..\..\common\src\gxe_generic_scroll_wheel_row_height_set.c" />
<ClCompile Include="..\..\..\..\common\src\gxe_generic_scroll_wheel_total_rows_set.c" />
<ClCompile Include="..\..\..\..\common\src\gx_animation_delete.c" />
<ClCompile Include="..\..\..\..\common\src\gx_canvas_text_draw.c" />
<ClCompile Include="..\..\..\..\common\src\gx_display_driver_16bpp_rotated_block_move.c" />
<ClCompile Include="..\..\..\..\common\src\gx_display_driver_16bpp_rotated_canvas_copy.c" />
<ClCompile Include="..\..\..\..\common\src\gx_display_driver_16bpp_rotated_horizontal_line_draw.c" />
@ -586,7 +587,6 @@
<ClCompile Include="..\..\..\..\common\src\gx_canvas_rotated_text_draw.c" />
<ClCompile Include="..\..\..\..\common\src\gx_canvas_shift.c" />
<ClCompile Include="..\..\..\..\common\src\gx_canvas_show.c" />
<ClCompile Include="..\..\..\..\common\src\gx_canvas_text_draw.c" />
<ClCompile Include="..\..\..\..\common\src\gx_checkbox_create.c" />
<ClCompile Include="..\..\..\..\common\src\gx_checkbox_draw.c" />
<ClCompile Include="..\..\..\..\common\src\gx_checkbox_event_process.c" />

View File

@ -170,7 +170,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Win32/Visual Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Win32/Visual Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -419,7 +419,7 @@ VOID _tx_thread_interrupt_restore(UINT previous_posture);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Win32/Visual Studio Version 6.1 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Win32/Visual Studio Version 6.1.11 *";
#else
extern CHAR _tx_version_id[];
#endif

View File

@ -1442,7 +1442,7 @@ WNDCLASS wndclass;
/* FUNCTION RELEASE */
/* */
/* WndProc PORTABLE C */
/* 6.1.10 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@ -1478,6 +1478,9 @@ WNDCLASS wndclass;
/* 01-31-2022 Ting Zhu Modified comment(s), modified */
/* GUIX event send logic, */
/* resulting in version 6.1.10 */
/* 04-25-2022 Ting Zhu Modified comment(s), improved */
/* timer event send logic, */
/* resulting in version 6.1.11 */
/* */
/**************************************************************************/
LRESULT CALLBACK gx_win32_event_process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
@ -1501,7 +1504,16 @@ GX_BOOL check_key_event;
case WM_TIMER:
NewEvent.gx_event_type = GX_EVENT_TIMER;
NewEvent.gx_event_payload.gx_event_ulongdata = 1;
gx_win32_event_to_guix(&NewEvent);
#ifdef GX_THREADX_BINDING
_tx_thread_context_save();
#endif
gx_system_event_fold(&NewEvent);
#ifdef GX_THREADX_BINDING
_tx_thread_context_restore();
#endif
return 0;
case WM_PAINT:

View File

@ -100,7 +100,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Win32/Standalone/Visual Version 6.1.10 *";
"Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Win32/Standalone/Visual Version 6.1.11 *";
#else
extern CHAR _gx_version_id[];
#endif

View File

@ -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.1.8.1 */
/* Date (dd.mm.yyyy): 27. 9.2021 Time (hh:mm): 11:07 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 23. 3.2022 Time (hh:mm): 14:56 */
/*******************************************************************************/
@ -70,6 +70,10 @@ UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_b
{
gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
}
else
{
gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
}
return status;
}

View File

@ -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.1.9.0 */
/* Date (dd.mm.yyyy): 28.10.2021 Time (hh:mm): 10:18 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 23. 3.2022 Time (hh:mm): 14:56 */
/*******************************************************************************/
@ -375,6 +375,10 @@ UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_b
{
gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
}
else
{
gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
}
return status;
}

View File

@ -29,7 +29,7 @@ GX_ANIMATION slide_animation;
GX_PIXELMAP main_screen_bg;
/* Define application varaible to record current screen and overrall energy used today. */
APP_INFO app_info = { (GX_WIDGET *)&main_screen.main_screen_home_window, 8746594 };
APP_INFO app_info = { (GX_WIDGET *)&main_screen.main_screen_home_window, GX_NULL, 8746594 };
const GX_CHAR *day_names[7] = {
"Sunday",
@ -298,7 +298,7 @@ VOID fade_in_home_window(int event_type)
/******************************************************************************************/
VOID toggle_screen(GX_WIDGET *new_screen)
{
if (new_screen->gx_widget_id == app_info.current_screen->gx_widget_id)
if (!new_screen || new_screen->gx_widget_id == app_info.current_screen->gx_widget_id)
{
/* no change. */
return;
@ -358,6 +358,7 @@ VOID toggle_screen(GX_WIDGET *new_screen)
break;
}
app_info.previous_screen = app_info.current_screen;
app_info.current_screen = new_screen;
}

View File

@ -4,7 +4,7 @@
<header>
<project_version>55</project_version>
<guix_version>60108</guix_version>
<studio_version>6010902</studio_version>
<studio_version>6011001</studio_version>
<project_name>demo_guix_home_automation</project_name>
<source_path>.\</source_path>
<header_path>.\</header_path>
@ -4134,6 +4134,15 @@
<enabled>TRUE</enabled>
<compress>FALSE</compress>
</resource>
<resource>
<name>Add New String</name>
<pathinfo>
<pathtype>project_relative</pathtype>
</pathinfo>
<is_default>FALSE</is_default>
<enabled>TRUE</enabled>
<compress>FALSE</compress>
</resource>
</resource>
<vscroll_appearance>
<scroll_width>20</scroll_width>
@ -8103,10 +8112,10 @@
<type>prompt</type>
<app_name>degree_lable</app_name>
<size>
<left>395</left>
<top>195</top>
<right>406</right>
<bottom>212</bottom>
<left>398</left>
<top>180</top>
<right>414</right>
<bottom>202</bottom>
</size>
<style>268451840</style>
<allocation>0</allocation>
@ -8117,7 +8126,7 @@
<template>FALSE</template>
<visible_at_startup>FALSE</visible_at_startup>
<string_id>STRING_16</string_id>
<font_id>SYSTEM</font_id>
<font_id>NORMAL</font_id>
<normal_text_color>TEXT</normal_text_color>
<selected_text_color>SELECTED_TEXT</selected_text_color>
<disabled_text_color>DISABLED_TEXT</disabled_text_color>
@ -11603,9 +11612,9 @@
<app_name>lower_dot</app_name>
<size>
<left>281</left>
<top>196</top>
<top>176</top>
<right>287</right>
<bottom>202</bottom>
<bottom>182</bottom>
</size>
<style>269615104</style>
<allocation>0</allocation>

View File

@ -26,6 +26,7 @@
/* Define application information structure. */
typedef struct APP_INFO_STRUCT{
GX_WIDGET *current_screen; /* Pointer to current screen. */
GX_WIDGET *previous_screen; /* Pointer to previous screen. */
INT overall_energy_today; /* Overall energy used today. */
}APP_INFO;
@ -38,20 +39,24 @@ VOID lights_screen_init();
VOID lights_title_init();
VOID lights_screen_reset();
VOID lights_screen_animation_start();
VOID lights_screen_animation_stop();
GX_RESOURCE_ID light_selected_map_id_get(GX_RADIAL_SLIDER *slider);
VOID thermostat_screen_init();
VOID thermostat_title_init();
VOID thermostat_screen_reset();
VOID thermostat_screen_animation_start();
VOID thermostat_screen_animation_stop();
VOID locks_screen_init();
VOID locks_title_init();
VOID locks_screen_reset();
VOID locks_screen_animation_start();
VOID locks_screen_animation_stop();
VOID weather_screen_init();
VOID weather_screen_reset();
VOID weather_screen_animation_start();
VOID weather_screen_animation_stop();
VOID pagination_button_enable_disable(GX_WINDOW *window, GX_BOOL enabled);

View File

@ -5,8 +5,8 @@
/* resource 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.1.8.0 */
/* Date (dd.mm.yyyy): 26. 7.2021 Time (hh:mm): 15:32 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 7. 4.2022 Time (hh:mm): 16:12 */
/*******************************************************************************/

View File

@ -5,8 +5,8 @@
/* resource 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.1.8.0 */
/* Date (dd.mm.yyyy): 26. 7.2021 Time (hh:mm): 15:32 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 7. 4.2022 Time (hh:mm): 16:12 */
/*******************************************************************************/

View File

@ -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.1.9.2 */
/* Date (dd.mm.yyyy): 28.12.2021 Time (hh:mm): 13:06 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 7. 4.2022 Time (hh:mm): 16:12 */
/*******************************************************************************/
@ -429,6 +429,10 @@ UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_b
{
gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
}
else
{
gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
}
return status;
}
@ -601,7 +605,7 @@ GX_NUMERIC_PROMPT_PROPERTIES weather_base_temperature_properties =
GX_PROMPT_PROPERTIES weather_base_degree_lable_properties =
{
GX_STRING_ID_STRING_16, /* string id */
GX_FONT_ID_SYSTEM, /* font id */
GX_FONT_ID_NORMAL, /* font id */
GX_COLOR_ID_TEXT, /* normal text color */
GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
@ -2884,7 +2888,7 @@ GX_CONST GX_STUDIO_WIDGET weather_base_degree_lable_define =
gx_studio_prompt_create, /* create function */
GX_NULL, /* drawing function override */
GX_NULL, /* event function override */
{395, 195, 406, 212}, /* widget size */
{398, 180, 414, 202}, /* widget size */
&weather_base_weather_win_define, /* next widget definition */
GX_NULL, /* no child widgets */
offsetof(WEATHER_BASE_CONTROL_BLOCK, weather_base_degree_lable), /* control block */
@ -5281,7 +5285,7 @@ GX_CONST GX_STUDIO_WIDGET main_screen_lower_dot_define =
gx_studio_icon_create, /* create function */
GX_NULL, /* drawing function override */
GX_NULL, /* event function override */
{281, 196, 287, 202}, /* widget size */
{281, 176, 287, 182}, /* widget size */
GX_NULL, /* no next widget */
GX_NULL, /* no child widgets */
offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_lower_dot), /* control block */

View File

@ -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.1.8.0 */
/* Date (dd.mm.yyyy): 26. 7.2021 Time (hh:mm): 15:32 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 7. 4.2022 Time (hh:mm): 16:12 */
/*******************************************************************************/

View File

@ -24,6 +24,8 @@ static LIGHT_INFO light_info_list[] = {
};
extern GX_ANIMATION slide_animation;
extern int screen_animation_count;
UINT string_length_get(GX_CONST GX_CHAR* input_string, UINT max_string_length);
/******************************************************************************************/
@ -299,6 +301,27 @@ VOID lights_screen_animation_start()
}
}
/******************************************************************************************/
/* Stop all animations in lights screen. */
/******************************************************************************************/
VOID lights_screen_animation_stop()
{
LIGHT_INFO *info = light_info_list;
while (info->light)
{
if (info->light->base.gx_widget_status & GX_STATUS_VISIBLE)
{
/* Light controller is visible. */
gx_animation_delete(GX_NULL, (GX_WIDGET *)&info->light->base);
}
info++;
}
screen_animation_count = 0;
}
/******************************************************************************************/
/* Callback function of radial slider, which is called after every animation step. */
/******************************************************************************************/

View File

@ -38,6 +38,7 @@ static CONTROLLER_BASE_CONTROL_BLOCK *lock_controller_list[] = {
static LOCK_INFO lock_info = { GX_TRUE, GX_TRUE };
extern GX_ANIMATION slide_animation;
extern int screen_animation_count;
/******************************************************************************************/
/* Custom button select function. */
@ -501,6 +502,36 @@ VOID locks_screen_animation_start()
}
}
/******************************************************************************************/
/* Stop all animations in locks screen. */
/******************************************************************************************/
VOID locks_screen_animation_stop()
{
CONTROLLER_BASE_CONTROL_BLOCK* lock_controller;
INT index = 0;
while (1)
{
lock_controller = lock_controller_list[index];
if (lock_controller)
{
if (lock_controller->gx_widget_status & GX_STATUS_VISIBLE)
{
gx_animation_delete(GX_NULL, (GX_WIDGET*)lock_controller);
}
index++;
}
else
{
break;
}
}
screen_animation_count = 0;
}
/******************************************************************************************/
/* Initiate lock screen information. */
/******************************************************************************************/

View File

@ -144,8 +144,7 @@ UINT passcode_screen_event_process(GX_WINDOW *window, GX_EVENT *event_ptr)
break;
case GX_SIGNAL(ID_CLOSE, GX_EVENT_CLICKED):
gx_widget_attach(window->gx_widget_parent, app_info.current_screen);
gx_widget_detach(window);
toggle_screen(app_info.previous_screen);
break;
default:

View File

@ -115,7 +115,6 @@ int screen_animation_count = 0;
static GX_BOOL is_animation_active()
{
if (page_slide_animation_count ||
screen_animation_count ||
slide_animation.gx_animation_status != GX_ANIMATION_IDLE)
{
return GX_TRUE;
@ -228,7 +227,7 @@ VOID title_animation_start(CONTROLLER_BASE_CONTROL_BLOCK *base)
info.gx_animation_target = target;
info.gx_animation_start_alpha = 255;
info.gx_animation_end_alpha = 255;
info.gx_animation_steps = 400 / GX_SYSTEM_TIMER_MS;
info.gx_animation_steps = 100 / GX_SYSTEM_TIMER_MS;
info.gx_animation_frame_interval = 2;
info.gx_animation_start_position.gx_point_x = base->gx_widget_size.gx_rectangle_left + 22;
info.gx_animation_start_position.gx_point_y = base->gx_widget_size.gx_rectangle_top - 18;
@ -261,7 +260,7 @@ static VOID slide_animation_start(GX_WINDOW *window)
slide_animation_info.gx_animation_style = GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_HORIZONTAL | GX_ANIMATION_WRAP | GX_ANIMATION_SINE_EASE_OUT;
slide_animation_info.gx_animation_id = ANIMATION_ID_DRAG_SLIDE;
slide_animation_info.gx_animation_frame_interval = 1;
slide_animation_info.gx_animation_steps = 600 / GX_SYSTEM_TIMER_MS;
slide_animation_info.gx_animation_steps = 400 / GX_SYSTEM_TIMER_MS;
slide_animation_info.gx_animation_slide_screen_list = info->window_list;
gx_animation_drag_enable(&slide_animation, (GX_WIDGET *)window, &slide_animation_info);
@ -668,6 +667,35 @@ UINT screen_base_event_process(GX_WINDOW *window, GX_EVENT *event_ptr)
gx_window_event_process(window, event_ptr);
break;
case GX_EVENT_HIDE:
switch (window->gx_widget_id)
{
case ID_LIGHTS_SCREEN:
lights_screen_animation_stop();
break;
case ID_THERMOSTAT_SCREEN:
thermostat_screen_animation_stop();
break;
case ID_LOCKS_SCREEN:
locks_screen_animation_stop();
break;
case ID_WEATHER_SCREEN:
weather_screen_animation_stop();
break;
}
/* Delete footer animations. */
gx_animation_delete(GX_NULL, (GX_WIDGET *)window);
/* Disable drag slide animation. */
gx_animation_drag_disable(&slide_animation, (GX_WIDGET*)&((SCREEN_BASE_CONTROL_BLOCK*)window)->screen_base_slide_win);
gx_window_event_process(window, event_ptr);
break;
case GX_SIGNAL(ID_HOME, GX_EVENT_CLICKED):
if (!is_animation_active())
{
@ -680,8 +708,7 @@ UINT screen_base_event_process(GX_WINDOW *window, GX_EVENT *event_ptr)
if (!is_animation_active())
{
/* Toggle to passcode screen. */
gx_widget_attach(window->gx_widget_parent, (GX_WIDGET *)&passcode_screen);
gx_widget_detach(window);
toggle_screen((GX_WIDGET *)&passcode_screen);
}
break;
@ -710,7 +737,10 @@ UINT screen_base_event_process(GX_WINDOW *window, GX_EVENT *event_ptr)
break;
case GX_EVENT_ANIMATION_COMPLETE:
on_animation_complete(window, event_ptr);
if (window -> gx_widget_status & GX_STATUS_VISIBLE)
{
on_animation_complete(window, event_ptr);
}
break;
default:

View File

@ -28,6 +28,7 @@ static THERMOSTAT_INFO thermostat_info_list[] = {
/* This variable is used for screen slide animation. */
extern GX_ANIMATION slide_animation;
extern int screen_animation_count;
/******************************************************************************************/
/* Retrieve thermostat information with specified thermostat controller. */
@ -280,6 +281,26 @@ VOID thermostat_screen_animation_start()
}
}
/******************************************************************************************/
/* Stop all animations in thermostat screen. */
/******************************************************************************************/
VOID thermostat_screen_animation_stop()
{
THERMOSTAT_INFO* info = thermostat_info_list;
while (info->controller)
{
if (info->controller->base.gx_widget_status & GX_STATUS_VISIBLE)
{
gx_animation_delete(GX_NULL, (GX_WIDGET *)&info->controller->base);
}
info++;
}
screen_animation_count = 0;
}
/******************************************************************************************/
/* Callback function of radial slider, which is called after every animation step. */

View File

@ -79,15 +79,15 @@ typedef struct WEATHER_ANIMATION_INFO_STRUCT{
weather information page switches. */
WEATHER_ANIMATION_INFO animation_info_list[] = {
{ ID_WEATHER_WIN, 0, -128, 28, 23, 23 },
{ ID_WIND_WIN, 10, -128, 28, 110, 110 },
{ ID_HUMIDITY_WIN, 20, -128, 28, 197, 197 },
{ ID_WIND_WIN, 5, -128, 28, 110, 110 },
{ ID_HUMIDITY_WIN, 10, -128, 28, 197, 197 },
{ ID_THU_WIN, 0, 611, 434, 15, 15 },
{ ID_FRI_WIN, 10, 611, 434, 53, 53 },
{ ID_SAT_WIN, 20, 611, 434, 91, 91 },
{ ID_SUN_WIN, 30, 611, 434, 130, 130 },
{ ID_MON_WIN, 40, 611, 434, 168, 168 },
{ ID_TUE_WIN, 50, 611, 434, 206, 206 },
{ ID_WED_WIN, 60, 611, 434, 243, 243 },
{ ID_FRI_WIN, 5, 611, 434, 53, 53 },
{ ID_SAT_WIN, 10, 611, 434, 91, 91 },
{ ID_SUN_WIN, 15, 611, 434, 130, 130 },
{ ID_MON_WIN, 20, 611, 434, 168, 168 },
{ ID_TUE_WIN, 25, 611, 434, 206, 206 },
{ ID_WED_WIN, 30, 611, 434, 243, 243 },
{ ID_TITLE, 0, 200, 200, -42, 24 },
{ 0, 0, 0, 0, 0, 0 }
};
@ -227,7 +227,7 @@ static VOID start_weather_children_animation(WEATHER_INFO *info)
animation_info.gx_animation_style = 0;
animation_info.gx_animation_start_alpha = 255;
animation_info.gx_animation_end_alpha = 255;
animation_info.gx_animation_steps = 1000 / GX_SYSTEM_TIMER_MS;
animation_info.gx_animation_steps = 400 / GX_SYSTEM_TIMER_MS;
animation_info.gx_animation_frame_interval = 1;
/* Start animations descriped in animation information list. */
@ -305,6 +305,26 @@ VOID weather_screen_animation_start()
}
}
/******************************************************************************************/
/* Stop all animations in weather screen. */
/******************************************************************************************/
VOID weather_screen_animation_stop()
{
WEATHER_INFO* info = weather_info_list;
while (info->widget)
{
if (info->widget->gx_widget_status & GX_STATUS_VISIBLE)
{
gx_animation_delete(GX_NULL, (GX_WIDGET *)info->widget);
}
info++;
}
screen_animation_count = 0;
}
/******************************************************************************************/
/* Initiate weather screen information. */
/******************************************************************************************/

View File

@ -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.1.8.1 */
/* Date (dd.mm.yyyy): 27. 9.2021 Time (hh:mm): 11:07 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 23. 3.2022 Time (hh:mm): 14:56 */
/*******************************************************************************/
@ -364,6 +364,10 @@ UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_b
{
gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
}
else
{
gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
}
return status;
}

View File

@ -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.1.8.1 */
/* Date (dd.mm.yyyy): 27. 9.2021 Time (hh:mm): 11:07 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 23. 3.2022 Time (hh:mm): 14:56 */
/*******************************************************************************/
@ -70,6 +70,10 @@ UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_b
{
gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
}
else
{
gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
}
return status;
}

View File

@ -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.1.9.2 */
/* Date (dd.mm.yyyy): 28.12.2021 Time (hh:mm): 13:10 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 23. 3.2022 Time (hh:mm): 14:56 */
/*******************************************************************************/
@ -381,6 +381,10 @@ UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_b
{
gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
}
else
{
gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
}
return status;
}

View File

@ -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.1.8.1 */
/* Date (dd.mm.yyyy): 27. 9.2021 Time (hh:mm): 11:07 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 23. 3.2022 Time (hh:mm): 14:56 */
/*******************************************************************************/
@ -120,6 +120,10 @@ UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_b
{
gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
}
else
{
gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
}
return status;
}

View File

@ -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.1.8.1 */
/* Date (dd.mm.yyyy): 27. 9.2021 Time (hh:mm): 11:07 */
/* GUIX Studio Revision 6.1.10.1 */
/* Date (dd.mm.yyyy): 23. 3.2022 Time (hh:mm): 14:56 */
/*******************************************************************************/
@ -70,6 +70,10 @@ UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_b
{
gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
}
else
{
gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
}
return status;
}

View File

@ -11,10 +11,17 @@ extern UINT win32_graphics_driver_setup_24xrgb(GX_DISPLAY* display);
VOID start_guix(VOID);
VOID root_window_draw(GX_WINDOW* root);
UINT root_window_event_process(GX_WINDOW* window, GX_EVENT* event_ptr);
VOID demo_thread_entry(ULONG thread_input);
/* Create stack and control block for demo thread. */
static TX_THREAD demo_thread;
static ULONG demo_thread_stack[1024];
/* Define variables. */
GX_WINDOW_ROOT *root;
TIME system_time = {12, 9, 4, 15, 35, 0};
static INT screen_clock_record_hour = -1;
static INT screen_clock_record_minute = -1;
static TX_BYTE_POOL memory_pool;
static GX_UBYTE memory_pool_buffer[MEMORY_POOL_BUFFER_SIZE];
@ -60,31 +67,18 @@ static GX_WIDGET* page_3_screen_list[] = {
GX_NULL
};
static VOID (*default_buffer_toggle)(GX_CANVAS* canvas, GX_RECTANGLE* dirty) = GX_NULL;
#ifndef WIN32
#define USE_CANVAS_FOR_SCREEN_SLIDE_ANIMATION
#endif
/******************************************************************************************/
/* Define custom buffer toggle function to draw watch frame before toggle. */
/******************************************************************************************/
static VOID smart_watch_gx_win32_display_buffer_toggle(GX_CANVAS* canvas, GX_RECTANGLE* dirty)
{
GX_PIXELMAP* map = GX_NULL;
#ifdef USE_CANVAS_FOR_SCREEN_SLIDE_ANIMATION
#define ANIMATION_CANVAS_WIDTH (258 * 2)
#define ANIMATION_CANVAS_HEIGHT (289 * 2)
gx_canvas_drawing_initiate(canvas, root, &canvas->gx_canvas_dirty_area);
gx_context_pixelmap_get(GX_PIXELMAP_ID_WATCH, &map);
if (map)
{
/* Draw smart watch frame. */
gx_context_fill_color_set(GX_COLOR_ID_WHITE);
gx_canvas_pixelmap_draw((DISPLAY_1_X_RESOLUTION - map->gx_pixelmap_width) >> 1, 0, map);
}
gx_canvas_drawing_complete(canvas, GX_FALSE);
/* Call default win32 buffer toggle function. */
default_buffer_toggle(canvas, dirty);
}
GX_COLOR animation_canvas_memory[ANIMATION_CANVAS_WIDTH * ANIMATION_CANVAS_HEIGHT];
GX_CANVAS animation_canvas;
GX_WINDOW_ROOT animation_root;
#endif
/******************************************************************************************/
/* Application entry. */
@ -122,14 +116,21 @@ VOID memory_free(VOID *mem)
/******************************************************************************************/
VOID tx_application_define(void *first_unused_memory)
{
start_guix();
tx_thread_create(&demo_thread, "Demo Thread", demo_thread_entry, 0,
demo_thread_stack, sizeof(demo_thread_stack),
GX_SYSTEM_THREAD_PRIORITY + 1,
GX_SYSTEM_THREAD_PRIORITY + 1, TX_NO_TIME_SLICE, TX_AUTO_START);
}
/******************************************************************************************/
/* Initiate and run GUIX. */
/******************************************************************************************/
VOID start_guix(VOID)
VOID demo_thread_entry(ULONG thread_input)
{
#ifdef USE_CANVAS_FOR_SCREEN_SLIDE_ANIMATION
GX_RECTANGLE size;
#endif
/* Create byte pool*/
tx_byte_pool_create(&memory_pool, "memory_pol", memory_pool_buffer, MEMORY_POOL_BUFFER_SIZE);
@ -142,11 +143,6 @@ VOID start_guix(VOID)
/* Configure display. */
gx_studio_display_configure(DISPLAY_1, win32_graphics_driver_setup_24xrgb, LANGUAGE_ENGLISH, DISPLAY_1_THEME_1, &root);
default_buffer_toggle = root->gx_window_root_canvas->gx_canvas_display->gx_display_driver_buffer_toggle;
/* Reset buffer toggle function. */
root->gx_window_root_canvas->gx_canvas_display->gx_display_driver_buffer_toggle = smart_watch_gx_win32_display_buffer_toggle;
/* Create main screens. */
gx_studio_named_widget_create("main_screen", (GX_WIDGET *)root, GX_NULL);
gx_studio_named_widget_create("home_button", (GX_WIDGET*)root, GX_NULL);
@ -179,6 +175,8 @@ VOID start_guix(VOID)
gx_studio_named_widget_create("yoga_screen", GX_NULL, GX_NULL);
screens_initialize();
gx_studio_named_widget_create("screen_slide_parent", GX_NULL, GX_NULL);
/* Reset root window draw function. */
gx_widget_draw_set((GX_WIDGET *)root, root_window_draw);
@ -188,6 +186,20 @@ VOID start_guix(VOID)
/* Create slide animation control block. */
gx_animation_create(&slide_animation);
#ifdef USE_CANVAS_FOR_SCREEN_SLIDE_ANIMATION
gx_canvas_create(&animation_canvas, GX_NULL,
root->gx_window_root_canvas->gx_canvas_display,
GX_CANVAS_SIMPLE,
ANIMATION_CANVAS_WIDTH, ANIMATION_CANVAS_HEIGHT,
animation_canvas_memory, ANIMATION_CANVAS_WIDTH * ANIMATION_CANVAS_HEIGHT * sizeof(GX_COLOR));
gx_utility_rectangle_define(&size, 0, 0, ANIMATION_CANVAS_WIDTH - 1, ANIMATION_CANVAS_HEIGHT - 1);
gx_window_root_create(&animation_root, "animation_root", &animation_canvas, GX_STYLE_BORDER_NONE, GX_NULL, &size);
gx_canvas_hide(&animation_canvas);
gx_canvas_hardware_layer_bind(&animation_canvas, 2);
#endif
/* Show the root window. */
gx_widget_show(root);
@ -276,11 +288,16 @@ static GX_BOOL enable_vertical_slide_animation()
memset(&slide_animation_info, 0, sizeof(GX_ANIMATION_INFO));
slide_animation_info.gx_animation_parent = (GX_WIDGET*)&main_screen;
slide_animation_info.gx_animation_style = GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_VERTICAL | GX_ANIMATION_WRAP;
slide_animation_info.gx_animation_id = SCREEN_SLIDE_ANIMATION_ID;
slide_animation_info.gx_animation_style = GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_VERTICAL | GX_ANIMATION_WRAP | GX_ANIMATION_BLOCK_MOVE;
slide_animation_info.gx_animation_id = SCREEN_DRAG_ANIMATION_ID;
slide_animation_info.gx_animation_frame_interval = 20 / GX_SYSTEM_TIMER_MS;
slide_animation_info.gx_animation_slide_screen_list = container_screen_list;
slide_animation_info.gx_animation_start_alpha = 255;
slide_animation_info.gx_animation_end_alpha = 255;
#ifdef USE_CANVAS_FOR_SCREEN_SLIDE_ANIMATION
gx_animation_canvas_define(&slide_animation, &animation_canvas);
#endif
gx_animation_drag_enable(&slide_animation, (GX_WIDGET*)&main_screen, &slide_animation_info);
return GX_SUCCESS;
@ -300,11 +317,16 @@ static GX_BOOL enable_horizontal_slide_animation()
if (slide_animation_info.gx_animation_parent)
{
slide_animation_info.gx_animation_style = GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_HORIZONTAL | GX_ANIMATION_WRAP;
slide_animation_info.gx_animation_id = SCREEN_SLIDE_ANIMATION_ID;
slide_animation_info.gx_animation_style = GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_HORIZONTAL | GX_ANIMATION_WRAP | GX_ANIMATION_BLOCK_MOVE;
slide_animation_info.gx_animation_id = SCREEN_DRAG_ANIMATION_ID;
slide_animation_info.gx_animation_frame_interval = 20 / GX_SYSTEM_TIMER_MS;
slide_animation_info.gx_animation_slide_screen_list = get_page_screen_list(slide_animation_info.gx_animation_parent);
slide_animation_info.gx_animation_start_alpha = 255;
slide_animation_info.gx_animation_end_alpha = 255;
#ifdef USE_CANVAS_FOR_SCREEN_SLIDE_ANIMATION
gx_animation_canvas_define(&slide_animation, &animation_canvas);
#endif
/* Enable slide animation for the visible page container screen. */
gx_animation_drag_enable(&slide_animation, slide_animation_info.gx_animation_parent, &slide_animation_info);
@ -344,6 +366,49 @@ static VOID system_clock_update()
#endif
}
/******************************************************************************************/
/* Clear time record of screens. */
/******************************************************************************************/
VOID clear_screen_clock_record()
{
screen_clock_record_hour = -1;
screen_clock_record_minute = -1;
}
/******************************************************************************************/
/* Update screen clock. */
/******************************************************************************************/
VOID screen_clock_update(GX_NUMERIC_PROMPT *hour, GX_NUMERIC_PROMPT *minute, GX_PROMPT *second)
{
GX_RESOURCE_ID text_color_id;
if (screen_clock_record_hour != system_time.hour)
{
gx_numeric_prompt_value_set(hour, system_time.hour);
screen_clock_record_hour = system_time.hour;
}
if (screen_clock_record_minute != system_time.minute)
{
gx_numeric_prompt_value_set(minute, system_time.minute);
screen_clock_record_minute = system_time.minute;
}
if (second)
{
if (system_time.second & 0x1)
{
text_color_id = GX_COLOR_ID_WHITE;
}
else
{
text_color_id = GX_COLOR_ID_GRAY;
}
gx_prompt_text_color_set(second, text_color_id, text_color_id, text_color_id);
}
}
/******************************************************************************************/
/* Send event to current screen. */
/******************************************************************************************/
@ -363,7 +428,7 @@ static VOID send_event_to_current_screen(INT event_type)
memset(&myevent, 0, sizeof(GX_EVENT));
myevent.gx_event_type = event_type;
myevent.gx_event_target = parent;
gx_system_event_send(&myevent);
parent->gx_widget_event_process_function(parent, &myevent);
}
}
@ -412,7 +477,8 @@ VOID page_screen_slide(GX_WIDGET *current_screen, GX_WIDGET *target_screen)
INT index = 0;
GX_ANIMATION *animation;
GX_ANIMATION_INFO animation_info;
GX_RECTANGLE *size;
GX_RECTANGLE *parent_size;
GX_RECTANGLE size;
INT width;
INT distance;
@ -421,6 +487,8 @@ VOID page_screen_slide(GX_WIDGET *current_screen, GX_WIDGET *target_screen)
return;
}
send_event_to_current_screen(USER_EVENT_ANIMATION_STOP);
/* Find the visible page container screen. */
screen_container = find_visible_screen_of_screen_list(container_screen_list);
@ -441,10 +509,23 @@ VOID page_screen_slide(GX_WIDGET *current_screen, GX_WIDGET *target_screen)
index++;
}
size = &screen_container->gx_widget_size;
width = size->gx_rectangle_right - size->gx_rectangle_left + 1;
parent_size = &screen_container->gx_widget_size;
width = parent_size->gx_rectangle_right - parent_size->gx_rectangle_left + 1;
distance = width * (target_screen_index - current_screen_index);
size = *parent_size;
if (target_screen_index > current_screen_index)
{
size.gx_rectangle_right = size.gx_rectangle_left + distance + width - 1;
}
else
{
size.gx_rectangle_left = size.gx_rectangle_right + distance - width + 1;
}
gx_widget_resize(&screen_slide_parent, &size);
memset(&animation_info, 0, sizeof(GX_ANIMATION_INFO));
animation_info.gx_animation_frame_interval = 1;
animation_info.gx_animation_id = SCREEN_SLIDE_ANIMATION_ID;
@ -452,20 +533,25 @@ VOID page_screen_slide(GX_WIDGET *current_screen, GX_WIDGET *target_screen)
animation_info.gx_animation_start_alpha = 255;
animation_info.gx_animation_end_alpha = 255;
animation_info.gx_animation_parent = screen_container;
animation_info.gx_animation_start_position.gx_point_y = size->gx_rectangle_top;
animation_info.gx_animation_end_position.gx_point_y = size->gx_rectangle_top;
animation_info.gx_animation_style = GX_ANIMATION_TRANSLATE | GX_ANIMATION_DETACH;
animation_info.gx_animation_target = (GX_WIDGET *)&screen_slide_parent;
animation_info.gx_animation_start_position.gx_point_x = size.gx_rectangle_left;
animation_info.gx_animation_start_position.gx_point_y = size.gx_rectangle_top;
animation_info.gx_animation_end_position.gx_point_x= size.gx_rectangle_left - distance;
animation_info.gx_animation_end_position.gx_point_y = size.gx_rectangle_top;
animation_info.gx_animation_style = GX_ANIMATION_TRANSLATE | GX_ANIMATION_BLOCK_MOVE;
index = current_screen_index;
while (index != target_screen_index)
while (1)
{
animation_info.gx_animation_target = screen_list[index];
animation_info.gx_animation_start_position.gx_point_x = size->gx_rectangle_left + (width * (index - current_screen_index));
animation_info.gx_animation_end_position.gx_point_x = animation_info.gx_animation_start_position.gx_point_x - distance;
gx_widget_attach(&screen_slide_parent, screen_list[index]);
if (gx_system_animation_get(&animation) == GX_SUCCESS)
size.gx_rectangle_left = parent_size->gx_rectangle_left + (width * (index - current_screen_index));
size.gx_rectangle_right = size.gx_rectangle_left + width - 1;
gx_widget_resize(screen_list[index], &size);
if (index == target_screen_index)
{
gx_animation_start(animation, &animation_info);
break;
}
if (current_screen_index < target_screen_index)
@ -478,12 +564,10 @@ VOID page_screen_slide(GX_WIDGET *current_screen, GX_WIDGET *target_screen)
}
}
animation_info.gx_animation_target = screen_list[index];
animation_info.gx_animation_style = GX_ANIMATION_TRANSLATE;
animation_info.gx_animation_start_position.gx_point_x = size->gx_rectangle_left + distance;
animation_info.gx_animation_end_position.gx_point_x = size->gx_rectangle_left;
gx_animation_start(&slide_animation, &animation_info);
if (gx_system_animation_get(&animation) == GX_SUCCESS)
{
gx_animation_start(animation, &animation_info);
}
}
/******************************************************************************************/
@ -499,7 +583,8 @@ VOID container_screen_slide(GX_WIDGET* current_screen, GX_WIDGET* target_screen)
INT index = 0;
GX_ANIMATION* animation;
GX_ANIMATION_INFO animation_info;
GX_RECTANGLE* size;
GX_RECTANGLE *parent_size;
GX_RECTANGLE size;
INT height;
INT distance;
GX_WIDGET* child = GX_NULL;
@ -509,6 +594,8 @@ VOID container_screen_slide(GX_WIDGET* current_screen, GX_WIDGET* target_screen)
return;
}
send_event_to_current_screen(USER_EVENT_ANIMATION_STOP);
/* Find the visible page container screen. */
current_screen_container = find_visible_screen_of_screen_list(container_screen_list);
target_screen_container = get_screen_container(target_screen);
@ -540,10 +627,23 @@ VOID container_screen_slide(GX_WIDGET* current_screen, GX_WIDGET* target_screen)
index++;
}
size = &main_screen.gx_widget_size;
height = size->gx_rectangle_bottom - size->gx_rectangle_top + 1;
parent_size = &main_screen.gx_widget_size;
height = parent_size->gx_rectangle_bottom - parent_size->gx_rectangle_top + 1;
distance = height * (target_screen_index - current_screen_index);
size = *parent_size;
if (target_screen_index > current_screen_index)
{
size.gx_rectangle_bottom = size.gx_rectangle_top + distance + height - 1;
}
else
{
size.gx_rectangle_top = size.gx_rectangle_bottom + distance - height + 1;
}
gx_widget_resize(&screen_slide_parent, &size);
memset(&animation_info, 0, sizeof(GX_ANIMATION_INFO));
animation_info.gx_animation_frame_interval = 1;
animation_info.gx_animation_id = SCREEN_SLIDE_ANIMATION_ID;
@ -551,20 +651,26 @@ VOID container_screen_slide(GX_WIDGET* current_screen, GX_WIDGET* target_screen)
animation_info.gx_animation_start_alpha = 255;
animation_info.gx_animation_end_alpha = 255;
animation_info.gx_animation_parent = (GX_WIDGET *)&main_screen;
animation_info.gx_animation_start_position.gx_point_x = size->gx_rectangle_left;
animation_info.gx_animation_end_position.gx_point_x = size->gx_rectangle_left;
animation_info.gx_animation_style = GX_ANIMATION_TRANSLATE | GX_ANIMATION_DETACH;
animation_info.gx_animation_target = (GX_WIDGET *)&screen_slide_parent;
animation_info.gx_animation_start_position.gx_point_x = size.gx_rectangle_left;
animation_info.gx_animation_start_position.gx_point_y = size.gx_rectangle_top;
animation_info.gx_animation_end_position.gx_point_x = size.gx_rectangle_left;
animation_info.gx_animation_end_position.gx_point_y = size.gx_rectangle_top - distance;
animation_info.gx_animation_style = GX_ANIMATION_TRANSLATE | GX_ANIMATION_BLOCK_MOVE;
index = current_screen_index;
while(index != target_screen_index)
{
animation_info.gx_animation_target = screen_list[index];
animation_info.gx_animation_start_position.gx_point_y = size->gx_rectangle_top + (height * (index - current_screen_index));
animation_info.gx_animation_end_position.gx_point_y = animation_info.gx_animation_start_position.gx_point_y - distance;
if (gx_system_animation_get(&animation) == GX_SUCCESS)
while(1)
{
gx_widget_attach(&screen_slide_parent, screen_list[index]);
size.gx_rectangle_top = parent_size->gx_rectangle_top + (height * (index - current_screen_index));
size.gx_rectangle_bottom = size.gx_rectangle_top + height - 1;
gx_widget_resize(screen_list[index], &size);
if (index == target_screen_index)
{
gx_animation_start(animation, &animation_info);
break;
}
if (current_screen_index < target_screen_index)
@ -577,12 +683,10 @@ VOID container_screen_slide(GX_WIDGET* current_screen, GX_WIDGET* target_screen)
}
}
animation_info.gx_animation_target = screen_list[index];
animation_info.gx_animation_style = GX_ANIMATION_TRANSLATE;
animation_info.gx_animation_start_position.gx_point_y = size->gx_rectangle_top + distance;
animation_info.gx_animation_end_position.gx_point_y = size->gx_rectangle_top;
gx_animation_start(&slide_animation, &animation_info);
if (gx_system_animation_get(&animation) == GX_SUCCESS)
{
gx_animation_start(animation, &animation_info);
}
}
/******************************************************************************************/
@ -613,6 +717,15 @@ VOID root_window_draw(GX_WINDOW* root)
/* Draw logo. */
gx_canvas_pixelmap_draw(15, 15, map);
}
gx_context_pixelmap_get(GX_PIXELMAP_ID_WATCH, &map);
if (map)
{
/* Draw smart watch frame. */
gx_context_fill_color_set(GX_COLOR_ID_WHITE);
gx_canvas_pixelmap_draw((DISPLAY_1_X_RESOLUTION - map->gx_pixelmap_width) >> 1, 0, map);
}
}
/******************************************************************************************/
@ -654,8 +767,14 @@ UINT main_screen_event_process(GX_WINDOW* window, GX_EVENT* event_ptr)
/* Start a timer to update time. */
gx_system_timer_start(window, SYSTEM_CLOCK_TIMER_ID, GX_TICKS_SECOND, GX_TICKS_SECOND);
status = gx_window_event_process(window, event_ptr);
return gx_window_event_process(window, event_ptr);
if(home_screen.gx_widget_status & GX_STATUS_VISIBLE)
{
gx_sprite_start(&home_screen.home_screen_sprite, 0);
}
break;
case GX_EVENT_TIMER:
if (event_ptr->gx_event_payload.gx_event_timer_id == SYSTEM_CLOCK_TIMER_ID)
@ -708,13 +827,25 @@ UINT main_screen_event_process(GX_WINDOW* window, GX_EVENT* event_ptr)
break;
case GX_EVENT_ANIMATION_COMPLETE:
if (event_ptr->gx_event_sender == SCREEN_SLIDE_ANIMATION_ID)
if (event_ptr->gx_event_sender == SCREEN_DRAG_ANIMATION_ID)
{
/* Disable slide animation. */
gx_animation_drag_disable(&slide_animation, slide_animation.gx_animation_info.gx_animation_parent);
send_event_to_current_screen(USER_EVENT_ANIMATION_START);
}
else if (event_ptr->gx_event_sender == SCREEN_SLIDE_ANIMATION_ID)
{
gx_widget_attach(screen_slide_parent.gx_widget_parent, screen_slide_parent.gx_widget_last_child);
parent = screen_slide_parent.gx_widget_first_child;
while (parent)
{
gx_widget_detach(parent);
parent = parent->gx_widget_next;
}
gx_widget_detach(&screen_slide_parent);
send_event_to_current_screen(USER_EVENT_ANIMATION_START);
}
break;
case GX_EVENT_PEN_UP:
@ -730,5 +861,5 @@ UINT main_screen_event_process(GX_WINDOW* window, GX_EVENT* event_ptr)
return gx_window_event_process((GX_WINDOW*)window, event_ptr);
}
return 0;
return status;
}

View File

@ -10,8 +10,9 @@
#define FITNESS_SCREEN_CHART_TIMER_ID 3
#define SCREEN_ANIMATION_TIMER_ID 4
#define SCREEN_SLIDE_ANIMATION_ID 1
#define SCREEN_DRAG_ANIMATION_ID 1
#define CLOCK_SLIDE_ANIMATION_ID 2
#define SCREEN_SLIDE_ANIMATION_ID 3
#define USER_EVENT_ANIMATION_START GX_FIRST_APP_EVENT
#define USER_EVENT_ANIMATION_STOP GX_FIRST_APP_EVENT + 1
@ -35,6 +36,8 @@ typedef struct TIME_STRUCT {
VOID *memory_allocate(ULONG size);
VOID memory_free(VOID *mem);
VOID clear_screen_clock_record();
VOID screen_clock_update(GX_NUMERIC_PROMPT* hour, GX_NUMERIC_PROMPT* minute, GX_PROMPT* second);
VOID page_screen_slide(GX_WIDGET *current_screen, GX_WIDGET *target_screen);
VOID container_screen_slide(GX_WIDGET *current_screen, GX_WIDGET *target_screen);
VOID screens_initialize();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -4,7 +4,7 @@
<header>
<project_version>55</project_version>
<guix_version>60109</guix_version>
<studio_version>6010902</studio_version>
<studio_version>6011000</studio_version>
<project_name>guix_smart_watch</project_name>
<source_path>.\</source_path>
<header_path>.\</header_path>
@ -3034,7 +3034,7 @@
</pathinfo>
<is_default>FALSE</is_default>
<enabled>TRUE</enabled>
<compress>TRUE</compress>
<compress>FALSE</compress>
<alpha>TRUE</alpha>
<dither>FALSE</dither>
<raw>FALSE</raw>
@ -3051,7 +3051,7 @@
</pathinfo>
<is_default>FALSE</is_default>
<enabled>TRUE</enabled>
<compress>TRUE</compress>
<compress>FALSE</compress>
<alpha>TRUE</alpha>
<dither>FALSE</dither>
<raw>FALSE</raw>
@ -3085,7 +3085,7 @@
</pathinfo>
<is_default>FALSE</is_default>
<enabled>TRUE</enabled>
<compress>TRUE</compress>
<compress>FALSE</compress>
<alpha>FALSE</alpha>
<dither>FALSE</dither>
<raw>FALSE</raw>
@ -3833,6 +3833,24 @@
<widget_folder>
<folder_name>default_folder</folder_name>
<widget>
<type>window</type>
<app_name>screen_slide_parent</app_name>
<size>
<left>0</left>
<top>0</top>
<right>257</right>
<bottom>288</bottom>
</size>
<style>1073741824</style>
<allocation>0</allocation>
<accepts_focus>TRUE</accepts_focus>
<normal_fill_color>WINDOW_FILL</normal_fill_color>
<selected_fill_color>WINDOW_FILL</selected_fill_color>
<disabled_fill_color>DISABLED_FILL</disabled_fill_color>
<template>FALSE</template>
<visible_at_startup>FALSE</visible_at_startup>
</widget>
<widget>
<type>pixelmap_button</type>
<app_name>home_button</app_name>
<size>
@ -3862,7 +3880,7 @@
<right>442</right>
<bottom>384</bottom>
</size>
<style>1342177280</style>
<style>1073741824</style>
<allocation>0</allocation>
<accepts_focus>TRUE</accepts_focus>
<normal_fill_color>WINDOW_FILL</normal_fill_color>
@ -3881,7 +3899,7 @@
<right>442</right>
<bottom>384</bottom>
</size>
<style>1342177280</style>
<style>1073741824</style>
<allocation>0</allocation>
<accepts_focus>TRUE</accepts_focus>
<normal_fill_color>WINDOW_FILL</normal_fill_color>
@ -3900,7 +3918,7 @@
<right>442</right>
<bottom>384</bottom>
</size>
<style>1342177280</style>
<style>1073741824</style>
<allocation>0</allocation>
<accepts_focus>TRUE</accepts_focus>
<normal_fill_color>WINDOW_FILL</normal_fill_color>
@ -3919,7 +3937,7 @@
<right>442</right>
<bottom>384</bottom>
</size>
<style>1342177280</style>
<style>1073741824</style>
<allocation>0</allocation>
<accepts_focus>TRUE</accepts_focus>
<normal_fill_color>WINDOW_FILL</normal_fill_color>
@ -8153,7 +8171,7 @@
<right>442</right>
<bottom>384</bottom>
</size>
<style>1073741872</style>
<style>1073741856</style>
<allocation>0</allocation>
<accepts_focus>TRUE</accepts_focus>
<normal_fill_color>WIDGET_FILL</normal_fill_color>

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,8 @@
/* resource 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.1.9.2 */
/* Date (dd.mm.yyyy): 28.12.2021 Time (hh:mm): 11:00 */
/* GUIX Studio Revision 6.1.10.0 */
/* Date (dd.mm.yyyy): 16. 2.2022 Time (hh:mm): 14:44 */
/*******************************************************************************/

View File

@ -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.1.9.2 */
/* Date (dd.mm.yyyy): 28.12.2021 Time (hh:mm): 11:00 */
/* GUIX Studio Revision 6.1.10.0 */
/* Date (dd.mm.yyyy): 11. 4.2022 Time (hh:mm): 09:30 */
/*******************************************************************************/
@ -16,6 +16,7 @@
#include "guix_smart_watch_specifications.h"
static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
SCREEN_SLIDE_PARENT_CONTROL_BLOCK screen_slide_parent;
HOME_BUTTON_CONTROL_BLOCK home_button;
PAGE_3_CONTAINER_SCREEN_CONTROL_BLOCK page_3_container_screen;
PAGE_2_CONTAINER_SCREEN_CONTROL_BLOCK page_2_container_screen;
@ -297,6 +298,34 @@ UINT gx_studio_template_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *contr
}
return status;
}
GX_WINDOW_PROPERTIES screen_slide_parent_properties =
{
0 /* wallpaper pixelmap id */
};
GX_CONST GX_STUDIO_WIDGET screen_slide_parent_define =
{
"screen_slide_parent",
GX_TYPE_WINDOW, /* widget type */
GX_ID_NONE, /* widget id */
#if defined(GX_WIDGET_USER_DATA)
0, /* user data */
#endif
GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED, /* style flags */
GX_STATUS_ACCEPTS_FOCUS, /* status flags */
sizeof(SCREEN_SLIDE_PARENT_CONTROL_BLOCK), /* control block size */
GX_COLOR_ID_WINDOW_FILL, /* normal color id */
GX_COLOR_ID_WINDOW_FILL, /* selected color id */
GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
gx_studio_window_create, /* create function */
GX_NULL, /* drawing function override */
GX_NULL, /* event function override */
{0, 0, 257, 288}, /* widget size */
GX_NULL, /* next widget */
GX_NULL, /* child widget */
0, /* control block */
(void *) &screen_slide_parent_properties /* extended properties */
};
GX_PIXELMAP_BUTTON_PROPERTIES home_button_properties =
{
GX_PIXELMAP_ID_WATCH_HOME_BUTTON, /* normal pixelmap id */
@ -340,7 +369,7 @@ GX_CONST GX_STUDIO_WIDGET page_3_container_screen_define =
#if defined(GX_WIDGET_USER_DATA)
0, /* user data */
#endif
GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED, /* style flags */
GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED, /* style flags */
GX_STATUS_ACCEPTS_FOCUS, /* status flags */
sizeof(PAGE_3_CONTAINER_SCREEN_CONTROL_BLOCK), /* control block size */
GX_COLOR_ID_WINDOW_FILL, /* normal color id */
@ -368,7 +397,7 @@ GX_CONST GX_STUDIO_WIDGET page_2_container_screen_define =
#if defined(GX_WIDGET_USER_DATA)
0, /* user data */
#endif
GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED, /* style flags */
GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED, /* style flags */
GX_STATUS_ACCEPTS_FOCUS, /* status flags */
sizeof(PAGE_2_CONTAINER_SCREEN_CONTROL_BLOCK), /* control block size */
GX_COLOR_ID_WINDOW_FILL, /* normal color id */
@ -396,7 +425,7 @@ GX_CONST GX_STUDIO_WIDGET page_1_container_screen_define =
#if defined(GX_WIDGET_USER_DATA)
0, /* user data */
#endif
GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED, /* style flags */
GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED, /* style flags */
GX_STATUS_ACCEPTS_FOCUS, /* status flags */
sizeof(PAGE_1_CONTAINER_SCREEN_CONTROL_BLOCK), /* control block size */
GX_COLOR_ID_WINDOW_FILL, /* normal color id */
@ -424,7 +453,7 @@ GX_CONST GX_STUDIO_WIDGET main_screen_define =
#if defined(GX_WIDGET_USER_DATA)
0, /* user data */
#endif
GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED, /* style flags */
GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED, /* style flags */
GX_STATUS_ACCEPTS_FOCUS, /* status flags */
sizeof(MAIN_SCREEN_CONTROL_BLOCK), /* control block size */
GX_COLOR_ID_WINDOW_FILL, /* normal color id */
@ -5925,7 +5954,7 @@ GX_CONST GX_STUDIO_WIDGET home_screen_sprite_define =
#if defined(GX_WIDGET_USER_DATA)
0, /* user data */
#endif
GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_SPRITE_AUTO|GX_STYLE_SPRITE_LOOP, /* style flags */
GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_SPRITE_LOOP, /* style flags */
GX_STATUS_ACCEPTS_FOCUS, /* status flags */
sizeof(GX_SPRITE), /* control block size */
GX_COLOR_ID_WIDGET_FILL, /* normal color id */
@ -6902,6 +6931,7 @@ GX_CONST GX_STUDIO_WIDGET SanDiego_weather_screen_define =
};
GX_CONST GX_STUDIO_WIDGET_ENTRY guix_smart_watch_widget_table[] =
{
{ &screen_slide_parent_define, (GX_WIDGET *) &screen_slide_parent },
{ &home_button_define, (GX_WIDGET *) &home_button },
{ &page_3_container_screen_define, (GX_WIDGET *) &page_3_container_screen },
{ &page_2_container_screen_define, (GX_WIDGET *) &page_2_container_screen },

View File

@ -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.1.9.2 */
/* Date (dd.mm.yyyy): 28.12.2021 Time (hh:mm): 11:00 */
/* GUIX Studio Revision 6.1.10.0 */
/* Date (dd.mm.yyyy): 11. 4.2022 Time (hh:mm): 09:30 */
/*******************************************************************************/
@ -167,6 +167,11 @@ typedef struct
/* Declare top-level control blocks */
typedef struct SCREEN_SLIDE_PARENT_CONTROL_BLOCK_STRUCT
{
GX_WINDOW_MEMBERS_DECLARE
} SCREEN_SLIDE_PARENT_CONTROL_BLOCK;
typedef struct HOME_BUTTON_CONTROL_BLOCK_STRUCT
{
GX_PIXELMAP_BUTTON_MEMBERS_DECLARE
@ -487,6 +492,7 @@ typedef struct SANDIEGO_WEATHER_SCREEN_CONTROL_BLOCK_STRUCT
/* extern statically defined control blocks */
#ifndef GUIX_STUDIO_GENERATED_FILE
extern SCREEN_SLIDE_PARENT_CONTROL_BLOCK screen_slide_parent;
extern HOME_BUTTON_CONTROL_BLOCK home_button;
extern PAGE_3_CONTAINER_SCREEN_CONTROL_BLOCK page_3_container_screen;
extern PAGE_2_CONTAINER_SCREEN_CONTROL_BLOCK page_2_container_screen;

View File

@ -3,7 +3,6 @@
#define ANIMATION_TOTAL_STEPS 20
#define CAL_ANIMATION_VAL(val) ((val) * animation_step / ANIMATION_TOTAL_STEPS)
extern TIME system_time;
static INT animation_step = 0;
/******************************************************************************************/
@ -63,28 +62,6 @@ static void animation_update()
}
}
/******************************************************************************************/
/* Update title bar clock. */
/******************************************************************************************/
static VOID update_title_clock()
{
GX_RESOURCE_ID text_color_id;
gx_numeric_prompt_value_set(&weather_screen.weather_screen_hour, system_time.hour);
gx_numeric_prompt_value_set(&weather_screen.weather_screen_minute, system_time.minute);
if (system_time.second & 0x1)
{
text_color_id = GX_COLOR_ID_WHITE;
}
else
{
text_color_id = GX_COLOR_ID_GRAY;
}
gx_prompt_text_color_set(&weather_screen.weather_screen_second, text_color_id, text_color_id, text_color_id);
}
/******************************************************************************************/
/* Override the default event processing of "weather_screen" to handle signals from my */
/* child widgets. */
@ -95,7 +72,8 @@ UINT weather_screen_event_process(GX_WINDOW* window, GX_EVENT* event_ptr)
{
case GX_EVENT_SHOW:
screen_data_reset();
update_title_clock();
clear_screen_clock_record();
screen_clock_update(&weather_screen.weather_screen_hour, &weather_screen.weather_screen_minute, &weather_screen.weather_screen_second);
weather_screen_music_progress_update();
gx_system_timer_start(window, SCREEN_CLOCK_TIMER_ID, GX_TICKS_SECOND, GX_TICKS_SECOND);
return gx_window_event_process(window, event_ptr);
@ -116,7 +94,7 @@ UINT weather_screen_event_process(GX_WINDOW* window, GX_EVENT* event_ptr)
break;
case SCREEN_CLOCK_TIMER_ID:
update_title_clock((SCREEN_TEMPLATE_CONTROL_BLOCK*)window);
screen_clock_update(&weather_screen.weather_screen_hour, &weather_screen.weather_screen_minute, &weather_screen.weather_screen_second);
weather_screen_music_progress_update();
break;
}

View File

@ -94,10 +94,10 @@ UINT weather_screen_template_event_process(GX_WINDOW *window, GX_EVENT *event_pt
{
case GX_EVENT_SHOW:
update_screen_weather_info((WEATHER_SCREEN_TEMPLATE_CONTROL_BLOCK *)window);
return gx_window_event_process(window, event_ptr);
return screen_template_event_process(window, event_ptr);
default:
return gx_window_event_process(window, event_ptr);
return screen_template_event_process(window, event_ptr);
}
return 0;

View File

@ -22,21 +22,9 @@
/* 310 <- 230 */
/********************************************/
/* Extern system time. */
extern TIME system_time;
/* Define rotate angle for background animation. */
static INT rotate_angle = 50;
/******************************************************************************************/
/* Update clock time. */
/******************************************************************************************/
static VOID screen_clock_update()
{
gx_numeric_prompt_value_set(&clock_3_screen.clock_3_screen_hour, system_time.hour);
gx_numeric_prompt_value_set(&clock_3_screen.clock_3_screen_minute, system_time.minute);
}
/******************************************************************************************/
/* Update rotate angle. */
/******************************************************************************************/
@ -60,7 +48,7 @@ UINT clock_3_screen_event_process(GX_WINDOW* window, GX_EVENT* event_ptr)
switch (event_ptr->gx_event_type)
{
case GX_EVENT_SHOW:
screen_clock_update();
screen_clock_update(&clock_3_screen.clock_3_screen_hour, &clock_3_screen.clock_3_screen_minute, GX_NULL);
gx_system_timer_start(window, SCREEN_CLOCK_TIMER_ID, GX_TICKS_SECOND, GX_TICKS_SECOND);
return gx_window_event_process(window, event_ptr);
@ -76,7 +64,7 @@ UINT clock_3_screen_event_process(GX_WINDOW* window, GX_EVENT* event_ptr)
switch (event_ptr->gx_event_payload.gx_event_timer_id)
{
case SCREEN_CLOCK_TIMER_ID:
screen_clock_update();
screen_clock_update(&clock_3_screen.clock_3_screen_hour, &clock_3_screen.clock_3_screen_minute, GX_NULL);
break;
case SCREEN_ANIMATION_TIMER_ID:

View File

@ -2,21 +2,12 @@
#define CLOCK_SLIDE_SHIFT 30
/* Extern system time. */
extern TIME system_time;
#define TARGET_XPOS_MIN 227
#define TARGET_XPOS_MAX (TARGET_XPOS_MIN + CLOCK_SLIDE_SHIFT)
/* Define clock slide animation control blocks. */
static GX_ANIMATION clock_slide_animation[2];
/******************************************************************************************/
/* Update clock time. */
/******************************************************************************************/
static VOID screen_clock_update()
{
gx_numeric_prompt_value_set(&clock_4_screen.clock_4_screen_hour, system_time.hour);
gx_numeric_prompt_value_set(&clock_4_screen.clock_4_screen_minute, system_time.minute);
}
/******************************************************************************************/
/* Start clock slide animation. */
/******************************************************************************************/
@ -25,15 +16,18 @@ static void clock_slide_animation_start()
GX_ANIMATION_INFO info;
GX_WIDGET *target_hour = (GX_WIDGET*)&clock_4_screen.clock_4_screen_hour;
GX_WIDGET *target_minute = (GX_WIDGET*)&clock_4_screen.clock_4_screen_minute;
INT sign;
GX_VALUE hour_end_xpos;
GX_VALUE minute_end_xpos;
if (target_hour->gx_widget_size.gx_rectangle_left < target_minute->gx_widget_size.gx_rectangle_left)
{
sign = 1;
hour_end_xpos = TARGET_XPOS_MAX;
minute_end_xpos = TARGET_XPOS_MIN;
}
else
{
sign = -1;
hour_end_xpos = TARGET_XPOS_MIN;
minute_end_xpos = TARGET_XPOS_MAX;
}
memset(&info, 0, sizeof(GX_ANIMATION_INFO));
@ -42,19 +36,19 @@ static void clock_slide_animation_start()
info.gx_animation_start_alpha = 255;
info.gx_animation_end_alpha = 255;
info.gx_animation_frame_interval = 40 / GX_SYSTEM_TIMER_MS;
info.gx_animation_steps = 30;
info.gx_animation_id = CLOCK_SLIDE_ANIMATION_ID;
info.gx_animation_start_position.gx_point_x = target_hour->gx_widget_size.gx_rectangle_left;
info.gx_animation_end_position.gx_point_x = hour_end_xpos;
info.gx_animation_start_position.gx_point_y = target_hour->gx_widget_size.gx_rectangle_top;
info.gx_animation_end_position.gx_point_x = info.gx_animation_start_position.gx_point_x + CLOCK_SLIDE_SHIFT * sign;
info.gx_animation_end_position.gx_point_y = info.gx_animation_start_position.gx_point_y;
info.gx_animation_steps = GX_ABS(info.gx_animation_end_position.gx_point_x - info.gx_animation_start_position.gx_point_x);
gx_animation_start(&clock_slide_animation[0], &info);
info.gx_animation_target = target_minute;
info.gx_animation_start_position.gx_point_x = target_minute->gx_widget_size.gx_rectangle_left;
info.gx_animation_end_position.gx_point_x = minute_end_xpos;
info.gx_animation_start_position.gx_point_y = target_minute->gx_widget_size.gx_rectangle_top;
info.gx_animation_end_position.gx_point_x = info.gx_animation_start_position.gx_point_x - CLOCK_SLIDE_SHIFT * sign;
info.gx_animation_end_position.gx_point_y = info.gx_animation_start_position.gx_point_y;
gx_animation_start(&clock_slide_animation[1], &info);
@ -80,7 +74,8 @@ UINT clock_4_screen_event_process(GX_WINDOW* window, GX_EVENT* event_ptr)
case GX_EVENT_SHOW:
gx_animation_create(&clock_slide_animation[0]);
gx_animation_create(&clock_slide_animation[1]);
screen_clock_update();
clear_screen_clock_record();
screen_clock_update(&clock_4_screen.clock_4_screen_hour, &clock_4_screen.clock_4_screen_minute, GX_NULL);
gx_system_timer_start(window, SCREEN_CLOCK_TIMER_ID, GX_TICKS_SECOND, GX_TICKS_SECOND);
return gx_window_event_process(window, event_ptr);
@ -107,7 +102,7 @@ UINT clock_4_screen_event_process(GX_WINDOW* window, GX_EVENT* event_ptr)
case GX_EVENT_TIMER:
if (event_ptr->gx_event_payload.gx_event_timer_id == SCREEN_CLOCK_TIMER_ID)
{
screen_clock_update();
screen_clock_update(&clock_4_screen.clock_4_screen_hour, &clock_4_screen.clock_4_screen_minute, GX_NULL);
}
break;

Some files were not shown because too many files have changed in this diff Show More