5#ifndef DCPP_I_DUCKCPP_DEVICE_HPP_INCLUDED
6#define DCPP_I_DUCKCPP_DEVICE_HPP_INCLUDED
8#include <duckcpp/core/engine/IReferenceCounted.hpp>
9#include <duckcpp/core/engine/dimension2d.hpp>
10#include <duckcpp/core/engine/IVideoDriver.hpp>
11#include <duckcpp/core/engine/EDriverTypes.hpp>
12#include <duckcpp/core/engine/EDeviceTypes.hpp>
13#include <duckcpp/core/engine/IEventReceiver.hpp>
14#include <duckcpp/core/engine/ICursorControl.hpp>
15#include <duckcpp/core/engine/IVideoModeList.hpp>
16#include <duckcpp/core/engine/ITimer.hpp>
17#include <duckcpp/core/engine/IOSOperator.hpp>
30 class IGUIEnvironment;
38 class IContextManager;
76 virtual bool run() = 0;
310#ifdef _DCPP_COMPILE_WITH_SOFTWARE_
316#ifdef _DCPP_COMPILE_WITH_BURNINGSVIDEO_
322#ifdef _DCPP_COMPILE_WITH_DIRECT3D_9_
328#ifdef _DCPP_COMPILE_WITH_OPENGL_
The Duckcpp device. You can create it with createDevice() or createDeviceEx().
Definition DuckcppDevice.hpp:48
virtual dcpp::video::IContextManager * getContextManager()=0
Get context manager.
virtual dcpp::io::IFileSystem * getFileSystem()=0
Provides access to the virtual file system.
virtual void sleep(dcpp::uint32_kt timeMs, bool pauseTimer=false)=0
Pause execution and let other processes to run for a specified amount of time.
virtual bool setGammaRamp(dcpp::float32_kt red, dcpp::float32_kt green, dcpp::float32_kt blue, dcpp::float32_kt relativebrightness, dcpp::float32_kt relativecontrast)=0
Set the current Gamma Value for the Display.
virtual dcpp::uint32_kt getDoubleClickTime() const =0
Get the maximal elapsed time between 2 clicks to generate double- and tripleclicks for the mouse.
virtual dcpp::video::ECOLOR_FORMAT getColorFormat() const =0
Get the current color format of the window.
virtual void minimizeWindow()=0
Minimizes the window if possible.
virtual bool isWindowActive() const =0
Returns if the window is active.
virtual const dcpp::char_kt * getVersion() const =0
Get the version of the engine.
virtual void setWindowCaption(const wchar_t *text)=0
Sets the caption of the window.
virtual void setDoubleClickTime(dcpp::uint32_kt timeMs)=0
Set the maximal elapsed time between 2 clicks to generate doubleclicks for the mouse....
virtual bool activateJoysticks(dcpp::nub::array< SJoystickInfo > &joystickInfo)=0
Activate any joysticks, and generate events for them.
virtual void setResizable(bool resize=false)=0
Sets if the window should be resizable in windowed mode.
virtual bool isWindowFocused() const =0
Checks if the Duckcpp window has the input focus.
virtual bool isWindowMinimized() const =0
Checks if the Duckcpp window is minimized.
virtual dcpp::nub::position2di getWindowPosition()=0
Get the position of the frame on-screen.
virtual dcpp::scene::ISceneManager * getSceneManager()=0
Provides access to the scene manager.
virtual bool getGammaRamp(dcpp::float32_kt &red, dcpp::float32_kt &green, dcpp::float32_kt &blue, dcpp::float32_kt &brightness, dcpp::float32_kt &contrast)=0
Get the current Gamma Value for the Display.
virtual E_DEVICE_TYPE getType() const =0
Get the type of the device.
virtual void setWindowSize(const dcpp::nub::dimension2du &size)=0
Resize the render window.
virtual void clearSystemMessages()=0
Remove messages pending in the system message loop.
virtual void yield()=0
Cause the device to temporarily pause execution and let other processes run.
virtual IEventReceiver * getEventReceiver()=0
Provides access to the current event receiver.
virtual bool run()=0
Runs the device.
static bool isDriverSupported(dcpp::video::E_DRIVER_TYPE driver)
Check if a driver type is supported by the engine.
Definition DuckcppDevice.hpp:303
virtual void setEventReceiver(IEventReceiver *receiver)=0
Sets a new user event receiver which will receive events from the engine.
virtual ITimer * getTimer()=0
Provides access to the engine's timer.
virtual void closeDevice()=0
Notifies the device that it should close itself.
virtual ILogger * getLogger()=0
Provides access to the message logger.
virtual bool postEventFromUser(const SEvent &event)=0
Sends a user created event to the engine.
virtual IRandomizer * getRandomizer() const =0
Provides access to the engine's currently set randomizer.
virtual dcpp::gui::IGUIEnvironment * getGUIEnvironment()=0
Provides access to the 2d user interface environment.
virtual dcpp::video::IVideoModeList * getVideoModeList()=0
Gets a list with all video modes available.
virtual void maximizeWindow()=0
Maximizes the window if possible.
virtual dcpp::gui::ICursorControl * getCursorControl()=0
Provides access to the cursor control.
virtual bool isFullScreen() const =0
Checks if the Duckcpp window is running in fullscreen mode.
virtual dcpp::video::IVideoDriver * getVideoDriver()=0
Provides access to the video driver for drawing 3d and 2d geometry.
virtual IRandomizer * createDefaultRandomizer() const =0
Creates a new default randomizer.
virtual IOSOperator * getOSOperator()=0
Provides access to the operation system operator object.
virtual void setInputReceivingSceneManager(dcpp::scene::ISceneManager *sceneManager)=0
Sets the input receiving scene manager.
virtual void restoreWindow()=0
Restore the window to normal size if possible.
virtual void setRandomizer(IRandomizer *r)=0
Sets a new randomizer.
Interface of an object which can receive events.
Definition IEventReceiver.hpp:484
Interface for logging messages, warnings and errors.
Definition ILogger.hpp:39
The Operating system operator provides operation system specific methods and information.
Definition IOSOperator.hpp:16
Interface for generating random numbers.
Definition IRandomizer.hpp:15
Base class of most objects of the Duckcpp Engine.
Definition IReferenceCounted.hpp:46
Interface for getting and manipulating the virtual time.
Definition ITimer.hpp:15
SEvents hold information about an event. See dcpp::IEventReceiver for details on event handling.
Definition IEventReceiver.hpp:282
Interface to manipulate the mouse cursor.
Definition ICursorControl.hpp:100
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.hpp:73
The FileSystem manages files and archives and provides access to them.
Definition IFileSystem.hpp:33
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
Definition ISceneManager.hpp:160
Definition IContextManager.hpp:17
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.hpp:152
A list of all available video modes.
Definition IVideoModeList.hpp:20
E_DRIVER_TYPE
An enum for all types of drivers the Duckcpp Engine supports.
Definition EDriverTypes.hpp:17
@ EDT_DIRECT3D9
dcpp::video::EDT_DIRECT3D9
Definition EDriverTypes.hpp:49
@ EDT_BURNINGSVIDEO
dcpp::video::EDT_BURNINGSVIDEO
Definition EDriverTypes.hpp:43
@ EDT_SOFTWARE
dcpp::video::EDT_SOFTWARE
Definition EDriverTypes.hpp:30
@ EDT_EGXU
dcpp::video::EDT_EGXU
Definition EDriverTypes.hpp:55
@ EDT_NULL
dcpp::video::NULL
Definition EDriverTypes.hpp:22
ECOLOR_FORMAT
An enum for the color format of textures used by the Duckcpp Engine.
Definition SColor.hpp:21
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition shared_device.hpp:34
char char_kt
8 bit character variable.
Definition irrTypes.hpp:37
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
float float32_kt
32 bit floating point variable.
Definition irrTypes.hpp:108
E_DEVICE_TYPE
An enum for the different device types supported by the Duckcpp Engine.
Definition EDeviceTypes.hpp:13