MHEG5
18.9.0
MHEG5 Documentation
Main Page
Related Pages
Classes
Files
File List
File Members
source
core
src
mh5actiontokens.c
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3
* Copyright © 2004 Ocean Blue Software Ltd
4
* Copyright © 2000 Koninklijke Philips Electronics N.V
5
*
6
* This file is part of a DTVKit Software Component
7
* You are permitted to copy, modify or distribute this file subject to the terms
8
* of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9
*
10
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12
* OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13
*
14
* If you or your organisation is not a member of DTVKit then you have access
15
* to this source code outside of the terms of the licence agreement
16
* and you are expected to delete this and any associated files immediately.
17
* Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18
*******************************************************************************/
26
/*---includes for this file--------------------------------------------------*/
27
#include "
mh5actiontokens.h
"
28
#include <string.h>
29
30
/*---constant definitions for this file--------------------------------------*/
31
32
33
/*---local typedef structs for this file-------------------------------------*/
34
35
/*---local (static) variable declarations for this file----------------------*/
36
37
#if defined(MH5PRINTOUT) || defined(MHEG5LOG) || defined(TRACING)
38
39
static
struct
40
{
41
const
char
*token;
42
MHEG5ElemActionType
action;
43
} MHEG5actiontoken[] =
44
45
{
46
/*
47
":AbsoluteTime",,
48
":NewAbsoluteColour",,
49
":NewColourIndex",,
50
":NewCCPriority",,
51
":NewContentSize",,
52
*/
53
54
/*
55
Root Actions
56
*/
57
{
":GetAvailabilityStatus"
,
MHEG5GETAVAILABILITYSTATUS
},
58
{
":GetRunningStatus"
,
MHEG5GETRUNNINGSTATUS
},
59
60
/*
61
Group Actions
62
*/
63
{
":SetCachePriority"
,
MHEG5SETCACHEPRIORITY
},
64
65
/*
66
Application Actions
67
*/
68
{
":StorePersistent"
,
MHEG5STOREPERSISTENT
},
69
{
":ReadPersistent"
,
MHEG5READPERSISTENT
},
70
{
":Launch"
,
MHEG5LAUNCH
},
71
{
":Spawn"
,
MHEG5SPAWN
},
72
{
":Quit"
,
MHEG5QUIT
},
73
{
":LockScreen"
,
MHEG5LOCKSCREEN
},
74
{
":UnlockScreen"
,
MHEG5UNLOCKSCREEN
},
75
{
":OpenConnection"
,
MHEG5OPENCONNECTION
},
76
{
":CloseConnection"
,
MHEG5CLOSECONNECTION
},
77
{
":GetEngineSupport"
,
MHEG5GETENGINESUPPORT
},
78
79
/*
80
Scene Actions
81
*/
82
{
":TransitionTo"
,
MHEG5TRANSITIONTO
},
83
{
":SetTimer"
,
MHEG5SETTIMER
},
84
{
":SendEvent"
,
MHEG5SENDEVENT
},
85
{
":SetCursorShape"
,
MHEG5SETCURSORSHAPE
},
86
{
":SetCursorPosition"
,
MHEG5SETCURSORPOSITION
},
87
{
":GetCursorPosition"
,
MHEG5GETCURSORPOSITION
},
88
{
":SetInputReg"
,
MHEG5SETINPUTREGISTER
},
89
{
":SetInputMask"
,
MHEG5SETINPUTMASK
},
90
91
/*
92
Ingredient Actions
93
*/
94
{
":SetData"
,
MHEG5SETDATA
},
95
{
":Clone"
,
MHEG5CLONE
},
96
{
":Preload"
,
MHEG5PRELOAD
},
97
{
":Unload"
,
MHEG5UNLOAD
},
98
99
/*
100
Link Actions
101
*/
102
{
":Activate"
,
MHEG5ACTIVATE
},
103
{
":Deactivate"
,
MHEG5DEACTIVATE
},
104
105
/*
106
Program Actions
107
*/
108
{
":Call"
,
MHEG5CALL
},
109
{
":Fork"
,
MHEG5FORK
},
110
{
":Stop"
,
MHEG5STOP
},
111
112
/*
113
Variable Actions
114
*/
115
{
":SetVariable"
,
MHEG5SETVARIABLE
},
116
{
":TestVariable"
,
MHEG5TESTVARIABLE
},
117
118
/*
119
IntegerVariable Actions
120
*/
121
{
":Add"
,
MHEG5ADD
},
122
{
":Subtract"
,
MHEG5SUBTRACT
},
123
{
":Multiply"
,
MHEG5MULTIPLY
},
124
{
":Divide"
,
MHEG5DIVIDE
},
125
{
":Modulo"
,
MHEG5MODULO
},
126
127
/*
128
OctetStringVariable Actions
129
*/
130
{
":Append"
,
MHEG5APPEND
},
131
132
133
/*
134
Presentable Actions
135
*/
136
{
":Run"
,
MHEG5RUN
},
137
138
/*
139
TokenManager Actions
140
*/
141
{
":Move"
,
MHEG5MOVE
},
142
{
":MoveTo"
,
MHEG5MOVETO
},
143
{
":GetTokenPosition"
,
MHEG5GETTOKENPOSITION
},
144
145
/*
146
TokenGroup Actions
147
*/
148
{
":CallActionSlot"
,
MHEG5CALLACTIONSLOT
},
149
150
/*
151
ListGroup Actions
152
*/
153
{
":AddItem"
,
MHEG5ADDITEM
},
154
{
":DelItem"
,
MHEG5DELITEM
},
155
{
":GetListItem"
,
MHEG5GETLISTITEM
},
156
{
":GetCellItem"
,
MHEG5GETCELLITEM
},
157
{
":GetItemStatus"
,
MHEG5GETITEMSTATUS
},
158
{
":SelectItem"
,
MHEG5SELECTITEM
},
159
{
":DeselectItem"
,
MHEG5DESELECTITEM
},
160
{
":ToggleItem"
,
MHEG5TOGGLEITEM
},
161
{
":ScrollItems"
,
MHEG5SCROLLITEMS
},
162
{
":SetFirstItem"
,
MHEG5SETFIRSTITEM
},
163
{
":GetFirstItem"
,
MHEG5GETFIRSTITEM
},
164
{
":GetListSize"
,
MHEG5GETLISTSIZE
},
165
{
":SetCellPosition"
,
MHEG5SETCELLPOSITION
},
166
167
/*
168
Visible Actions
169
*/
170
{
":SetPosition"
,
MHEG5SETPOSITION
},
171
{
":GetPosition"
,
MHEG5GETPOSITION
},
172
{
":SetBoxSize"
,
MHEG5SETBOXSIZE
},
173
{
":GetBoxSize"
,
MHEG5GETBOXSIZE
},
174
{
":BringToFront"
,
MHEG5BRINGTOFRONT
},
175
{
":SendToBack"
,
MHEG5SENDTOBACK
},
176
{
":PutBefore"
,
MHEG5PUTBEFORE
},
177
{
":PutBehind"
,
MHEG5PUTBEHIND
},
178
{
":SetPaletteRef"
,
MHEG5SETPALETTEREF
},
179
180
/*
181
Bitmap Actions
182
*/
183
{
":ScaleBitmap"
,
MHEG5SCALEBITMAP
},
184
{
":SetTransparency"
,
MHEG5SETTRANSPARENCY
},
185
{
":SetBitmapDecodeOffset"
,
MHEG5SETBITMAPDECODEOFFSET
},
186
{
":GetBitmapDecodeOffset"
,
MHEG5GETBITMAPDECODEOFFSET
},
187
188
/*
189
LineArt Actions
190
*/
191
{
":SetLineColour"
,
MHEG5SETLINECOLOUR
},
192
{
":SetLineStyle"
,
MHEG5SETLINESTYLE
},
193
{
":SetLineWidth"
,
MHEG5SETLINEWIDTH
},
194
{
":SetFillColour"
,
MHEG5SETFILLCOLOUR
},
195
196
/*
197
DynamicLineArt Actions
198
*/
199
{
":GetLineColour"
,
MHEG5GETLINECOLOUR
},
200
{
":GetLineStyle"
,
MHEG5GETLINESTYLE
},
201
{
":GetLineWidth"
,
MHEG5GETLINEWIDTH
},
202
{
":GetFillColour"
,
MHEG5GETFILLCOLOUR
},
203
{
":DrawArc"
,
MHEG5DRAWARC
},
204
{
":DrawLine"
,
MHEG5DRAWLINE
},
205
{
":DrawOval"
,
MHEG5DRAWOVAL
},
206
{
":DrawPolygon"
,
MHEG5DRAWPOLYGON
},
207
{
":DrawPolyline"
,
MHEG5DRAWPOLYLINE
},
208
{
":DrawRectangle"
,
MHEG5DRAWRECTANGLE
},
209
{
":DrawSector"
,
MHEG5DRAWSECTOR
},
210
{
":Clear"
,
MHEG5CLEAR
},
211
212
/*
213
Text Actions
214
*/
215
{
":GetTextContent"
,
MHEG5GETTEXTCONTENT
},
216
{
":GetTextData"
,
MHEG5GETTEXTDATA
},
217
{
":SetFontRef"
,
MHEG5SETFONTREF
},
218
{
":SetTextColour"
,
MHEG5SETTEXTCOLOUR
},
219
{
":SetFontAttributes"
,
MHEG5SETFONTATTRIBUTES
},
220
{
":SetBackgroundColour"
,
MHEG5SETBACKGROUNDCOLOUR
},
221
222
/*
223
Stream Actions
224
*/
225
{
":SetCounterTrigger"
,
MHEG5SETCOUNTERTRIGGER
},
226
{
":SetSpeed"
,
MHEG5SETSPEED
},
227
{
":SetCounterEndPosition"
,
MHEG5SETCOUNTERENDPOSITION
},
228
{
":SetCounterPosition"
,
MHEG5SETCOUNTERPOSITION
},
229
{
":GetCounterPosition"
,
MHEG5GETCOUNTERPOSITION
},
230
{
":GetCounterMaxPosition"
,
MHEG5GETCOUNTERMAXPOSITION
},
231
232
/*
233
Audio Actions
234
*/
235
{
":SetVolume"
,
MHEG5SETVOLUME
},
236
{
":GetVolume"
,
MHEG5GETVOLUME
},
237
238
/*
239
Video Actions
240
*/
241
{
":ScaleVideo"
,
MHEG5SCALEVIDEO
},
242
{
":SetVideoDecodeOffset"
,
MHEG5SETVIDEODECODEOFFSET
},
243
{
":GetVideoDecodeOffset"
,
MHEG5GETVIDEODECODEOFFSET
},
244
245
/*
246
RTGraphics Actions
247
*/
248
/*
249
Interactible Actions
250
*/
251
{
":SetInteractionStatus"
,
MHEG5SETINTERACTIONSTATUS
},
252
{
":GetInteractionStatus"
,
MHEG5GETINTERACTIONSTATUS
},
253
{
":SetHighlightStatus"
,
MHEG5SETHIGHLIGHTSTATUS
},
254
{
":GetHighlightStatus"
,
MHEG5GETHIGHLIGHTSTATUS
},
255
256
/*
257
Slider Actions
258
*/
259
{
":Step"
,
MHEG5STEP
},
260
{
":SetSliderValue"
,
MHEG5SETSLIDERVALUE
},
261
{
":GetSliderValue"
,
MHEG5GETSLIDERVALUE
},
262
{
":SetPortion"
,
MHEG5SETPORTION
},
263
{
":GetPortion"
,
MHEG5GETPORTION
},
264
{
":SetSliderParams"
,
MHEG5SETSLIDERPARAMETERS
},
265
266
/*
267
EntryField Actions
268
*/
269
{
":SetOverwriteMode"
,
MHEG5SETOVERWRITEMODE
},
270
{
":GetOverwriteMode"
,
MHEG5GETOVERWRITEMODE
},
271
{
":SetEntryPoint"
,
MHEG5SETENTRYPOINT
},
272
{
":GetEntryPoint"
,
MHEG5GETENTRYPOINT
},
273
/*
274
HyperText Actions
275
*/
276
{
":GetLastAnchorFired"
,
MHEG5GETLASTANCHORFIRED
},
277
278
/*
279
Button Actions
280
*/
281
{
":Select"
,
MHEG5SELECT
},
282
{
":Deselect"
,
MHEG5DESELECT
},
283
284
/*
285
Hotspot Actions
286
*/
287
/*
288
Pushbutton Actions
289
*/
290
{
":SetLabel"
,
MHEG5SETLABEL
},
291
{
":GetLabel"
,
MHEG5GETLABEL
},
292
293
/*
294
Switchbutton Actions
295
*/
296
{
":GetSelectionStatus"
,
MHEG5GETSELECTIONSTATUS
},
297
{
":Toggle"
,
MHEG5TOGGLE
},
298
299
/*
300
END
301
*/
302
{ 0,
MHEG5NONEACTION
}
303
};
304
305
#endif
/* #if defined (MH5PRINTOUT) || defined (MHEG5LOG) */
306
307
308
#if defined(MH5PRINTOUT) || defined(MHEG5LOG) || defined(TRACING)
309
310
extern
int
event_indent_num;
311
/*
312
For debuging
313
*/
314
const
char
*
MHEG5actionToString
(
MHEG5ElemActionType
action)
315
{
316
int
i = 0;
317
318
while
(MHEG5actiontoken[i].token != 0)
319
{
320
if
(MHEG5actiontoken[i].action == action)
321
return
MHEG5actiontoken[i].token;
322
i++;
323
}
324
return
0;
325
}
326
327
#endif
328
329
#ifdef MH5PRINTOUT
330
331
extern
int
mheg_trace_source;
332
333
void
MHEG5PrintAction
(
MHEG5Root
*t,
MHEG5ElemActionType
a,
MHEG5GList
*l)
334
{
335
int
ind = (event_indent_num << 1);
336
char
buff[256];
337
if
(mheg_trace_source & 2)
338
{
339
buff[ind + 1] = 0;
340
while
(ind > 0)
341
buff[ind--] =
' '
;
342
buff[0] =
'\n'
;
343
strcat(buff,
MHEG5actionToString
(a));
344
printf(buff);
345
MHEG5gListPrint(l, buff, 255);
346
}
347
}
348
349
#endif
MHEG5SETLINEWIDTH
Definition:
mh5action.h:139
MHEG5SETENTRYPOINT
Definition:
mh5action.h:130
MHEG5SETINPUTMASK
Definition:
mh5action.h:180
MHEG5GETCOUNTERPOSITION
Definition:
mh5action.h:177
MHEG5CLONE
Definition:
mh5action.h:59
MHEG5GETCOUNTERMAXPOSITION
Definition:
mh5action.h:178
MHEG5SETBACKGROUNDCOLOUR
Definition:
mh5action.h:163
MHEG5MOVETO
Definition:
mh5action.h:106
MHEG5SETCOUNTERPOSITION
Definition:
mh5action.h:125
MHEG5PUTBEFORE
Definition:
mh5action.h:110
MHEG5TOGGLEITEM
Definition:
mh5action.h:157
MHEG5SETOVERWRITEMODE
Definition:
mh5action.h:140
MHEG5SETINTERACTIONSTATUS
Definition:
mh5action.h:135
MHEG5GETENGINESUPPORT
Definition:
mh5action.h:78
MHEG5MODULO
Definition:
mh5action.h:104
MHEG5SETVIDEODECODEOFFSET
Definition:
mh5action.h:168
MHEG5SELECT
Definition:
mh5action.h:118
MHEG5SETTEXTCOLOUR
Definition:
mh5action.h:166
MHEG5MULTIPLY
Definition:
mh5action.h:107
MHEG5GETBITMAPDECODEOFFSET
Definition:
mh5action.h:173
MHEG5SENDTOBACK
Definition:
mh5action.h:121
MHEG5GETSELECTIONSTATUS
Definition:
mh5action.h:96
MHEG5STEP
Definition:
mh5action.h:151
MHEG5DRAWSECTOR
Definition:
mh5action.h:72
MHEG5GETLASTANCHORFIRED
Definition:
mh5action.h:86
MHEG5SETSLIDERVALUE
Definition:
mh5action.h:144
MHEG5ACTIVATE
Definition:
mh5action.h:51
MHEG5CLEAR
Definition:
mh5action.h:58
MHEG5GETTEXTCONTENT
Definition:
mh5action.h:98
MHEG5SETCOUNTERENDPOSITION
Definition:
mh5action.h:124
MHEG5DESELECT
Definition:
mh5action.h:63
MHEG5GETPOSITION
Definition:
mh5action.h:94
MHEG5GETFILLCOLOUR
Definition:
mh5action.h:80
MHEG5SCROLLITEMS
Definition:
mh5action.h:117
MHEG5GETLABEL
Definition:
mh5action.h:85
MHEG5DRAWRECTANGLE
Definition:
mh5action.h:71
MHEG5ADD
Definition:
mh5action.h:52
MHEG5TOGGLE
Definition:
mh5action.h:156
MHEG5SETCOUNTERTRIGGER
Definition:
mh5action.h:126
MHEG5NONEACTION
Definition:
mh5action.h:50
MHEG5SETLABEL
Definition:
mh5action.h:136
MHEG5DRAWOVAL
Definition:
mh5action.h:68
MHEG5DRAWPOLYLINE
Definition:
mh5action.h:70
MHEG5CALLACTIONSLOT
Definition:
mh5action.h:57
MHEG5ElemActionType
MHEG5Short MHEG5ElemActionType
Definition:
mh5action.h:184
MHEG5GETENTRYPOINT
Definition:
mh5action.h:79
MHEG5CLOSECONNECTION
Definition:
mh5action.h:60
MHEG5GETCELLITEM
Definition:
mh5action.h:76
MHEG5GETPORTION
Definition:
mh5action.h:93
MHEG5SETCURSORSHAPE
Definition:
mh5action.h:128
MHEG5SETFONTREF
Definition:
mh5action.h:133
MHEG5GETLISTSIZE
Definition:
mh5action.h:91
MHEG5GETLINECOLOUR
Definition:
mh5action.h:87
MHEG5DESELECTITEM
Definition:
mh5action.h:64
MHEG5SPAWN
Definition:
mh5action.h:150
MHEG5GETOVERWRITEMODE
Definition:
mh5action.h:92
MHEG5DRAWLINE
Definition:
mh5action.h:67
MHEG5SETTRANSPARENCY
Definition:
mh5action.h:147
MHEG5APPEND
Definition:
mh5action.h:54
MHEG5GETLISTITEM
Definition:
mh5action.h:90
MHEG5actionToString
const char * MHEG5actionToString(MHEG5ElemActionType action)
MHEG5SETVOLUME
Definition:
mh5action.h:149
MHEG5BRINGTOFRONT
Definition:
mh5action.h:55
MHEG5GETVIDEODECODEOFFSET
Definition:
mh5action.h:169
MHEG5QUIT
Definition:
mh5action.h:112
MHEG5SCALEVIDEO
Definition:
mh5action.h:116
MHEG5GETHIGHLIGHTSTATUS
Definition:
mh5action.h:82
MHEG5LAUNCH
Definition:
mh5action.h:102
MHEG5LOCKSCREEN
Definition:
mh5action.h:103
MHEG5SETBITMAPDECODEOFFSET
Definition:
mh5action.h:172
sMHEG5GList
Definition:
mh5base.h:169
MHEG5CALL
Definition:
mh5action.h:56
MHEG5SENDEVENT
Definition:
mh5action.h:120
MHEG5SETDATA
Definition:
mh5action.h:129
MHEG5GETRUNNINGSTATUS
Definition:
mh5action.h:95
MHEG5GETBOXSIZE
Definition:
mh5action.h:75
MHEG5STOREPERSISTENT
Definition:
mh5action.h:153
MHEG5SETPORTION
Definition:
mh5action.h:142
MHEG5SETHIGHLIGHTSTATUS
Definition:
mh5action.h:134
MHEG5SCALEBITMAP
Definition:
mh5action.h:115
MHEG5STOP
Definition:
mh5action.h:152
MHEG5SETBOXSIZE
Definition:
mh5action.h:122
MHEG5SETCELLPOSITION
Definition:
mh5action.h:164
MHEG5SETFIRSTITEM
Definition:
mh5action.h:132
MHEG5RUN
Definition:
mh5action.h:114
MHEG5SETINPUTREGISTER
Definition:
mh5action.h:165
MHEG5SETLINECOLOUR
Definition:
mh5action.h:137
MHEG5DELITEM
Definition:
mh5action.h:62
MHEG5SETFILLCOLOUR
Definition:
mh5action.h:131
MHEG5ADDITEM
Definition:
mh5action.h:53
MHEG5SELECTITEM
Definition:
mh5action.h:119
MHEG5READPERSISTENT
Definition:
mh5action.h:113
MHEG5TRANSITIONTO
Definition:
mh5action.h:158
MHEG5GETTOKENPOSITION
Definition:
mh5action.h:100
MHEG5GETSLIDERVALUE
Definition:
mh5action.h:97
MHEG5DRAWARC
Definition:
mh5action.h:66
MHEG5GETCURSORPOSITION
Definition:
mh5action.h:77
MHEG5SETSPEED
Definition:
mh5action.h:145
MHEG5GETINTERACTIONSTATUS
Definition:
mh5action.h:83
MHEG5SETLINESTYLE
Definition:
mh5action.h:138
MHEG5DIVIDE
Definition:
mh5action.h:65
mh5actiontokens.h
action to string conversion
MHEG5SETVARIABLE
Definition:
mh5action.h:148
MHEG5SETCURSORPOSITION
Definition:
mh5action.h:127
MHEG5GETITEMSTATUS
Definition:
mh5action.h:84
sMHEG5Root
Definition:
mh5root.h:43
MHEG5TESTVARIABLE
Definition:
mh5action.h:155
MHEG5PrintAction
void MHEG5PrintAction(MHEG5Root *t, MHEG5ElemActionType a, MHEG5GList *l)
MHEG5DRAWPOLYGON
Definition:
mh5action.h:69
MHEG5DEACTIVATE
Definition:
mh5action.h:61
MHEG5SETTIMER
Definition:
mh5action.h:146
MHEG5GETLINESTYLE
Definition:
mh5action.h:88
MHEG5SETPOSITION
Definition:
mh5action.h:143
MHEG5OPENCONNECTION
Definition:
mh5action.h:108
MHEG5SETFONTATTRIBUTES
Definition:
mh5action.h:167
MHEG5SETSLIDERPARAMETERS
Definition:
mh5action.h:174
MHEG5SETCACHEPRIORITY
Definition:
mh5action.h:123
MHEG5SETPALETTEREF
Definition:
mh5action.h:141
MHEG5GETFIRSTITEM
Definition:
mh5action.h:81
MHEG5UNLOCKSCREEN
Definition:
mh5action.h:160
MHEG5MOVE
Definition:
mh5action.h:105
MHEG5FORK
Definition:
mh5action.h:73
MHEG5GETTEXTDATA
Definition:
mh5action.h:99
MHEG5PRELOAD
Definition:
mh5action.h:109
MHEG5UNLOAD
Definition:
mh5action.h:159
MHEG5GETLINEWIDTH
Definition:
mh5action.h:89
MHEG5GETVOLUME
Definition:
mh5action.h:101
MHEG5SUBTRACT
Definition:
mh5action.h:154
MHEG5PUTBEHIND
Definition:
mh5action.h:111
MHEG5GETAVAILABILITYSTATUS
Definition:
mh5action.h:74
Generated by
1.8.11