Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials
IrrlichtDevice.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2010 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_IRRLICHT_DEVICE_H_INCLUDED__
6 #define __I_IRRLICHT_DEVICE_H_INCLUDED__
7 
8 #include "IReferenceCounted.h"
9 #include "dimension2d.h"
10 #include "IVideoDriver.h"
11 #include "EDriverTypes.h"
12 #include "EDeviceTypes.h"
13 #include "IEventReceiver.h"
14 #include "ICursorControl.h"
15 #include "IVideoModeList.h"
16 #include "ITimer.h"
17 #include "IOSOperator.h"
18 
19 namespace irr
20 {
21  class ILogger;
22  class IEventReceiver;
23 
24  namespace io {
25  class IFileSystem;
26  } // end namespace io
27 
28  namespace gui {
29  class IGUIEnvironment;
30  } // end namespace gui
31 
32  namespace scene {
33  class ISceneManager;
34  } // end namespace scene
35 
37 
42  class IrrlichtDevice : public virtual IReferenceCounted
43  {
44  public:
45 
47 
71  virtual bool run() = 0;
72 
74 
76  virtual void yield() = 0;
77 
79 
83  virtual void sleep(u32 timeMs, bool pauseTimer=false) = 0;
84 
86 
87  virtual video::IVideoDriver* getVideoDriver() = 0;
88 
90 
91  virtual io::IFileSystem* getFileSystem() = 0;
92 
94 
96 
98 
100 
102 
103  virtual gui::ICursorControl* getCursorControl() = 0;
104 
106 
107  virtual ILogger* getLogger() = 0;
108 
110 
119 
121 
126  virtual IOSOperator* getOSOperator() = 0;
127 
129 
132  virtual ITimer* getTimer() = 0;
133 
135 
136  virtual void setWindowCaption(const wchar_t* text) = 0;
137 
139 
154  virtual bool isWindowActive() const = 0;
155 
157 
158  virtual bool isWindowFocused() const = 0;
159 
161 
162  virtual bool isWindowMinimized() const = 0;
163 
165 
166  virtual bool isFullscreen() const = 0;
167 
169 
170  virtual video::ECOLOR_FORMAT getColorFormat() const = 0;
171 
173 
174  virtual void closeDevice() = 0;
175 
177 
180  virtual const c8* getVersion() const = 0;
181 
183 
187  virtual void setEventReceiver(IEventReceiver* receiver) = 0;
188 
190 
191  virtual IEventReceiver* getEventReceiver() = 0;
192 
194 
199  virtual bool postEventFromUser(const SEvent& event) = 0;
200 
202 
205  virtual void setInputReceivingSceneManager(scene::ISceneManager* sceneManager) = 0;
206 
208 
211  virtual void setResizable(bool resize=false) = 0;
212 
214  virtual void minimizeWindow() =0;
215 
217  virtual void maximizeWindow() =0;
218 
220  virtual void restoreWindow() =0;
221 
223 
230  virtual bool activateJoysticks(core::array<SJoystickInfo>& joystickInfo) =0;
231 
233  virtual bool setGammaRamp(f32 red, f32 green, f32 blue,
234  f32 relativebrightness, f32 relativecontrast) =0;
235 
237  virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue,
238  f32 &brightness, f32 &contrast) =0;
239 
241 
250  virtual void clearSystemMessages() = 0;
251 
253 
255  virtual E_DEVICE_TYPE getType() const = 0;
256 
258 
261  {
262  switch (driver)
263  {
264  case video::EDT_NULL:
265  return true;
266  case video::EDT_SOFTWARE:
267 #ifdef _IRR_COMPILE_WITH_SOFTWARE_
268  return true;
269 #else
270  return false;
271 #endif
273 #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
274  return true;
275 #else
276  return false;
277 #endif
279 #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_
280  return true;
281 #else
282  return false;
283 #endif
285 #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_
286  return true;
287 #else
288  return false;
289 #endif
290  case video::EDT_OPENGL:
291 #ifdef _IRR_COMPILE_WITH_OPENGL_
292  return true;
293 #else
294  return false;
295 #endif
296  default:
297  return false;
298  }
299  }
300  };
301 
302 } // end namespace irr
303 
304 #endif
305 

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Fri Mar 21 2014 04:40:16 by Doxygen (1.8.1.2)