summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI
AgeCommit message (Collapse)Author
2020-01-15Fix uninitialized vars in calls to fl_clip_box() (issue #6)Albrecht Schlosser
The main fixes are only to avoid static code analyzer warnings reported in issue #5, but there are also minor bug fixes included. These bug fixes are more of theoretical concerns though. Close #6.
2020-01-03Fixed previous commit for MSWindows.MatthiasM
2020-01-03Linux/MSWindows: improved Fl_Preferences file path checkingMatthias Melcher
2019-12-31Limiting file access for Fl_Preferences.Matthias Melcher
Added Fl_Preferences::file_access() and various flags that make it possible to limit or completely deny file access to the preferences system, either for the core library or for the application or both.
2019-11-02Slightly simpler code to support fl_overlay_rect() on HighDPI screens.ManoloFLTK
2019-10-22Add default value of 0 for 1st arg of member function Fl_Printer::begin_job().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-07-13Fl_WinAPI_Printer_Driver::end_page(): make sure rotation stops when the page ↵ManoloFLTK
ends
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-25Replace static void Fl_Window_Driver::default_icons() by virtual ↵ManoloFLTK
Fl_Screen_Driver::default_icons()
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
2019-02-23Rename member todelete_ of struct Fl_Window_Driver::shape_data_type to ↵ManoloFLTK
effective_bitmap_
2019-02-23New member function const Fl_Image* Fl_Window::shape() replaces int ↵ManoloFLTK
Fl_Window::is_shaped() The new function allows to get the window's shaping image and delete it after use, if appropriate.
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-06-27Remove a few useless 'friend' statements.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26Move Fl_System_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12976 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26Move Fl_Screen_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-26Move Fl_Window_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12974 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-25Replace Fl_Paged_Device::newPrinterDriver() by Fl_Printer::newPrinterDriver().Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12937 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-12Remove public member function Fl_Window_Driver *Fl_Window::driver() so class ↵Manolo Gouy
Fl_Window_Driver is not in FLTK public API. This function is replaced by static Fl_Window_Driver* Fl_Window_Driver::(const Fl_Window *win). The purpose is to have class Fl_Window_Driver outside from FLTK ABI. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12915 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-09Rename Fl_Paged_Device::start_job() to begin_job() and ↵Manolo Gouy
Fl_Paged_Device::start_page() to begin_page(). The new function names begin_job() and begin_page() better match end_job() and end_page() with which they must be used by pair. The old names start_job() and start_page() are maintained for API compatibility with FLTK 1.3.x git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12910 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-09Remove a bunch of useless #include <FL/Fl_Printer.H> statements.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12909 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-06Simplify Fl_XXX_Window_Driver::capture_titlebar_and_borders() using ↵Manolo Gouy
Fl_Image::scale(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12902 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-04-24Windows: avoid changing the current Fl_Surface_Device when drawing an ↵Manolo Gouy
Fl_Double_Window. This change was previously attempted at r.12792 but the test/offscreen demo did not run well with it. This commit fixes the problem: the global fl_window should not be changed when drawing to an Fl_Double_Window. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-23Undo change at r12792 (24 march 2018) because test/offscreen does not work ↵Manolo Gouy
with it. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12867 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18Simplify the implementation of printing of Fl_Pixmap images under Windows.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12851 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24Windows: avoid changing the current Fl_Surface_Device when drawing an ↵Manolo Gouy
Fl_Double_Window. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12792 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-20Remove unnecessary #ifdef _WIN32Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12682 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-16Remove Fl_Window_Driver::current_cursor() and its platform-specific forms ↵Manolo Gouy
that are now unused. This became unused when window scaling no longer involved window destruction/recreation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12668 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-12-18STR#3444: Add MacOS support for application rescaling (not quite complete)Manolo Gouy
With this, most MacOS FLTK app can be scaled with command/+/-/0/ keystrokes. A scaling problem remains, visible in test/cube, where the "Test" string is not positioned correctly. GLUT apps can also be scaled (across platforms). SVG images are re-rasterized after app scaling for optimal drawing. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12594 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-11-11Refactor Fl_WinAPI_System_Driver string conversion and more.Albrecht Schlosser
Remove duplicated code by using local (static) string conversion functions. This makes the code better maintainable and removes redundancies. Rename some variables (particularly one-letter names) to more useful names, minor code reformatting to be more compatible with the CMP. To do: check for potential memory leaks, maybe free temporary buffers. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12556 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-10Add missing platform wrapper fl_chdir() for chdir().Albrecht Schlosser
Tested under Windows and Linux, but not yet used in library code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12549 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15Rename fl_open_ext() parameter 'translation' to 'binary'.Albrecht Schlosser
The default (0) is 'text' mode, non-zero is 'binary' mode on platforms that distinguish text and binary mode. Currently Windows is the only supported platform that needs this. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12500 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-12Add fl_open_ext() to control whether the file is opened in binary/text mode.Manolo Gouy
This new function allows to write Fl_SVG_Image::fl_gzopen() in a completely platform-independent way. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04Undo commit at r.12475 that is not adequate.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04Fl_SVG_Image class: add support for compressed .svgz image files.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12475 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-19Convert the initialisation of global variables fl_local_shift, ↵Manolo Gouy
fl_local_meta, etc... using the driver approach. This avoids repeating the default values "Shift", "Meta", etc... for several platforms. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12463 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-19Fl_XXX_System_Driver::clocale_printf() : use thread-specific, locale-setting ↵Manolo Gouy
APIs where possible This commit uses thread-specific, locale-setting functions under Linux and MSWindows-Visual Studio They are already used by the Mac OS system driver, when possible. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12461 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-20Remove undesirable statement.Manolo Gouy
A bug was visible in test/unittests when moving between lines and rectangles. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12394 ea41ed52-d2ee-0310-a9c1-e6b18d33e121