MHEG5  15.3.0
source/classes/src/mh5scene.c File Reference

Implementation of the MHEG5 Scene Class Scene Class Defines a set of Ingredient objects to be activated together. Base class: Group Subclasses: None Status: Concrete class. More...

#include <string.h>
#include "mh5base.h"
#include "mh5profile.h"
#include "mh5scene.h"
#include "mh5object.h"
#include "mh5gate.h"
#include "mh5variable.h"
#include "mh5memory.h"
#include "tmcursor.h"
#include "mh5application.h"
#include "mh5display.h"
#include "mh5final.h"
#include "mh5cursorshape.h"
#include "mh5queue.h"
#include "mh5fileorm.h"
#include "mh5keypress.h"
#include "mh5debug.h"
#include "dvb_video.h"
#include "dvb_misc.h"
#include "mg_osd.h"
#include "fpa1_parserInvoke.h"

Functions

MHEG5SceneMHEG5getCurrentScene (void)
 This function returns the current scene.
void MHEG5sceneInit (MHEG5Scene *scene)
 Initialise a scene object with default values.
void MHEG5sceneFree (MHEG5Scene *scene)
 Free off all memory associated with the specified object, including any exchanged attributes and internal data. The data holding the object itself is not freed.
void MHEG5scenePrepare (MHEG5Scene *scene)
 Apply the preparation behaviour of the scene class. As this class has no own preparation behaviour this function just invokes the preparation behaviour from the base class.
void MHEG5sceneDestruct (MHEG5Scene *scene)
 Destruct a scene object.
void MHEG5sceneActivate (MHEG5Scene *scene)
 Apply the activation behaviour of the scene class. As this class has no own activation behaviour this function just invokes the activation behaviour from the base class.
void MHEG5sceneDeactivate (MHEG5Scene *scene)
 Apply the deactivation behaviour of the scene class. As this class has no own deactivation behaviour this function just invokes the deactivation behaviour from the base class.
MHEG5ErrorCode MHEG5transitionTo (MHEG5Root *target, MHEG5GList *params)
 This function performs the TransitionTo action which leads to a new scene. Implementation of the TransitionTo ( Target [ConnectionTag] [TransitionEffect] ) action of the scene class. |NOTE:| Neither `TransitionEffect` nor `ConnectionTag` are currently implemented. Actions: TransitionTo (ConnectionTag, TransitionEffect) Check that target scene is different from active scene; if it is not, ignore action, if it is, remove the active Scene from the screen and replace it with the target Scene as follows. Execute synchronously the following sequence of actions: 1. Apply the Deactivation behaviour to all active Ingredient objects of the currently active Application object that have the Shared parameter set to False in the reverse order that they are listed in the Items attribute of the application object. 2. Apply the Deactivation and Destruction behaviours to the Scene object currently active, if any. (This starts the transition effect) 3. Apply the Preparation behaviour to the Scene object to which the TransitionTo action was targeted. 4. Apply the Activation behaviour to the Scene object to which the TransitionTo action was targeted. (This stops the transition effect.) The timeline for the new scene starts after generation of the IsRunning event. This action has an optional parameter called ConnectionTag. If this parameter is not encoded, the Scene reference shall be resolved within the name space of the active Application object. If the ConnectionTag parameter is encoded, the reference to the target Scene and all ContentReferences made from the target Scene shall be resolved within a name space that is used for communication over a communication link with the tag ConnectionTag (see the action OpenConnection in the Application class). In addition, this action has a TransitionEffect parameter, which determines what type of visual transition effect to be implemented when performing the TransitionTo action. Implementing any transition effect is optional for the MHEG-5 engine. The encoding of the TransitionEffect attribute has to be specified by the application domain. Provisions of use: The Target object shall be a non-available Scene object. ToDo: NOT SUPPORTED - Transition Effect, Connection Tag.
MHEG5ErrorCode MHEG5sendEventAction (MHEG5Root *target, MHEG5GList *params)
 The actions inserts an event defined by the given parameters into the systems event queue. Implementation of the SendEvent (EmulatedEventSource, EmulatedEventType, EmulatedEventData) action of the scene class. SendEvent (EmulatedEventSource, EmulatedEventType, EmulatedEventData) Force the occurrence of an event. Execute the following sequence of actions: 1. Generate an event corresponding to EmulatedEventType, EmulatedEventSource and EmulatedEventData as if it has been generated in the normal way. 2. Store this event in the synchronous or asynchronous event queue, according to EmulatedEventType. Provisions of use: The Target object shall be the active Scene object. EmulatedEventSource shall refer to an MHEG-5 object compatible with EmulatedEventType. EmulatedEventData shall be either a direct value, or a reference to an active Variable object of a type compatible with the associated data of EmulatedEventType.
MHEG5ErrorCode MHEG5setCursorShape (MHEG5Root *target, MHEG5GList *params)
 This action sets a new cursor shape. Implementation of the SetCursorShape (NewCursorShape) action of the scene class. SetCursorShape (NewCursorShape) Set the shape of the free moving cursor. This action shall have an effect only if the free-moving cursor option is implemented by the MHEG-5 engine. If the NewCursorShape parameter is not encoded, the cursor is removed from the Scene. Provisions of use: The Target object shall be the active Scene object. NewCursorShape shall refer to an active CursorShape object.
MHEG5ErrorCode MHEG5setCursorPosition (MHEG5Root *target, MHEG5GList *params)
 This action sets the cursor position to the values given as parameters. Implementation of the SetCursorPosition (XCursor, YCursor) action of the scene class. SetCursorPosition (XCursor, YCursor) Set the position of the free moving cursor. This action shall have an effect only if the free-moving cursor option is implemented by the MHEG-5 engine. Execute the following sequence of actions: 1. Set the position of the cursor pointer within the coordinate space of the Scene. 2. Generate CursorLeave and CursorEnter events if Interactible objects are affected by the effect of this action. If an Interactible B overlaps another one A, a SetCursorPosition from a *point in A (not in B) to a point within the overlapping area shall generate a CursorLeave(A) and a CursorEnter(B). Provisions of use: The Target object shall be the active Scene object. XCursor and YCursor shall correspond to a location within the rectangle defined by the SceneCoordinateSystem attribute of the active Scene.
MHEG5ErrorCode MHEG5getCursorPosition (MHEG5Root *target, MHEG5GList *params)
 The effect of this action is that the current cursor position is retrieved and stored in the given variables. Implementation of the GetCursorPosition (XOutVar, YOutVar) action of the scene class. GetCursorPosition (XOut, YOut) Set the Variables referenced by XOut and YOut to the location of the free moving cursor within the coordinate space of the Scene. This action shall have an effect only if the free-moving cursor option is implemented by the MHEG-5 engine. Provisions of use: The Target object shall be the active Scene object. XOut and YOut shall refer to active IntegerVariable objects.
MHEG5ErrorCode MHEG5setInputRegister (MHEG5Root *target, MHEG5GList *params)
 Change the InputEventRegister attribute of the target Scene object. Changing the register will affect how subsequent key presses are handled by the Scene. Note that key events generated before the ElementaryAction are unchanged. Provisions of use: The target object shall be an available Scene object.
MHEG5ErrorCode MHEG5setInputMask (MHEG5Root *target, MHEG5GList *params)
 Change the InputMask attribute of the target Scene object. Changing the registermask will affect how subsequent key presses are handled by the Scene. Note that key events generated before the ElementaryAction are unchanged. Provisions of use: The target object shall be an available Scene object.

Detailed Description

Implementation of the MHEG5 Scene Class Scene Class Defines a set of Ingredient objects to be activated together. Base class: Group Subclasses: None Status: Concrete class.

Date:
01/02/2002
Author:
R.Freeman

Function Documentation

This function returns the current scene.

<Function description>="">

Returns:
The function returns an MHEG5Scene pointer to the current scene. If there is currently no active scene, 0 is returned.
MHEG5ErrorCode MHEG5getCursorPosition ( MHEG5Root target,
MHEG5GList params 
)

The effect of this action is that the current cursor position is retrieved and stored in the given variables. Implementation of the GetCursorPosition (XOutVar, YOutVar) action of the scene class. GetCursorPosition (XOut, YOut) Set the Variables referenced by XOut and YOut to the location of the free moving cursor within the coordinate space of the Scene. This action shall have an effect only if the free-moving cursor option is implemented by the MHEG-5 engine. Provisions of use: The Target object shall be the active Scene object. XOut and YOut shall refer to active IntegerVariable objects.

Parameters:
targettarget object for this action
paramsFunction parameters
Returns:
MHEG5ErrorCode
void MHEG5sceneActivate ( MHEG5Scene scene)

Apply the activation behaviour of the scene class. As this class has no own activation behaviour this function just invokes the activation behaviour from the base class.

Parameters:
sceneScene instance
Returns:
None.
void MHEG5sceneDeactivate ( MHEG5Scene scene)

Apply the deactivation behaviour of the scene class. As this class has no own deactivation behaviour this function just invokes the deactivation behaviour from the base class.

Parameters:
sceneScene instance
Returns:
None.
void MHEG5sceneDestruct ( MHEG5Scene scene)

Destruct a scene object.

Parameters:
sceneScene instance
Returns:
None.
void MHEG5sceneFree ( MHEG5Scene scene)

Free off all memory associated with the specified object, including any exchanged attributes and internal data. The data holding the object itself is not freed.

Parameters:
scenePointer to object to free.
Returns:
Void
void MHEG5sceneInit ( MHEG5Scene scene)

Initialise a scene object with default values.

Parameters:
scenePointer to object to initialise
Returns:
void
void MHEG5scenePrepare ( MHEG5Scene scene)

Apply the preparation behaviour of the scene class. As this class has no own preparation behaviour this function just invokes the preparation behaviour from the base class.

Parameters:
sceneScene instance
Returns:
None.
MHEG5ErrorCode MHEG5sendEventAction ( MHEG5Root target,
MHEG5GList params 
)

The actions inserts an event defined by the given parameters into the systems event queue. Implementation of the SendEvent (EmulatedEventSource, EmulatedEventType, EmulatedEventData) action of the scene class. SendEvent (EmulatedEventSource, EmulatedEventType, EmulatedEventData) Force the occurrence of an event. Execute the following sequence of actions: 1. Generate an event corresponding to EmulatedEventType, EmulatedEventSource and EmulatedEventData as if it has been generated in the normal way. 2. Store this event in the synchronous or asynchronous event queue, according to EmulatedEventType. Provisions of use: The Target object shall be the active Scene object. EmulatedEventSource shall refer to an MHEG-5 object compatible with EmulatedEventType. EmulatedEventData shall be either a direct value, or a reference to an active Variable object of a type compatible with the associated data of EmulatedEventType.

Parameters:
targettarget object for this action
paramsFunction parameters
Returns:
MHEG5ErrorCode
MHEG5ErrorCode MHEG5setCursorPosition ( MHEG5Root target,
MHEG5GList params 
)

This action sets the cursor position to the values given as parameters. Implementation of the SetCursorPosition (XCursor, YCursor) action of the scene class. SetCursorPosition (XCursor, YCursor) Set the position of the free moving cursor. This action shall have an effect only if the free-moving cursor option is implemented by the MHEG-5 engine. Execute the following sequence of actions: 1. Set the position of the cursor pointer within the coordinate space of the Scene. 2. Generate CursorLeave and CursorEnter events if Interactible objects are affected by the effect of this action. If an Interactible B overlaps another one A, a SetCursorPosition from a *point in A (not in B) to a point within the overlapping area shall generate a CursorLeave(A) and a CursorEnter(B). Provisions of use: The Target object shall be the active Scene object. XCursor and YCursor shall correspond to a location within the rectangle defined by the SceneCoordinateSystem attribute of the active Scene.

Parameters:
targettarget object for this action
paramsFunction parameters
Returns:
MHEG5ErrorCode
MHEG5ErrorCode MHEG5setCursorShape ( MHEG5Root target,
MHEG5GList params 
)

This action sets a new cursor shape. Implementation of the SetCursorShape (NewCursorShape) action of the scene class. SetCursorShape (NewCursorShape) Set the shape of the free moving cursor. This action shall have an effect only if the free-moving cursor option is implemented by the MHEG-5 engine. If the NewCursorShape parameter is not encoded, the cursor is removed from the Scene. Provisions of use: The Target object shall be the active Scene object. NewCursorShape shall refer to an active CursorShape object.

Parameters:
targettarget object for this action
paramsFunction parameters
Returns:
MHEG5ErrorCode
MHEG5ErrorCode MHEG5setInputMask ( MHEG5Root target,
MHEG5GList params 
)

Change the InputMask attribute of the target Scene object. Changing the registermask will affect how subsequent key presses are handled by the Scene. Note that key events generated before the ElementaryAction are unchanged. Provisions of use: The target object shall be an available Scene object.

Parameters:
targettarget object for this action
paramsFunction parameters
Returns:
MHEG5ErrorCode
MHEG5ErrorCode MHEG5setInputRegister ( MHEG5Root target,
MHEG5GList params 
)

Change the InputEventRegister attribute of the target Scene object. Changing the register will affect how subsequent key presses are handled by the Scene. Note that key events generated before the ElementaryAction are unchanged. Provisions of use: The target object shall be an available Scene object.

Parameters:
targettarget object for this action
paramsFunction parameters
Returns:
MHEG5ErrorCode
MHEG5ErrorCode MHEG5transitionTo ( MHEG5Root target,
MHEG5GList params 
)

This function performs the TransitionTo action which leads to a new scene. Implementation of the TransitionTo ( Target [ConnectionTag] [TransitionEffect] ) action of the scene class. |NOTE:| Neither `TransitionEffect` nor `ConnectionTag` are currently implemented. Actions: TransitionTo (ConnectionTag, TransitionEffect) Check that target scene is different from active scene; if it is not, ignore action, if it is, remove the active Scene from the screen and replace it with the target Scene as follows. Execute synchronously the following sequence of actions: 1. Apply the Deactivation behaviour to all active Ingredient objects of the currently active Application object that have the Shared parameter set to False in the reverse order that they are listed in the Items attribute of the application object. 2. Apply the Deactivation and Destruction behaviours to the Scene object currently active, if any. (This starts the transition effect) 3. Apply the Preparation behaviour to the Scene object to which the TransitionTo action was targeted. 4. Apply the Activation behaviour to the Scene object to which the TransitionTo action was targeted. (This stops the transition effect.) The timeline for the new scene starts after generation of the IsRunning event. This action has an optional parameter called ConnectionTag. If this parameter is not encoded, the Scene reference shall be resolved within the name space of the active Application object. If the ConnectionTag parameter is encoded, the reference to the target Scene and all ContentReferences made from the target Scene shall be resolved within a name space that is used for communication over a communication link with the tag ConnectionTag (see the action OpenConnection in the Application class). In addition, this action has a TransitionEffect parameter, which determines what type of visual transition effect to be implemented when performing the TransitionTo action. Implementing any transition effect is optional for the MHEG-5 engine. The encoding of the TransitionEffect attribute has to be specified by the application domain. Provisions of use: The Target object shall be a non-available Scene object. ToDo: NOT SUPPORTED - Transition Effect, Connection Tag.

Parameters:
targettarget object for this action
paramsFunction parameter
Returns:
MHEG5ErrorCode
 All Data Structures Files Functions Variables Typedefs Defines