MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5slider.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  *******************************************************************************/
31 #ifndef _MH5SLIDER_H_
32 #define _MH5SLIDER_H_
33 
34 /*---includes for this file--------------------------------------------------*/
35 #include "mh5visible.h"
36 #include "mh5interactible.h"
37 
38 /*---Constant and macro definitions for public use---------------------------*/
39 
40 /*---Enumerations for public use---------------------------------------------*/
41 
42 /*---Global type defs for public use-----------------------------------------*/
43 typedef struct
44 {
45  /* Base classes */
46  MHEG5Visible visible;
47  MHEG5Interactible interactible;
48 
49  /* Exchanged atributes */
50  MHEG5Orientation orientation;
51  MHEG5Int initialValue;
52  MHEG5Int originalMinValue;
53  MHEG5Int originalMaxValue;
54  MHEG5Int initialPortion;
55  MHEG5Int originalStepSize;
56  MHEG5SliderStyle sliderStyle;
57  MHEG5Colour sliderRefColour;
58 
59  /* Internal attributes */
60  MHEG5Int sliderValue;
61  MHEG5Int portion;
62  MHEG5Int minValue;
63  MHEG5Int maxValue;
64  MHEG5Int stepSize;
65 } MHEG5Slider;
66 
67 /*---Global variable declarations for public use-----------------------------*/
68 
69 /*---Global Function prototypes for public use-------------------------------*/
70 
81 void MHEG5sliderInit(MHEG5Slider *slider);
82 
83 
91 void MHEG5sliderFree(MHEG5Slider *slider);
92 
93 
94 /*
95  Internal behaviours
96  */
97 void MHEG5sliderPrepare(MHEG5Slider *slider);
98 void MHEG5sliderActivate(MHEG5Slider *slider);
100 void MHEG5sliderDestruct(MHEG5Slider *slider);
101 
102 /*
103  Actions
104  */
105 MHEG5ErrorCode MHEG5step(MHEG5Root *target, MHEG5GList *params);
106 MHEG5ErrorCode MHEG5setSliderValue(MHEG5Root *target, MHEG5GList *params);
107 MHEG5ErrorCode MHEG5getSliderValue(MHEG5Root *target, MHEG5GList *params);
108 MHEG5ErrorCode MHEG5setPortion(MHEG5Root *target, MHEG5GList *params);
109 MHEG5ErrorCode MHEG5getPortion(MHEG5Root *target, MHEG5GList *params);
110 MHEG5ErrorCode MHEG5setSliderParameters(MHEG5Root *target, MHEG5GList *params);
111 
112 
118 void MHEG5sliderLEFT(MHEG5Slider *slider);
119 
120 
126 void MHEG5sliderUP(MHEG5Slider *slider);
127 
128 
134 void MHEG5sliderRIGHT(MHEG5Slider *slider);
135 
136 
142 void MHEG5sliderDOWN(MHEG5Slider *slider);
143 
144 
150 void MHEG5sliderSELECT(MHEG5Slider *slider);
151 
152 
158 void MHEG5sliderEXIT(MHEG5Slider *slider);
159 
160 
161 /*
162  Debug
163  */
164 #ifdef MH5PRINTOUT
165 
171 void MHEG5sliderPrint(MHEG5Slider *slider, char *out);
172 #endif
173 
174 #endif /*_MH5SLIDER_H_*/
void MHEG5sliderDestruct(MHEG5Slider *slider)
Destruct a slider object.
Definition: mh5slider.c:292
void MHEG5sliderEXIT(MHEG5Slider *slider)
Perform action of exit key on interacting Slider.
Definition: mh5slider.c:714
void MHEG5sliderSELECT(MHEG5Slider *slider)
Perform action of select key on interacting Slider.
Definition: mh5slider.c:697
void MHEG5sliderUP(MHEG5Slider *slider)
Perform action of up arrow key on interacting Slider.
Definition: mh5slider.c:589
Definition: mh5slider.h:43
Implement the MHEG5 Interactible Class. Defines functionality associated with an interaction behaviou...
Definition: mh5visible.h:46
MHEG5ErrorCode MHEG5step(MHEG5Root *target, MHEG5GList *params)
The effect of this action is to modify the SliderValue of the target by the number given...
Definition: mh5slider.c:313
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 MHEG5sliderDOWN(MHEG5Slider *slider)
Perform action of down arrow key on interacting Slider.
Definition: mh5slider.c:661
Definition: mh5base.h:169
void MHEG5sliderPrepare(MHEG5Slider *slider)
Apply the preparation behaviour of the slider class Apply the preparation behaviour of the slider cla...
Definition: mh5slider.c:235
void MHEG5sliderRIGHT(MHEG5Slider *slider)
Perform action of right arrow key on interacting Slider.
Definition: mh5slider.c:625
MHEG5ErrorCode MHEG5getPortion(MHEG5Root *target, MHEG5GList *params)
This action retrieves the size of the slider portion and stores it in the PortionVar, which is passed to this action as the second parameter. Implementation of the GetPortion (Target, PortionVar) action of the slider class.
Definition: mh5slider.c:464
Definition: mh5interactible.h:44
Implement the MHEG5 Visible Class Defines the behaviour of Presentables that have a visual representa...
MHEG5ErrorCode MHEG5setPortion(MHEG5Root *target, MHEG5GList *params)
This action sets the portion of the slider to a new value, given as the second parameter to this acti...
Definition: mh5slider.c:428
Definition: mh5base.h:147
MHEG5ErrorCode MHEG5setSliderValue(MHEG5Root *target, MHEG5GList *params)
The effect of this action is to set the SliderValue to the given value. Implementation of the SetSlid...
Definition: mh5slider.c:353
void MHEG5sliderLEFT(MHEG5Slider *slider)
Perform action of left arrow key on interacting Slider.
Definition: mh5slider.c:553
Definition: mh5root.h:43
MHEG5ErrorCode MHEG5getSliderValue(MHEG5Root *target, MHEG5GList *params)
This action retrieves the SliderValue from the target and stores it in the variable, passed as the second parameter of this action. Implementation of the GetSliderValue (Target, SliderValueVar) action of the slider class.
Definition: mh5slider.c:393
MHEG5ErrorCode MHEG5setSliderParameters(MHEG5Root *target, MHEG5GList *params)
The effect of this action is to set the MinValue, MaxValue and StepSize to the given values...
Definition: mh5slider.c:502
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 MHEG5sliderFree(MHEG5Slider *slider)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5slider.c:212
void MHEG5sliderInit(MHEG5Slider *slider)
<Function description>="">
Definition: mh5slider.c:190