MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5listgroup.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  *******************************************************************************/
33 #ifndef _MH5LISTGROUP_H_
34 #define _MH5LISTGROUP_H_
35 
36 /*---includes for this file--------------------------------------------------*/
37 #include "mh5tokengroup.h"
38 
39 /*---Constant and macro definitions for public use---------------------------*/
40 
41 /*---Enumerations for public use---------------------------------------------*/
42 
43 /*---Global type defs for public use-----------------------------------------*/
45 {
46  MHEG5IntPair position;
47  struct sMHEG5PosList *next;
48 };
49 
50 typedef struct sMHEG5PosList MHEG5PosList;
51 
53 {
54  MHEG5Int id;
55  MH5GroupRef groupRef;
56  MHEG5Bool itemSelectionStatus;
57  MHEG5Int visibleIndex; /* Internal flag */
58  struct sMHEG5ItemList *next;
59 };
60 
61 typedef struct sMHEG5ItemList MHEG5ItemList;
62 
63 typedef struct sMHEG5ListGroup
64 {
65  /* Base class */
66  MHEG5TokenGroup tokenGroup;
67 
68  /* Exchanged attributes */
69  MHEG5PosList *originalPositions;
70  MHEG5Bool wrapAround;
71  MHEG5Bool multipleSelection;
72 
73  /* Internal attributes */
74  MHEG5PosList *positions;
75  MHEG5ItemList *itemList;
76  MHEG5Int firstItem;
77 
78  /* Engine data */
79  MHEG5Int positionCount;
80  MHEG5Int itemCount;
81  MHEG5Bool firstItemVisible;
82  MHEG5Bool lastItemVisible;
84 
85 /*---Global variable declarations for public use-----------------------------*/
86 
87 /*---Global Function prototypes for public use-------------------------------*/
88 
100 void MHEG5listGroupInit(MHEG5ListGroup *listGroup);
101 
102 
110 void MHEG5listGroupFree(MHEG5ListGroup *listGroup);
111 
112 
120 void MHEG5listGroupAddPosition(MHEG5ListGroup *listGroup, MHEG5Int x, MHEG5Int y);
121 
122 
128 void MHEG5listGroupPrepare(MHEG5ListGroup *listGroup);
129 
130 
136 void MHEG5listGroupActivate(MHEG5ListGroup *listGroup);
137 
138 
145 
146 
152 void MHEG5listGroupDestruct(MHEG5ListGroup *listGroup);
153 
154 
155 /*
156  Actions
157  */
164 MHEG5ErrorCode MHEG5addItem(MHEG5Root *target, MHEG5GList *params);
165 
166 
173 MHEG5ErrorCode MHEG5delItem(MHEG5Root *target, MHEG5GList *params);
174 
175 
182 MHEG5ErrorCode MHEG5getListItem(MHEG5Root *target, MHEG5GList *params);
183 
184 
191 MHEG5ErrorCode MHEG5getCellItem(MHEG5Root *target, MHEG5GList *params);
192 
193 
200 MHEG5ErrorCode MHEG5getItemStatus(MHEG5Root *target, MHEG5GList *params);
201 
202 
209 MHEG5ErrorCode MHEG5selectItem(MHEG5Root *target, MHEG5GList *params);
210 
211 
218 MHEG5ErrorCode MHEG5deselectItem(MHEG5Root *target, MHEG5GList *params);
219 
220 
227 MHEG5ErrorCode MHEG5toggleItem(MHEG5Root *target, MHEG5GList *params);
228 
229 
236 MHEG5ErrorCode MHEG5scrollItems(MHEG5Root *target, MHEG5GList *params);
237 
238 
245 MHEG5ErrorCode MHEG5setFirstItem(MHEG5Root *target, MHEG5GList *params);
246 
247 
254 MHEG5ErrorCode MHEG5getFirstItem(MHEG5Root *target, MHEG5GList *params);
255 
256 
263 MHEG5ErrorCode MHEG5getListSize(MHEG5Root *target, MHEG5GList *params);
264 
265 
272 MHEG5ErrorCode MHEG5setCellPosition(MHEG5Root *target, MHEG5GList *params);
273 
274 
275 /*
276  Debug
277  */
278 #ifdef MH5PRINTOUT
279 void MHEG5listGroupPrint(MHEG5ListGroup *listGroup, char *out);
280 #endif
281 
282 #endif /*_MH5LISTGROUP_H_*/
void MHEG5listGroupAddPosition(MHEG5ListGroup *listGroup, MHEG5Int x, MHEG5Int y)
Adds a new cell position to the ListGroup.
Definition: mh5listgroup.c:267
Definition: mh5tokengroup.h:58
Definition: mh5listgroup.h:44
MHEG5ErrorCode MHEG5getListItem(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup GetListItem elementary action.
Definition: mh5listgroup.c:1242
MHEG5ErrorCode MHEG5getFirstItem(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup GetFirstItem elementary action.
Definition: mh5listgroup.c:1852
MHEG5ErrorCode MHEG5getListSize(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup GetListSize elementary action.
Definition: mh5listgroup.c:1895
Definition: mh5listgroup.h:63
MHEG5ErrorCode MHEG5setFirstItem(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup SetFirstItem elementary action.
Definition: mh5listgroup.c:1789
MHEG5ErrorCode MHEG5deselectItem(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup DeselectItem elementary action.
Definition: mh5listgroup.c:1588
void MHEG5listGroupActivate(MHEG5ListGroup *listGroup)
Implementation of the ListGroup Activation behaviour.
Definition: mh5listgroup.c:423
MHEG5ErrorCode MHEG5addItem(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup AddItem elementary action.
Definition: mh5listgroup.c:1156
void MHEG5listGroupDeactivate(MHEG5ListGroup *listGroup)
Implementation of the ListGroup Deactivation behaviour.
Definition: mh5listgroup.c:462
void MHEG5listGroupDestruct(MHEG5ListGroup *listGroup)
Implementation of the ListGroup Destruction behaviour.
Definition: mh5listgroup.c:404
void MHEG5listGroupFree(MHEG5ListGroup *listGroup)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5listgroup.c:238
Definition: mh5base.h:97
MHEG5ErrorCode MHEG5getCellItem(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup GetCellItem elementary action.
Definition: mh5listgroup.c:1334
MHEG5ErrorCode MHEG5delItem(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup DelItem elementary action.
Definition: mh5listgroup.c:1199
void MHEG5listGroupInit(MHEG5ListGroup *listGroup)
<Function description>="">
Implement the MHEG5 Tokengroup Class 29 TokenGroup Class. Defines a group of Visible objects for navi...
Definition: mh5base.h:169
Definition: mh5base.h:76
MHEG5ErrorCode MHEG5selectItem(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup SelectItem elementary action.
Definition: mh5listgroup.c:1533
void MHEG5listGroupPrepare(MHEG5ListGroup *listGroup)
Implementation of the ListGroup Preparation behaviour.
Definition: mh5listgroup.c:304
Definition: mh5root.h:43
MHEG5ErrorCode MHEG5scrollItems(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup ScrollItems elementary action.
Definition: mh5listgroup.c:1725
Definition: mh5listgroup.h:52
MHEG5ErrorCode MHEG5getItemStatus(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup GetItemStatus elementary action.
Definition: mh5listgroup.c:1442
MHEG5ErrorCode MHEG5setCellPosition(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup SetCellPosition elementary action.
Definition: mh5listgroup.c:1938
MHEG5ErrorCode MHEG5toggleItem(MHEG5Root *target, MHEG5GList *params)
Implementation of the ListGroup ToggleItem elementary action.
Definition: mh5listgroup.c:1643