Commit Graph

11568 Commits

Author SHA1 Message Date
Jordan Williams
a6651e10ff
CMake: Improve detection of the GLU library and GL/glu.h header file (#953)
* CMake: Improve detection of the GLU library and GL/glu.h header file

Locate the GLU library and header independent of the GL library and header locations.
Add the GLU header location to necessary target_include_directory calls.

* CMake: Locate and use the GL include directory

Find the GL include directory and use it in target_include_directories calls.
2024-04-12 15:58:57 +02:00
Albrecht Schlosser
5de880ae81 Fix "Support for NetBSD", part 4 (#944)
Add missing return statement to replacement function for trunc().

Closes #944
2024-04-12 13:28:33 +02:00
Albrecht Schlosser
feec8f9fb1 Remove remaining references to xdbe on X11
This option has been removed in 1.4.0 because it was unreliable
and rarely used.
2024-04-11 14:15:38 +02:00
Albrecht Schlosser
05a95e146b Fix Fl_Terminal::handle_unknown_char() for plot_char() (#948)
- Add 'int Fl_Terminal::handle_unknown_char(int drow, int dcol)'
  to write the "unknown" character to the intended display position.

- Define Fl_Terminal::unknown_char as a static variable to avoid
  redundancy. In the future this might be overridden by users.
2024-04-09 12:53:12 +02:00
Albrecht Schlosser
265e5cd77b Improve CMake build configuration summary
- simplify and unify build option output
- alignment can be changed in only 2 macros in CMake/fl_summary.cmake
- output system library location of image libraries if applicable
2024-04-08 18:56:40 +02:00
ManoloFLTK
ba7b2427b6 Make Fl_GTK_Printer_Driver recognize more paper sizes
also, make clear the B* paper size names are from JIS not ISO.
2024-04-08 17:24:38 +02:00
ManoloFLTK
2662cad50b Improve Fl_GTK_Printer_Driver::begin_job() 2024-04-08 16:29:25 +02:00
ManoloFLTK
5b802be52b Add Tabloid paper size to menu_print_page_size array 2024-04-08 11:19:14 +02:00
Greg Ercolano
31170c4731 Rename putchar() to plot_char() (#944)
Some old platforms (NetBSD, AIX) implement the common stdio "putchar()"
function as a global macro which poisons the global namespace, preventing
all C and C++ programs from using "putchar()" as a function or method.

There was a long thread about this in fltk.coredev during the period
Mar 25 2024 ~ Apr 4 2024, subject "RFC: Fl_Terminal::putchar() in public API"
as to why we have no choice but to not use putchar() as a method name.
2024-04-06 23:36:04 -07:00
Albrecht Schlosser
2f1b8fc726 CMake: Fix detection of trunc() for Windows 2024-04-05 18:45:59 +02:00
ManoloFLTK
fe6ab4ebc2 Fix documentation example of the FL_FUNCTION_CALLBACK_#() macro 2024-04-05 10:57:46 +02:00
Albrecht Schlosser
9d9646fb12 Fix compiler warning, part 2 of #946 2024-04-04 23:40:29 +02:00
Albrecht Schlosser
3ac16f1dc4 Fix compiler warning, part 1 of #946 2024-04-04 22:59:08 +02:00
Greg Ercolano
06e495f262 Add NULL check to UNIX save_file() (#945) 2024-04-04 10:03:35 -07:00
Matthias Melcher
f779097c96 FLUID: fix possible null pointer. GitHub #945 2024-04-04 17:43:40 +02:00
ManoloFLTK
39c1386ba7 Improve use of fl_create_print_window() under Windows 2024-04-04 16:36:51 +02:00
ManoloFLTK
6763b357f4 Improve use of fl_create_print_window() under X11 2024-04-04 12:01:04 +02:00
Albrecht Schlosser
61de837cb0 Update misc/README.txt 2024-04-02 17:03:40 +02:00
Albrecht Schlosser
05ddf0f600 Move test/fromdos.c to misc/fromdos.c where it belongs
This is a test file for developers only. Use with caution.
2024-04-02 17:02:01 +02:00
Albrecht Schlosser
e5c4c1415b Add replacement for potentially missing trunc() (#944)
- add configure + CMake checks to define HAVE_TRUNC in config.h

- src/Fl_Timeout.cxx: add local replacement function
2024-04-02 16:03:29 +02:00
Albrecht Schlosser
7a879568b3 Improve support for NetBSD (#944)
- fix gcc version check for FL_DEPRECATED macro

- fix #include for select() on NetBSD < 3.0 (#944)

For more info please see GitHub Issue #944
2024-04-02 16:03:00 +02:00
Albrecht Schlosser
16cd29fd6d Remove dead code/comment: HP-UX 9.x not supported
README.Unix.txt documents that HP-UX 11.11 is required
2024-04-02 15:12:45 +02:00
ManoloFLTK
1bc5680472 Fix error in Fl_PostScript_File_Device::begin_page() under Pango
This fixes the bug reported in fltk.general "Fl_Printer bug?"
2024-03-30 17:21:11 +01:00
ManoloFLTK
b4b98c5d57 macOS: Avoid possible crash in makeMainWindow when another win is modal 2024-03-28 18:20:38 +01:00
Albrecht Schlosser
5666ec0ff0 Fix "Support for AIX" - part 2 (#942)
Add missing file counter increment, thanks to @michaelbauerle.
2024-03-25 17:07:42 +01:00
ManoloFLTK
4742d830be CMake for macOS platform: improve handling of -framework link arguments 2024-03-24 08:48:45 +01:00
ManoloFLTK
1434bc2bd0 Replace lround() calls by round() calls in class Fl_Anim_GIF_Image (#942) 2024-03-24 08:12:11 +01:00
ManoloFLTK
f01dec8eb3 Remove duplicated #include <config.h> directive 2024-03-24 07:53:03 +01:00
ManoloFLTK
97d2836f5e macOS: remove deprecated use of property allowedFileTypes in class NSSavePanel
The recommended replacement requires macos ≥ 11.0 and a new framework: UniformTypeIdentifiers
2024-03-23 17:16:57 +01:00
ManoloFLTK
f3640a7312 Add necessary #include <config.h> directives 2024-03-23 17:00:03 +01:00
Albrecht Schlosser
1c910720bf Fix "Support for AIX" (#942)
Slightly modified patch from @michaelbaeuerle (issue #942).
2024-03-22 20:38:03 +01:00
ManoloFLTK
34a881482a Add comments giving cairo version required for each cairo call if > 1.0 2024-03-22 16:11:38 +01:00
ManoloFLTK
86f4a6fc8e Remove "-no-pie" link option also from configure-based builds 2024-03-21 16:18:00 +01:00
Albrecht Schlosser
b53b2b6e11 CMake: Remove "-no-pie" build option
libdecor/build/Makefile: unused anyway (previously used building demos)

src/CMakeLists.txt: broke some user builds, see fltk.general, thread
  "-no-pie in FLTK Libraries build." (Mar 17, 2024).

Todo: check usage of "-fPIC" (libdecor builds)
2024-03-21 14:27:29 +01:00
ManoloFLTK
b0b20cdecc Remove unused macro definitions 2024-03-20 23:26:48 +01:00
Albrecht Schlosser
b3b051240e Add missing include file (#939) 2024-03-20 17:41:08 +01:00
Albrecht Schlosser
2001132f4a Add configure option to build tests only on request (#940)
Option: ./configure --disable-test   build test programs (default=yes)

Thanks for the patch(es) to @michaelbaeuerle.

I added `make test` to be able to build the test programs from the
FLTK root directory if FLTK was configured with --disable-test.
2024-03-20 17:24:12 +01:00
ManoloFLTK
46406d1d21 Add compile-time check of required minimum cairo version 2024-03-20 15:40:04 +01:00
ManoloFLTK
0fa49f0ab4 Use type cairo_region_t* for Fl_Region under Wayland platform 2024-03-20 15:20:31 +01:00
Albrecht Schlosser
af90841fbc Update dependencies, whitespace, and Fl_File_Chooser.cxx
Rewrite src/Fl_File_Chooser.cxx from its .fl source file
2024-03-19 15:39:18 +01:00
ManoloFLTK
3a8daf70c0 Document fl_close_display() 2024-03-19 08:52:49 +01:00
Albrecht Schlosser
a77f68693c Fix "Support for HP-UX" (#937)
Fix usage of vsscanf in Fl_Unix_System_Driver::clocale_vsscanf().

Final commit of all patches provided by the OP of issue #937 - if
everything works now.
2024-03-18 23:51:05 +01:00
Albrecht Schlosser
5af2d77b84 Add more public accessor methods to Fl_Grid (#937)
Some of these accessor methods should be private so they can't be used
by user code but - due to compiler issues - they must be public for
HP-UX 11.11 (for details see GitHub Issue #937).
2024-03-18 23:23:49 +01:00
Albrecht Schlosser
dddfec57a1 Fix name clash on some systems (#937)
Rename local function and void using leading underscore.
2024-03-18 22:46:15 +01:00
Albrecht Schlosser
a5bad9a395 CMake: formatting only 2024-03-18 22:44:53 +01:00
Albrecht Schlosser
d3a3ab40b7 Replace setenv() with putenv() on old systems (+937)
Add system check for setenv() function in configure and CMake.
2024-03-18 22:29:50 +01:00
Albrecht Schlosser
1d43ae0b0a Move nanosvg to a separate file, don't use 'roundf()' (#937)
Replacement of roundf() with nsvg__roundf() fixes one aspect of
issue #937.

Having the nanosvg implementation in its own module was planned anyway.
2024-03-18 19:36:16 +01:00
Albrecht Schlosser
81d47f71d6 Fix VS compiler warning, write "copied" message to tty
... rather than popping up a message window.
2024-03-18 19:34:32 +01:00
Albrecht Schlosser
7bc75e8962 Fix a Visual Studio compiler warning 2024-03-18 18:48:28 +01:00
ManoloFLTK
792cfc27e7 native-filechooser has preview panel with FLTK_USE_X11 and macOS 2024-03-18 18:22:41 +01:00