Ginga  0.13.6
 All Classes Namespaces Functions Variables
ILocalScreenManager.h
1 /******************************************************************************
2 Este arquivo eh parte da implementacao do ambiente declarativo do middleware
3 Ginga (Ginga-NCL).
4 
5 Direitos Autorais Reservados (c) 1989-2007 PUC-Rio/Laboratorio TeleMidia
6 
7 Este programa eh software livre; voce pode redistribui-lo e/ou modificah-lo sob
8 os termos da Licenca Publica Geral GNU versao 2 conforme publicada pela Free
9 Software Foundation.
10 
11 Este programa eh distribuido na expectativa de que seja util, porem, SEM
12 NENHUMA GARANTIA; nem mesmo a garantia implicita de COMERCIABILIDADE OU
13 ADEQUACAO A UMA FINALIDADE ESPECIFICA. Consulte a Licenca Publica Geral do
14 GNU versao 2 para mais detalhes.
15 
16 Voce deve ter recebido uma copia da Licenca Publica Geral do GNU versao 2 junto
17 com este programa; se nao, escreva para a Free Software Foundation, Inc., no
18 endereco 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
19 
20 Para maiores informacoes:
21 ncl @ telemidia.puc-rio.br
22 http://www.ncl.org.br
23 http://www.ginga.org.br
24 http://www.telemidia.puc-rio.br
25 ******************************************************************************
26 This file is part of the declarative environment of middleware Ginga (Ginga-NCL)
27 
28 Copyright: 1989-2007 PUC-RIO/LABORATORIO TELEMIDIA, All Rights Reserved.
29 
30 This program is free software; you can redistribute it and/or modify it under
31 the terms of the GNU General Public License version 2 as published by
32 the Free Software Foundation.
33 
34 This program is distributed in the hope that it will be useful, but WITHOUT ANY
35 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
36 PARTICULAR PURPOSE. See the GNU General Public License version 2 for more
37 details.
38 
39 You should have received a copy of the GNU General Public License version 2
40 along with this program; if not, write to the Free Software
41 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
42 
43 For further information contact:
44 ncl @ telemidia.puc-rio.br
45 http://www.ncl.org.br
46 http://www.ginga.org.br
47 http://www.telemidia.puc-rio.br
48 *******************************************************************************/
49 
50 #ifndef ILocalScreenManager_H_
51 #define ILocalScreenManager_H_
52 
53 #include "IMBDefs.h"
54 
55 #include "interface/IWindow.h"
56 #include "interface/ISurface.h"
57 
58 #include "interface/IContinuousMediaProvider.h"
59 #include "interface/IFontProvider.h"
60 #include "interface/IImageProvider.h"
61 
62 #include "IInputManager.h"
63 #include "interface/IInputEvent.h"
64 #include "interface/IEventBuffer.h"
65 
66 #include <vector>
67 #include <string>
68 using namespace std;
69 
70 namespace br {
71 namespace pucrio {
72 namespace telemidia {
73 namespace ginga {
74 namespace core {
75 namespace mb {
77  public:
78  virtual ~ILocalScreenManager(){};
79 
80  virtual void releaseHandler()=0;
81 
82  virtual void setBackgroundImage(
83  GingaScreenID screenId, string uri)=0;
84 
85  virtual int getDeviceWidth(GingaScreenID screenId)=0;
86 
87  virtual int getDeviceHeight(GingaScreenID screenId)=0;
88 
89  virtual void* getGfxRoot(GingaScreenID screenId)=0;
90 
91  virtual void releaseScreen(GingaScreenID screenId)=0;
92  virtual void releaseMB(GingaScreenID screenId)=0;
93  virtual void clearWidgetPools(GingaScreenID screenId)=0;
94 
95  virtual GingaScreenID createScreen(int numArgs, char** args)=0;
96  virtual string getScreenName(GingaScreenID screenId)=0;
97 
98  virtual GingaWindowID getScreenUnderlyingWindow(
99  GingaScreenID screenId)=0;
100 
101  virtual IWindow* getIWindowFromId(
102  GingaScreenID screenId, GingaWindowID winId)=0;
103 
104  virtual bool mergeIds(
105  GingaScreenID screenId,
106  GingaWindowID destId,
107  vector<GingaWindowID>* srcIds)=0;
108 
109  virtual void blitScreen(
110  GingaScreenID screenId, ISurface* destination)=0;
111 
112  virtual void blitScreen(GingaScreenID screenId, string fileUri)=0;
113  virtual void refreshScreen(GingaScreenID screenId)=0;
114 
115 
116  /* Interfacing output */
117 
118  virtual IWindow* createWindow(
119  GingaScreenID screenId,
120  int x, int y,
121  int w, int h,
122  float z)=0;
123 
124  virtual GingaWindowID createUnderlyingSubWindow(
125  GingaScreenID screenId,
126  int x, int y,
127  int w, int h,
128  float z)=0;
129 
130  virtual IWindow* createWindowFrom(
131  GingaScreenID screenId, GingaWindowID underlyingWindow)=0;
132 
133  virtual bool hasWindow(
134  GingaScreenID screenId, IWindow* window)=0;
135 
136  virtual void releaseWindow(
137  GingaScreenID screenId, IWindow* window)=0;
138 
139  virtual ISurface* createSurface(GingaScreenID screenId)=0;
140 
141  virtual ISurface* createSurface(
142  GingaScreenID screenId, int w, int h)=0;
143 
144  virtual ISurface* createSurfaceFrom(
145  GingaScreenID screenId, void* underlyingSurface)=0;
146 
147  virtual bool hasSurface(
148  GingaScreenID screenId, ISurface* sur)=0;
149 
150  virtual bool releaseSurface(
151  GingaScreenID screenId, ISurface* sur)=0;
152 
153 
154  /* Interfacing content */
155 
156  virtual IContinuousMediaProvider* createContinuousMediaProvider(
157  GingaScreenID screenId,
158  const char* mrl,
159  bool* hasVisual,
160  bool isRemote)=0;
161 
162  virtual void releaseContinuousMediaProvider(
163  GingaScreenID screenId,
164  IContinuousMediaProvider* provider)=0;
165 
166  virtual IFontProvider* createFontProvider(
167  GingaScreenID screenId,
168  const char* mrl,
169  int fontSize)=0;
170 
171  virtual void releaseFontProvider(
172  GingaScreenID screenId, IFontProvider* provider)=0;
173 
174  virtual IImageProvider* createImageProvider(
175  GingaScreenID screenId, const char* mrl)=0;
176 
177  virtual void releaseImageProvider(
178  GingaScreenID screenId, IImageProvider* provider)=0;
179 
180  virtual ISurface* createRenderedSurfaceFromImageFile(
181  GingaScreenID screenId, const char* mrl)=0;
182 
183 
184  /* Interfacing input */
185  virtual IInputManager* getInputManager(GingaScreenID screenId)=0;
186  virtual IEventBuffer* createEventBuffer(GingaScreenID screenId)=0;
187 
188  virtual IInputEvent* createInputEvent(
189  GingaScreenID screenId, void* event, const int symbol)=0;
190 
191  virtual IInputEvent* createApplicationEvent(
192  GingaScreenID screenId, int type, void* data)=0;
193 
194  virtual int fromMBToGinga(GingaScreenID screenId, int keyCode)=0;
195  virtual int fromGingaToMB(GingaScreenID screenId, int keyCode)=0;
196  };
197 }
198 }
199 }
200 }
201 }
202 }
203 
204 typedef ::br::pucrio::telemidia::ginga::core::mb::ILocalScreenManager*
205  LocalScreenManagerCreator();
206 
207 typedef void LocalScreenManagerDestroyer(
208  ::br::pucrio::telemidia::ginga::core::mb::
209  ILocalScreenManager* dm);
210 
211 #endif /*ILocalScreenManager_H_*/