MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5button.h
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 #ifndef _MH5BUTTON_H
33 #define _MH5BUTTON_H
34 
35 /*---includes for this file--------------------------------------------------*/
36 
37 #include "mh5visible.h"
38 #include "mh5interactible.h"
39 
40 /*---Constant and macro definitions for public use---------------------------*/
41 
42 /*---Enumerations for public use---------------------------------------------*/
43 
44 /*---Global type defs for public use-----------------------------------------*/
45 
46 /* struct Hotspot */
47 typedef struct
48 {
49  /* Base classes */
50  MHEG5Visible visible;
51  MHEG5Interactible interactible;
52 
53  /* Exchanged attributes */
54  MHEG5Colour buttonColour;
55 
56  /* Internal attributes */
57  MHEG5Bool selectionStatus;
58  MHEG5Bool cursorHere;
59 } MHEG5Button;
60 
61 /*---Global variable declarations for public use-----------------------------*/
62 
63 /*---Global Function prototypes for public use-------------------------------*/
64 
70 /*
71  Debug
72  */
73 #ifdef MH5PRINTOUT
74 void MHEG5buttonPrint(MHEG5Button *button, char *out);
75 #endif
76 
77 /*
78  Constructor
79  */
85 void MHEG5buttonInit(MHEG5Button *button);
86 
87 
95 void MHEG5buttonFree(MHEG5Button *button);
96 
97 
98 /*
99  Internal behaviours
100  */
101 void MHEG5buttonPrepare(MHEG5Button *button);
102 void MHEG5buttonActivate(MHEG5Button *button);
103 void MHEG5buttonDeactivate(MHEG5Button *button);
104 void MHEG5buttonDestruct(MHEG5Button *button);
105 
106 /*
107  Actions
108  */
109 MHEG5ErrorCode MHEG5select(MHEG5Root *target, MHEG5GList *params);
110 MHEG5ErrorCode MHEG5deselect(MHEG5Root *target, MHEG5GList *params);
111 
112 #endif /*_MH5BUTTON_H*/
Implement the MHEG5 Interactible Class. Defines functionality associated with an interaction behaviou...
Definition: mh5visible.h:46
MHEG5ErrorCode MHEG5select(MHEG5Root *target, MHEG5GList *params)
The effect of this action is to select a button. Implementation of the Select action of the button cl...
Definition: mh5button.c:232
void MHEG5buttonActivate(MHEG5Button *button)
Apply the activation behaviour of the button class. As this class has no own activation behaviour thi...
Definition: mh5button.c:145
MHEG5ErrorCode MHEG5deselect(MHEG5Root *target, MHEG5GList *params)
The effect of this action is to deselect the button. Implementation of the Deselect action of the but...
Definition: mh5button.c:275
void MHEG5buttonInit(MHEG5Button *button)
<Function description>="">
Definition: mh5button.c:94
Definition: mh5base.h:169
Definition: mh5interactible.h:44
Implement the MHEG5 Visible Class Defines the behaviour of Presentables that have a visual representa...
void MHEG5buttonFree(MHEG5Button *button)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5button.c:109
Definition: mh5base.h:147
Definition: mh5button.h:47
void MHEG5buttonDestruct(MHEG5Button *button)
Destruct a button object.
Definition: mh5button.c:179
void MHEG5buttonPrepare(MHEG5Button *button)
Apply the preparation behaviour of the button class Apply the preparation behaviour of the button cla...
Definition: mh5button.c:128
Definition: mh5root.h:43
void MHEG5buttonDeactivate(MHEG5Button *button)
Apply the deactivation behaviour of the button class. As this class has no own deactivation behaviour...
Definition: mh5button.c:163