MHEG5  18.9.0
MHEG5 Documentation
mh5cursorshape.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  *******************************************************************************/
31 /*---includes for this file--------------------------------------------------*/
32 #include "mh5cursorshape.h"
33 #include "mh5memory.h" /* for constructor */
34 #include "mh5queue.h"
35 #include <stdlib.h>
36 
37 #ifndef MHEG5PROFILE_UK1_06
38 
39 #ifdef MH5PRINTOUT
40 
41 void MHEG5cursorShapePrint(MHEG5CursorShape *cursorShape, char *out)
42 {
43  MHEG5ingredientPrint(&cursorShape->ingredient, out);
44 }
45 
46 #endif
47 
48 
55 {
56  assert(cursorShape);
57 
58  MHEG5ingredientInit(&cursorShape->ingredient);
59 }
60 
69 {
70  assert(cursorShape);
71 
72  MHEG5ingredientFree(&cursorShape->ingredient);
73 }
74 
85 {
86  assert(cursorShape);
87  MHEG5ingredientPrepare(&cursorShape->ingredient);
88 }
89 
97 {
98  assert(cursorShape);
99  MHEG5ingredientDestruct(&cursorShape->ingredient);
100 }
101 
111 {
112  assert(cursorShape);
113  if (!cursorShape->ingredient.root.availabilityStatus)
114  {
115  MHEG5cursorShapePrepare( cursorShape );
116  }
117  MHEG5ingredientActivate(&cursorShape->ingredient);
118  cursorShape->ingredient.root.runningStatus = MHEG5TRUE;
119  MHEG5sendSync((MHEG5Root *) cursorShape, MHEG5ISRUNNING, 0);
120 }
121 
122 /*
123  Deactivation
124  */
134 {
135  assert(cursorShape);
136  MHEG5ingredientDeactivate(&cursorShape->ingredient);
137 }
138 
139 #endif
MHEG5Bool availabilityStatus
Definition: mh5root.h:52
void MHEG5ingredientInit(MHEG5Ingredient *ingredient)
Initialise a ingredient object with default values.
void MHEG5cursorShapeInit(MHEG5CursorShape *cursorShape)
Initialise a CursorShape object with default values.
Implement the MHEG5 Cursorshape Class Defines encapsulation for the data structures used to represent...
void MHEG5ingredientDestruct(MHEG5Ingredient *ingredient)
Implementation of the Destruction behaviour Execute the following sequence of actions: ...
void MHEG5ingredientActivate(MHEG5Ingredient *ingredient)
Implementation of Activate behaviour Inherrited from Root class.
void MHEG5cursorShapeFree(MHEG5CursorShape *cursorShape)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
MHEG5Ingredient ingredient
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
void MHEG5cursorShapeDestruct(MHEG5CursorShape *cursorShape)
Destruct a cursorshape object.
#define MHEG5TRUE
Definition: mh5base.h:49
void MHEG5ingredientDeactivate(MHEG5Ingredient *ingredient)
Implementation of Deactivate behaviour Inherrited from Root class.
void MHEG5cursorShapeDeactivate(MHEG5CursorShape *cursorShape)
Apply the deactivation behaviour of the cursorshape class. As this class has no own deactivation beha...
void MHEG5ingredientPrepare(MHEG5Ingredient *ingredient)
Implementation of the Preparation behaviour Inherrited from Root class.
MHEG5Bool runningStatus
Definition: mh5root.h:51
redirection include
void MHEG5ingredientFree(MHEG5Ingredient *ingredient)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
void MHEG5cursorShapePrepare(MHEG5CursorShape *cursorShape)
Apply the preparation behaviour of the cursorshape class Apply the preparation behaviour of the curso...
void MHEG5sendSync(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the synchronous event queue.
Definition: mh5queue.c:1651
void MHEG5cursorShapeActivate(MHEG5CursorShape *cursorShape)
Apply the activation behaviour of the cursorshape class. As this class has no own activation behaviou...