summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
AgeCommit message (Collapse)Author
2025-05-09Remove declaration of Fl_Scalable_Graphics_Driver from FL/Fl_Graphics_Driver.HManoloFLTK
and declare it in non-public header src/Fl_Scalable_Graphics_Driver.H which also declares classes Fl_Font_Descriptor and Fl_Fontdesc.
2024-11-12 Fix Keyboard shortcut (alt + letter) does not work in input widget-Windows ↵ManoloFLTK
(#1122)
2024-10-27Quick fix for Windows Ctrl character handling - cont'dManoloFLTK
2024-09-02Reverting false Ctrl Key fix on WindowsMatthias Melcher
- 1ae43956e2bfb933d63fc774ca8e4ed22e4108dd
2024-08-23Quick fix for Window Ctrl charcter handling.Matthias Melcher
This is needed to allow platform compatibel e_text and e_length, but a lot more work ist needed to unify keyboard handling
2024-04-13Remove "MS" from "MS Windows" in docs code, and commentsAlbrecht Schlosser
The system (platform) is called "Windows", "MS Windows" doesn't make much sense. I removed "MS" for consistency.
2024-03-03Fix Visual Studio compiler warningsAlbrecht Schlosser
2024-03-01Windows: improve changing scale values of display while app runs.ManoloFLTK
2024-03-01Windows: make Ctrl/+/-/0/ scaling system-wide if all screens have same DPIManoloFLTK
2023-02-10Unlimited undo/redo for Fl_Input_ and Fl_Text_Buffer (#558) (#676)Matthias Melcher
2022-11-11Remove redundant doxygen docs of fl_beep()Albrecht Schlosser
Also add a comment to all platform driver implementations.
2022-08-29Make hybrid Wayland/X11 platform.ManoloFLTK
2022-03-13Separate platform init functions from platform-specific driver filesManoloFLTK
2022-01-31Consolidate timeout handling across platforms (#379)Albrecht Schlosser
Add Fl_Timeout class Move platform independent code of Fl::wait() to main part - basic timeout handling - Fl::run_checks() - Fl::run_idle() - Fl::idle() - waiting time calculation (next timeout) - remove platform dependent "screen driver" stuff
2021-03-11Unification of scaled coordinate calculations in class ↵ManoloFLTK
Fl_Scalable_Graphics_Driver Most coordinate calculations are done with the new inline function int Fl_Scalable_Graphics_Driver::floor(int coord) that is used by both the Windows and X11 platforms.
2021-02-24Improve precision of GUI scaling for Windows platform.ManoloFLTK
2021-02-16Use <config.h> when appropriate.ManoloFLTK
2021-02-15PR #174: Skip the call to MonitorFromRect when it is not needed.ManoloFLTK
2021-02-13Remove compilation warnings issued by Visual Studio 2019.ManoloFLTK
2020-12-02Improve Fl_Graphics_Driver::cache_size() when GUI is scaled.ManoloFLTK
The change lets this function enlarge the size only when strictly necessary for image tiling.
2020-11-29 Fix for issue #123 - Windows platformManoloFLTK
2020-11-17Fix whitespace and minor formatting issuesAlbrecht Schlosser
2020-11-02Fix possible memory leak in ↵ManoloFLTK
Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled() Thanks to "fire-eggs" for spotting it. Also minor optimisations in Fl_X11_Screen_Driver::read_win_rectangle_unscaled() and Fl_Cocoa_Screen_Driver::read_win_rectangle_unscaled(). This closes PR #151.
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2019-11-02Slightly simpler code to support fl_overlay_rect() on HighDPI screens.ManoloFLTK
2019-08-21Fix a case when fl_read_window() did not capture subwindows correctly.ManoloFLTK
The case was under macOS with a non-GL parent window mapped to a retina display containing a GL subwindow and if the app did not call Fl::use_high_res_GL(1).
2019-06-18Slightly simpler Fl_WinAPI_Screen_Driver::init()ManoloFLTK
2019-06-16Make FLTK Windows apps "Per-Monitor-V2 DPI Aware"ManoloFLTK
Per-Monitor V2 awareness mode is supported on Windows 10 1703 or above and has window title bars correctly scaled on HighDPI screens. Before this commit, FLTK Windows apps were "Per-Monitor-V1 DPI Aware". FLTK apps detect at run-time whether the V2 mode is possible.
2019-06-06Add one argument to Fl_Screen_Driver::read_win_rectangle()ManoloFLTK
The new argument gives the window to be captured, or NULL to indicate capture from the current offscreen. Calling this function becomes easier because less dependent on global variables.
2019-03-06Process env var FLTK_SCALING_FACTOR consistently across platforms.ManoloFLTK
The procedure to set screen scaling factors becomes: 1) each screen scaling factor is set to 1 2) the OS is queried according to each platform to get screen scaling factor values 3) The value of FLTK_SCALING_FACTOR, if present, is used to multiply scaling factors
2019-02-28Fix error in Fl_WinAPI_Screen_Driver::screen_work_area() when screen is scaled.ManoloFLTK
2018-11-28Create default implementation of Fl_Screen_Driver::get_system_scheme() and ↵Manolo Gouy
use it for macOS and Windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13137 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-26Windows: Have Fl::x(), Fl::y(), Fl::w() and Fl::h() change their values when ↵Manolo Gouy
the screen is rescaled. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13134 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-03Fix fl_overlay_rect() under X11 and Windows when GUI is scaled.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12891 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-09Windows: remove necessity to compile with -DFLTK_HIDPI_SUPPORT to make WIN32 ↵Manolo Gouy
FLTK apps DPI-aware. At this point, Windows FLTK apps detect HighDPI displays and rescale their GUI accordingly. They also all reply to ctrl/+/-/0/ keystrokes to enlarge/shrink/reset their windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09Replace "WIN32" with "_WIN32" or "Windows".Albrecht Schlosser
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32". Replace "WIN32" in text and documentation with "Windows". Replace "MSWindows" with "Windows". To do: README.Windows.txt (and maybe other documentation as well) needs updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09Fix fl_read_image() under MacOS platform when GUI is rescaled.Manolo Gouy
This commit also simplifies the platform-dependent support of fl_read_image(): only Fl_XXX_Screen_Driver::read_win_rectangle() contains platform-specific code to capture pixels from the current window or from an offscreen buffer. Platform-independent function Fl_Screen_Driver::traverse_to_gl_subwindows() captures subwindows that intersect with the area fl_read_image() targets. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12653 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31Replace FL/x.H with FL/platform.H - step 2 (STR #3435).Albrecht Schlosser
This second step replaces FL/x.H with FL/platform.H in all source files. Dependencies have been adjusted as well. This commit completes the replacement of FL/x.H with FL/platform.H. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-09Put a default implementation of parse_color() in Fl_Screen_Driver and only ↵Manolo Gouy
Fl_X11_Screen_Driver reimplements it. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-17Replace remaining calls of getenv() with fl_getenv().Albrecht Schlosser
Note: don't use fl_getenv() in Fl_System_Driver and derived classes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-19Prevent situation where SetProcessDPIAwareness was called after ↵Manolo Gouy
Fl_WinAPI_Screen_Driver::init(). The effect was that the file_chooser test app did not recognize the window scaling factor. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12393 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-30Improve rescaling when window moved across screens: make sure center stays ↵Manolo Gouy
on new screen. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12367 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07Define Fl_WinAPI_Screen_Driver::DWM_scaling_factor() only without ↵Manolo Gouy
FLTK_HIDPI_SUPPORT. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12298 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-03HiDPI support under WIN32 platform: completed.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12285 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-29HiDPI support for WIN32 platform: begin to support screen-specific scale factor.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12280 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-18Advancing HiDPI support for the WIN32 platform - still incomplete.Manolo Gouy
It's still necessary to compile with -DFLTK_HIDPI_SUPPORT to activate the new HiDPI support. Default builds get the same HiDPI support as in FLTK 1.3 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-17Introduce HiDPI + rescaling support for the X11 platform (+ partial support ↵Manolo Gouy
for WIN32) Corresponds to STR #3320 1) HiDPI support consists in detecting the adequate scaling factor for the screen on which FLTK maps a window, and scaling all FLTK units by this factor. FLTK tries to detect the correct value of this factor at startup (see more details below). Environment variable FLTK_SCALING_FACTOR can also be used to set this value. 2) Rescaling support consists in changing the scaling factor of all FLTK windows in reply to ctrl/+/-/0/ keystrokes. More details for the various platforms : - X11: Support is very advanced. Some details need still to be improved. Automatic detection of the correct starting value of the scaling factor works well with the gnome desktop. The present code contains no support for this on other desktops. FLTK_SCALING_FACTOR provides a workaround. -WIN32: Support is incomplete at this point, although many test applications have partial or complete HiDPI and scaling support. The current value of the system's scaling factor is correctly detected at application startup. Apps respond to changes of this value in real time. Support needs to define the FLTK_HIDPI_SUPPORT preprocessor variable at compile time. This way, standard builds produce a code with the default WIN32 HiDPI support, that is, where all graphics goes to an internal buffer that gets enlarged by the system and then mapped to the HiDPI display. To experiment with (or develop) the new HiDPI support requires a modified build procedure in which FLTK_HIDPI_SUPPORT is defined at compile time. When the support will be complete, the requirement for the definition of this preprocessor variable will be removed. The present commit contains support for a single scaling factor. Eventually, per-screen scaling factors should be implemented, as done for X11. - MacOS: this commit does not give new HiDPI for this platform. Eventually, window rescaling in reply to command/+/-/0/ is desirable. Per-screen scaling factor makes no sense on this platform because the OS itself takes care of the difference between the resolutions of traditional and retina displays. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-11Fix Windows CreateDC/DeleteDC mismatch (STR #3373).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12217 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-14Implement a platform-independent version of ↵Manolo Gouy
Fl_Graphics_Driver::copy_offscreen() usable when drawing to PostScript. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-09Use Fl_Graphics_Driver::default_driver() when convenient.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12088 ea41ed52-d2ee-0310-a9c1-e6b18d33e121