summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-07-03 17:31:57 +0000
committerManolo Gouy <Manolo>2017-07-03 17:31:57 +0000
commit8dccfc88386561782d9b78900b283cedad2e59bb (patch)
treee241ec766008d154f32f1b3a313fd7233984606a /src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
parentba10af9edb594f69e58e6f2ccb251e3bdff3e9c6 (diff)
HiDPI support under WIN32 platform: completed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12285 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
index 6dbfa7848..682afca25 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
@@ -42,9 +42,14 @@ protected:
static BOOL CALLBACK screen_cb(HMONITOR mon, HDC, LPRECT r, LPARAM);
BOOL screen_cb(HMONITOR mon, HDC, LPRECT r);
int get_mouse_unscaled(int &mx, int &my);
+#ifdef FLTK_HIDPI_SUPPORT
+ void init_screen_scale_factors();
+#endif
public:
- Fl_WinAPI_Screen_Driver() : Fl_Screen_Driver() { }
+ Fl_WinAPI_Screen_Driver() : Fl_Screen_Driver() {
+ for (int i = 0; i < MAX_SCREENS; i++) scale_of_screen[i] = 1;
+ }
// --- display management
virtual int visual(int flags);
// --- screen configuration
@@ -85,11 +90,17 @@ public:
virtual void offscreen_size(Fl_Offscreen off, int &width, int &height);
#if defined(FLTK_HIDPI_SUPPORT)
virtual APP_SCALING_CAPABILITY rescalable() {
- return SYSTEMWIDE_APP_SCALING;
+ return PER_SCREEN_APP_SCALING;
+ }
+#endif
+#if defined(FLTK_HIDPI_SUPPORT)
+ virtual float scale(int n) {
+ return scale_of_screen[n];
+ }
+ virtual void scale(int n, float f) {
+ scale_of_screen[n] = f;
}
#endif
- virtual float scale(int n) {return scale_of_screen[n];}
- virtual void scale(int n, float f) { scale_of_screen[n] = f;}
virtual float desktop_scale_factor();
};