Skip to content

Commit af6ae69

Browse files
authored
Merge pull request #145 from parsley/fix_animation
Fixed missing configuration check "#if (GX_ANIMATION_POOL_SIZE > 0)"
2 parents 75e2e04 + 2be1da8 commit af6ae69

26 files changed

Lines changed: 56 additions & 26 deletions

common/inc/gx_animation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#ifndef GX_ANIMATION_H
5353
#define GX_ANIMATION_H
5454

55+
#if (GX_ANIMATION_POOL_SIZE > 0)
5556
#define GX_ANIMATION_SLIDE_LEFT 0x0001
5657
#define GX_ANIMATION_SLIDE_RIGHT 0x0002
5758
#define GX_ANIMATION_SLIDE_UP 0x0040
@@ -92,4 +93,5 @@ UINT _gxe_animation_stop(GX_ANIMATION *animation);
9293
UINT _gxe_animation_landing_speed_set(GX_ANIMATION *animation, USHORT shift_per_step);
9394

9495
#endif
96+
#endif
9597

common/inc/gx_api.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5714,8 +5714,10 @@ UINT _gxe_string_scroll_wheel_string_list_set_ext(GX_STRING_SCROLL_WHEEL *wheel,
57145714
INT string_count);
57155715

57165716
UINT _gxe_system_active_language_set(GX_UBYTE language);
5717+
#if (GX_ANIMATION_POOL_SIZE > 0)
57175718
UINT _gxe_system_animation_get(GX_ANIMATION **animation);
57185719
UINT _gxe_system_animation_free(GX_ANIMATION *animation);
5720+
#endif
57195721
#if defined(GX_DYNAMIC_BIDI_TEXT_SUPPORT)
57205722
UINT _gx_system_bidi_text_enable(VOID);
57215723
UINT _gx_system_bidi_text_disable(VOID);

common/src/gx_animation_canvas_define.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
/* resulting in version 6.1 */
7474
/* */
7575
/**************************************************************************/
76+
#if (GX_ANIMATION_POOL_SIZE > 0)
7677
UINT _gx_animation_canvas_define(GX_ANIMATION *animation, GX_CANVAS *canvas)
7778
{
7879
if (animation -> gx_animation_status != GX_ANIMATION_IDLE)
@@ -85,4 +86,4 @@ UINT _gx_animation_canvas_define(GX_ANIMATION *animation, GX_CANVAS *canvas)
8586
/* Return completion status code. */
8687
return(GX_SUCCESS);
8788
}
88-
89+
#endif

common/src/gx_animation_complete.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
/* resulting in version 6.1 */
7272
/* */
7373
/**************************************************************************/
74+
#if (GX_ANIMATION_POOL_SIZE > 0)
7475
VOID _gx_animation_complete_event_send(GX_ANIMATION *animation)
7576
{
7677
GX_EVENT complete_event;
@@ -93,7 +94,7 @@ GX_EVENT complete_event;
9394
_gx_system_event_send(&complete_event);
9495
}
9596
}
96-
97+
#endif
9798

9899

99100
/**************************************************************************/
@@ -146,7 +147,7 @@ GX_EVENT complete_event;
146147
/* resulting in version 6.1.3 */
147148
/* */
148149
/**************************************************************************/
149-
150+
#if (GX_ANIMATION_POOL_SIZE > 0)
150151
VOID _gx_animation_complete(GX_ANIMATION *animation)
151152
{
152153
GX_WIDGET *target;
@@ -255,4 +256,4 @@ GX_VALUE yshift;
255256
_gx_system_animation_free(animation);
256257
}
257258
}
258-
259+
#endif

common/src/gx_animation_create.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
/* resulting in version 6.1 */
7171
/* */
7272
/**************************************************************************/
73+
#if (GX_ANIMATION_POOL_SIZE > 0)
7374
UINT _gx_animation_create(GX_ANIMATION *animation)
7475
{
7576
memset(animation, 0, sizeof(GX_ANIMATION));
@@ -79,4 +80,4 @@ UINT _gx_animation_create(GX_ANIMATION *animation)
7980
/* Return completion status code. */
8081
return(GX_SUCCESS);
8182
}
82-
83+
#endif

common/src/gx_animation_delete.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
/* 06-02-2021 Ting Zhu Initial Version 6.1.7 */
7272
/* */
7373
/**************************************************************************/
74-
74+
#if (GX_ANIMATION_POOL_SIZE > 0)
7575
UINT _gx_animation_delete(GX_ANIMATION *target, GX_WIDGET *parent)
7676
{
7777
GX_ANIMATION *animation;
@@ -122,4 +122,4 @@ GX_ANIMATION *next;
122122

123123
return(GX_SUCCESS);
124124
}
125-
125+
#endif

common/src/gx_animation_drag_disable.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
/* resulting in version 6.1 */
7171
/* */
7272
/**************************************************************************/
73+
#if (GX_ANIMATION_POOL_SIZE > 0)
7374
UINT _gx_animation_drag_disable(GX_ANIMATION *animation, GX_WIDGET *widget)
7475
{
7576
UINT status;
@@ -82,4 +83,4 @@ UINT status;
8283
status = _gx_animation_stop(animation);
8384
return status;
8485
}
85-
86+
#endif

common/src/gx_animation_drag_enable.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
/* resulting in version 6.1 */
7272
/* */
7373
/**************************************************************************/
74+
#if (GX_ANIMATION_POOL_SIZE > 0)
7475
UINT _gx_animation_drag_enable(GX_ANIMATION *animation, GX_WIDGET *widget, GX_ANIMATION_INFO *info)
7576
{
7677
/* Test invalid animation status. */
@@ -93,4 +94,4 @@ UINT _gx_animation_drag_enable(GX_ANIMATION *animation, GX_WIDGET *widget, GX_A
9394
/* Return completion status code. */
9495
return(GX_SUCCESS);
9596
}
96-
97+
#endif

common/src/gx_animation_drag_event_process.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
/* resulting in version 6.1.8 */
8686
/* */
8787
/**************************************************************************/
88+
#if (GX_ANIMATION_POOL_SIZE > 0)
8889
static UINT _gx_animation_drag_event_check(GX_ANIMATION *animation, GX_EVENT *event_ptr)
8990
{
9091
GX_ANIMATION_INFO *info = &animation -> gx_animation_info;
@@ -277,6 +278,7 @@ INT shift;
277278

278279
return GX_SUCCESS;
279280
}
281+
#endif
280282

281283
/**************************************************************************/
282284
/* */
@@ -320,6 +322,7 @@ INT shift;
320322
/* resulting in version 6.1 */
321323
/* */
322324
/**************************************************************************/
325+
#if (GX_ANIMATION_POOL_SIZE > 0)
323326
UINT _gx_animation_drag_event_process(GX_WIDGET *widget, GX_EVENT *event_ptr)
324327
{
325328
GX_ANIMATION *animation;
@@ -342,4 +345,4 @@ GX_ANIMATION *animation;
342345

343346
return GX_SUCCESS;
344347
}
345-
348+
#endif

common/src/gx_animation_drag_tracking.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
/* resulting in version 6.1.11 */
7979
/* */
8080
/**************************************************************************/
81+
#if (GX_ANIMATION_POOL_SIZE > 0)
8182
UINT _gx_animation_drag_tracking(GX_ANIMATION *animation, GX_POINT penpos)
8283
{
8384
GX_VALUE delta_x = 0;
@@ -221,4 +222,4 @@ GX_VALUE border_width;
221222
/* Return completion status code. */
222223
return(GX_SUCCESS);
223224
}
224-
225+
#endif

0 commit comments

Comments
 (0)