mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-12 10:03:53 +02:00
020a825ecd
Note that TTF rendering bypasses xBRZ - TTF fonts are rendered at larger point size
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
/*
|
|
* IScreenHandler.h, part of VCMI engine
|
|
*
|
|
* Authors: listed in file AUTHORS in main folder
|
|
*
|
|
* License: GNU General Public License v2.0 or later
|
|
* Full text of license available in license.txt file, in main folder
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
class Point;
|
|
class Rect;
|
|
VCMI_LIB_NAMESPACE_END
|
|
|
|
class IScreenHandler
|
|
{
|
|
public:
|
|
virtual ~IScreenHandler() = default;
|
|
|
|
/// Updates window state after fullscreen state has been changed in settings
|
|
virtual void onScreenResize() = 0;
|
|
|
|
/// De-initializes window state
|
|
virtual void close() = 0;
|
|
|
|
/// Fills screen with black color, erasing any existing content
|
|
virtual void clearScreen() = 0;
|
|
|
|
/// Returns list of resolutions supported by current screen
|
|
virtual std::vector<Point> getSupportedResolutions() const = 0;
|
|
|
|
/// Returns <min, max> range of possible values for screen scaling percentage
|
|
virtual std::tuple<int, int> getSupportedScalingRange() const = 0;
|
|
|
|
/// Converts provided rect from logical coordinates into coordinates within window, accounting for scaling and viewport
|
|
virtual Rect convertLogicalPointsToWindow(const Rect & input) const = 0;
|
|
|
|
/// Dimensions of render output
|
|
virtual Point getRenderResolution() const = 0;
|
|
|
|
/// Dimensions of logical output. Can be different if scaling is used
|
|
virtual Point getLogicalResolution() const = 0;
|
|
|
|
virtual int getScalingFactor() const = 0;
|
|
|
|
/// Window has focus
|
|
virtual bool hasFocus() = 0;
|
|
};
|