IOSOperator.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #pragma once
  5. #include "IReferenceCounted.h"
  6. #include "irrString.h"
  7. namespace irr
  8. {
  9. //! The OSOperator provides OS-specific methods and information.
  10. class IOSOperator : public virtual IReferenceCounted
  11. {
  12. public:
  13. //! Get the current OS version as string.
  14. virtual const core::stringc &getOperatingSystemVersion() const = 0;
  15. //! Copies text to the clipboard
  16. //! \param text: text in utf-8
  17. virtual void copyToClipboard(const c8 *text) const = 0;
  18. //! Copies text to the primary selection
  19. //! This is a no-op on some platforms.
  20. //! \param text: text in utf-8
  21. virtual void copyToPrimarySelection(const c8 *text) const = 0;
  22. //! Get text from the clipboard
  23. //! \return Returns 0 if no string is in there, otherwise an utf-8 string.
  24. virtual const c8 *getTextFromClipboard() const = 0;
  25. //! Get text from the primary selection
  26. //! This is a no-op on some platforms.
  27. //! \return Returns 0 if no string is in there, otherwise an utf-8 string.
  28. virtual const c8 *getTextFromPrimarySelection() const = 0;
  29. //! Get the total and available system RAM
  30. /** \param totalBytes: will contain the total system memory in Kilobytes (1024 B)
  31. \param availableBytes: will contain the available memory in Kilobytes (1024 B)
  32. \return True if successful, false if not */
  33. virtual bool getSystemMemory(u32 *totalBytes, u32 *availableBytes) const = 0;
  34. };
  35. } // end namespace