IScreenHandler.h 929 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * IScreenHandler.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. VCMI_LIB_NAMESPACE_BEGIN
  12. class Point;
  13. VCMI_LIB_NAMESPACE_END
  14. class IScreenHandler
  15. {
  16. public:
  17. virtual ~IScreenHandler() = default;
  18. /// Updates window state after fullscreen state has been changed in settings
  19. virtual void onScreenResize() = 0;
  20. /// De-initializes window state
  21. virtual void close() = 0;
  22. /// Fills screen with black color, erasing any existing content
  23. virtual void clearScreen() = 0;
  24. /// Returns list of resolutions supported by current screen
  25. virtual std::vector<Point> getSupportedResolutions() const = 0;
  26. /// Returns <min, max> range of possible values for screen scaling percentage
  27. virtual std::tuple<int, int> getSupportedScalingRange() const = 0;
  28. };