-
Notifications
You must be signed in to change notification settings - Fork 1
/
flirt-debug.h
173 lines (123 loc) · 4.26 KB
/
flirt-debug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
Flirt, an SWF rendering library
Copyright (c) 2004-2006 Dave Hayden <dave@opaque.net>
All rights reserved.
http://www.opaque.net/flirt/
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice
and URL, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice and URL, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "flirt.h"
// functions available when libflirt is compiled with DD_INCLUDE_DEBUGGER set
typedef struct _ddTimelineFrame ddTimelineFrame;
typedef struct _ddTimelineItem ddTimelineItem;
typedef struct _ddAction ddAction;
typedef struct _ddSoundStreamBlock ddSoundStreamBlock;
typedef struct _ddCharacter ddCharacter;
typedef struct _ddDisplayList ddDisplayList;
typedef struct _ddDrawable ddDrawable;
typedef struct _ddDrawButton ddDrawButton;
typedef enum
{
SHAPE_CHAR,
MORPH_CHAR,
BITMAP_CHAR,
BUTTON_CHAR,
TEXT_CHAR,
FONT_CHAR,
MOVIECLIP_CHAR,
TEXTFIELD_CHAR,
SOUND_CHAR
} ddCharacterType;
typedef enum
{
STEP_FRAME,
STEP_OVER,
STEP_INTO,
STEP_FINISH
} ddStepMode;
// for debugging:
void
ddPlayer_stepFlashUpdates(ddPlayer* player);
void
ddPlayer_drawUpdates(ddPlayer* player);
ddMovieClip*
ddPlayer_getMovieClip(ddPlayer* player);
ddDrawClip*
ddPlayer_getPlayClip(ddPlayer* player);
boolean
ddPlayer_executeFrameActions(ddPlayer* player, ddStepMode mode);
int
ddPlayer_actionStackDepth(ddPlayer* player);
ddActionContext*
ddPlayer_actionContextAtDepth(ddPlayer* player, int depth);
ddAction*
ddActionContext_getAction(ddActionContext* context);
int
ddActionContext_getActionOffset(ddActionContext* context);
char*
ddActionContext_getLabel(ddActionContext* context);
int
ddMovieClip_getFramesTotal(ddMovieClip* clip);
ddTimelineFrame*
ddMovieClip_getFrame(ddMovieClip* clip, int i);
ddTimelineItem*
ddTimelineFrame_getItems(ddTimelineFrame* frame);
ddAction*
ddTimelineFrame_getActions(ddTimelineFrame* frame);
int
ddAction_getLength(ddAction* action);
char*
ddAction_opcodeAtOffset(ddAction* action, int length);
ddAction*
ddAction_functionAtOffset(ddAction* action, int length);
void
ddAction_setBreakpoint(ddAction* action, int line);
void
ddAction_clearBreakpoint(ddAction* action, int line);
void
ddAction_getBreakpoints(ddAction* action, int** outLines, int* outNBreaks);
ddActionObject*
ddPlayer_getGlobals(ddPlayer* player);
int
ddActionObject_getProperties(ddActionObject* object, char*** outNames, ddActionValue** outValues, int* outCount);
ddActionFunction*
ddActionValue_getFunctionValue(ddActionValue value);
ddAction*
ddActionFunction_getBytecodeAction(ddActionFunction* function);
ddSoundStreamBlock*
ddTimelineFrame_getSoundStreamBlock(ddTimelineFrame* frame);
ddTimelineItem*
ddTimelineItem_getNext(ddTimelineItem* item);
ddCharacter*
ddTimelineItem_getCharacter(ddTimelineItem* item);
const char*
ddTimelineItem_getName(ddTimelineItem* item);
ddCharacterType
ddCharacter_getType(ddCharacter* character);
void
ddDrawClip_getDisplayList(ddDrawClip* clip, ddDrawable*** outItems, int* outNItems);
ddActionObject*
ddDrawClip_getActionObject(ddDrawClip* clip);
void
ddDrawButton_getDisplayList(ddDrawClip* clip, ddDrawable*** outItems, int* outNItems);
ddCharacterType
ddDrawable_getType(ddDrawable* d);
ddRect
ddDrawable_getBounds(ddDrawable* d);