gx_sprite.h 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. /** Sprite Management (Sprite) */
  17. /** */
  18. /**************************************************************************/
  19. /**************************************************************************/
  20. /**************************************************************************/
  21. /* */
  22. /* COMPONENT DEFINITION RELEASE */
  23. /* */
  24. /* gx_sprite.h PORTABLE C */
  25. /* 6.0 */
  26. /* AUTHOR */
  27. /* */
  28. /* Kenneth Maxwell, Microsoft Corporation */
  29. /* */
  30. /* DESCRIPTION */
  31. /* */
  32. /* This file defines the GUIX sprite 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_SPRITE_H
  44. #define GX_SPRITE_H
  45. #define GX_SPRITE_IDLE 0x0001
  46. #define GX_SPRITE_RUNNING 0x0002
  47. #define GX_SPRITE_TIMER 0x1000
  48. /* Define animation management function prototypes. */
  49. UINT _gx_sprite_create(GX_SPRITE *sprite, GX_CONST GX_CHAR *name, GX_WIDGET *parent,
  50. GX_SPRITE_FRAME *frame_list, USHORT frame_count,
  51. ULONG style, USHORT sprite_id, GX_CONST GX_RECTANGLE *size);
  52. UINT _gx_sprite_start(GX_SPRITE *sprite, USHORT start_frame);
  53. UINT _gx_sprite_stop(GX_SPRITE *sprite);
  54. VOID _gx_sprite_update(GX_SPRITE *sprite);
  55. VOID _gx_sprite_complete(GX_SPRITE *sprite);
  56. UINT _gx_sprite_current_frame_set(GX_SPRITE *sprite, USHORT frame);
  57. VOID _gx_sprite_draw(GX_SPRITE *sprite);
  58. UINT _gx_sprite_event_process(GX_SPRITE *sprite, GX_EVENT *event_ptr);
  59. UINT _gx_sprite_frame_list_set(GX_SPRITE *sprite, GX_SPRITE_FRAME *frame_list, USHORT frame_count);
  60. /* error checking versions of the animation API functions */
  61. UINT _gxe_sprite_create(GX_SPRITE *sprite, GX_CONST GX_CHAR *name, GX_WIDGET *parent,
  62. GX_SPRITE_FRAME *frame_list, USHORT frame_count,
  63. ULONG style, USHORT sprite_id, GX_CONST GX_RECTANGLE *size, UINT sprite_control_block_size);
  64. UINT _gxe_sprite_current_frame_set(GX_SPRITE *sprite, USHORT frame);
  65. UINT _gxe_sprite_frame_list_set(GX_SPRITE *sprite, GX_SPRITE_FRAME *frame_list, USHORT frame_count);
  66. UINT _gxe_sprite_start(GX_SPRITE *sprite, USHORT frame);
  67. UINT _gxe_sprite_stop(GX_SPRITE *sprite);
  68. #endif