Commit Graph

1483 Commits

Author SHA1 Message Date
Matthias Melcher 30756ae350 Window functions to retrieve more detailed window type
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-13 15:31:26 +00:00
Matthias Melcher 5953f5a695 Quick fix for Fluid on X11. MSWindows version broken due to missing Fl_Printer::Helper::Helper
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-12 23:44:57 +00:00
Matthias Melcher e6631a0f7f Moved the Fl_Window::decorated_*() functions teh Window_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-12 22:24:20 +00:00
Albrecht Schlosser c1fe316855 Add localization of modifier key names in shortcut labels.
Modifier key names like Alt, Shift, Ctrl, Meta can now be localized by
setting global string pointers. See documentation of fl_shortcut_label().

Port branch-1.3, svn r 11321.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11354 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-12 17:44:24 +00:00
Manolo Gouy f11fe83e5e Rewrite of Fl_Printer under the driver model - first step
Next step will involve moving code to new, platform-specific files.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-11 20:32:48 +00:00
Manolo Gouy 28f24b1b6f Remove a few #include <FL/x.H> from public FLTK headers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11347 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-11 09:28:56 +00:00
Manolo Gouy 408d0672a4 Rewrite Fl_Window::wait_for_expose() using the window driver approach.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11346 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-11 08:31:36 +00:00
Manolo Gouy 2952c530b8 Rewrite capture of window decorations using the window driver approach.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-11 07:07:42 +00:00
Matthias Melcher ac1932eaa7 (incomplete) Add files required to compile for Android via Pico driver.
Don't get your hopes up just yet: this code does compile, but it doesn't fully link yet. If you like to test this, install the Android SDK and NDK, set the usual environment variables, then change into the "Android" direktory and run "mk". It will currently fail at the linker stage.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11343 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-11 00:19:27 +00:00
Manolo Gouy 31fcd84ca9 Rewrite all window icon-related Fl_Window API with the window driver approach.
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
2016-03-10 22:26:40 +00:00
Manolo Gouy d4768073fa Implement non-rectangular windows using the Window Driver mechanism.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11336 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-10 17:19:34 +00:00
Albrecht Schlosser bcb756da38 Improve documentation of Fl_Valuator class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11318 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08 13:51:01 +00:00
Matthias Melcher ca54afe5f4 Add missing PicoSDL functions for command line build.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11313 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08 09:15:50 +00:00
Matthias Melcher 00750d4c33 Add very basic graphics support to PicoSDL.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08 00:35:00 +00:00
Matthias Melcher b73bf4a73e Fixes for MSWindow
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11310 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-07 21:56:12 +00:00
Matthias Melcher c26880e2d2 Fixes for X11
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11309 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-07 21:45:55 +00:00
Matthias Melcher 12eef8e64d Separating Fl_X and Fl_Window_Driver in Fl_Window.
This was needed because Fl_X only exists if a window is mapped, but we need the driver from the very beginning. Adding Fl_X in the ctor would create hidden bugs. Strategy is now to remove system specific stuff from Fl_X and move it one-by-one to Fl_Window_Driver while maintaining a working code base. X11 and WIN32 fixups will follow in 15 minutes.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11308 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-07 21:15:25 +00:00
Matthias Melcher b6b99d84e9 Fix PicoSDL.
Fixed some issues with Image_Surface and Copy_Surface for PicoSDL. Still have to virtualize the driver concept.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-07 20:50:18 +00:00
Manolo Gouy 5ca73da7b3 Driver-based Fl_Double_Window implementation - continued.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11304 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-06 22:22:22 +00:00
Manolo Gouy acfeee6d78 New, driver-based Fl_Double_Window implementation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11303 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-06 21:33:07 +00:00
Manolo Gouy e7a0f7c5d0 Complete the platform-neutral implementation of fl_XXX_offscreen() functions.
It is necessary to have a stack of the fl_begin_offscreen() calls, so that nested
such calls apply fl_end_offscreen() to the matching fl_begin_offscreen().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11289 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-05 07:04:20 +00:00
Manolo Gouy a46e324405 Fix a problem seen in fluid on the Mac OS platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11285 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-04 22:30:18 +00:00
Manolo Gouy 750c372b29 Remove Fl_Copy_Surface::newPlatformSurface() that does not do much.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11279 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-03 19:25:10 +00:00
Manolo Gouy 8bd3ea6c8a A hopefully clearer implementation of the fl_XXX_offscreen() functions.
The Xlib driver is tricky because it uses two kinds of offscreen buffers.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11277 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-03 08:32:16 +00:00
Matthias Melcher fcdc7f1212 Made Pico/SDL setup compile and run some minimal code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11274 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-03 00:07:17 +00:00
Manolo Gouy 2d52a3494d Rewrite Fl_Image_Surface with full separation of public API and platform-specific implementation.
File Fl_Image_Surface.cxx still needs to be cut in several platform-specific files.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11273 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-02 22:10:03 +00:00
Albrecht Schlosser 35c4ae5527 Don't expose X11 headers in user space any more (mostly).
Platform headers should not be #include'd in public FLTK header files,
so that user space is not polluted by platform specific definitions.

See discussion and test file in discussion in fltk.general:
https://groups.google.com/forum/#!topic/fltkgeneral/gzmdRk2LvAk
https://groups.google.com/d/msg/fltkgeneral/gzmdRk2LvAk/EOe314ChBgAJ

This commit fixes FL/fl_utf8.h to #include X11 headers only if compiled
in the FLTK library (same as in FLTK 1.3.4, svn r 11266).

Todo (FLTK 1.4): Remove more unnecessary (unwanted) system header #include
statements from FL/x.H and other public header files.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11268 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-02 12:40:53 +00:00
Manolo Gouy 39fdbecd16 Finalize new implementation of Fl_Copy_Surface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11267 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-02 12:36:37 +00:00
Albrecht Schlosser df94673b61 Fix C++ comment in C header file + typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-02 10:53:25 +00:00
Matthias Melcher 53859c584f Add support for SDL as a base library on OS X.
This commit adds the basic setup in CMake to allow SDL as a base
library for FLTK on OS X (and probably for other platforms as well).

The SDL library driver set is derived from yet another new driver
set named 'Pico'. 'Pico' is a base class for a driver that will
allow porting of FLTK with the tinyest amount of effort. This 
implementation of the SDL driver shall be documented very well
to explain the porting process.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-02 00:54:37 +00:00
Manolo Gouy a3d54d5d6c Correct the headers included by FL/Fl_Copy_Surface.H, following the new implementation of this class.
This change requires other changes in header inclusions by class Fl_Image_Surface.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11258 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-01 18:07:12 +00:00
Manolo Gouy 7decb3d3b2 Rewrite the Fl_Copy_Surface class with strict separation of public API and platform-related code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11257 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-01 17:20:25 +00:00
Matthias Melcher 95824506fe Moved timer code to screen drivers. Not sure if this should be in System Drivers instead.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11253 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-01 00:54:21 +00:00
Albrecht Schlosser d67e9ccb73 Fix compiler warnings (STR #2988) - final commit.
This commit includes all fixes from branch-1.3 (svn r 11243) and additional
fixes for warnings that crept in during the porting efforts, particularly
C++ ("//") comments in C and included header files, and some more.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11246 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-27 17:27:21 +00:00
Manolo Gouy 0b406baa0f Rewrite all fl_XXX_offscreen() functions so they use an Fl_Image_Surface object.
These functions become therefore platform-independent.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-27 13:52:27 +00:00
Manolo Gouy 81bd759b53 Remove Fl_Printer::driver() that is already implemented in a parent class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11236 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 20:27:41 +00:00
Manolo Gouy 169e422fee Make the Fl_Widget_Surface's constructor protected.
Because this object is not functional in itself, but needs to be subclassed.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11235 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 17:45:13 +00:00
Manolo Gouy 350cca5446 Use the FL_DOXYGEN preprocessor variable to remove all Doxygen warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11232 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 17:17:20 +00:00
Manolo Gouy cf4825eedf Move PostScript-support files to src/drivers/PostScript/
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11222 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 15:24:08 +00:00
Manolo Gouy 53993d4bd1 Add virtual destructor to Fl_Screen_Driver.
This is safer because Fl_Screen_Driver has virtual member functions and derived classes.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11221 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 13:41:48 +00:00
Manolo Gouy 682f950796 Create class Fl_Widget_Surface that supports draw(Fl_Widget *, int, int).
This simplifies the implementation of Fl_Copy_Surface and Fl_Image_Surface
which now are made to derive from Fl_Widget_Surface.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 12:51:47 +00:00
Albrecht Schlosser 44f203e275 Fix Linux and Windows compilation error.
Note: class Fl_Device has been removed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11218 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 11:13:43 +00:00
Manolo Gouy 7f17b915db Remove the useless pseudo run-time type information supported by the Fl_Device class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11217 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-25 17:56:48 +00:00
Manolo Gouy 31793cbdba Remove the global variable fl_mask_bitmap - put it in the graphics driver's virtual API.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11216 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-25 10:14:28 +00:00
Manolo Gouy 6097c134d8 Avoid static initializers to allow FLTK usage in static initializers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11213 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-24 08:07:30 +00:00
Manolo Gouy 941c301ceb Fix Fl_RGB_Image::uncache() and Fl_Bitmap::uncache().
It is not possible to use fl_graphics_driver in these functions
because when they are called *fl_graphics_driver may have been
deleted. A solution is to use  Fl_Display_Device::display_device()->driver()
instead which is always valid.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-23 20:37:22 +00:00
Matthias Melcher 90c42cac3e WinAPI fixes
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-19 22:46:00 +00:00
Matthias Melcher 093c0c7f73 Fixes for X11
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-19 22:43:40 +00:00
Matthias Melcher 399501783c Add example code to Fl_Window_Driver.
Some refactoring of a take_focus() function into driver structures (not too happy with it, because it has some kind of bug fix. However, shouldn't *all* Fl_Windows always have an FL_Window_Driver?)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-19 22:37:41 +00:00
Matthias Melcher 052401a34e Instantiate the right Fl_Window_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11195 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-19 22:21:02 +00:00