Skip to content

Commit

Permalink
Release 6.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxin-azrtos committed Jul 28, 2021
1 parent b917b0e commit 8251cf1
Show file tree
Hide file tree
Showing 251 changed files with 115,929 additions and 25,464 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)

# Set up the project
project(guix
VERSION 6.0.0
LANGUAGES C ASM
)

Expand All @@ -26,7 +25,11 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc)

# Pick up the port specific stuff first
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/ports/${THREADX_ARCH}/${THREADX_TOOLCHAIN})
if(DEFINED GUIX_CUSTOM_PORT)
add_subdirectory(${GUIX_CUSTOM_PORT} guix_port)
else()
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/ports/${THREADX_ARCH}/${THREADX_TOOLCHAIN})
endif()

# Then the common files
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common)
Expand Down
17 changes: 11 additions & 6 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.7 */
/* 6.1.8 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
Expand Down Expand Up @@ -72,6 +72,9 @@
/* graphics accelerator */
/* support, */
/* resulting in version 6.1.7 */
/* 08-02-2021 Ting Zhu Modified comment(s), added */
/* GX_TICKS_SECOND definition */
/* resulting in version 6.1.8 */
/* */
/**************************************************************************/

Expand All @@ -95,7 +98,7 @@ extern "C" {
#define AZURE_RTOS_GUIX
#define GUIX_MAJOR_VERSION 6
#define GUIX_MINOR_VERSION 1
#define GUIX_PATCH_VERSION 7
#define GUIX_PATCH_VERSION 8

/* The following symbols are defined for backward compatibility reasons.*/
#define __PRODUCT_GUIX__
Expand Down Expand Up @@ -180,6 +183,10 @@ typedef struct GX_STRING_STRUCT
#define GX_SYSTEM_TIMER_TICKS ((GX_SYSTEM_TIMER_MS * TX_TIMER_TICKS_PER_SECOND) / 1000)
#endif

#ifndef GX_TICKS_SECOND
#define GX_TICKS_SECOND (1000 / GX_SYSTEM_TIMER_MS)
#endif

#endif /* GX_THREADX_BINDING */

#ifndef GX_DISABLE_MULTITHREAD_SUPPORT
Expand Down Expand Up @@ -301,7 +308,7 @@ typedef struct GX_STRING_STRUCT

/* defines for backwards compatiblity */
#ifndef GX_RENESAS_DAVE2D_DRAW
#ifdef GX_USE_SYNERGY_DRAW
#ifdef GX_USE_SYNERGY_DRW
#define GX_RENESAS_DAVE2D_DRAW
#endif
#endif
Expand Down Expand Up @@ -811,6 +818,7 @@ typedef struct GX_STRING_STRUCT
/* Define Radial Progress Bar style flags. */
#define GX_STYLE_RADIAL_PROGRESS_ALIAS 0x00000200UL
#define GX_STYLE_RADIAL_PROGRESS_ROUND 0x00000400UL
#define GX_STYLE_RADIAL_PROGRESS_NO_BACKTRACK 0x00000800UL

/* Define Text alignment styles. */

Expand Down Expand Up @@ -1200,10 +1208,7 @@ typedef struct GX_PIXELMAP_STRUCT
#define GX_PIXELMAP_ALPHA 0x04 /* Pixelmap has alpha channel */
#define GX_PIXELMAP_TARGA 0x08 /* Pixelmap uses Targa format compresssion */
#define GX_PIXELMAP_RAW_FORMAT 0x10 /* RAW JPG/PNG format */

#if defined(GX_RENESAS_DAVE2D_DRAW)
#define GX_PIXELMAP_DYNAMICALLY_ALLOCATED 0x20 /* Pixelmap is dynamically allocated */
#endif

#define GX_PIXELMAP_ROTATED_CW 0x40
#define GX_PIXELMAP_ROTATED_CCW 0x80
Expand Down
7 changes: 5 additions & 2 deletions common/src/gx_animation_drag_event_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_animation_drag_event_check PORTABLE C */
/* 6.1 */
/* 6.1.8 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
Expand Down Expand Up @@ -81,6 +81,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 08-02-2021 Kenneth Maxwell Modified comment(s), */
/* replaced abs with GX_ABS, */
/* resulting in version 6.1.8 */
/* */
/**************************************************************************/
static UINT _gx_animation_drag_event_check(GX_ANIMATION *animation, GX_EVENT *event_ptr)
Expand Down Expand Up @@ -173,7 +176,7 @@ INT shift;
shift = (size -> gx_rectangle_right - size -> gx_rectangle_left + 1) >> 1;
}

if ((abs(delta) < shift) || (animation -> gx_animation_slide_target_index_2 == -1))
if ((GX_ABS(delta) < shift) || (animation -> gx_animation_slide_target_index_2 == -1))
{
/* slide back to original when slide distance is less than half screen width/height. */
if (animation -> gx_animation_slide_target_index_2 >= 0)
Expand Down
159 changes: 155 additions & 4 deletions common/src/gx_horizontal_list_scroll.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,125 @@
#include "gx_system.h"
#include "gx_scrollbar.h"

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _gx_horizontal_list_invisible_page_scroll PORTABLE C */
/* 6.1.8 */
/* AUTHOR */
/* */
/* Ting Zhu, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This function moves left or right the horizontal list by pages. */
/* */
/* INPUT */
/* */
/* list Horizontal list widget control*/
/* block */
/* num_pages The number of pages to scroll */
/* */
/* OUTPUT */
/* */
/* None */
/* */
/* CALLS */
/* */
/* _gx_widget_first_client_child_get Get first client child */
/* _gx_widget_next_client_child_get Get next client child */
/* */
/* CALLED BY */
/* */
/* _gx_horizontal_list_scroll */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 08-02-2021 Ting Zhu Initial Version 6.1.8 */
/* */
/**************************************************************************/
static VOID _gx_horizontal_list_invisible_page_scroll(GX_HORIZONTAL_LIST *list, INT num_pages)
{
INT maximum_scroll_pages;

if (!(list -> gx_widget_style & GX_STYLE_WRAP))
{

/* Wrap style is not applied, need to calculate scroll limit. */
if (num_pages < 0)
{

/* Calculate maximum up scroll num_pages. */
maximum_scroll_pages = (list -> gx_horizontal_list_total_columns - list -> gx_horizontal_list_top_index - list -> gx_horizontal_list_child_count);
maximum_scroll_pages /= list -> gx_horizontal_list_child_count;

/* Remain one page for normal scroll routine. */
if (maximum_scroll_pages >= 1)
{
maximum_scroll_pages--;
}

if (maximum_scroll_pages < (-num_pages))
{
num_pages = (-maximum_scroll_pages);
}
}
else
{

/* Calculate maximum down scroll num_pages. */
maximum_scroll_pages = list -> gx_horizontal_list_top_index / list -> gx_horizontal_list_child_count;

/* Remain one page for normal scroll routine. */
if (maximum_scroll_pages >= 1)
{
maximum_scroll_pages--;
}

if (maximum_scroll_pages < num_pages)
{
num_pages = maximum_scroll_pages;
}
}
}

if (num_pages)
{

/* Update top index according to scroll num_pages. */
list -> gx_horizontal_list_top_index -= num_pages * list -> gx_horizontal_list_child_count;

if (list -> gx_widget_style & GX_STYLE_WRAP)
{

/* Wrap page index. */
if (num_pages < 0)
{
while (list -> gx_horizontal_list_top_index >= list -> gx_horizontal_list_total_columns)
{
list -> gx_horizontal_list_top_index -= list -> gx_horizontal_list_total_columns;
}
}
else
{
while (list -> gx_horizontal_list_top_index < 0)
{
list -> gx_horizontal_list_top_index += list -> gx_horizontal_list_total_columns;
}
}
}
}
}

/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _gx_horizontal_list_scroll PORTABLE C */
/* 6.1 */
/* 6.1.8 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
Expand Down Expand Up @@ -74,6 +186,9 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 08-02-2021 Ting Zhu Modified comment(s), */
/* fixed scroll overflow issue,*/
/* resulting in version 6.1.8 */
/* */
/**************************************************************************/
VOID _gx_horizontal_list_scroll(GX_HORIZONTAL_LIST *list, INT amount)
Expand All @@ -83,12 +198,50 @@ GX_WIDGET *last_child;
GX_RECTANGLE block;
GX_SCROLLBAR *scroll;
GX_BOOL do_block_move = GX_TRUE;
GX_BOOL reuse_child_widgets = GX_FALSE;
INT page_size;
INT num_pages;

if (!amount)
{
return;
}

if ((list -> gx_horizontal_list_callback != GX_NULL) &&
(list -> gx_horizontal_list_visible_columns < list -> gx_horizontal_list_total_columns) &&
((list -> gx_horizontal_list_child_count < list -> gx_horizontal_list_total_columns) || (list -> gx_widget_style & GX_STYLE_WRAP)))
{
reuse_child_widgets = GX_TRUE;

/* Calculate the page size. */
page_size = (list -> gx_horizontal_list_child_width * list -> gx_horizontal_list_child_count);

if (!page_size)
{
return;
}

/* Calculate the number of pages to be scrolled. */
if (amount < 0)
{
num_pages = (amount + page_size) / page_size;
}
else
{
num_pages = (amount - page_size) / page_size;
}

if (num_pages)
{

/* Calculate the remainning scroll amount. */
amount -= (num_pages * page_size);

/* Scroll pages. */
_gx_horizontal_list_invisible_page_scroll(list, num_pages);
}
}

/* first shift my child widgets */
child = list -> gx_widget_first_child;

Expand All @@ -104,9 +257,7 @@ GX_BOOL do_block_move = GX_TRUE;

/* now check to see if we need to wrap any child widgets */

if ((list -> gx_horizontal_list_callback != GX_NULL) &&
(list -> gx_horizontal_list_visible_columns < list -> gx_horizontal_list_total_columns) &&
((list -> gx_horizontal_list_child_count < list -> gx_horizontal_list_total_columns) || (list -> gx_widget_style & GX_STYLE_WRAP)))
if (reuse_child_widgets)
{
/* this means we have fewer children than list rows, so we
need to move and re-use the child widgets
Expand Down
1 change: 0 additions & 1 deletion common/src/gx_image_reader_pixel_write_callback_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,6 @@ static UINT _gx_image_reader_pixel_rotated_write_callback_set(GX_IMAGE_READER *i

default:
return GX_NOT_SUPPORTED;
break;
}

return GX_SUCCESS;
Expand Down
11 changes: 7 additions & 4 deletions common/src/gx_image_reader_png_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1792,7 +1792,7 @@ GX_UBYTE blue;
/* FUNCTION RELEASE */
/* */
/* _gx_image_reader_png_paeth_predictor PORTABLE C */
/* 6.1 */
/* 6.1.8 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
Expand Down Expand Up @@ -1826,6 +1826,9 @@ GX_UBYTE blue;
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 08-02-2021 Kenneth Maxwell Modified comment(s), */
/* replaced abs with GX_ABS, */
/* resulting in version 6.1.8 */
/* */
/**************************************************************************/
static GX_UBYTE _gx_image_reader_png_paeth_predictor(GX_UBYTE a, GX_UBYTE b, GX_UBYTE c)
Expand All @@ -1834,9 +1837,9 @@ INT p;
INT pa, pb, pc;

p = a + b - c;
pa = abs(p - a);
pb = abs(p - b);
pc = abs(p - c);
pa = GX_ABS(p - a);
pb = GX_ABS(p - b);
pc = GX_ABS(p - c);

/*return nearest of a, b, c */

Expand Down
16 changes: 12 additions & 4 deletions common/src/gx_radial_progress_bar_background_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/* FUNCTION RELEASE */
/* */
/* _gx_radial_progress_bar_background_draw PORTABLE C */
/* 6.1 */
/* 6.1.8 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
Expand Down Expand Up @@ -75,6 +75,10 @@
/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
/* 09-30-2020 Kenneth Maxwell Modified comment(s), */
/* resulting in version 6.1 */
/* 08-02-2021 Ting Zhu Modified comment(s), */
/* supported no background */
/* radial track mode, */
/* resulting in version 6.1.8 */
/* */
/**************************************************************************/
VOID _gx_radial_progress_bar_background_draw(GX_RADIAL_PROGRESS_BAR *progress_bar)
Expand Down Expand Up @@ -181,8 +185,6 @@ GX_VALUE old_ypos = 0;
ycenter = (GX_VALUE)(size -> gx_rectangle_bottom + size -> gx_rectangle_top);
ycenter >>= 1;

_gx_context_line_color_set(info -> gx_radial_progress_bar_info_normal_brush_color);
_gx_context_brush_width_set((UINT)(info -> gx_radial_progress_bar_info_normal_brush_width));
brush -> gx_brush_style &= (ULONG)(~GX_BRUSH_SOLID_FILL);

if (progress_bar -> gx_widget_style & GX_STYLE_RADIAL_PROGRESS_ALIAS)
Expand All @@ -195,7 +197,13 @@ GX_VALUE old_ypos = 0;
brush -> gx_brush_style |= GX_BRUSH_ROUND;
}

_gx_canvas_circle_draw(xcenter, ycenter, (UINT)(info -> gx_radial_progress_bar_info_radius));
if (!(progress_bar -> gx_widget_style & GX_STYLE_RADIAL_PROGRESS_NO_BACKTRACK))
{
_gx_context_line_color_set(info -> gx_radial_progress_bar_info_normal_brush_color);
_gx_context_brush_width_set((UINT)(info -> gx_radial_progress_bar_info_normal_brush_width));

_gx_canvas_circle_draw(xcenter, ycenter, (UINT)(info -> gx_radial_progress_bar_info_radius));
}

if (info -> gx_radial_progress_bar_info_current_val != 0)
{
Expand Down
Loading

0 comments on commit 8251cf1

Please sign in to comment.