]> git.lizzy.rs Git - irrlicht.git/blob - source/Irrlicht/COSOperator.h
6ef0f9ba290f12d918ba4822c70abfa7437e818f
[irrlicht.git] / source / Irrlicht / COSOperator.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __C_OS_OPERATOR_H_INCLUDED__\r
6 #define __C_OS_OPERATOR_H_INCLUDED__\r
7 \r
8 #include "IOSOperator.h"\r
9 \r
10 namespace irr\r
11 {\r
12 \r
13 class CIrrDeviceLinux;\r
14 \r
15 //! The Operating system operator provides operation system specific methods and information.\r
16 class COSOperator : public IOSOperator\r
17 {\r
18 public:\r
19 \r
20         // constructor\r
21 #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)\r
22         COSOperator(const core::stringc& osversion, CIrrDeviceLinux* device);\r
23 #endif\r
24         COSOperator(const core::stringc& osversion);\r
25 \r
26         //! returns the current operation system version as string.\r
27         const core::stringc& getOperatingSystemVersion() const override;\r
28 \r
29         //! copies text to the clipboard\r
30         //! \param text: text in utf-8\r
31         void copyToClipboard(const c8 *text) const override;\r
32 \r
33         //! gets text from the clipboard\r
34         //! \return Returns 0 if no string is in there, otherwise an utf-8 string.\r
35         const c8* getTextFromClipboard() const override;\r
36 \r
37         //! gets the total and available system RAM in kB\r
38         //! \param Total: will contain the total system memory\r
39         //! \param Avail: will contain the available memory\r
40         //! \return Returns true if successful, false if not\r
41         bool getSystemMemory(u32* Total, u32* Avail) const override;\r
42 \r
43 private:\r
44 \r
45         core::stringc OperatingSystem;\r
46 \r
47 #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)\r
48         CIrrDeviceLinux * IrrDeviceLinux;\r
49 #endif\r
50 \r
51 #ifdef  _IRR_WINDOWS_API_\r
52         mutable core::stringc ClipboardBuf;\r
53 #endif\r
54 \r
55 };\r
56 \r
57 } // end namespace\r
58 \r
59 #endif\r
60 \r