Commit Graph

10320 Commits

Author SHA1 Message Date
ManoloFLTK
7e4306af6b Fix "Focus is lost leaving full screen on macOS 13" (#608) 2022-12-29 15:54:32 +01:00
ManoloFLTK
83d9a2c63d libdecor: update from upstream (3f3e5e1d) as of 29-dec-2022 2022-12-29 15:26:28 +01:00
Albrecht Schlosser
78cf29ba29 Improve and extend fl_contrast() (#370)
- 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-28 18:16:23 +01:00
ManoloFLTK
31327cd649 Fix for Two compiler warnings (#615) - cont'd
The Page_Format and Page_Layout  enums have been conceived for them to be combinable
into a single int value.
2022-12-28 16:58:52 +01:00
Albrecht Schlosser
6518e2d1f1 Fix merge error in animated.cxx (sorry for the noise) 2022-12-28 16:24:28 +01:00
Albrecht Schlosser
03389d1931 Replace an enum with 'const' variables in test/animated.cxx
- replace enum value 'FRAMES' with 'const unsigned int frames'
- replace enum value 'DIM' with 'const unsigned int dim'
- remove commented statements that have never been used.

Note: this also changes uppercase enum values to lowercase constants.
2022-12-28 16:00:22 +01:00
ManoloFLTK
72b8054ecc Fix compiler warnings on Windows with mingw-w64 CMAKE_CXX_STANDARD=20 (#615) 2022-12-28 09:32:01 +01:00
ManoloFLTK
7601bd832c Wayland: remove un-needed #include directives 2022-12-28 09:08:52 +01:00
ManoloFLTK
bb96cfac44 Wayland: remove un-necessary Fl_Wayland_Gl_Window_Driver::gl_event_queue 2022-12-28 08:55:02 +01:00
ManoloFLTK
86adfe0dbe Wayland: simplify function struct wl_display *fl_wl_display() 2022-12-28 08:43:22 +01:00
Albrecht Schlosser
b6cdb8ef25 Fix doxygen warnings (typos in argument names) 2022-12-27 19:26:34 +01:00
Albrecht Schlosser
70a107537f Exclude generated, Wayland specific files from Doxygen docs
Some Wayland specific files are generated by the build process with
configure + make in the source tree.

These files are now ignored by the Doxygen documentation process.
2022-12-27 19:22:56 +01:00
ManoloFLTK
e73b2da5e4 Wayland: Dropdown menu moves when navigated (#613) - cont'd
Menu windows containing sub-menus are now processed differently.
2022-12-27 13:15:31 +01:00
ManoloFLTK
694df9d7e6 Wayland: Fix for "Dropdown menu moves when navigated" (#613)
This commit uses Wayland popup positionning methods to handle common
menu windows and prevents them from expanding below display bottom or above top.
The previous algorithm remains in place for menu windows higher than
the display height. Further changes for these big menus may come later.
2022-12-26 08:13:27 +01:00
ManoloFLTK
b26db74dd0 Fix for "Fatal error while communicating with the Wayland server" (#610)
This commit should fix: once the mouse leaves the app window area and returns back to it
(app loses focus and gets it again) the crash happens.
2022-12-24 11:13:02 +01:00
ManoloFLTK
e7eac09cf8 Add libdecor to README.bundled-libs.txt 2022-12-23 08:39:48 +01:00
Albrecht Schlosser
c5f4934995 Update bundled nanosvg library to current upstream version
... with FLTK modifications (see README.bundled-libs.txt).

This fixes an issue where some svg images could not be loaded.

Upstream: https://github.com/memononen/nanosvg/

commit 9da543e8329fdd81b64eb48742d8ccb09377aed1 (upstream/master)
Merge: c886e50 0ce2e2b
Author: Mikko Mononen <memononen@gmail.com>
Date:   Sun Dec 4 17:46:22 2022 +0200

    Merge pull request #236 from sezero/signed-char

    change struct NSVGpaint:type to signed char
2022-12-22 01:13:45 +01:00
Matthias Melcher
6ea1f73d93 Missing parentheses 2022-12-22 00:33:08 +01:00
Matthias Melcher
d98c663893
Fix compilation on old gcc (#606)
* Fixing char* use in FLUID
* Fixing const cast
2022-12-22 00:18:01 +01:00
Albrecht Schlosser
1d212b7a03 Clean up class Fl_String (part of issue #601)
- remove static variable 'string_count'
- improve and document methods debug() and hexdump()

This commit does not resolve issue 601 but removes some development
leftovers.

Methods debug() and hexdump() left for debugging as requested.
2022-12-20 20:05:15 +01:00
Albrecht Schlosser
004ea67203 Update dependencies, remove trailing whitespace 2022-12-19 15:23:20 +01:00
Albrecht Schlosser
62f68128bf Fix compiler warning (unused variable) 2022-12-19 15:21:38 +01:00
ManoloFLTK
84c5992d9f Complete Fl_Cairo_Graphics_Driver::restore_clip()
The driver's clip_ member was not updated to the new Cairo clip state
which rendered function Fl_Cairo_Graphics_Driver::clip_box() inaccurate.
2022-12-19 10:22:22 +01:00
Greg Ercolano
e7630e045a Added ansi_show_unknown(bool) (default off)
It may be useful to some to have the terminal emit an error character
to show unknown escape sequences. Off by default, unknown escape sequences
are silently ignored. If enabled, '¿' is inserted instead.
2022-12-18 13:21:22 -08:00
ManoloFLTK
b246b6650a Fix "link errors connected with recent Zenity dialog feature" (#602) 2022-12-18 09:29:37 +01:00
Greg Ercolano
993b7da3b5 ESC sequences can traverse append(), unicode support for backspace
This is basically a rewrite of the ESC handler, keeping state
in the class, so ESC sequences can continued between called
to append() (such as when reading data from a pipe in blocks).

New private class 'Fl_Escape_Seq' handles parsing and state info.
It also has careful bounds checking during parsing.

Backspace supports Unicode, and the unicode chars can straddle
across append() operations as well.

Private variables in Fl_Simple_Terminal renamed _xxx to xxx_
to improve CMP compliance.
2022-12-17 20:53:54 -08:00
Matthias Melcher
8586c257ab Update SVG binary constructor documentation 2022-12-17 23:44:42 +01:00
ManoloFLTK
b9852ff58f Add cross-platform fl_close_fd(int fd) to close a file descriptor 2022-12-17 19:13:30 +01:00
ManoloFLTK
5b6d5f9279 Remove further unused code after 12da87b 2022-12-17 19:12:53 +01:00
ManoloFLTK
2c1bb09578 Remove useless Fl_System_Driver members after 12da87b 2022-12-17 18:20:53 +01:00
ManoloFLTK
8207d73cf2 CHANGES.txt: correct typo. 2022-12-17 18:18:00 +01:00
Matthias Melcher
12da87ba0c
Adding length checks for in-memory image data (see #542) (#592)
SVG is now decompressed in memory
Bitmap invalid array length handling to return an error
RGB Image data reader to return error if image data is too short
FLUID: Add size argument to bitmap and JPEG data
2022-12-17 16:01:35 +01:00
Matthias Melcher
08f6741d7b
Make unittest conform to CMP (#597)
Update unittest README
2022-12-17 13:16:57 +01:00
ManoloFLTK
07041ea06e CHANGES.txt: Reorganize text about HighDPI support and GUI scaling 2022-12-17 08:34:58 +01:00
ManoloFLTK
3a55545dc0 Complete and consolidate Fl_Native_File_Chooser-related changes 2022-12-17 08:34:58 +01:00
Greg Ercolano
118bf55c38 Added backspace handling to simple terminal ansi() mode
This addresses a comment from MoAlyousef in issue #577
	on 12/15/2022 requesting backspace processing.
2022-12-16 10:48:32 -08:00
ManoloFLTK
41f37613ec Derive Fl_Zenity_Native_File_Chooser_Driver from Fl_Kdialog_Native_…
Also add Fl::option(OPTION_FNFC_USES_ZENITY)
2022-12-16 16:21:23 +01:00
Trent McPheron
576271fb04 Add Zenity-based file chooser based on the KDialog one (HugLifeTiZ)
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-16 16:21:23 +01:00
ManoloFLTK
2ddb27f0f2 Fix for "Recent macos build issues" (#598) 2022-12-16 08:06:41 +01:00
Albrecht Schlosser
44a2547394
Rename some Fl_Flex methods for FLTK compliance (#594)
Change some method names to comply with FLTK style as discussed
in fltk.coredev, thread "Fl_Flex method name question".

* Rename Fl_Flex::margins(...) to Fl_Flex::margin(...)
  (use singular form for all margin related methods)

* Remove Fl_Flex::setSize() and isSetSize() "backwards compatibility" methods

* Rename Fl_Flex::set_size(...) to fixed(...)

Note: the latter affects existing (pre-release) fluid (.fl) files: you may
  want to edit and replace "set_size_tuples" with "fixed_size_tuples"
2022-12-15 16:46:40 +01:00
ManoloFLTK
2fd1866f49 macOS: Add "Show hidden files" button to native file chooser 2022-12-15 12:10:41 +01:00
Albrecht Schlosser
64d8c913be Fix trailing whitespace and dependencies 2022-12-13 15:58:56 +01:00
Albrecht Schlosser
5b3bd50001 Fix compiler warning: unused variable 2022-12-13 15:58:27 +01:00
Albrecht Schlosser
b82ea16d69 Fix compiler warning [-Wmaybe-uninitialized]
Fl_BMP_Image.cxx:228:30: warning: ‘width’ may be used uninitialized in this function
  228 |       int maskSize = (((width*Bpp+3)&~3)*height) + ...
      |                         ~~~~~^~~~
2022-12-13 15:51:54 +01:00
ManoloFLTK
0e3acd27fb Add information about Wayland support by FLTK on the RaspberryPi 2022-12-13 15:22:24 +01:00
ManoloFLTK
496c7dd84b Fix for "Build on FreeBSD fails: linux/input.h not found" (#584) 2022-12-13 10:16:23 +01:00
ManoloFLTK
79e26cf19a Package libxinerama-dev is required for the Wayland platform 2022-12-12 17:31:06 +01:00
Greg Ercolano
6a047855db Move utf-8 box drawing string into .cxx
It was decided today it is ok to use utf-8 strings in source,
so consolidating.
2022-12-11 11:00:08 -08:00
Greg Ercolano
821d2fdf82 Added Unicode Boxes unittest and README-unittests.txt
This test helps check for issues with multiline widgets
drawing text properly.

The README-unittests.txt was added to help developers
add new unit tests easily.
2022-12-11 10:18:06 -08:00
ManoloFLTK
3834a23248 Add new members Fl_Widget::bind_{de}image(Fl_Image*) to CHANGES.txt 2022-12-11 11:05:55 +01:00