summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
AgeCommit message (Collapse)Author
2023-09-12Fix Visual Studio shared library buildAlbrecht Schlosser
Todo: fluid-shared can't (yet) be built agains the shared fltk lib because of some linker errors. Needs investigation. Note: fluid-shared is basically a test program to demonstrate linking against the shared FLTK libs but doesn't work yet using VS (MSVC). This is no problem for the functionality.
2023-08-28CMake: Make compile definitions 'FL_LIBRARY' and 'FL_DLL' privateAlbrecht Schlosser
... so they are not inherited by consumers of the library. Remove 'add_definitions(-DFL_LIBRARY)' from src/CMakeLists.txt This is not necessary, see CMake/fl_add_library.cmake Don't set obsolete property 'CLEAN_DIRECT_OUTPUT' which was removed in CMake 2.8.0.
2023-07-09Update CMakeLists.txtMohammed Alyousef
2023-04-30Allow building Wayland platform without dbus - cont'd (#726)ManoloFLTK
CMake-based building without dbus is made possible
2023-04-10Fix CMake generation for minimal CMake version (3.2.3)Albrecht Schlosser
Unfortunately `execute_process(COMMAND pkg-config ...)` used for CMake versions lower than 3.4 appends a trailing newline ('\n') to the output variable which must be removed. Replace double slash '//' returned by pkg-config with a single '/' for consistency (applies to all CMake versions). Tested with CMake 3.2.3 but we should probably raise the minimal CMake version to a more recent version in the future.
2023-03-29Improve detection of the location of Wayland protocol files across OSesManoloFLTK
2023-03-22CMake: check for presence of needed Wayland protocol source filesManoloFLTK
2023-03-09CMake: build shared libs with OPTION_CAIROEXT (issue #250)Albrecht Schlosser
- 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-02-15Move class Fl_Shortcut_Button from FLUID to core (#677) (#680)Matthias Melcher
2023-02-14Rename class Fl_Display_Cairo_Graphics_Driver to Fl_X11_Cairo_Graphics_DriverManoloFLTK
2023-01-21Animated GIF support (Fl_Anim_GIF_Image class) (#375)wcout
2023-01-12Add Fl_Scheme_Choice widget and use it in test programsAlbrecht Schlosser
This widget offers the selection of all known FLTK schemes as a simple widget based on Fl_Choice. Some test and demo programs use Fl_Scheme_Choice to enable the developer or user to switch schemes quickly for comparison. Todo: - add features to add new schemes during runtime (partially done) - update status when the scheme is changed by Fl::scheme("...")
2023-01-12Add the initial version of class Fl_SchemeAlbrecht Schlosser
This basic version of class Fl_Scheme contains only static methods that are needed for Fl_Scheme_Choice and further extensions.
2022-12-28Improve and extend fl_contrast() (#370)Albrecht Schlosser
- Add internal fl_contrast_cielab() as the new default. - Keep old function as internal fl_contrast_legacy(). - Add fl_contrast_mode() to switch between fl_contrast() functions. - Add fl_contrast_level() to fine tune fl_contrast() per mode. - Add option to register and use a custom contrast function. - Add test/contrast.cxx test program. - Move all fl_contrast() related code to a new file src/fl_contrast.cxx. - Add fl_lightness() convenience function for perceived lightness. - Add fl_luminance() convenience function for physical luminance.
2022-12-18Fix "link errors connected with recent Zenity dialog feature" (#602)ManoloFLTK
2022-12-16Derive Fl_Zenity_Native_File_Chooser_Driver from Fl_Kdialog_Native_…ManoloFLTK
Also add Fl::option(OPTION_FNFC_USES_ZENITY)
2022-12-16Add Zenity-based file chooser based on the KDialog one (HugLifeTiZ)Trent McPheron
If available, it is used on Linux regardless of the current desktop because it offers free XDG portal integration, which means it picks the correct file chooser on all desktops, and allows for meaningful file selection in sandbox environments like Flatpak.
2022-12-09New Fl_ICO_Image class to read Windows .ico icon filesManoloFLTK
Many thanks to @darealshinji for contributing all the code for this new FLTK image class (see branch Fl_ICO_Image of https://github.com/darealshinji/fltk).
2022-11-30Remove small files fl_XXX_gl_platform_init.cxxManoloFLTK
The single-function content of these files is moved to Fl_XXX_Gl_Window_Driver.cxx.
2022-11-25Add "Oxy" scheme (STR 2675, STR 3477)Albrecht Schlosser
This commit is similar to the patch given in STR 3477, oxy_v5.diff: https://www.fltk.org/strfiles/3477/oxy_v5.diff ... with modifications, and updated to current FLTK code.
2022-11-23Wayland+CMake: stop forcing GTK_FOUND to 0ManoloFLTK
This removes the cause of this developer's message # FIXME: This needs to be redesigned! Forcing GTK_FOUND to 0 (NO) is a bad # FIXME: idea because there could be unwanted side effects. AlbrechtS
2022-11-22Refactor and simplify "arrow drawing" in widgetsAlbrecht Schlosser
"Arrows" in widgets are those GUI elements mostly represented by triangles pointing in a particular direction as in scrollbars, choice widgets, some menus, valuators and Fl_Counter widgets. The code has been simplified and standardized such that all these GUI elements are drawn identically per FLTK scheme. Widget authors no longer need to write code to calculate arrow sizes and draw polygons etc. Different schemes can and do implement different drawing functions. Todo: see comments "FIXME_ARROW" in src/Fl_Menu_Button.cxx and src/Fl_Menu.cxx
2022-11-18CMake+Wayland: check for presence of required software modulesManoloFLTK
Also, remove hardcoded path to wayland-protocols when CMake version ≥ 3.4
2022-11-07Create class Fl_Unix_Screen_Driver used by X11 and Wayland platformsManoloFLTK
2022-11-06Add Fl_Int_Vector: "an STL-ish vector without templates"Albrecht Schlosser
Code copied from Fl_Table and reformatted. Thanks to Greg for the original code.
2022-11-03libdecor: update from source git repo (commit e87dcfda)ManoloFLTK
This brings the GTK plugin inside the master libdecor git repo.
2022-10-16macOS + homebrew: restore building with CMake's OPTION_APPLE_X11ManoloFLTK
These option combinations work: -DOPTION_APPLE_X11 -DOPTION_APPLE_X11 -DOPTION_USE_CAIRO But -DOPTION_APPLE_X11 -DOPTION_USE_PANGO is not possible because homebrew doesn't provide the pangoxft package.
2022-09-29macOS platform: rename Fl_Cocoa_Gl_Window_Driver.cxx to .mmManoloFLTK
2022-09-23Wayland: process OPTION_USE_WAYLAND for Unix onlyManoloFLTK
2022-09-11Fix fl_read_image() under hybrid Wayland/X11 platform.ManoloFLTK
Function fl_read_image() obliges to keep a minimal use of global variable fl_window also under the Wayland platform, even if its type (Window) makes little sense for the hybrid library because it has its X11 value (given by X11/X.h) which is not meaningful for the Wayland leg of the hybrid platform. Virtual member function Fl_Surface_Device::as_image_surface() becomes useless.
2022-09-11Fix support of CMake OPTION_WAYLAND_ONLY.ManoloFLTK
2022-09-09New OPTION_WAYLAND_ONLY for CMake to build pure Wayland platform.ManoloFLTK
2022-08-31Wayland platform: remove redirection of stderr.ManoloFLTK
2022-08-29Make hybrid Wayland/X11 platform.ManoloFLTK
2022-08-01Add Fl_Flex widget from Karsten Pedersen (issue #255)Albrecht Schlosser
This work is based on the repository and latest commit: https://github.com/osen/FL_Flex.git commit 36e4ed75a00daac825b87e81295818b4650991f5 Author: Karsten Pedersen <...> Date: Fri Apr 23 12:06:16 2021 +0000 Added Fltk (LGPL) license. This widget is similar to Fl_Pack and supports either one row or one column of widgets but has some more features. Test and demo programs are included: test/flex_login.cxx: simple "login window" demo program test/flex_demo.cxx: slightly more complex demo program The original demo programs can still be compiled and built with the new widget provided you '#include <FL/Fl_Flex.H>'. Backwards compatible methods are included (except debug()). The original widget has been modified to match FLTK standards and enhanced in several ways, including: - support box frames - add HORIZONTAL and VERTICAL enum values (as in Fl_Pack) - add horizontal() method (as in Fl_Pack) - use type() rather than internal 'direction' variable - add standard widget constructor (x, y, w, h, label) - add margin and gap accessors rather than hard coding constants - improve test and demo programs - add documentation - replace <vector> with array as required by FLTK CMP - rename camelCase method names, keeping old names for compatibility: - change 'setSize(Fl_Widget*, int)' to 'set_size(Fl_Widget*, int)' - change 'bool isSetSize(Fl_Widget*)' to 'int set_size(Fl_Widget*)' - remove debug() method - add a way to "unset" fixed size: set_size(Fl_Widget *, 0) - add layout() method to force recalculation of children - unify resizeRow() and resizeCol() methods to avoid code duplication - improve widget size calculation.
2022-06-06Wayland under FreeBSD: use package evdev-proto which brings linux/input.hManoloFLTK
2022-05-22Fix MinGW build with shared libs (#445)Albrecht Schlosser
Add missing lib 'gdiplus' to shared libs.
2022-05-21Wayland under FreeBSD: detect <GL/glu.h> and fix LIBDECOR_PLUGIN_DIR.ManoloFLTK
2022-05-20Wayland under FreeBSD: add support for CMake-based builds.ManoloFLTK
2022-04-22Restore use of CMake OPTION_USE_SYSTEM_LIBDECORManoloFLTK
2022-04-21Avoid code duplication using os_create_anonymous_file() from libdecor.ManoloFLTK
2022-03-31Fix whitespace errors (no code changes)Albrecht Schlosser
2022-03-13Separate platform init functions from platform-specific driver filesManoloFLTK
2022-03-05Rename Fl_wayland.cxx to fl_wayland_clipboard_dnd.cxxManoloFLTK
2022-03-04Add the Wayland platform to FLTK 1.4ManoloFLTK
2022-02-05CMake: Remove unnecessary file from build systemAlbrecht Schlosser
Remove macOS warning "ranlib: file ... has no symbols".
2022-02-01CMake: Fix image libraries build if fallback is usedAlbrecht Schlosser
The CMake instructions would use the wrong image libs (png, jpeg, zlib) if the fallback was active (OPTION_USE_SYSTEM_XXX) was true but the header files were not present. This had already been fixed for jpeg but not for the other two libs. This commit rearranges the logic for all three libs. Add information about builtin or system libraries to config summary.
2022-01-31Consolidate timeout handling across platforms (#379)Albrecht Schlosser
Add Fl_Timeout class Move platform independent code of Fl::wait() to main part - basic timeout handling - Fl::run_checks() - Fl::run_idle() - Fl::idle() - waiting time calculation (next timeout) - remove platform dependent "screen driver" stuff
2022-01-23Remove experimental platforms Android, Pico, SDL (PR #376)Albrecht Schlosser
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule" https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
2022-01-16Rename FL/Fl_String_class.H to FL/Fl_String.HAlbrecht Schlosser
This is part 2 of the final fix for a previous name clash on case insensitive file systems (fl_string.h vs. Fl_String.H).