Commit Graph

9640 Commits

Author SHA1 Message Date
Albrecht Schlosser
1e99a00c65 Update "migration" documentation with new information
- clarify and extend documentation of Fl_Preferences file locations
- add info about locale independent Fl_Preferences types (enum)
- add info about FLTK timer consolidation across platforms
2022-04-13 23:08:20 +02:00
Albrecht Schlosser
10537b7143 Make Fl_Image::copy() 'const', including all derived classes
Copying an image does not (and must not) change the original object,
hence copy() should always be 'const'.

This is *necessary* if the given Fl_Image object is 'const'.
2022-04-13 16:50:30 +02:00
ManoloFLTK
95b5623b96 Fix for issue #427 - continued. 2022-04-13 11:13:05 +02:00
ManoloFLTK
e25758582e Fix for issue #427 - continued. 2022-04-13 09:30:31 +02:00
ManoloFLTK
bfae813c4e Fix for issue #427: Problems with data_w, data_h, w, h of Fl_Image. 2022-04-12 15:06:21 +02:00
ManoloFLTK
fad867a5d3 Modify test/cairo_test.cxx to show roles of OPTION_CAIRO and OPTION_CAIROEXT.
Also make clear that these options require, for now, Fl_Double_Window to work cross-platform.
2022-04-12 09:20:34 +02:00
ManoloFLTK
0d59e32b84 Fix for issue #426 - cont'd. 2022-04-10 15:09:25 +02:00
Albrecht Schlosser
9e147fe8c0 Fix build of test/unittests with shared libraries
- set variables UNITTEST_LIBS and UNITTEST_LIBS_SHARED appropriately
- use these variables in build instructions

This includes normal and shared builds with and w/o OpenGL.
2022-04-09 17:19:20 +02:00
ManoloFLTK
223bf6309b Fix for issue #426: "configure --enable-cairoext" flips display upside down 2022-04-08 16:22:22 +02:00
Albrecht Schlosser
b4bbc53c5e Reorder CMake build options for better order of include directories
This is only one minor step to remove issues of some CMake options
that can cause conflicting include directories ("-I..." switches).

See implementation note in CMake/options.cmake.
2022-04-07 19:19:40 +02:00
Albrecht Schlosser
6c07d7b597 Clean up test/.gitignore
- remove no longer used filenames
- reorder to separate generated files from executables
- add comment on how to create list of generated files
2022-04-07 17:56:15 +02:00
ManoloFLTK
04305ec7e3 Add note to doc of Fl_Cairo_Window about required build option. 2022-04-07 17:21:23 +02:00
ManoloFLTK
aa8c2a71c0 Package gnome-session-wayland is just a transitional package. 2022-04-07 17:14:47 +02:00
Albrecht Schlosser
385f0d5b4d Rename remaining FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT
Thanks to Manolo for finding this.
2022-04-07 15:14:30 +02:00
ManoloFLTK
ee5b9974bb Update doc of struct Fl_Menu_Item whose shortcut_ member is now an int. 2022-04-07 12:12:20 +02:00
ManoloFLTK
21428bad10 Undo most of f6a93eb that was a bad move. 2022-04-07 11:31:12 +02:00
Albrecht Schlosser
dacf243889 Fix build w/o Xft 2022-04-07 03:40:43 +02:00
ManoloFLTK
d1bffee04a Remove useless instructions. 2022-04-06 13:25:54 +02:00
ManoloFLTK
f6a93eb060 Remove warnings: comparison of integer expressions of different signedness [-Wsign-compare] 2022-04-06 13:25:17 +02:00
ManoloFLTK
3be89234b0 Remove crashes that occur in SSD mode. 2022-04-06 11:39:50 +02:00
Albrecht Schlosser
8bd67f40da CMake: Restore removed HAVE_LIBPNG setting
This was removed unintentionally.
2022-04-05 15:36:28 +02:00
ManoloFLTK
6a30f63fe4 Fix for "Fl_Native_File_Chooser_GTK does not respect PREVIEW option" in fltk.general. 2022-04-05 09:19:26 +02:00
Albrecht Schlosser
cc6a7d008b Remove obsolete config variable 'HAVE_LIBPNG_PNG_H'
This variable has never been used in the code. Configure and CMake
look for a *working* libpng (HAVE_PNG) and set variable HAVE_PNG_H
if the header <png.h> can be included.

The alternative to include <libpng/png.h> is always used in the #else
clause and doesn't need its own config variable. Configure and CMake
log what they find, hence this extra variable is not necessary.
2022-04-04 21:10:25 +02:00
ManoloFLTK
2ee27e39db Catch also Fl_Posix_System_Driver after rename stat -> flstat in Fl_System_Driver 2022-04-04 08:30:43 +02:00
Albrecht Schlosser
228d04d0e0 Build and use fluid-cmd on Windows for .fl files (#224, #293)
On Windows fluid.exe is a "GUI" program and does not allow console
output which can be a problem in automated builds. In Visual Studio
the fluid GUI program would pop up console windows when generating
.cxx and .h files from .fl files.

The new (additional) fluid-cmd.exe is built as console application
for users that need it and it is used in the FLTK build process on
Windows to convert the .fl files.
2022-04-03 23:47:23 +02:00
Albrecht Schlosser
5a8b9d9130 Improve libpng header search (notably on macOS)
Fix usage of internal cache variables so users can switch between
system and builtin libpng reliably.
2022-04-03 23:34:09 +02:00
Albrecht Schlosser
9a7af11108 Silence compiler warnings [-Wunused-but-set-variable] 2022-04-03 22:30:59 +02:00
Albrecht Schlosser
717a7d266b Remove '#include <sys/stat.h>' from FL/platform_types.h
- Add this include statement only where needed.
- Rename Fl_System_Driver::stat() to flstat().

This fixes an issue when using some (!) MinGW 64-bit build systems
that obviously '#define stat _stat64' or similar. This would
result in compiler problems if 'stat()' is a member function of
Fl_System_Driver.
2022-04-03 22:01:41 +02:00
ManoloFLTK
9aba7c9db0 Fl_Wayland_Window_Driver::scroll() when GUI scaling >= 2. 2022-04-01 14:52:47 +02:00
ManoloFLTK
d992a12403 Merge remote-tracking branch 'refs/remotes/origin/master' 2022-04-01 14:36:41 +02:00
ManoloFLTK
a53efd73d7 Fix regression introduced with d9a6ec8 visible in test/scroll. 2022-04-01 14:36:33 +02:00
Albrecht Schlosser
e91d65cd2f Fix whitespace errors (no code changes) 2022-03-31 16:00:11 +02:00
Albrecht Schlosser
34d02a3ddf Update .clang-format control file 2022-03-31 15:57:10 +02:00
ManoloFLTK
d9a6ec88e4 Add support of Fl_Region to the Cairo graphics driver
and remove it from the Wayland graphics driver.
2022-03-31 10:36:01 +02:00
Albrecht Schlosser
a638f5a545 Add method Fl_Shared_Image::image()
This public method returns a pointer to the internal Fl_Image
object (const Fl_Image *). This is only for reference, the internal
image must not be modified by user code but it can be inspected and
copied to another image.
2022-03-30 15:56:27 +02:00
Albrecht Schlosser
df4503ea2c Export fl_cmap to be able to build shared FLTK libraries 2022-03-27 17:13:16 +02:00
Albrecht Schlosser
b037472649 Move src/cmap.cxx to util/cmap.cxx (utilities folder)
Regenerated src/fl_cmap.h with less spaces, updated copyright year.
Only whitespace and comments are changed in this file.

Note that src/cmap.cxx is not compiled to build the FLTK libs,
it's only used to generate src/fl_cmap.h.
2022-03-27 17:05:55 +02:00
ManoloFLTK
dc8c4b5676 Wayland: replace public fl_event_time by static wld_event_time. 2022-03-27 09:20:30 +02:00
Albrecht Schlosser
2b8f3a757a CMake: Don't install man pages of game programs (issue #23)
I decided not to install the man pages for consistency because we
don't install the executable programs. The instructions are commented
out only so they can be activated easily if this will be changed,
i.e. if we decide to install the test/game programs in the future.

Closes #23
2022-03-26 20:04:04 +01:00
Albrecht Schlosser
9cf1afda62 CMake: Remove obsolete platform dependent instructions
The intended effect (building a Windows "GUI" application), is
correctly achieved using the "WIN32" option of add_executable()
selectively where appropriate rather than setting this platform
specific option for *all* (Windows) executables when using GNU
compilers (MinGW, MSYS2, Cygwin, ...).
2022-03-26 18:53:05 +01:00
Albrecht Schlosser
111b858e12 CMake/MSVC: limit "/utf-8" to VS 2015 and later (PR #415)
According to PR #415 this switch was added in Visual Studio 2015
Update 3. However, version "1900" does not distinguish updates,
hence Visual Studio 2015 up to Update 2 may fail to compile with
this addition. Installing the updates would obviously fix this.
2022-03-26 18:13:47 +01:00
ZJUGKC
6f06265e86 Add UTF-8 encoding support in setup.cmake for MSVC (PR #415)
The source files are all encoded by UTF-8 without BOM. This will raise
warnings and errors when compiling by the MSVC with some active code
pages (ACP). The file `test/ask.cxx` contains such characters with UTF-8
encoding. Adding `/utf-8` here is equivalent to specifying
`/source-charset:utf-8 /execution-charset:utf-8`, and all warnings and
errors are removed.
2022-03-26 18:00:50 +01:00
YX
e9b1c2fed0 Add const to Fl_Image::fail() (PR #415) 2022-03-26 17:55:13 +01:00
Albrecht Schlosser
fc250a3aa2 Update documentation and dependencies 2022-03-25 17:27:46 +01:00
Albrecht Schlosser
3fb66056d6 CMake: add missing variable initialization
Although CMake uses previously undefined variables like empty strings
it could happen that variables set in the calling context by other
projects initialized some variables with unexpected values.

Example: FLTK_LIBRARIES could have been initialized by previous
  execution of 'find_package(FLTK ...)' in a project using FLTK
2022-03-25 17:27:46 +01:00
ManoloFLTK
0ab3ca7cf6 Remove documentation of non-existant function return values. 2022-03-25 16:54:53 +01:00
ManoloFLTK
427e4dbc7a Remove platform-dependent type Fl_Bitmask (not in documented public API). 2022-03-24 10:00:01 +01:00
ManoloFLTK
70f61a63f4 Merge remote-tracking branch 'refs/remotes/origin/master' 2022-03-24 06:30:33 +01:00
ManoloFLTK
194164054b Remove useless virtual member function overrides. 2022-03-24 06:30:27 +01:00
ian.macarthur
29c6d6c679 Remove vsscanf_l() call from Win32 driver (it appears to be a BSD-ism and unsupported by the MS tools) and rename several clocale specific methods from "name" to "vname" since they take a va_list not a variable list of arguments. 2022-03-23 19:46:35 +01:00