Commit Graph

6576 Commits

Author SHA1 Message Date
Albrecht Schlosser
4a1662f1da Fix compilation under Linux - compiles, but doesn't work :-(
I moved all timer related (X11) stuff from src/Fl.cxx to
src/drivers/X11/Fl_X11_Screen_Driver.cxx and added externals as
done by Ian in a previous commit for the WinAPI screen driver.

I did not (yet) remove the code from Fl_x.cxx though, but disabled it. See:
  #if (0) // *FIXME* moved to src/drivers/X11/Fl_X11_Screen_Driver.cxx

Current state is that FLTK can be compiled and linked again (under Linux)
but doesn't work (shows empty windows only).

I thought it was worth to commit my work, but can't check what's going on
right now - other devs should feel free to continue this.

PS: the new code in src/drivers/X11/Fl_X11_Screen_Driver.cxx was just
dropped in, keeping the right order for usage of static helper functions,
but should be fixed in all regards (order, logic, ...).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11185 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-17 12:16:59 +00:00
Albrecht Schlosser
f7ef143c4f Fix typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11184 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-17 11:23:26 +00:00
Manolo Gouy
c5994ebb6f Fix drawing of window decoration.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11183 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-16 22:15:47 +00:00
Manolo Gouy
4bdfc28670 Reformatting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11182 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-15 17:28:50 +00:00
Manolo Gouy
6c33971353 Restore compilability for the WIN32 platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11181 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-15 17:25:57 +00:00
Manolo Gouy
88f20cfd15 Improve image drawing to double-resolution Fl_Image_Surface objects (Mac OS only).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11180 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-15 17:21:23 +00:00
Ian MacArthur
5918384879 FL porting Win32 build fix:
Fix a typo. in Fl_WinAPI_Screen_Driver.cxx that was
preventing linking.
Also hack around a build issue by adding some extra
extern calls to Fl_WinAPI_Screen_Driver.cxx.

I suspect that these are also needed in
Fl_X11_Screen_Driver.cxx but do not have an X11 box
here to test with.

In any case, these added externs should probably be
in an internal header somewhere, not in the code
like I have done!

Currently builds/runs OK on Win7 with these changes.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11178 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-15 13:52:58 +00:00
Albrecht Schlosser
5bc3f5f5a7 Remove all Windows IDE files.
Todo: remove Xcode4 files as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 22:57:48 +00:00
Albrecht Schlosser
0c4804270b Fix HTML entities in Fl_Help_View.
Removed obsolete ENC() macro, fixed some encodings that were still
Windows CP-1252: converted to correct Unicode values.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11175 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 19:50:57 +00:00
Manolo Gouy
17fc58f6ad Fl_Graphics_Driver::has_feature(Fl_Graphics_Driver::NATIVE) is useful here.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 10:29:54 +00:00
Manolo Gouy
ec290bc9e0 Remove Fl_X::q_fill_context() used only once.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 06:36:20 +00:00
Manolo Gouy
6439f34ee7 Remove Fl_X::q_clear_clipping() used only once.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11170 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 06:19:26 +00:00
Manolo Gouy
a349dc994e Move Fl_Quartz_Graphics_Driver::draw_CGImage() to Fl_Quartz_Graphics_Driver_image.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11169 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 06:02:12 +00:00
Albrecht Schlosser
8630bdbed2 [Cairo] Remove part of the dependency of FL/Fl.H on config.h.
To use Fl_Cairo_Window one did not only need to configure with --enable-cairo,
but also needed to #include <config.h> before #include <FL/Fl.H>.

This commit removes the smaller part of the dependency of the public header
file FL/Fl.H on config.h. This needs a better solution in FLTK 1.4.0.

The user still needs to define FLTK_HAVE_CAIRO _before_ #include <FL/Fl.H>.

Note: This is not compatible with fluid, since fluid _always_ includes
FL/Fl.H as the first statement in generated header files.

See also the discussion in fltk.general:

https://groups.google.com/d/msg/fltkgeneral/_C1OJhMLQl0/pHUFtz9SCwAJ

Note: also fixed a typo in src/drivers/X11/Fl_X11_Screen_Driver.cxx


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 18:02:17 +00:00
Matthias Melcher
d8f96b579d Moed Fl::visual and System_Scheme to the driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11166 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 16:12:57 +00:00
Manolo Gouy
4af616a7a2 New member function Fl_Quartz_Graphics_Driver::draw_CGImage() used internally for all image drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11165 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 14:48:13 +00:00
Matthias Melcher
c95169ea49 Refactoring get_system_colors() into Fl_Screen_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11164 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 13:17:29 +00:00
Matthias Melcher
5d1df0e789 Details on PORTME items. Move fl_parse_color() to screen drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 12:57:00 +00:00
Manolo Gouy
8deac1e6ba Simpler code to support drawing to high-resolution Fl_Image_Surface object.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11162 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 06:25:34 +00:00
Manolo Gouy
df0b1dcb07 Fl_Window::capture_titlebar_and_borders() returns a double-resolution top image.
Also, Fl_Image_Surface now can draw a scaled Fl_Shared_Image to 
a double-resolution surface.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11160 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-12 21:15:48 +00:00
Manolo Gouy
bf7c25a1d7 Add Fl_Shared_Image *Fl_Image_Surface::highres_image() to draw into high-resolution bitmap.
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
2016-02-12 16:17:40 +00:00
Manolo Gouy
bc83464b64 Add Fl_Shared_Image *Fl_Image_Surface::highres_image() to draw into high-resolution bitmap.
This new member function returns a high resolution bitmap image scaled to the adequate
 drawing size. This allows to create a bitmap image able to fill all pixels of a high resolution
 display. This is functional only for the Mac OS platform. On other platforms, 
 the new member function returns an unscaled bitmap.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11158 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-12 11:49:32 +00:00
Matthias Melcher
50ee3bcd66 Mark places that need to be refactored with // PORTME:
Searching for __APPLE, WIN32 or X11 did give me many false results. I instead marked most ifdef's that I would like to get rid of with the text // PORTME:, so they can be easily found by a global search.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11155 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11 12:02:36 +00:00
Matthias Melcher
a3c0dac034 Typo in Fl_X11_Screen_Driver::flush header
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11154 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11 00:18:02 +00:00
Matthias Melcher
9a0be2c8df Move platform part of Fl::flush()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11153 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11 00:10:49 +00:00
Matthias Melcher
5aa3fc9655 Moving fl_beep into screen driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11152 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 22:43:45 +00:00
Matthias Melcher
1a3c2dfd08 Avoid OS X warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11151 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 21:42:26 +00:00
Matthias Melcher
1ad9f6acf2 Fixed Screen Drivers for MSWindows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11150 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 21:02:38 +00:00
Matthias Melcher
c3b3105720 Fix Screen Driver implementation for X11
- moved stuff around to fit X11 file layout
- fixed a few Cocoa variables


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11149 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 20:26:51 +00:00
Matthias Melcher
e83bc2527f Basic Screen Driver Structure. LIMBO!
Creating the basic structure for a screen driver system.
OS X works X11 and WinAPI are in limbo and will be fixed in the next hour or so.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11148 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 19:49:35 +00:00
Matthias Melcher
478d633620 More device and driver setup.
- building the base structure to have a screen driver, a window driver, and a system driver
- still pondering over the exact implementation

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 13:04:24 +00:00
Matthias Melcher
572b7fe0b8 Starting CMake config to blend out filechoose and filename handling (shrins fltk massively if not needed)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11146 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 12:22:38 +00:00
Matthias Melcher
a679616477 Add header files to CMake setup.
I added a regex search to add header files. This is helpful when searching for symbols and strings from within the Xcode IDE and likely others as well.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11145 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 12:03:16 +00:00
Matthias Melcher
4f8ec11569 Fix missing files in Makefile system
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11144 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 10:38:03 +00:00
Matthias Melcher
4079e7590b Fix MSWindows compile issues.
Fixed a few warnings and a compilation issue introduced from previous reorganization.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-10 10:31:43 +00:00
Matthias Melcher
94f0278d47 Porting efforts, minimal Android stuff, cleanup.
- Moving code around for Fl_Double_Window, but not yet happy
- Tested CMake for Android cross compilation. Very happy!

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11142 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 21:54:38 +00:00
Matthias Melcher
7a0fe79f99 Fix MSWindows issues from last refactoring.
During the last refactoring on OS X, a few thing were relocated into new files, mainly to avoid ifdef's and use C++ inheritance in a driver system instead. This commit makes FLTK compile again under VC2013 with IDE files generated by CMake.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11141 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 20:15:04 +00:00
Matthias Melcher
4272f32b6b Fix typos for Linux from previous check-in.
- The previous check-in for OS X moved a few files and symbols around
- Fixing for Linux what I broke in my previous commit
- Fixing stuff for MSWindows next
- CodeBlocks IDE file generation via CMake works



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 18:52:21 +00:00
Matthias Melcher
e02b3631b3 Remove two files.
- two files were checke in that were misnamed. Removing.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11139 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 18:26:05 +00:00
Matthias Melcher
41e22f2f39 Move ifdef's in RGB_Image into driver system.
- change image caching variable types to uintptr_t
- added driver function to uncache image data
- cleaning up (Xlib and GDI will likely throw syntax errors. Trying to fix ASAP)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11138 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 18:25:02 +00:00
Matthias Melcher
dee0f5a824 Strip Graphics Driver related ifdefs.
- removed more ifdef's from the graphics drivers
- moved functionality into the driver files themselves
- updated CMakeList.txt



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11137 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 12:33:49 +00:00
Albrecht Schlosser
99a6faa513 Fix valgrind warning (uninitialized variable) in Fl_Window.
Regression only with FLTK_ABI_VERSION >= 10303 (since FLTK 1.3.3).
Was fixed in FLTK 1.3.4.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11136 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 01:48:08 +00:00
Albrecht Schlosser
b69fbf21bf [CMake only] Add examples/fltk-versions to test programs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11135 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 01:22:51 +00:00
Albrecht Schlosser
c5acf543d7 Fixed Windows drag'n'drop not showing insert position (STR #3209).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11132 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-07 10:15:11 +00:00
Manolo Gouy
a278a478fd New CMake option OPTION_PRINT_SUPPORT - continued
The previous version (r11127) had FL/Fl_Printer.H include config.h
That is not allowed. This commit repairs that.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-06 05:56:38 +00:00
Manolo Gouy
d8cebd1fdf Add description of the new CMake option OPTION_PRINT_SUPPORT
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-05 17:13:17 +00:00
Manolo Gouy
da97c30d7a Fix typo fl_draw.h instead of fl_draw.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11128 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-05 16:46:16 +00:00
Manolo Gouy
a8a777ff26 New CMake option OPTION_PRINT_SUPPORT turned ON by default
When the option is off, file config.h defines NO_PRINT_SUPPORT 
which in turn produces a library without print support, that is, 
class Fl_Printer does nothing.
When off, the FLTK library is somewhat smaller.
Can be turned off only when the X11 library is used.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-05 16:34:42 +00:00
Manolo Gouy
254cb01f54 Support of OPTION_APPLE_X11 by CMake: do not use hard-coded paths
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11125 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-03 10:20:03 +00:00
Manolo Gouy
f057cca22b To support OPTION_APPLE_X11
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11122 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-02 14:14:38 +00:00