1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* Copyright (c) 2026-present Eclipse ThreadX contributors |
4 |
|
|
* |
5 |
|
|
* This program and the accompanying materials are made available under the |
6 |
|
|
* terms of the MIT License which is available at |
7 |
|
|
* https://opensource.org/licenses/MIT. |
8 |
|
|
* |
9 |
|
|
* SPDX-License-Identifier: MIT |
10 |
|
|
**************************************************************************/ |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
/**************************************************************************/ |
14 |
|
|
/**************************************************************************/ |
15 |
|
|
/** */ |
16 |
|
|
/** GUIX Component */ |
17 |
|
|
/** */ |
18 |
|
|
/** Sprite Management (Sprite) */ |
19 |
|
|
/** */ |
20 |
|
|
/**************************************************************************/ |
21 |
|
|
|
22 |
|
|
#define GX_SOURCE_CODE |
23 |
|
|
|
24 |
|
|
|
25 |
|
|
/* Include necessary system files. */ |
26 |
|
|
|
27 |
|
|
#include "gx_api.h" |
28 |
|
|
#include "gx_system.h" |
29 |
|
|
#include "gx_display.h" |
30 |
|
|
#include "gx_context.h" |
31 |
|
|
#include "gx_canvas.h" |
32 |
|
|
#include "gx_widget.h" |
33 |
|
|
#include "gx_sprite.h" |
34 |
|
|
|
35 |
|
|
|
36 |
|
|
/**************************************************************************/ |
37 |
|
|
/* */ |
38 |
|
|
/* FUNCTION RELEASE */ |
39 |
|
|
/* */ |
40 |
|
|
/* _gx_sprite_stop PORTABLE C */ |
41 |
|
|
/* 6.1 */ |
42 |
|
|
/* AUTHOR */ |
43 |
|
|
/* */ |
44 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
45 |
|
|
/* */ |
46 |
|
|
/* DESCRIPTION */ |
47 |
|
|
/* */ |
48 |
|
|
/* This service stops a sprite widget. */ |
49 |
|
|
/* */ |
50 |
|
|
/* INPUT */ |
51 |
|
|
/* */ |
52 |
|
|
/* sprite Pointer to sprite widget */ |
53 |
|
|
/* control block */ |
54 |
|
|
/* */ |
55 |
|
|
/* OUTPUT */ |
56 |
|
|
/* */ |
57 |
|
|
/* status Completion status */ |
58 |
|
|
/* */ |
59 |
|
|
/* CALLS */ |
60 |
|
|
/* */ |
61 |
|
|
/* _gx_system_timer_stop Stop an active GUIX timer */ |
62 |
|
|
/* */ |
63 |
|
|
/* CALLED BY */ |
64 |
|
|
/* */ |
65 |
|
|
/* Application Code */ |
66 |
|
|
/* */ |
67 |
|
|
/**************************************************************************/ |
68 |
|
5 |
UINT _gx_sprite_stop(GX_SPRITE *sprite) |
69 |
|
|
{ |
70 |
|
5 |
GX_WIDGET *widget = (GX_WIDGET *)sprite; |
71 |
|
|
|
72 |
✓✓ |
5 |
if (sprite -> gx_sprite_run_state == GX_SPRITE_RUNNING) |
73 |
|
|
{ |
74 |
|
4 |
_gx_system_timer_stop(widget, GX_SPRITE_TIMER); |
75 |
|
4 |
sprite -> gx_sprite_run_state = GX_SPRITE_IDLE; |
76 |
|
|
} |
77 |
|
|
|
78 |
|
5 |
return(GX_SUCCESS); |
79 |
|
|
} |
80 |
|
|
|