MHEG5  15.3.0
source/classes/inc/mh5application.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  * Copyright © 2000 Koninklijke Philips Electronics N.V
00005  *
00006  * This file is part of a DTVKit Software Component
00007  * You are permitted to copy, modify or distribute this file subject to the terms
00008  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00009  * 
00010  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00011  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00012  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00013  * 
00014  * If you or your organisation is not a member of DTVKit then you have access
00015  * to this source code outside of the terms of the licence agreement
00016  * and you are expected to delete this and any associated files immediately.
00017  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00018  *******************************************************************************/
00031 #ifndef _MH5APPLICATION_H
00032 #define _MH5APPLICATION_H
00033 
00034 /*---includes for this file--------------------------------------------------*/
00035 #include "mh5group.h"
00036 
00037 /*---Constant and macro definitions for public use---------------------------*/
00038 
00039 /*---Enumerations for public use---------------------------------------------*/
00040 
00041 /*---Global type defs for public use-----------------------------------------*/
00042 /*
00043      Display Stack
00044  */
00045 typedef struct sMHEG5DisplayStackItem
00046 {
00047    MHEG5Root *item;
00048    struct sMHEG5DisplayStackItem *next;
00049    struct sMHEG5DisplayStackItem *prev;
00050 } MHEG5DisplayStackItem;
00051 
00052 
00053 /*
00054      Applicatin Object
00055  */
00056 typedef struct
00057 {
00058    /* Base class */
00059    MHEG5Group group;
00060 
00061    /* Exchanged attributes */
00062    MHEG5ActionList onSpawnCloseDown;
00063    MHEG5ActionList onRestart;
00064    MHEG5Int characterSet;
00065    MHEG5Colour backgroundColour;
00066    MHEG5Colour textColour;
00067    MHEG5FontBody fontBody;
00068    MHEG5String fontAttributes;
00069    MHEG5Int bitmapContentHook;
00070    MHEG5Int streamContentHook;
00071    MHEG5Int textContentHook;
00072    MHEG5Int lineArtContentHook;
00073    MHEG5Int interchangedProgramContentHook;
00074    MHEG5Colour buttonRefColour;
00075    MHEG5Colour highlightRefColour;
00076    MHEG5Colour sliderRefColour;
00077    MHEG5Colour originalDesktopColour;
00078 
00079    /* Internal attributes */
00080    MHEG5Int lockCount;
00081    MHEG5DisplayStackItem *displayStackTop;
00082    MHEG5DisplayStackItem *displayStackBottom;
00083    MHEG5Bool streamContinuanceFlag;                 /* See UK1.05 section 6.3.4 */
00084    MHEG5Colour desktopColour;
00085 } MHEG5Application;
00086 
00087 /*---Global variable declarations for public use-----------------------------*/
00088 
00089 /*---Global Function prototypes for public use-------------------------------*/
00090 
00097 #ifdef MH5PRINTOUT
00098 
00105 void MHEG5fontBodyPrint(MHEG5FontBody fontBody, char *out);
00106 
00113 void MHEG5applicationPrint(MHEG5Application *application, char *out);
00114 
00115 #endif /* MH5PRINTOUT */
00116 
00117 
00118 
00119 /*
00120      Access to current Application
00121  */
00122 MHEG5Application* MHEG5getCurrentApplication(void);
00123 
00124 
00125 /*   Clear the application stack */
00126 void MHEG5applicationStackClear(BOOLEAN isNdt);
00127 #ifndef CI_PLUS_ONLY
00128 void MHEG5applicationCarouselUnload( void *carousel );
00129 void MHEG5applicationNDTcarouselAttach( void *carousel );
00130 #endif
00131 
00132 
00151 MHEG5ErrorCode MHEG5applicationBootup( char *app_name );
00152 
00157 void MHEG5applicationBootAbort( void );
00158 
00159 /*
00160      Access the display Stack
00161  */
00162 void MHEG5displayStackAdd(MHEG5Root *visible, MHEG5Bool atTop);
00163 MHEG5Bool MHEG5displayStackDelete(MHEG5Root *visible);
00164 void MHEG5displayStackToTop(MHEG5Root *visible);
00165 void MHEG5displayStackToBottom(MHEG5Root *visible);
00166 void MHEG5displayStackPutBefore(MHEG5Root *target, MHEG5Root *refVisible);
00167 void MHEG5displayStackPutBehind(MHEG5Root *target, MHEG5Root *refVisible);
00168 MHEG5DisplayStackItem* MHEG5displayStackBottom(void);
00169 MHEG5DisplayStackItem* MHEG5displayStackPrev(MHEG5DisplayStackItem *item);
00170 MHEG5DisplayStackItem* MHEG5displayStackPrevVisible(MHEG5Root *visible);
00171 MHEG5Root* MHEG5displayStackGetVisible(MHEG5DisplayStackItem *item);
00172 
00178 void MHEG5applicationInit(MHEG5Application *application);
00179 
00180 
00188 void MHEG5applicationFree(MHEG5Application *application);
00189 
00190 /*
00191      Internal behaviours
00192  */
00193 void MHEG5applicationPrepare(MHEG5Application *application);
00194 void MHEG5applicationDestruct(MHEG5Application *application);
00195 void MHEG5ActivateCurrentApplication(void);
00196 void MHEG5applicationDeactivate(MHEG5Application *application);
00197 
00198 /*
00199      Actions
00200  */
00201 MHEG5ErrorCode MHEG5storePersistent(MHEG5Root *target, MHEG5GList *params);
00202 MHEG5ErrorCode MHEG5readPersistent(MHEG5Root *target, MHEG5GList *params);
00203 MHEG5ErrorCode MHEG5launch(MHEG5Root *target, MHEG5GList *params);
00204 MHEG5ErrorCode MHEG5spawn(MHEG5Root *target, MHEG5GList *params);
00205 MHEG5ErrorCode MHEG5quit(MHEG5Root *target, MHEG5GList *params);
00206 MHEG5ErrorCode MHEG5lockScreen(MHEG5Root *target, MHEG5GList *params);
00207 MHEG5ErrorCode MHEG5unlockScreen(MHEG5Root *target, MHEG5GList *params);
00208 MHEG5ErrorCode MHEG5getEngineSupport(MHEG5Root *target, MHEG5GList *params);
00209 MHEG5ErrorCode MHEG5setDesktopColour(MHEG5Root *target, MHEG5GList *params);
00210 
00211 #ifndef MHEG5PROFILE_UK1_06
00212 MHEG5ErrorCode MHEG5openConnection(MHEG5Root *target, MHEG5GList *params);
00213 MHEG5ErrorCode MHEG5closeConnection(MHEG5Root *target, MHEG5GList *params);
00214 #endif 
00216 /*
00217    Engine behaviours
00218  */
00219 void MHEG5quitApp(void);
00220 
00228 void MHEG5applicationClearGroupTargets(MHEG5Application *application,
00229    MHEG5Group *group);
00230 
00236 void MHEG5applicationResolveTargets(MHEG5Application *application);
00237 
00238 /* For CI interface */
00239 void MHEG5applicationPush(MHEG5String groupid);
00240 
00241 
00242 #endif /*_MH5APPLICATION_H*/
 All Data Structures Files Functions Variables Typedefs Defines