gx_animation.h 5.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /**************************************************************************/
  2. /* */
  3. /* Copyright (c) Microsoft Corporation. All rights reserved. */
  4. /* */
  5. /* This software is licensed under the Microsoft Software License */
  6. /* Terms for Microsoft Azure RTOS. Full text of the license can be */
  7. /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
  8. /* and in the root directory of this software. */
  9. /* */
  10. /**************************************************************************/
  11. /**************************************************************************/
  12. /**************************************************************************/
  13. /** */
  14. /** GUIX Component */
  15. /** */
  16. /** Animation Management (Animation) */
  17. /** */
  18. /**************************************************************************/
  19. /**************************************************************************/
  20. /**************************************************************************/
  21. /* */
  22. /* COMPONENT DEFINITION RELEASE */
  23. /* */
  24. /* gx_animation.h PORTABLE C */
  25. /* 6.0 */
  26. /* AUTHOR */
  27. /* */
  28. /* Kenneth Maxwell, Microsoft Corporation */
  29. /* */
  30. /* DESCRIPTION */
  31. /* */
  32. /* This file defines the GUIX animation component, including all data */
  33. /* types and external references. It is assumed that gx_api.h and */
  34. /* gx_port.h have already been included. */
  35. /* */
  36. /* RELEASE HISTORY */
  37. /* */
  38. /* DATE NAME DESCRIPTION */
  39. /* */
  40. /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
  41. /* */
  42. /**************************************************************************/
  43. #ifndef GX_ANIMATION_H
  44. #define GX_ANIMATION_H
  45. #define GX_ANIMATION_SLIDE_LEFT 0x0001
  46. #define GX_ANIMATION_SLIDE_RIGHT 0x0002
  47. #define GX_ANIMATION_SLIDE_UP 0x0040
  48. #define GX_ANIMATION_SLIDE_DOWN 0x0080
  49. #define GX_ANIMATION_SLIDE_TIMER 1000
  50. #define GX_ANIMATION_MIN_SLIDING_DIST 5
  51. /* Define animation management function prototypes. */
  52. UINT _gx_animation_create(GX_ANIMATION *animation);
  53. UINT _gx_animation_canvas_define(GX_ANIMATION *animation, GX_CANVAS *canvas);
  54. VOID _gx_animation_complete_event_send(GX_ANIMATION *animation);
  55. UINT _gx_animation_start(GX_ANIMATION *animation, GX_ANIMATION_INFO *info);
  56. UINT _gx_animation_stop(GX_ANIMATION *animation);
  57. VOID _gx_animation_update(VOID);
  58. VOID _gx_animation_complete(GX_ANIMATION *animation);
  59. UINT _gx_animation_drag_disable(GX_ANIMATION *animation, GX_WIDGET *widget);
  60. UINT _gx_animation_drag_enable(GX_ANIMATION *animation, GX_WIDGET *widget, GX_ANIMATION_INFO *info);
  61. UINT _gx_animation_drag_event_process(GX_WIDGET *widget, GX_EVENT *event_ptr);
  62. UINT _gx_animation_drag_tracking(GX_ANIMATION *animation, GX_POINT penpos);
  63. UINT _gx_animation_drag_tracking_start(GX_ANIMATION *animation, GX_POINT penpos);
  64. UINT _gx_animation_slide_landing(GX_ANIMATION *animation);
  65. UINT _gx_animation_landing_speed_set(GX_ANIMATION *animation, USHORT shift_per_step);
  66. UINT _gx_animation_slide_landing_start(GX_ANIMATION *animation);
  67. /* error checking versions of the animation API functions */
  68. UINT _gxe_animation_create(GX_ANIMATION *animation);
  69. UINT _gxe_animation_canvas_define(GX_ANIMATION *animation, GX_CANVAS *canvas);
  70. UINT _gxe_animation_drag_disable(GX_ANIMATION *animation, GX_WIDGET *widget);
  71. UINT _gxe_animation_drag_enable(GX_ANIMATION *animation, GX_WIDGET *widget, GX_ANIMATION_INFO *info);
  72. UINT _gxe_animation_start(GX_ANIMATION *animation, GX_ANIMATION_INFO *info);
  73. UINT _gxe_animation_stop(GX_ANIMATION *animation);
  74. UINT _gxe_animation_landing_speed_set(GX_ANIMATION *animation, USHORT shift_per_step);
  75. #endif