]> git.lizzy.rs Git - irrlicht.git/blob - source/Irrlicht/COSOperator.h
Implement X11 primary selection
[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         void copyToClipboard(const c8 *text) const override;\r
31 \r
32         //! copies text to the primary selection\r
33         void copyToPrimarySelection(const c8 *text) const override;\r
34 \r
35         //! gets text from the clipboard\r
36         const c8* getTextFromClipboard() const override;\r
37 \r
38         //! gets text from the primary selection\r
39         const c8* getTextFromPrimarySelection() const override;\r
40 \r
41         //! gets the total and available system RAM in kB\r
42         //! \param Total: will contain the total system memory\r
43         //! \param Avail: will contain the available memory\r
44         //! \return Returns true if successful, false if not\r
45         bool getSystemMemory(u32* Total, u32* Avail) const override;\r
46 \r
47 private:\r
48 \r
49         core::stringc OperatingSystem;\r
50 \r
51 #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)\r
52         CIrrDeviceLinux * IrrDeviceLinux;\r
53 #endif\r
54 \r
55 #ifdef  _IRR_WINDOWS_API_\r
56         mutable core::stringc ClipboardBuf;\r
57 #endif\r
58 \r
59 };\r
60 \r
61 } // end namespace\r
62 \r
63 #endif\r
64 \r