Commit Graph

60 Commits

Author SHA1 Message Date
Albrecht Schlosser
5175192755 CMake: build shared libs with OPTION_CAIROEXT (issue #250)
- remove separate libfltk_cairo to avoid cyclic dependencies, but
- keep a dummy libfltk_cairo in 1.4.0 for backwards compatibility
- move cairo/Fl_Cairo.cxx to src/Fl_Cairo.cxx
- add preliminary Cairo support for Visual Studio (MSVC)

Static linking is not affected by this change, but users building
with hand-made Makefiles will have to remove libfltk_cairo starting
with FLTK 1.4.0. The dummy library can be linked for backwards
compatibility but it will be removed later (in 1.4.x or 1.5.0).

The shared FLTK library libfltk.{so|dylib|dll|..} depends on libcairo
if and only if FLTK is built with one of the Cairo options. This has
always been the case for OPTION_CAIROEXT but is now also true if only
OPTION_CAIRO is selected, i.e. FLTK programs linked with a Cairo
enabled shared FLTK library will also be linked with libcairo. The same
is true for configure options --enable-cairo and --enable-cairoext,
respectively.

Preliminary Cairo support for MSVC now detects a Cairo installation
using the CMake variable FLTK_CAIRO_DIR which must be set by the user.
Note that this feature is temporary and may be changed in the future
for a better and more comfortable version.
2023-03-09 17:34:05 +01:00
ManoloFLTK
6276822e9e Allow cmake -DOPTION_APPLE_X11=On without -U__APPLE__ 2023-02-02 18:48:24 +01:00
Albrecht Schlosser
4e75549e7b Update dependencies and fix whitespace errors
- replace tabs with spaces
- remove trailing whitespace
2023-02-02 17:09:14 +01:00
Albrecht Schlosser
c798581e4e Cairo: Remove compiler warning and improve formatting
... for better readability and CMP compliance.
No functionality changes.
2023-01-29 15:18:12 +01:00
Albrecht Schlosser
0ef8fb5ab4 Revert unintended change of comment in 44c874b731
... where 'override' was changed to 'FL_OVERRIDE'
2023-01-29 14:58:32 +01:00
Matthias Melcher
44c874b731
Use FL_OVERRIDE for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher
FL_OVERRIDE is defined as `override` for VisualC 2015 and newer
Don't interfere with Fl_Widget::override()
2022-12-30 19:14:36 +01:00
Albrecht Schlosser
624eda17bc Fix whitespace errors and dependencies
(no code changes)
2022-11-16 21:10:14 +01:00
ManoloFLTK
433a8e71e8 Fix typo in Doxygen for Fl::cairo_make_current(Fl_Window*) 2022-11-15 09:49:19 +01:00
ManoloFLTK
1c448d6ff1 Fix for "Wayland-only build is not compatible with Cairo option" (#544) 2022-11-15 09:02:03 +01:00
Albrecht Schlosser
85af0036f9 Reformat Cairo support Fl_Cairo.cxx for CMP compliance
Only formatting, no code changes.
2022-11-12 20:14:44 +01:00
ManoloFLTK
c720aae515 Make hybrid Wayland/X11 platform. 2022-08-29 12:15:32 +02:00
Albrecht Schlosser
15bbfeb975 Configure/make: update dependencies 2022-07-27 19:45:08 +02:00
ManoloFLTK
223bf6309b Fix for issue #426: "configure --enable-cairoext" flips display upside down 2022-04-08 16:22:22 +02:00
ManoloFLTK
3718effc43 Add the Wayland platform to FLTK 1.4 2022-03-04 15:41:00 +01:00
Albrecht Schlosser
9d474dfcdf Fix whitespace and Makefile dependencies
No code changes
2022-01-05 22:00:54 +01:00
Albrecht Schlosser
5438954d8c Generate FL/fl_config.h rather than FL/abi-version.h
... as discussed in fltk.coredev in thread "RFC: introduce public
config header <FL/fl_config.h>", see:
https://groups.google.com/g/fltkcoredev/c/xLCs1AIXMVo/m/MHZpQggzAQAJ

- Rename abi-version.h to fl_config.h, rename input files,
  update dependencies, .gitignore, CMake, configure and Makefiles.

- Include Cairo options in FL/fl_config.h

- Rename FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT for consistency.

- Include <FL/fl_config.h> in config.h and wherever necessary,
  fix include order (move FL/Fl.H to the top) and more.

- Move USE_X11 to fl_config.h and rename to FLTK_USE_X11

- Do not include <config.h> in Cairo demo program which is no
  longer required in Cairo programs since FLTK 1.4.0
2021-12-18 22:44:08 +01:00
Albrecht Schlosser
14f842708d Fix indenting, whitespace errors and dependencies
(no code changes)
2021-10-27 20:52:08 +02:00
Albrecht Schlosser
410a01c6db Add CMake compatibility functions and macros
CMake/compatibility.cmake: define functions and macros to be used
  if a particular CMake functionality requires a higher CMake version
  than FLTK's minimum CMake version, see 'cmake_minimum_required(...)'
  in the root CMakeLists.txt.

Note: target_link_directories() is available since CMake 3.13
2021-07-26 17:40:26 +02:00
Albrecht Schlosser
787c67afea macOS: fix fltk_cairo shared library (issue #250)
- add missing dependencies to build the shared libfltk_cairo(.dylib)
- remove incorrect dependency on cairo from libfltk
- add cairo_test-shared demo (linked with shared libs)
2021-07-12 20:05:07 +02:00
Albrecht Schlosser
49a78bc482 Fix cairo build (autoconf + CMake) + README's
- rewrite to use pkg-config with both autoconf + CMake
- remove hardcoded library names
- fix build dependencies and search directories
- remove or replace old and unused variables
- update README files

To be done:
- implement fallback for autoconf/configure if pkg-config is missing
- fix pango build (uses cairo internally)
2021-03-01 10:45:59 +01:00
Albrecht Schlosser
bbaec9bd88 Update CMake and make files, minor edits only
There are no functional changes to be expected, mostly formatting
and comments.
2021-02-15 19:45:20 +01:00
Albrecht Schlosser
f09e17c3c5 Remove $Id$ tags, update URL's, and more
- 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.
2020-07-06 20:28:20 +02:00
Albrecht Schlosser
1078b8fe43 Update dependencies
Change sort order using -f (--ignore-case):
  fold lower case to upper case characters
2020-06-13 12:50:06 +02:00
ManoloFLTK
d6aa3a67a0 Add screen scaling support to Fl_Cairo_Window under X11 platform. 2020-02-09 07:52:20 +01:00
Albrecht Schlosser
44b2b7126c Update dependency system
Try to make `make depend' independent of locale.
2019-06-22 23:42:39 +02:00
Albrecht Schlosser
f78ef314aa Update dependencies
Note: these dependencies are not complete and will likely never be
because they depend on different configurations.
2019-03-28 11:42:09 +01:00
Albrecht Schlosser
80ad88555f Sort makedepend files for better comparability
The intention is to improve (and minimize) diffs when dependencies
are changed and `make depend' is executed.

(1) use `makedepend ... -w 20'
(2) `sort -u' the resultant file with some more "magic".

(1) makes sure that there is only one dependent file per line,
(2) makes lines unique since `makedepend' can output one file
    many times which is redundant and makes diffs hard to read.

This uses 'mv', 'grep', and 'sort' in all FLTK library Makefiles.
Image libraries are intentionally left for a later update.
2019-01-18 15:44:24 +01:00
Manolo Gouy
43b511b784 Fix macOS 10.14 Mojave support of the FLTK-cairo interface.
After experimenting with a modified cairo_test program that draws both with
cairo and with regular FLTK drawing functions to the same window, it seems
necessary to control for possible changes to the graphics context made by
cairo in Fl_Cocoa_Window_Driver::make_current() rather than in
cairo_create_surface().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13119 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-09 14:35:55 +00:00
Manolo Gouy
ff20361f5a Support of macOS 10.14 Mojave: take care of the FLTK-Cairo interface.
Discussion "Screen buffer flipped in OSX Mojave running 1.4.x"
in fltk.general, 
    http://www.fltk.org/newsgroups.php?s36913+gfltk.general+v36915
describes a Cairo-using FLTK app that runs well after this modification.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13115 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-08 17:09:24 +00:00
Matthias Melcher
b1598dc703 Removed macro FL_PORTING, as it has been more confusing than helpful.
The original intention of FL_PORTING was to mark all places in the
source code where changes are required to port FLTK to a new platform.
Thanks to the driver system, this approach has become somewhat
misleading, so I removed all references.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 17:04:18 +00:00
Albrecht Schlosser
52ae3582a2 Replace "WIN32" with "_WIN32" or "Windows".
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-09 14:39:42 +00:00
Albrecht Schlosser
42d8aba117 Replace FL/x.H with FL/platform.H - step 2 (STR #3435).
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-31 21:17:17 +00:00
Manolo Gouy
28d6a56f2a Change copyright year to reflect date of last commit.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12467 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-23 14:51:00 +00:00
Manolo Gouy
615cea792f Remove obsolete include directive.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12465 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-23 07:33:40 +00:00
Albrecht Schlosser
3b73dece7b Set missing svn properties.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-13 23:31:38 +00:00
Manolo Gouy
45e6be7316 Mac OS platform: Remove old Carbon code from cairo/Fl_Cairo.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11981 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-26 12:08:37 +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
Albrecht Schlosser
86abe14361 Fix undefined reference building shared cairo library (STR #3276).
Ported from branch-1.3, svn r 11005.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11102 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 18:20:09 +00:00
Albrecht Schlosser
f41be78153 Rename confusing configure and Makefile (makeinclude) variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10653 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-03-25 20:06:54 +00:00
Albrecht Schlosser
1a69ba5ae9 Update configure and makeinclude.in to get rid of version numbers in Makefiles.
configure is used to set all needed version numbers in makeinclude.
makeinclude is included in Makefile's and the version numbers are used
to build the correct shared libs.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10609 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-03-07 18:37:56 +00:00
Albrecht Schlosser
aef482198e Bump version numbers to 1.3.3.
All fluid .fl files have been rewritten with fluid 1.3.3 and may differ
somehow, but there are no significant changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10353 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-05 00:03:27 +00:00
Albrecht Schlosser
318c3619dc CMake enhancements, as discussed in STR #3055.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10342 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-27 00:41:06 +00:00
Fabien Costantini
8edcf8f29f STR#3012 Fix: cairo_make_current(void*, int, int) would not release previously allocated cc in certain conditions, fixed the extra cc non null test condition erronously formulated in previous submission.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10027 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-12-11 06:33:14 +00:00
Fabien Costantini
32aba335c6 STR#3012 Fix: cairo_make_current(void*, int, int) would not release previously allocated cc in certain conditions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10026 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-12-11 06:16:57 +00:00
Albrecht Schlosser
61923a5bf8 Update even more version numbers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9830 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-01 00:40:53 +00:00
Manolo Gouy
0130df031a Allows compilation on 64-bit Mac OS X with FLTK_HAVE_CAIRO defined.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9250 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-21 12:27:31 +00:00
Greg Ercolano
4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Manolo Gouy
cff882f34d Fix STR #2585: use relative link when installing the cairo shared library.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8510 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-06 16:37:22 +00:00
Manolo Gouy
22111debb8 Fixed use of FLTK_HAVE_CAIRO under Mac OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-06 13:17:21 +00:00
Manolo Gouy
bc509d32eb Fix STR #2504 (first part). Replaced HAVE _CAIRO by FLTK_HAVE_CAIRO and USE_CAIRO
by FLTK_USE_CAIRO everywhere.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-06 10:24:58 +00:00