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 /**************************************************************************/ 15 /** */ 16 /** GUIX Component */ 17 /** */ 18 /** Sprite Management (Sprite) */ 19 /** */ 20 /**************************************************************************/ 21 /**************************************************************************/ 22 23 24 /**************************************************************************/ 25 /* */ 26 /* COMPONENT DEFINITION RELEASE */ 27 /* */ 28 /* gx_sprite.h PORTABLE C */ 29 /* 6.1 */ 30 /* AUTHOR */ 31 /* */ 32 /* Kenneth Maxwell, Microsoft Corporation */ 33 /* */ 34 /* DESCRIPTION */ 35 /* */ 36 /* This file defines the GUIX sprite component, including all data */ 37 /* types and external references. It is assumed that gx_api.h and */ 38 /* gx_port.h have already been included. */ 39 /* */ 40 /* RELEASE HISTORY */ 41 /* */ 42 /* DATE NAME DESCRIPTION */ 43 /* */ 44 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ 45 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ 46 /* resulting in version 6.1 */ 47 /* */ 48 /**************************************************************************/ 49 50 #ifndef GX_SPRITE_H 51 #define GX_SPRITE_H 52 53 #define GX_SPRITE_IDLE 0x0001 54 #define GX_SPRITE_RUNNING 0x0002 55 #define GX_SPRITE_TIMER 0x1000 56 57 /* Define animation management function prototypes. */ 58 UINT _gx_sprite_create(GX_SPRITE *sprite, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 59 GX_SPRITE_FRAME *frame_list, USHORT frame_count, 60 ULONG style, USHORT sprite_id, GX_CONST GX_RECTANGLE *size); 61 62 UINT _gx_sprite_start(GX_SPRITE *sprite, USHORT start_frame); 63 UINT _gx_sprite_stop(GX_SPRITE *sprite); 64 VOID _gx_sprite_update(GX_SPRITE *sprite); 65 VOID _gx_sprite_complete(GX_SPRITE *sprite); 66 UINT _gx_sprite_current_frame_set(GX_SPRITE *sprite, USHORT frame); 67 VOID _gx_sprite_draw(GX_SPRITE *sprite); 68 UINT _gx_sprite_event_process(GX_SPRITE *sprite, GX_EVENT *event_ptr); 69 UINT _gx_sprite_frame_list_set(GX_SPRITE *sprite, GX_SPRITE_FRAME *frame_list, USHORT frame_count); 70 71 /* error checking versions of the animation API functions */ 72 UINT _gxe_sprite_create(GX_SPRITE *sprite, GX_CONST GX_CHAR *name, GX_WIDGET *parent, 73 GX_SPRITE_FRAME *frame_list, USHORT frame_count, 74 ULONG style, USHORT sprite_id, GX_CONST GX_RECTANGLE *size, UINT sprite_control_block_size); 75 UINT _gxe_sprite_current_frame_set(GX_SPRITE *sprite, USHORT frame); 76 UINT _gxe_sprite_frame_list_set(GX_SPRITE *sprite, GX_SPRITE_FRAME *frame_list, USHORT frame_count); 77 UINT _gxe_sprite_start(GX_SPRITE *sprite, USHORT frame); 78 UINT _gxe_sprite_stop(GX_SPRITE *sprite); 79 80 81 #endif 82 83