These methods are intended to be used instead of pWindow->method()
for better code readability and easier porting of methods from
Fl_Window to Fl_Window_Driver.
New methods: x(), y(), y(), h(), shown(), parent(), border(),
visible(), and visible_r().
We should add more such methods if appropriate.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11414 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Still unclear whether the implementation of the flush() functions follows the plan.
The Fl_Printer class is fully rewritten under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
It seems this allows not to #include <windows.h> in the public header files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11342 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
fl_gc remains usable by the application as a hook into the system.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Also, change arguments of void Fl_Window::capture_titlebar_and_borders() from
Fl_RGB_Image to F_Shared_Image so, in the future, scaled images having
a drawing size distinct from a pixel size can be returned, to support
high-resolution displays.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11159 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is the accumulated patch introduced in branch 1.3
in svn r 11094, 11095, and 11096.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This allows compilation to complete, and appears to work. Probably.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11078 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
that triggers a warning when FL_PORTING is ON and with a default platform-neutral
implementation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2) Advance branch-1.3-porting with new function Fl_X::capture_titlebar_and_borders()
that contains all the platform-specific code of all operations related to drawing
window borders and title bars. What is platform-specific and what is not
is therefore much clearer, to ease porting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11002 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
that copies a window to the clipboard together with its title bar and borders.
This requires very little new code because the capture of window decorations
is shared with the Fl_Paged_Device::print window() method.
The device test program is changed to call the new method.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10928 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
by Fl_Paged_Device::print_window(). The GetWindowRect()
function gives inadequate results on Windows 10. DwmGetWindowAttributes()
from dwmapi.dll gives adequate results. This new function is dynamically
loaded at run-time, when dwmapi.dll is available.
On Windows XP, dwmapi.dll is not available.
On Windows 7, DwmGetWindowAttributes() returns with error, so GetWindowRect()
is used.
On Windows 10, DwmGetWindowAttributes() computes the correct window full rectangle.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10921 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
In testing, this resolves the reported issue, but I'd be happy if we could find a
solution that resolved the underlying issue of us missing PostThreadMessage()
messages passed from the worker thread to the main thread, whilst the main window
is unresponsive (i.e. moving or dragging.)
This also puts in place an amendment to the way the awake callback ring-buffer indices
are tested, when the buffer is wrapping over or near to full. This was identified by
Albrecht in STR #3223 (item #1 on that STR, though there are a few other issues
identified there.)
In my testing, this appears to be correct and robust. Further testing would not go
amiss, however.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10714 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The window icon was reset during show() if it was set before show(),
because Fl_X::make() didn't check the new RGB image icons. Hence the
previously set Fl_RGB_Image icon was ignored and replaced by the default
Windows application icon.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10570 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Moreover, fl_read_image() behaves differently with and without OS virtualization for X11 and MSWindows.
The patched function reads whatever is in the rectangle transmitted in arguments, with and without GL data, with and without subwindows,
on ‘true’ OS or on virtualized OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
as quickly as possible or we might miss important window
messages.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10387 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
on Windows. This is necessary because Windows doesn't implicitly
clean up when a process dies, and we cannot trust applications to
always explicitly unregister.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10367 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
more explicit. Otherwise we could end up with
Fl::remove_clipboard_notify() unregistering, just to have it
immediately re-register again.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This needs to be done from FLTK as it affects the window interaction,
which FLTK is largely responsible for.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10314 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
fatal() if it cannot be loaded and is hence already required.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This gives applications the means to handle some low level
integration with the system that might otherwise not be possible
without modifying FLTK itself.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10310 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
with the double calls to PeekMessage() and the extra if clause.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10309 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Also change our fallback cursors to use this method, so that fallback
cursors are handled in a platform independent manner. STR #2660.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
makes sure that windows are decorated better when a modal window
is active. STR #2802.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10190 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The API follows that of EWMH, which gives you a good control
over which monitors to use.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
easily break if an application misbehaves and/or crashes.
So to minimise risk, don't register ourselves unless we
really need to.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
next window in order for the chain to properly update.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10187 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Added Fl_Image_Surface class to draw into an Fl_Image object.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10159 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The reason the code was problematic was because of r4589, where
a call to PostQuitMessage() snuck in. As we could not find a
valid reason for that PostQuitMessage(), it has been removed and
FLTK is now again properly responsive to WM_QUIT messages.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Try with test/editor, opening several windows, and closing one.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10060 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
applications a convenient way to request termination, rather
than forcing it. And it does so in a way that mimics UNIX's
way, allowing code reuse.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10030 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
A new event FL_SCREEN_CONFIGURATION_CHANGED is introduced.
Fl::add_handler() allows to register a callback for this event.
The unix/X11 implementation is still missing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
entire window area instead of the top left corner only to find the
screen to put the window on (Windows only).
Note that this *should* be changed to use the work area instead of
the screen area, as discussed in fltk.development.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
when the window is iconized for all platforms.
Also, factorized some duplicated code in src/Fl_x.cxx.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fl_Paged_Device::print_window() where the window didn't redraw well in some
cases after printing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8606 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Added Fl_Window::decorated_w() and Fl_Window::decorated_h() that return the size
of a window with its title bar and frame.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8593 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Applied Manolo's patch, modified to use FL_INTERNALS for
explicit request in user code to expose class Fl_X.
Also changed X11 and Mac OS to use FL_INTERNALS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8289 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
with Fl_Widget::type(). Added a setter function Fl_Device::class_name(const char *).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8190 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
discussed in fltk.development. We exclusively use winsock 2
(ws2_32.dll) and winsock2.h now.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7987 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
not yet completely converted to UTF-8. Cleaned up related code, removed
old comments.
Tested and confirmed that the xclass() setup works and that different
icons can be set for different window classes (as it was in FLTK 1.1.10).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7704 ea41ed52-d2ee-0310-a9c1-e6b18d33e121