Skip to content

Commit

Permalink
Release 6.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxin-azrtos committed Apr 20, 2022
1 parent b638e8c commit 0798b70
Show file tree
Hide file tree
Showing 131 changed files with 113,145 additions and 73,122 deletions.
16 changes: 14 additions & 2 deletions common/inc/gx_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/* APPLICATION INTERFACE DEFINITION RELEASE */
/* */
/* gx_api.h PORTABLE C */
/* 6.1.10 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
Expand Down Expand Up @@ -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 */
/* */
/**************************************************************************/

Expand All @@ -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__
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion common/inc/gx_canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* gx_canvas.h PORTABLE C */
/* 6.1 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
Expand All @@ -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 */
/* */
/**************************************************************************/

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions common/inc/gx_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* gx_system.h PORTABLE C */
/* 6.1.3 */
/* 6.1.11 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
Expand All @@ -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 */
/* */
/**************************************************************************/

Expand Down Expand Up @@ -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);
Expand Down
78 changes: 60 additions & 18 deletions common/src/gx_animation_drag_tracking.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand All @@ -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)
{
Expand All @@ -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;
}
Expand Down
Loading

0 comments on commit 0798b70

Please sign in to comment.