Commit Graph

9608 Commits

Author SHA1 Message Date
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
ManoloFLTK 54ecae9bda Create struct wld_window *Fl_Wayland_Window_Driver::wld_window to replace eventually fl_window. 2022-03-23 14:11:49 +01:00
ManoloFLTK 2d71a95b5d Wayland: replace global fl_display by function struct wl_display *fl_wl_display(). 2022-03-23 11:37:25 +01:00
ManoloFLTK 4c854dbbc3 Remove unnecessary libEGL-devel Fedora package from requirements list. 2022-03-23 09:03:12 +01:00
ManoloFLTK 26a78c4992 Fix for issue #419: Wayland: scale/resize issue. 2022-03-23 07:57:17 +01:00
ManoloFLTK 52015f2a26 Restore CMake build with OPTION_USE_GL=0 2022-03-22 22:16:03 +01:00
ManoloFLTK da5efb95d5 Add support of configure --enable-wayland --disable-gl - Cont'd. 2022-03-22 21:47:22 +01:00
ManoloFLTK 7432079632 Add support of configure --enable-wayland --disable-gl 2022-03-22 21:28:29 +01:00
ManoloFLTK 61d72c76d2 Restore building when HAVE_GL is 0 2022-03-22 20:43:02 +01:00
ManoloFLTK 94d2f81daa Add autoconf for configure-based builds. 2022-03-22 16:24:26 +01:00
ManoloFLTK 6cc394a39e Merge remote-tracking branch 'refs/remotes/origin/master' 2022-03-22 08:16:56 +01:00
ManoloFLTK ffbc66321c Add Wayland build recipe for Fedora. 2022-03-22 08:16:42 +01:00
Albrecht Schlosser f1b00c6637 Fix driver definitions of vsnprintf() and vsscanf()
These two functions are fully defined in the platform specific driver
methods, there's no need to define them in the base class.

This quick fix returns 0 from the base class method. The main reason
was to avoid a compiler error of MSVC 2010 and earlier, i.e. before
MSVC 2012.

Todo: int Fl_WinAPI_System_Driver::clocale_sscanf() needs to be fixed
because '_vsscanf_l()' (with lower case 'L' for 'locale') does not
exist in MSVC 2010 and earlier. It is not clear yet in which version
it was added - current MS docs show it in MSVC 2015 and later.
2022-03-21 17:16:14 +01:00
Albrecht Schlosser 34b89f8466 MSVC: use fl_snprintf() rather than snprintf()
Note that this fix includes "../src/flstring.h" which makes the source
file no longer compileable without the full source code, e.g. by
using "fltk-config --compile ...". This might be fixed later. (?)
2022-03-21 17:05:32 +01:00
Albrecht Schlosser fa84b58cd5 Fix silly MSVC 2010 parser warnings
Code like "void copy(const char */*stuff*/, ...)" would issue the
warning "'*/' seen outside comment" which is formally true but ...

These warnings don't appear with newer MS compilers, but I fixed them
anyway.
2022-03-21 17:03:13 +01:00
Albrecht Schlosser 35c212ef3b Fix MSVC 2010 warning: using 'this' in initializer list
This is a legitimate warning although it probably didn't do any harm.
2022-03-21 16:57:32 +01:00
Albrecht Schlosser 9e16f3439e Fix MSVC 2010 warning/error: declare variables in C early
... before other code gets executed in a block. The warning or errors
generated were MORE than confusing.
2022-03-21 16:55:07 +01:00
ManoloFLTK ff4cf80891 Avoid using same name (p) for distinct members of derived classes - cont'd. 2022-03-21 16:10:34 +01:00
ManoloFLTK d87b62ea69 Avoid using same name (p) for distinct members of derived classes. 2022-03-21 15:56:50 +01:00
ManoloFLTK bf5b902180 Rename member Fl_Graphics_Driver::p to xpoint to avoid shadowing. 2022-03-21 14:39:00 +01:00
ManoloFLTK 49dae86edf Fix for issue #418 : some warnings about unused functions. 2022-03-21 12:12:07 +01:00
ManoloFLTK a9412b41bb Issue #359 RFE: access the MacOS windowid . 2022-03-21 11:41:51 +01:00
ManoloFLTK 7e76929aff Fix for issue #416: Fl_Xlib_Graphics_Driver_font_xft.cxx has a libasan error. 2022-03-21 10:31:09 +01:00
ManoloFLTK 19439e8e0a Remove unnecessary constructors. 2022-03-21 10:01:45 +01:00
ManoloFLTK 2c706838a6 Mention the new Wayland platform. 2022-03-21 07:46:33 +01:00
Albrecht Schlosser 4bcd5c467b Improve documentation of Fl_Image::copy()
Mention the new Fl_Image::release() method to delete all types of
images.
2022-03-20 15:52:08 +01:00
Albrecht Schlosser 7758020edb Fix Fl_Tiled_Image::copy(int W, int H)
Remove false "optimization" that would return the same pointer
if the requested width and height are the same.

Note: copy() must always return a new image (this is the expected
behavior of copy). Otherwise deleting one of the objects (either
the source or the copy) would delete the other one as well.
2022-03-20 15:35:04 +01:00
ManoloFLTK 791fc7d6eb Update description of Fl_Graphics_Driver class hierarchy. 2022-03-20 15:10:43 +01:00
ManoloFLTK a2229c8b6b Fix typo in comment. 2022-03-20 14:07:33 +01:00
ManoloFLTK bc606cce57 Simpler updateTrackingAreas method of class FLView is enough. 2022-03-20 14:06:30 +01:00
ManoloFLTK f5628aa66d Fix issue #413: Commit 29d9e31 creates memory handling problem under macOS. 2022-03-20 08:09:34 +01:00
Albrecht Schlosser 733ffed630 Add missing initialization parts of Fl_SVG_Image 2022-03-19 15:34:45 +01:00
ManoloFLTK 5884d37ee8 Restore default YES value for FLWindow releasedWhenClosed property. 2022-03-19 08:42:09 +01:00