File: CIrrDeviceServer.h

package info (click to toggle)
supertuxkart 1.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 767,580 kB
  • sloc: cpp: 412,075; xml: 106,334; ansic: 83,792; asm: 1,559; python: 1,403; sh: 1,366; objc: 452; makefile: 333; javascript: 23; awk: 20
file content (79 lines) | stat: -rw-r--r-- 2,275 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
// This device code is based on the original SDL device implementation
// contributed by Shane Parker (sirshane).

#ifndef __C_IRR_DEVICE_SERVER_H_INCLUDED__
#define __C_IRR_DEVICE_SERVER_H_INCLUDED__

#include "IrrCompileConfig.h"

#ifdef SERVER_ONLY

#include "IrrlichtDevice.h"
#include "CIrrDeviceStub.h"

namespace irr
{

	class CIrrDeviceServer : public CIrrDeviceStub
	{
	public:
		//! constructor
		CIrrDeviceServer(const SIrrlichtCreationParameters& param);

		//! runs the device. Returns false if device wants to be deleted
		virtual bool run() { return !Close; }

		//! pause execution temporarily
		virtual void yield() {}

		//! pause execution for a specified time
		virtual void sleep(u32 timeMs, bool pauseTimer) {}

		//! sets the caption of the window
		virtual void setWindowCaption(const wchar_t* text) {}

		//! sets the class of the window
		virtual void setWindowClass(const char* text) {}

		//! returns if window is active. if not, nothing need to be drawn
		virtual bool isWindowActive() const { return true; }

		//! returns if window has focus.
		bool isWindowFocused() const { return true; }

		//! returns if window is minimized.
		bool isWindowMinimized() const { return false; }

		//! notifies the device that it should close itself
		virtual void closeDevice() { Close = true; }

		//! Sets if the window should be resizable in windowed mode.
		virtual void setResizable(bool resize=false) {}

		//! Minimizes the window.
		virtual void minimizeWindow() {}

		//! Maximizes the window.
		virtual void maximizeWindow() {}

		//! Restores the window size.
		virtual void restoreWindow() {}

		//! Move window to requested position
		virtual bool moveWindow(int x, int y) { return true; }

		//! Get current window position.
		virtual bool getWindowPosition(int* x, int* y) { return true; }

		//! Get the device type
		virtual E_DEVICE_TYPE getType() const { return EIDT_SERVER; }
	};

} // end namespace irr

#endif // _IRR_COMPILE_WITH_SDL_DEVICE_
#endif // __C_IRR_DEVICE_SDL_H_INCLUDED__