MHEG5  18.9.0
MHEG5 Documentation
mh5presentable.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  *******************************************************************************/
32 /*---includes for this file--------------------------------------------------*/
33 #include "mh5profile.h"
34 #include "mh5presentable.h"
35 #include "mh5object.h"
36 #include "mh5classes.h"
37 #include "mh5debug.h"
38 
39 /*---constant definitions for this file--------------------------------------*/
40 
41 
42 /*---local typedef structs for this file-------------------------------------*/
43 
44 /*---local (static) variable declarations for this file----------------------*/
45 
46 /*---local function definitions----------------------------------------------*/
47 
48 /*---global function definitions---------------------------------------------*/
49 
56 /*
57  */
58 
59 /*
60  27.1 Attributes
61  This subclause defines the inherited, exchanged and internal attributes for this class.
62  27.1.1 Inherited attributes
63  This class has all the attributes of its base class, with identical semantics.
64  27.1.2 Own exchanged attributes
65  This class defines no additional exchanged attribute.
66  27.1.3 Own internal attributes
67  This class defines no additional internal attribute.
68  27.2 Events
69  This class has the same events as its base class, with identical semantics.
70  27.3 Internal behaviours
71  The internal behaviours of this class have the same semantics as for its base class.
72  */
73 
74 /*
75  27.4 Effect of MHEG-5 actions
76  This class has the same set of MHEG-5 actions as its base class, with identical semantics, except as noted
77  below (SetData). In addition, the following applicable MHEG-5 actions are defined:
78 
79  SetData
80  Execute synchronously the following actions:
81  1. Execute the SetData action as defined in the Ingredient class.
82  2. If the Presentable is active, present it again immediately using the new
83  value of Content.
84  Provisions of use and syntax description are provided in the Ingredient class.
85 
86  Added this behaviour in SetData Action at Ingredient!!
87  */
88 
89 /*
90  Run
91  Execute the following actions:
92  1. If the target Presentable is active, disregard this action.
93  2. If the target Presentable is non-available or is inactive, apply the Activation
94  behaviour of the Presentable.
95  */
97 {
98  assert(target);
99 
100  if (!target->runningStatus)
101  {
102  switch (target->clazz)
103  {
104  case MHEG5BITMAP:
105  MHEG5bitmapActivate((MHEG5Bitmap *) target);
106  break;
107  case MHEG5TEXT:
108  MHEG5textActivate((MHEG5Text *) target);
109  break;
110  case MHEG5LINEART:
112  break;
113  case MHEG5DYNAMICLINEART:
115  break;
116  case MHEG5RECTANGLE:
118  break;
120  case MHEG5REMOTEPROGRAM:
123  break;
124  case MHEG5STREAM:
125  MHEG5streamActivate((MHEG5Stream *) target);
126  break;
127  case MHEG5AUDIO:
128  MHEG5audioActivate((MHEG5Audio *) target);
129  break;
130  case MHEG5VIDEO:
131  MHEG5videoActivate((MHEG5Video *) target);
132  break;
133  #ifndef MHEG5PROFILE_UK1_06
134  case MHEG5HOTSPOT:
136  break;
137  case MHEG5PUSHBUTTON:
139  break;
140  case MHEG5SWITCHBUTTON:
142  break;
143  case MHEG5RTGRAPHICS:
145  break;
146  #endif
147  case MHEG5TOKENGROUP:
149  break;
150  case MHEG5LISTGROUP:
152  break;
153  case MHEG5ENTRYFIELD:
155  break;
156  case MHEG5HYPERTEXT:
158  break;
159  case MHEG5SLIDER:
160  MHEG5sliderActivate((MHEG5Slider *)target);
161  break;
162  case MHEG5SCENE:
163  case MHEG5APPLICATION:
164  case MHEG5LINK:
170  case MHEG5PALETTE:
171  case MHEG5CURSORSHAPE:
172  case MHEG5FONT:
173  default:;
174  }
175  }
176  return MHEG5ERR_NOERROR;
177 }
178 
179 /*
180  Stop
181  Execute the following actions:
182  1. If the target Presentable is inactive, disregard this action.
183  2. If the target Presentable is active, apply the Deactivation behaviour of the
184  Presentable.
185 
186  Provisions of use:
187  The Target object shall be available.
188  */
189 /*
190  Stop from Program Class
191  Interrupt the execution of an external piece of procedural code.
192  Execute the following sequence of actions:
193  1. If the Program is inactive, disregard this action. Otherwise,
194  2. Apply the Deactivation behaviour.
195 
196  Provisions of use:
197  The Target object shall be an available Program object.
198  */
200 {
201  assert(target);
202 
203  if (target->runningStatus)
204  {
205  switch (target->clazz)
206  {
207  case MHEG5BITMAP:
209  break;
210  case MHEG5TEXT:
211  MHEG5textDeactivate((MHEG5Text *) target);
212  break;
213  case MHEG5LINEART:
215  break;
216  case MHEG5DYNAMICLINEART:
218  break;
219  case MHEG5RECTANGLE:
221  break;
223  case MHEG5REMOTEPROGRAM:
226  break;
227  case MHEG5STREAM:
229  break;
230  case MHEG5AUDIO:
231  MHEG5audioDeactivate((MHEG5Audio *) target);
232  break;
233  case MHEG5VIDEO:
234  MHEG5videoDeactivate((MHEG5Video *) target);
235  break;
236  #ifndef MHEG5PROFILE_UK1_06
237  case MHEG5HOTSPOT:
239  break;
240  case MHEG5PUSHBUTTON:
242  break;
243  case MHEG5SWITCHBUTTON:
245  break;
246  case MHEG5RTGRAPHICS:
248  break;
249  #endif
250  case MHEG5TOKENGROUP:
252  break;
253  case MHEG5LISTGROUP:
255  break;
256  case MHEG5ENTRYFIELD:
258  break;
259  case MHEG5HYPERTEXT:
261  break;
262  case MHEG5SLIDER:
264  break;
265  case MHEG5SCENE:
266  case MHEG5APPLICATION:
267  case MHEG5LINK:
273  case MHEG5PALETTE:
274  case MHEG5CURSORSHAPE:
275  case MHEG5FONT:
276  default:;
277  }
278  }
279  return MHEG5ERR_NOERROR;
280 }
281 
void MHEG5hotspotDeactivate(MHEG5Hotspot *hotspot)
Definition: mh5hotspot.c:101
void MHEG5rtgraphicsActivate(MHEG5RTGraphics *rtgraphics)
Apply the activation behaviour of the RTGraphics class.
void MHEG5programDeactivate(MHEG5Program *program)
Definition: mh5program.c:314
void MHEG5tokenGroupActivate(MHEG5TokenGroup *tokenGroup)
void MHEG5dynamicLineartDeactivate(MHEG5DynamicLineart *dynamicLineart)
Apply the deactivation behaviour of the dynamiclineart class.
void MHEG5videoDeactivate(MHEG5Video *video)
Apply the deactivation behaviour of the video class. As this class has no own deactivation behaviour ...
Definition: mh5video.c:171
void MHEG5pushbuttonActivate(MHEG5Pushbutton *pushbutton)
void MHEG5rectangleDeactivate(MHEG5Rectangle *rectangle)
Definition: mh5rectangle.c:130
void MHEG5switchbuttonActivate(MHEG5Switchbutton *switchbutton)
Apply the activation behaviour of the switchbutton class. As this class has no own activation behavio...
void MHEG5audioDeactivate(MHEG5Audio *audio)
Apply the deactivation behaviour off the audio class. As this class has no own deactivation behaviour...
Definition: mh5audio.c:177
MHEG5Final clazz
Definition: mh5root.h:55
void MHEG5listGroupActivate(MHEG5ListGroup *listGroup)
Implementation of the ListGroup Activation behaviour.
Definition: mh5listgroup.c:423
void MHEG5rectangleActivate(MHEG5Rectangle *rectangle)
Definition: mh5rectangle.c:125
void MHEG5streamDeactivate(MHEG5Stream *stream)
Apply the deactivation behaviour of the stream class. Execute the following sequence of actions: ...
Definition: mh5stream.c:406
void MHEG5listGroupDeactivate(MHEG5ListGroup *listGroup)
Implementation of the ListGroup Deactivation behaviour.
Definition: mh5listgroup.c:462
void MHEG5streamActivate(MHEG5Stream *stream)
Apply the activation behaviour of the stream class. Execute the following sequence of actions: ...
Definition: mh5stream.c:340
void MHEG5videoActivate(MHEG5Video *video)
Apply the activation behaviour of the video class.
Definition: mh5video.c:141
This file defines the profile for the MHEG engine.
void MHEG5sliderActivate(MHEG5Slider *slider)
Apply the activation behaviour of the slider class. As this class has no own activation behaviour thi...
Definition: mh5slider.c:257
void MHEG5tokenGroupDeactivate(MHEG5TokenGroup *tokenGroup)
void MHEG5hypertextDeactivate(MHEG5Hypertext *hypertext)
Definition: mh5hypertext.c:291
void MHEG5entryfieldDeactivate(MHEG5Entryfield *entryfield)
Apply the deactivation behaviour of the entryfield class. As this class has no own deactivation behav...
MHEG5ErrorCode
Definition: mh5base.h:222
MHEG5ErrorCode MHEG5stop(MHEG5Root *target, MHEG5GList *params)
Implement the MHEG5 Presentable Class Description Presentable Class Defines the behaviour of objects ...
void MHEG5textDeactivate(MHEG5Text *text)
Apply the deactivation behaviour of the text class. As this class has no own deactivation behaviour t...
Definition: mh5text.c:348
void MHEG5entryfieldActivate(MHEG5Entryfield *entryfield)
Apply the activation behaviour of the entryfield class. As this class has no own activation behaviour...
Implement functions to retrieve MHEG5objects by GroupID and ID.
Mheg5 logging and debug printing.
void MHEG5bitmapActivate(MHEG5Bitmap *bitmap)
Apply the activation behaviour of the bitmap class. As this class has no own activation behaviour thi...
Definition: mh5bitmap.c:164
void MHEG5textActivate(MHEG5Text *text)
Apply the activation behaviour of the text class. As this class has no own activation behaviour this ...
Definition: mh5text.c:330
void MHEG5audioActivate(MHEG5Audio *audio)
Apply the activation behaviour off the audio class. Apply the activation behaviour of the base class...
Definition: mh5audio.c:144
MHEG5Bool runningStatus
Definition: mh5root.h:51
void MHEG5lineartDeactivate(MHEG5Lineart *lineart)
Definition: mh5lineart.c:238
void MHEG5switchbuttonDeactivate(MHEG5Switchbutton *switchbutton)
Apply the deactivation behaviour of the switchbutton class. As this class has no own deactivation beh...
void MHEG5rtgraphicsDeactivate(MHEG5RTGraphics *rtgraphics)
Apply the deactivation behaviour of the RTGraphics class. As this class has no own deactivation behav...
void MHEG5hotspotActivate(MHEG5Hotspot *hotspot)
Definition: mh5hotspot.c:95
MHEG5ErrorCode MHEG5programActivate(MHEG5Program *program)
Definition: mh5program.c:236
void MHEG5pushbuttonDeactivate(MHEG5Pushbutton *pushbutton)
Include all classes.
MHEG5ErrorCode MHEG5run(MHEG5Root *target, MHEG5GList *params)
<Function description>="">
void MHEG5hypertextActivate(MHEG5Hypertext *hypertext)
Definition: mh5hypertext.c:276
void MHEG5dynamicLineartActivate(MHEG5DynamicLineart *dynamicLineart)
Apply the activation behaviour of the dynamiclineart class.
void MHEG5sliderDeactivate(MHEG5Slider *slider)
Apply the deactivation behaviour of the slider class. As this class has no own deactivation behaviour...
Definition: mh5slider.c:276
void MHEG5lineartActivate(MHEG5Lineart *lineart)
Definition: mh5lineart.c:227
void MHEG5bitmapDeactivate(MHEG5Bitmap *bitmap)
Apply the deactivation behaviour of the bitmap class. As this class has no own deactivation behaviour...
Definition: mh5bitmap.c:210