mirror of
https://github.com/fltk/fltk.git
synced 2026-02-05 15:59:50 +08:00
Remove libfltk_cairo (fltk::cairo)
This library is no longer needed and was "empty" for backwards compatibility since FLTK 1.4.0.
This commit is contained in:
10
.github/ISSUE_TEMPLATE/bug_report.md
vendored
10
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -7,7 +7,7 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
**Description of the Bug Report**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
@@ -38,11 +38,9 @@ Please complete the following information and delete non-applicable lines:
|
||||
- If from Git, commit: [e.g. 7d58e2385452]
|
||||
|
||||
**FLTK Configure / Build Options**
|
||||
Please add the complete configure and build command lines if you built FLTK yourself.
|
||||
Please include all configure or CMake options and add all CMake options you changed
|
||||
by using CMake GUI tools (if any).
|
||||
- ./configure --enable-cairo ...
|
||||
- cmake -G"..." -DCMAKE_BUILD_TYPE=Debug ...
|
||||
Please add the complete CMake and build command lines if you built FLTK yourself.
|
||||
Please add all CMake options you changed by using CMake GUI tools (if any).
|
||||
- cmake -G"..." -D CMAKE_BUILD_TYPE=Debug ...
|
||||
|
||||
**Operating System / Platform:**
|
||||
Please be as precise as possible, e.g. "Linux: Ubuntu 20.04"
|
||||
|
||||
@@ -117,7 +117,7 @@ else(CMAKE_CROSSCOMPILING)
|
||||
_fltk_make_alias(fltk-options fltk::options)
|
||||
_fltk_make_alias(fltk-options-cmd fltk::options-cmd)
|
||||
|
||||
foreach(target cairo forms gl images jpeg png z)
|
||||
foreach(target forms gl images jpeg png z)
|
||||
_fltk_make_alias(fltk_${target} fltk::${target})
|
||||
_fltk_make_alias(fltk_${target}-shared fltk::${target}-shared)
|
||||
endforeach()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# A function used by the CMake build system for the Fast Light Tool Kit (FLTK).
|
||||
# Originally written by Michael Surette
|
||||
#
|
||||
# Copyright 1998-2024 by Bill Spitzak and others.
|
||||
# Copyright 1998-2025 by Bill Spitzak and others.
|
||||
#
|
||||
# This library is free software. Distribution and use rights are outlined in
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
@@ -114,20 +114,6 @@ function(fl_create_example NAME SOURCES LIBRARIES)
|
||||
|
||||
set_target_properties (${TARGET_NAME} PROPERTIES ENABLE_EXPORTS TRUE)
|
||||
|
||||
### *FIXME* Remove the entire 'if' block below when verified:
|
||||
|
||||
if(0) # This should no longer be necessary (implied by linking the libs)
|
||||
|
||||
# we must link all programs with Cairo if option CAIROEXT is enabled
|
||||
if(FLTK_HAVE_CAIROEXT)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ${PKG_CAIRO_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(FLTK_HAVE_CAIRO AND PKG_CAIRO_LIBRARY_DIRS)
|
||||
target_link_directories(${TARGET_NAME} PRIVATE ${PKG_CAIRO_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
endif() # This should no longer be necessary (implied by linking the libs)
|
||||
|
||||
# Search the current binary directory for header files created by CMake
|
||||
# or fluid and the source folder for other headers included by test programs
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# which can be applied to particular targets and source files only.
|
||||
#
|
||||
# This could remove some of these potential build conflicts, for
|
||||
# instance # if the bundled image libs and Cairo or Pango are used
|
||||
# instance if the bundled image libs and Cairo or Pango are used
|
||||
# together (Pango depends on Cairo and Cairo depends on libpng).
|
||||
# However, this is not a proper solution!
|
||||
#
|
||||
|
||||
@@ -140,16 +140,6 @@ endif(debug_build)
|
||||
|
||||
unset(debug_build)
|
||||
|
||||
#######################################################################
|
||||
# Build a dummy ("empty") Cairo library for backwards compatibility.
|
||||
# This should be removed in the next minor release after 1.4.x, likely
|
||||
# in FLTK 1.5.0.
|
||||
#######################################################################
|
||||
|
||||
if(FLTK_HAVE_CAIRO)
|
||||
add_subdirectory(cairo)
|
||||
endif()
|
||||
|
||||
#######################################################################
|
||||
# build the standard FLTK libraries
|
||||
#######################################################################
|
||||
@@ -380,7 +370,7 @@ message(STATUS "End of Configuration Summary --\n")
|
||||
|
||||
if(0) # debug built library and fluid targets
|
||||
message(STATUS "------------------------ TARGETS ------------------------")
|
||||
foreach(tgt fltk fluid fluid-cmd options options-cmd images gl forms cairo jpeg png z)
|
||||
foreach(tgt fltk fluid fluid-cmd options options-cmd images gl forms jpeg png z)
|
||||
if(TARGET fltk::${tgt})
|
||||
message("Target: fltk::${tgt}")
|
||||
# fl_debug_target(fltk::${tgt})
|
||||
|
||||
14
FL/Fl.H
14
FL/Fl.H
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Main header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2024 by Bill Spitzak and others.
|
||||
// Copyright 1998-2025 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
@@ -1449,7 +1449,7 @@ public:
|
||||
In this last case, you don't need anymore to call Fl::cairo_make_current().
|
||||
You can use Fl::cairo_cc() to get the current Cairo context anytime.
|
||||
|
||||
\note Only available when configure has the --enable-cairo option
|
||||
\note Only available if built with CMake option FLTK_OPTION_CAIRO_WINDOW=ON.
|
||||
*/
|
||||
static void cairo_autolink_context(bool alink) {
|
||||
cairo_state_.autolink(alink);
|
||||
@@ -1460,7 +1460,8 @@ public:
|
||||
\retval false if no Cairo context autolink is made for each window.
|
||||
\retval true if any fltk window is attached a Cairo context when it
|
||||
is current. \see void cairo_autolink_context(bool alink)
|
||||
\note Only available when configure has the --enable-cairo option
|
||||
|
||||
\note Only available if built with CMake option FLTK_OPTION_CAIRO_EXT=ON.
|
||||
*/
|
||||
static bool cairo_autolink_context() {
|
||||
return cairo_state_.autolink();
|
||||
@@ -1473,7 +1474,8 @@ public:
|
||||
|
||||
/** Sets the current Cairo context to \p c.
|
||||
Set \p own to true if you want fltk to handle this cc deletion.
|
||||
\note Only available when configure has the --enable-Cairo option
|
||||
|
||||
\note Only available if built with CMake option FLTK_OPTION_CAIRO_WINDOW=ON.
|
||||
*/
|
||||
static void cairo_cc(cairo_t *c, bool own=false) {
|
||||
cairo_state_.cc(c, own);
|
||||
@@ -1498,8 +1500,8 @@ public:
|
||||
Fl::cairo_flush(cc); // flush Cairo drawings to the device
|
||||
\endcode
|
||||
|
||||
If you configure FLTK with \c '--enable-cairo' or CMake option
|
||||
\c 'FLTK_OPTION_CAIRO_WINDOW' (i.e. without \c '--enable-cairoext' or CMake option
|
||||
If you configure FLTK with CMake option
|
||||
\c 'FLTK_OPTION_CAIRO_WINDOW' (i.e. without CMake option
|
||||
\c 'FLTK_OPTION_CAIRO_EXT') or if you don't enable the \c 'autolink' Cairo
|
||||
context you may do the equivalent to use Cairo drawings in an
|
||||
overridden draw() method of derived classes by using
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Main Cairo support header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2023 by Bill Spitzak and others.
|
||||
// Copyright 1998-2025 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
@@ -49,9 +49,8 @@
|
||||
A private internal & unique corresponding object is created to
|
||||
permit cairo context state handling while keeping it opaque.
|
||||
For internal use only.
|
||||
\note Only available when configure has the --enable-cairo or
|
||||
--enable-cairoext option or one or both of the CMake options
|
||||
FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT is set (ON)
|
||||
\note Only available if one or both of the CMake options
|
||||
FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT is set (ON).
|
||||
*/
|
||||
class FL_EXPORT Fl_Cairo_State {
|
||||
public:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Fl_Cairo_Window header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2023 by Bill Spitzak and others.
|
||||
// Copyright 1998-2025 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
@@ -78,7 +78,7 @@
|
||||
\see test/cairo_test.cxx
|
||||
|
||||
\note Class Fl_Cairo_Window requires the FLTK library to have been built with
|
||||
CMake option FLTK_OPTION_CAIRO_WINDOW or configure --enable-cairo.
|
||||
CMake option FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT.
|
||||
|
||||
\note You can alternatively define your custom Cairo FLTK window,
|
||||
and thus at least override the draw() method to provide custom Cairo
|
||||
|
||||
@@ -825,10 +825,10 @@ specific prefixes and postfixes. For instance, on Linux/Unix 'fltk' is libfltk.a
|
||||
and the shared library (fltk-shared) is libfltk.so.1.4.0 (in FLTK 1.4.0) with
|
||||
additional system specific links.
|
||||
|
||||
Note: since FLTK 1.4.0 the library fltk_cairo is no longer necessary and
|
||||
should be removed from CMake files of user projects. fltk_cairo is now an
|
||||
empty library solely for backwards compatibility and will be removed in the
|
||||
future.
|
||||
Note: since FLTK 1.5.0 the library fltk_cairo is no longer necessary and
|
||||
must be removed from CMake files of user projects. fltk_cairo was an
|
||||
empty library solely for backwards compatibility in FLTK 1.4 and has been
|
||||
removed from FLTK 1.5.
|
||||
|
||||
|
||||
3.2 Library Aliases
|
||||
|
||||
@@ -36,7 +36,7 @@ CJK text-input methods, as well as dead and compose keys are supported.
|
||||
|
||||
On Linux and FreeBSD systems, the FLTK library is by default configured so FLTK
|
||||
apps do all their windowing through the Wayland protocol, all their graphics
|
||||
withCairo or EGL, and all text-drawing with Pango. If no Wayland compositor
|
||||
with Cairo or EGL, and all text-drawing with Pango. If no Wayland compositor
|
||||
is available at run-time, FLTK apps fall back to using X11 for windowing.
|
||||
Cairo and Pango remain used for graphics and text, respectively.
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#
|
||||
# CMakeLists.txt to build a dummy Cairo library for the FLTK project using CMake
|
||||
#
|
||||
# Copyright 1998-2023 by Bill Spitzak and others.
|
||||
#
|
||||
# This library is free software. Distribution and use rights are outlined in
|
||||
# the file "COPYING" which should have been included with this file. If this
|
||||
# file is missing or damaged, see the license at:
|
||||
#
|
||||
# https://www.fltk.org/COPYING.php
|
||||
#
|
||||
# Please see the following page on how to report bugs and issues:
|
||||
#
|
||||
# https://www.fltk.org/bugs.php
|
||||
#
|
||||
|
||||
########################################################################
|
||||
# Note: since FLTK 1.4.0 Fl_Cairo_Window support [1] is included in
|
||||
# libfltk and libfltk_cairo is no longer necessary. This directory is
|
||||
# used to build an "empty" dummy library for backwards compatibility,
|
||||
# just in case users expect it to exist.
|
||||
# ----------------------------------------------------------------------
|
||||
# The entire 'cairo' folder will be removed in a later FLTK release.
|
||||
########################################################################
|
||||
|
||||
# Build dummy fltk_cairo library
|
||||
|
||||
set(cairo_SRCS cairo_dummy.c)
|
||||
|
||||
fl_add_library(fltk_cairo STATIC "${cairo_SRCS}")
|
||||
target_link_libraries(fltk_cairo PUBLIC fltk::fltk)
|
||||
|
||||
# Build shared dummy library(optional)
|
||||
|
||||
if(FLTK_BUILD_SHARED_LIBS)
|
||||
|
||||
fl_add_library(fltk_cairo SHARED "${cairo_SRCS}")
|
||||
target_link_libraries(fltk_cairo-shared PUBLIC fltk::fltk-shared)
|
||||
|
||||
endif(FLTK_BUILD_SHARED_LIBS)
|
||||
|
||||
set(FLTK_LIBRARIES ${FLTK_LIBRARIES} PARENT_SCOPE)
|
||||
set(FLTK_LIBRARIES_SHARED ${FLTK_LIBRARIES_SHARED} PARENT_SCOPE)
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
Dummy C file to build the dummy Cairo library for the FLTK project.
|
||||
|
||||
Copyright 2023 by Bill Spitzak and others.
|
||||
|
||||
This library is free software. Distribution and use rights are outlined in
|
||||
the file "COPYING" which should have been included with this file. If this
|
||||
file is missing or damaged, see the license at:
|
||||
|
||||
https://www.fltk.org/COPYING.php
|
||||
|
||||
Please see the following page on how to report bugs and issues:
|
||||
|
||||
https://www.fltk.org/bugs.php
|
||||
*/
|
||||
|
||||
/*
|
||||
Note: since FLTK 1.4.0 Fl_Cairo_Window support is included in
|
||||
libfltk and libfltk_cairo is no longer necessary. This directory is
|
||||
used to build an "empty" dummy library for backwards compatibility,
|
||||
just in case users expect it to exist.
|
||||
|
||||
The entire 'cairo' folder will be removed in a later FLTK release.
|
||||
*/
|
||||
|
||||
int fl_cairo_dummy() {
|
||||
return 0;
|
||||
}
|
||||
@@ -341,11 +341,7 @@ The libraries are named `fltk.lib`, `fltk_forms.lib`, `fltk_gl.lib`, and
|
||||
|
||||
\note
|
||||
The separate \p fltk_cairo library is no longer necessary since FLTK 1.4.0.
|
||||
However, this release of FLTK builds a dummy `fltk_cairo` library for
|
||||
backwards compatibility. You are advised to remove the usage of
|
||||
the `fltk_cairo` library from your build systems and tools.
|
||||
<b>The `fltk_cairo` library will be removed in a future release.</b>
|
||||
|
||||
It is no longer built since FLTK 1.5.0.
|
||||
|
||||
As before, the \p fltk-config script can be used to get the options that are
|
||||
required by your linker:
|
||||
@@ -370,7 +366,7 @@ c++ ... `fltk-config --use-forms --use-gl --use-images --ldflags`
|
||||
The option `--use-cairo` may be used to build your program with Cairo libs if
|
||||
you use Cairo in your code. It does no longer include the `fltk_cairo` lib but
|
||||
all necessary Cairo compiler flags and Cairo libs, if and only if FLTK has been
|
||||
built with the optional Cairo support by configure or CMake.
|
||||
configured with the optional Cairo support by CMake.
|
||||
|
||||
Finally, you can use the \p fltk-config script to compile one or more source
|
||||
files as a FLTK program.
|
||||
|
||||
@@ -58,8 +58,8 @@ int main(int argc, char **argv) {
|
||||
#include <FL/fl_ask.H>
|
||||
int main(int argc, char **argv) {
|
||||
fl_message_title("This program needs a Cairo enabled FLTK library");
|
||||
fl_message("Please configure FLTK with Cairo enabled (--enable-cairo or --enable-cairoext)\n"
|
||||
"or one of the CMake options FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT, respectively.");
|
||||
fl_message("Please configure FLTK with Cairo enabled by one of the CMake options\n"
|
||||
"FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT, respectively.");
|
||||
return 0;
|
||||
}
|
||||
#endif // (FLTK_HAVE_CAIRO)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/*
|
||||
* FLTK_HAVE_CAIRO
|
||||
*
|
||||
* Do we have the Cairo library available?
|
||||
* Do we have the Fl_Cairo_Window support?
|
||||
*/
|
||||
|
||||
#cmakedefine FLTK_HAVE_CAIRO 1
|
||||
|
||||
Reference in New Issue
Block a user