]> git.lizzy.rs Git - irrlicht.git/blob - include/IOSOperator.h
Implement X11 primary selection
[irrlicht.git] / include / IOSOperator.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 __I_OS_OPERATOR_H_INCLUDED__\r
6 #define __I_OS_OPERATOR_H_INCLUDED__\r
7 \r
8 #include "IReferenceCounted.h"\r
9 #include "irrString.h"\r
10 \r
11 namespace irr\r
12 {\r
13 \r
14 //! The Operating system operator provides operation system specific methods and information.\r
15 class IOSOperator : public virtual IReferenceCounted\r
16 {\r
17 public:\r
18         //! Get the current operation system version as string.\r
19         virtual const core::stringc& getOperatingSystemVersion() const = 0;\r
20 \r
21         //! Get the current operation system version as string.\r
22         /** \deprecated Use getOperatingSystemVersion instead. This method will be removed in Irrlicht 1.9. */\r
23         _IRR_DEPRECATED_ const wchar_t* getOperationSystemVersion() const\r
24         {\r
25                 return core::stringw(getOperatingSystemVersion()).c_str();\r
26         }\r
27 \r
28         //! Copies text to the clipboard\r
29         //! \param text: text in utf-8\r
30         virtual void copyToClipboard(const c8* text) const = 0;\r
31 \r
32         //! Copies text to the primary selection\r
33         //! This is a no-op on some platforms.\r
34         //! \param text: text in utf-8\r
35         virtual void copyToPrimarySelection(const c8* text) const = 0;\r
36 \r
37         //! Get text from the clipboard\r
38         //! \return Returns 0 if no string is in there, otherwise an utf-8 string.\r
39         virtual const c8* getTextFromClipboard() const = 0;\r
40 \r
41         //! Get text from the primary selection\r
42         //! This is a no-op on some platforms.\r
43         //! \return Returns 0 if no string is in there, otherwise an utf-8 string.\r
44         virtual const c8* getTextFromPrimarySelection() const = 0;\r
45 \r
46         //! Get the total and available system RAM\r
47         /** \param totalBytes: will contain the total system memory in Kilobytes (1024 B)\r
48         \param availableBytes: will contain the available memory in Kilobytes (1024 B)\r
49         \return True if successful, false if not */\r
50         virtual bool getSystemMemory(u32* totalBytes, u32* availableBytes) const = 0;\r
51 \r
52 };\r
53 \r
54 } // end namespace\r
55 \r
56 #endif\r