Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fltk for openSUSE:Factory checked in at 2021-12-08 22:08:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fltk (Old) and /work/SRC/openSUSE:Factory/.fltk.new.31177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fltk" Wed Dec 8 22:08:32 2021 rev:46 rq:935949 version:1.3.8 Changes: -------- --- /work/SRC/openSUSE:Factory/fltk/fltk.changes 2021-11-20 02:38:11.964966415 +0100 +++ /work/SRC/openSUSE:Factory/.fltk.new.31177/fltk.changes 2021-12-08 22:08:45.630857082 +0100 @@ -1,0 +2,8 @@ +Fri Dec 3 16:00:09 UTC 2021 - Ferdinand Thiessen <r...@fthiessen.de> + +- Update to 1.3.8: + * Add new dialog with extended return values + * Make "FLTK_CONSOLIDATE_MOTION" user-definable +- Use bzip2 compressed sources + +------------------------------------------------------------------- Old: ---- fltk-1.3.7-source.tar.gz New: ---- fltk-1.3.8-source.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fltk.spec ++++++ --- /var/tmp/diff_new_pack.YVyqGX/_old 2021-12-08 22:08:46.234857365 +0100 +++ /var/tmp/diff_new_pack.YVyqGX/_new 2021-12-08 22:08:46.238857368 +0100 @@ -18,14 +18,14 @@ %define libname libfltk1_3 Name: fltk -Version: 1.3.7 +Version: 1.3.8 Release: 0 Summary: C++ GUI Toolkit for the X Window System, OpenGL, and WIN32 License: LGPL-2.1-or-later Group: Development/Libraries/X11 URL: https://www.fltk.org/ -Source: https://fltk.org/pub/fltk/%{version}/fltk-%{version}-source.tar.gz -Source2: baselibs.conf +Source0: https://www.fltk.org/pub/fltk/%{version}/fltk-%{version}-source.tar.bz2 +Source1: baselibs.conf # PATCH-FIX-UPSTREAM fltk-1.3.4-fltk_config.patch tchva...@suse.com -- obey libdir and other options in fltk-config taken from Fedora Patch0: fltk-1.3.4-fltk_config.patch # PATCH-FIX-OPENSUSE fltk-1.3.2-verbose_build.patch reddw...@opensuse.org -- Make the build verbose so the post build checks can verify the CFLAGS ++++++ fltk-1.3.7-source.tar.gz -> fltk-1.3.8-source.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/ANNOUNCEMENT new/fltk-1.3.8/ANNOUNCEMENT --- old/fltk-1.3.7/ANNOUNCEMENT 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/ANNOUNCEMENT 2021-11-20 19:10:34.000000000 +0100 @@ -4,15 +4,13 @@ Doxygen based documentation, and several new widgets including Fl_Native_File_Chooser, Fl_Table, and Fl_Tree. -FLTK 1.3.7 and previous versions contain many improvements and bug fixes. +FLTK 1.3.8 and previous versions contain many improvements and bug fixes. - Please see CHANGES for a list of changes in FLTK 1.3.0 to 1.3.7. + Please see CHANGES for a list of changes in FLTK 1.3.0 to 1.3.8. - FLTK 1.3.7 is a maintenance release for macOS only. It fixes one - regression introduced in FLTK 1.3.6 and two long standing timer - issues on macOS. - - Other platforms than macOS are not affected. + FLTK 1.3.8 is a maintenance release with minor enhancements and + some macOS related improvements. One new function 'fl_choice_n()' + has been introduced (please see docs for details). Open bugs and feature requests can be viewed (offline) in KNOWN_BUGS.html with your browser. Links in this file direct you to the current state @@ -23,9 +21,9 @@ bugs and/or feature requests in this list might have been fixed without notice. - Bugs and feature requests for FLTK 1.4.x may also apply to FLTK 1.3.7. + Bugs and feature requests for FLTK 1.4.x may also apply to FLTK 1.3.8. -FLTK 1.3.7 is expected to be the last release in the 1.3.x series. +FLTK 1.3.8 is expected to be the last release in the 1.3.x series. All bug reports for 1.3.x will be fixed in FLTK 1.4.x if possible. @@ -35,9 +33,6 @@ release of FLTK 1.3.4. Only very serious bug fixes will be available if FLTK 1.4.0 is not yet released or not (yet) stable enough. -This release (1.3.7) is a bug fix and maintenance release without new -FLTK features (except macOS Mojave and Big Sur + M1 support). - The current development branch is 'master' -- please checkout a new, clean working copy if you want to get FLTK 1.4 (master). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/CHANGES new/fltk-1.3.8/CHANGES --- old/fltk-1.3.7/CHANGES 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/CHANGES 2021-11-20 19:10:34.000000000 +0100 @@ -1,3 +1,24 @@ +CHANGES IN FLTK 1.3.8 RELEASED: Nov 20 2021 + +FLTK 1.3.8 is a maintenance release with some fixes and enhancements. + +Details: + + Albrecht Schlosser: + Make "FLTK_CONSOLIDATE_MOTION" user-definable (issue #76) + Fix compiler warnings (backported from 1.4) + Add new dialog fl_choice_n() with extended return values (#282) + + ManoloFLTK: + Account for deprecation of [NSBitmapImageRep initWithFocusedViewRect:] + in macOS 10.14 + macOS: fix fullscreen window when other windows were created before + Fix issue #287: "FLTK 1.3.6 doesn't handle fullscreen on macOS" + Fix issue #288: "FLTK 1.3.6+ doesn't notify window movement on macOS" + Fix issue #279: "HiDpi issue on macOS with retina display" + macOS: Allow building with non-Apple compiler that may not support blocks + + CHANGES IN FLTK 1.3.7 RELEASED: Jul 25 2021 FLTK 1.3.7 is a maintenance release for macOS only. It fixes one diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/CMakeLists.txt new/fltk-1.3.8/CMakeLists.txt --- old/fltk-1.3.7/CMakeLists.txt 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/CMakeLists.txt 2021-11-20 19:10:34.000000000 +0100 @@ -47,7 +47,7 @@ # define the FLTK project and version ####################################################################### -project (FLTK VERSION 1.3.7) +project (FLTK VERSION 1.3.8) ####################################################################### # include macro definitions of generally used macros diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/FL/Enumerations.H new/fltk-1.3.8/FL/Enumerations.H --- old/fltk-1.3.7/FL/Enumerations.H 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/FL/Enumerations.H 2021-11-20 19:10:34.000000000 +0100 @@ -73,7 +73,7 @@ FLTK remains binary compatible between patches. */ -#define FL_PATCH_VERSION 7 +#define FL_PATCH_VERSION 8 /** The FLTK version number as a \em double. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/FL/Fl_File_Chooser.H new/fltk-1.3.8/FL/Fl_File_Chooser.H --- old/fltk-1.3.7/FL/Fl_File_Chooser.H 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/FL/Fl_File_Chooser.H 2021-11-20 19:10:34.000000000 +0100 @@ -23,7 +23,7 @@ // ======================================================================= // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #ifndef Fl_File_Chooser_H #define Fl_File_Chooser_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/FL/Fl_Help_Dialog.H new/fltk-1.3.8/FL/Fl_Help_Dialog.H --- old/fltk-1.3.7/FL/Fl_Help_Dialog.H 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/FL/Fl_Help_Dialog.H 2021-11-20 19:10:34.000000000 +0100 @@ -23,7 +23,7 @@ // ======================================================================== // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #ifndef Fl_Help_Dialog_H #define Fl_Help_Dialog_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/FL/fl_ask.H new/fltk-1.3.8/FL/fl_ask.H --- old/fltk-1.3.7/FL/fl_ask.H 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/FL/fl_ask.H 2021-11-20 19:10:34.000000000 +0100 @@ -57,6 +57,9 @@ FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3))); FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3))); +// since FLTK 1.3.8: +FL_EXPORT int fl_choice_n(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5))); + FL_EXPORT Fl_Widget *fl_message_icon(); extern FL_EXPORT Fl_Font fl_message_font_; extern FL_EXPORT Fl_Fontsize fl_message_size_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/README new/fltk-1.3.8/README --- old/fltk-1.3.7/README 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/README 2021-11-20 19:10:34.000000000 +0100 @@ -1,4 +1,4 @@ -README - Fast Light Tool Kit (FLTK) Version 1.3.7 +README - Fast Light Tool Kit (FLTK) Version 1.3.8 ------------------------------------------------- WHAT IS FLTK? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/README.bundled-libs.txt new/fltk-1.3.8/README.bundled-libs.txt --- old/fltk-1.3.7/README.bundled-libs.txt 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/README.bundled-libs.txt 2021-11-20 19:10:34.000000000 +0100 @@ -6,13 +6,13 @@ upgrade these bundled libraries. -Current versions of bundled libraries (as of June 9, 2021): +Current versions of bundled libraries (as of Nov. 5, 2021): Library Version Release date FLTK Version -------------------------------------------------------------------------- - jpeg jpeg-9d 2020-01-12 1.3.6 / 1.3.7 - png libpng-1.6.37 2019-04-14 1.3.6 / 1.3.7 - zlib zlib-1.2.11 2017-01-15 1.3.6 / 1.3.7 + jpeg jpeg-9d 2020-01-12 1.3.6 - 1.3.8 + png libpng-1.6.37 2019-04-14 1.3.6 - 1.3.8 + zlib zlib-1.2.11 2017-01-15 1.3.6 - 1.3.8 -------------------------------------------------------------------------- Previous versions of bundled libraries: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/configure new/fltk-1.3.8/configure --- old/fltk-1.3.7/configure 2021-07-25 15:57:37.000000000 +0200 +++ new/fltk-1.3.8/configure 2021-11-20 19:12:26.000000000 +0100 @@ -3642,7 +3642,7 @@ FLTK_VERSION_MAJOR=1 FLTK_VERSION_MINOR=3 -FLTK_VERSION_PATCH=7 +FLTK_VERSION_PATCH=8 FL_DSO_VERSION=${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} FL_ABI_VERSION=${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}.0 FLTK_VERSION=${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}.${FLTK_VERSION_PATCH} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/configure.ac new/fltk-1.3.8/configure.ac --- old/fltk-1.3.7/configure.ac 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/configure.ac 2021-11-20 19:10:34.000000000 +0100 @@ -51,7 +51,7 @@ dnl FLTK library versions... FLTK_VERSION_MAJOR=1 FLTK_VERSION_MINOR=3 -FLTK_VERSION_PATCH=7 +FLTK_VERSION_PATCH=8 FL_DSO_VERSION=${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} FL_ABI_VERSION=${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}.0 FLTK_VERSION=${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}.${FLTK_VERSION_PATCH} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/documentation/src/fltk-title.tex.in new/fltk-1.3.8/documentation/src/fltk-title.tex.in --- old/fltk-1.3.7/documentation/src/fltk-title.tex.in 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/documentation/src/fltk-title.tex.in 2021-11-20 19:10:34.000000000 +0100 @@ -11,7 +11,7 @@ \end{DoxyImageNoCaption}\\ \vspace*{2cm} {\Large -Revision 9.7 by F. Costantini, D. Gibson, M. Melcher, \\ +Revision 9.8 by F. Costantini, D. Gibson, M. Melcher, \\ A. Schlosser, B. Spitzak, and M. Sweet.}\\ \vspace*{1.5cm} {\large Copyright 1998-@YEAR@ by Bill Spitzak and others.}\\ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/documentation/src/index.dox new/fltk-1.3.8/documentation/src/index.dox --- old/fltk-1.3.7/documentation/src/index.dox 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/documentation/src/index.dox 2021-11-20 19:10:34.000000000 +0100 @@ -8,9 +8,9 @@ \image latex FL200.png "" width=5cm </CENTER></TD> <TD><CENTER> - <B>FLTK 1.3.7 Programming Manual</B> + <B>FLTK 1.3.8 Programming Manual</B> - Revision 9.7 by F. Costantini, D. Gibson, M. Melcher, + Revision 9.8 by F. Costantini, D. Gibson, M. Melcher, A. Schlosser, B. Spitzak and M. Sweet. Copyright 1998-2021 by Bill Spitzak and others. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/documentation/src/preface.dox new/fltk-1.3.8/documentation/src/preface.dox --- old/fltk-1.3.7/documentation/src/preface.dox 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/documentation/src/preface.dox 2021-11-20 19:10:34.000000000 +0100 @@ -3,7 +3,7 @@ \page preface Preface This manual describes the Fast Light Tool Kit ("FLTK") -version 1.3.7, a C++ Graphical User Interface +version 1.3.8, a C++ Graphical User Interface ("GUI") toolkit for UNIX, Microsoft Windows and Apple OS X. Each of the chapters in this manual is designed as a tutorial for using FLTK, while the appendices provide a convenient reference diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fltk.spec new/fltk-1.3.8/fltk.spec --- old/fltk-1.3.7/fltk.spec 2021-07-25 15:57:37.000000000 +0200 +++ new/fltk-1.3.8/fltk.spec 2021-11-20 19:12:26.000000000 +0100 @@ -24,7 +24,7 @@ Release: %{release} License: LGPL Group: System Environment/Libraries -Source: https://www.fltk.org/pub/fltk/1.3.7/fltk-1.3.7-source.tar.gz +Source: https://www.fltk.org/pub/fltk/1.3.8/fltk-1.3.8-source.tar.gz URL: https://www.fltk.org/ Packager: FLTK Developer <f...@fltk.org> # use BuildRoot so as not to disturb the version already installed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fltk_version.dat new/fltk-1.3.8/fltk_version.dat --- old/fltk-1.3.7/fltk_version.dat 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fltk_version.dat 2021-11-20 19:10:34.000000000 +0100 @@ -1 +1 @@ -1.3.7 +1.3.8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/about_panel.cxx new/fltk-1.3.8/fluid/about_panel.cxx --- old/fltk-1.3.7/fluid/about_panel.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/about_panel.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #include "about_panel.h" void show_help(const char *name); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/about_panel.fl new/fltk-1.3.8/fluid/about_panel.fl --- old/fltk-1.3.7/fluid/about_panel.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/about_panel.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} comment {// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/about_panel.h new/fltk-1.3.8/fluid/about_panel.h --- old/fltk-1.3.7/fluid/about_panel.h 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/about_panel.h 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #ifndef about_panel_h #define about_panel_h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/alignment_panel.cxx new/fltk-1.3.8/fluid/alignment_panel.cxx --- old/fltk-1.3.7/fluid/alignment_panel.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/alignment_panel.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #include "alignment_panel.h" #include <FL/Fl_Preferences.H> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/alignment_panel.fl new/fltk-1.3.8/fluid/alignment_panel.fl --- old/fltk-1.3.7/fluid/alignment_panel.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/alignment_panel.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} comment {// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/alignment_panel.h new/fltk-1.3.8/fluid/alignment_panel.h --- old/fltk-1.3.7/fluid/alignment_panel.h 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/alignment_panel.h 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #ifndef alignment_panel_h #define alignment_panel_h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/fluid.plist new/fltk-1.3.8/fluid/fluid.plist --- old/fltk-1.3.7/fluid/fluid.plist 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/fluid.plist 2021-11-20 19:10:34.000000000 +0100 @@ -9,7 +9,7 @@ <key>CFBundleIdentifier</key> <string>org.fltk.fluid</string> <key>CFBundleVersion</key> - <string>1.3.7</string> + <string>1.3.8</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>NSHumanReadableCopyright</key> @@ -25,9 +25,9 @@ <key>CFBundleIconFile</key> <string>fluid.icns</string> <key>CFBundleShortVersionString</key> - <string>1.3.7</string> + <string>1.3.8</string> <key>CFBundleGetInfoString</key> - <string>1.3.7, Copyright 1998-2021 by Bill Spitzak and others</string> + <string>1.3.8, Copyright 1998-2021 by Bill Spitzak and others</string> <key>CFBundleDocumentTypes</key> <array> <dict> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/function_panel.cxx new/fltk-1.3.8/fluid/function_panel.cxx --- old/fltk-1.3.7/fluid/function_panel.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/function_panel.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #include "function_panel.h" #include <FL/Fl_Pixmap.H> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/function_panel.fl new/fltk-1.3.8/fluid/function_panel.fl --- old/fltk-1.3.7/fluid/function_panel.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/function_panel.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} comment {// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/function_panel.h new/fltk-1.3.8/fluid/function_panel.h --- old/fltk-1.3.7/fluid/function_panel.h 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/function_panel.h 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #ifndef function_panel_h #define function_panel_h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/print_panel.cxx new/fltk-1.3.8/fluid/print_panel.cxx --- old/fltk-1.3.7/fluid/print_panel.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/print_panel.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #include "print_panel.h" #include <stdio.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/print_panel.fl new/fltk-1.3.8/fluid/print_panel.fl --- old/fltk-1.3.7/fluid/print_panel.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/print_panel.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} comment {// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/print_panel.h new/fltk-1.3.8/fluid/print_panel.h --- old/fltk-1.3.7/fluid/print_panel.h 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/print_panel.h 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #ifndef print_panel_h #define print_panel_h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/template_panel.cxx new/fltk-1.3.8/fluid/template_panel.cxx --- old/fltk-1.3.7/fluid/template_panel.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/template_panel.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #include "template_panel.h" #include <stdio.h> @@ -213,7 +213,7 @@ void template_load() { int i; - char name[1024], filename[1024], path[1024], *ptr; + char name[1024], filename[1400], path[1024], *ptr; struct dirent **files; int num_files; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/template_panel.fl new/fltk-1.3.8/fluid/template_panel.fl --- old/fltk-1.3.7/fluid/template_panel.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/template_panel.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} comment {// @@ -209,7 +209,7 @@ Function {template_load()} {return_type void } { code {int i; -char name[1024], filename[1024], path[1024], *ptr; +char name[1024], filename[1400], path[1024], *ptr; struct dirent **files; int num_files; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/template_panel.h new/fltk-1.3.8/fluid/template_panel.h --- old/fltk-1.3.7/fluid/template_panel.h 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/template_panel.h 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #ifndef template_panel_h #define template_panel_h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/widget_panel.cxx new/fltk-1.3.8/fluid/widget_panel.cxx --- old/fltk-1.3.7/fluid/widget_panel.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/widget_panel.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #include "widget_panel.h" extern void comment_cb(Fl_Text_Editor*, void*); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/widget_panel.fl new/fltk-1.3.8/fluid/widget_panel.fl --- old/fltk-1.3.7/fluid/widget_panel.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/widget_panel.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} comment {// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/fluid/widget_panel.h new/fltk-1.3.8/fluid/widget_panel.h --- old/fltk-1.3.7/fluid/widget_panel.h 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/fluid/widget_panel.h 2021-11-20 19:10:34.000000000 +0100 @@ -16,7 +16,7 @@ // http://www.fltk.org/str.php // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #ifndef widget_panel_h #define widget_panel_h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/fltk-1.3.7/ide/Xcode4/Project Templates/FLTK Application/FLTK 1.3/ui.fl" "new/fltk-1.3.8/ide/Xcode4/Project Templates/FLTK Application/FLTK 1.3/ui.fl" --- "old/fltk-1.3.7/ide/Xcode4/Project Templates/FLTK Application/FLTK 1.3/ui.fl" 2021-07-25 15:16:28.000000000 +0200 +++ "new/fltk-1.3.8/ide/Xcode4/Project Templates/FLTK Application/FLTK 1.3/ui.fl" 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0306 +version 1.0308 header_name {.h} code_name {.cxx} Function {make_window()} {open diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/ide/Xcode4/plists/Fluid-Info.plist new/fltk-1.3.8/ide/Xcode4/plists/Fluid-Info.plist --- old/fltk-1.3.7/ide/Xcode4/plists/Fluid-Info.plist 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/ide/Xcode4/plists/Fluid-Info.plist 2021-11-20 19:10:34.000000000 +0100 @@ -40,7 +40,7 @@ <key>CFBundleSignature</key> <string>FLTK</string> <key>CFBundleVersion</key> - <string>1.3.7</string> + <string>1.3.8</string> <key>NSHumanReadableCopyright</key> <string>Copyright 1998-2021 by Bill Spitzak and others.</string> <key>CFBundleGetInfoString</key> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_File_Chooser.cxx new/fltk-1.3.8/src/Fl_File_Chooser.cxx --- old/fltk-1.3.7/src/Fl_File_Chooser.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_File_Chooser.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -23,7 +23,7 @@ // ======================================================================= // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #include "../FL/Fl_File_Chooser.H" #include <FL/fl_draw.H> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_File_Chooser.fl new/fltk-1.3.8/src/Fl_File_Chooser.fl --- old/fltk-1.3.7/src/Fl_File_Chooser.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_File_Chooser.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {../FL/Fl_File_Chooser.H} code_name {.cxx} comment {// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_File_Chooser2.cxx new/fltk-1.3.8/src/Fl_File_Chooser2.cxx --- old/fltk-1.3.7/src/Fl_File_Chooser2.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_File_Chooser2.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -700,7 +700,7 @@ Fl_File_Chooser::fileListCB() { char *filename, // New filename - pathname[FL_PATH_MAX]; // Full pathname to file + pathname[FL_PATH_MAX + 4]; // Full pathname to file filename = (char *)fileList->text(fileList->value()); @@ -899,7 +899,7 @@ directory(pathname); if (filename[0]) { - char tempname[FL_PATH_MAX]; + char tempname[FL_PATH_MAX + 4]; snprintf(tempname, sizeof(tempname), "%s/%s", directory_, filename); fileName->value(tempname); @@ -1057,8 +1057,8 @@ void Fl_File_Chooser::newdir() { - const char *dir; // New directory name - char pathname[FL_PATH_MAX]; // Full path of directory + const char *dir; // New directory name + char pathname[FL_PATH_MAX + 4]; // Full path of directory // Get a directory name from the user @@ -1479,7 +1479,7 @@ int i; // Looping var int fcount; // Number of selected files const char *name; // Current filename - static char pathname[FL_PATH_MAX]; // Filename + directory + static char pathname[FL_PATH_MAX + 4]; // Filename + directory name = fileName->value(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_File_Icon2.cxx new/fltk-1.3.8/src/Fl_File_Icon2.cxx --- old/fltk-1.3.7/src/Fl_File_Icon2.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_File_Icon2.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -596,7 +596,7 @@ Fl_File_Icon::load_system_icons(void) { int i; // Looping var Fl_File_Icon *icon; // New icons - char filename[FL_PATH_MAX]; // Filename + char filename[FL_PATH_MAX + 60]; // Filename char icondir[FL_PATH_MAX]; // Icon directory static int init = 0; // Have the icons been initialized? const char * const icondirs[] = { @@ -841,7 +841,7 @@ char pattern[1024]; char mimetype[1024]; char *val; - char full_iconfilename[FL_PATH_MAX]; + char full_iconfilename[2 * FL_PATH_MAX]; Fl_File_Icon *icon; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_Help_Dialog.cxx new/fltk-1.3.8/src/Fl_Help_Dialog.cxx --- old/fltk-1.3.7/src/Fl_Help_Dialog.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_Help_Dialog.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -23,7 +23,7 @@ // ======================================================================== // -// generated by Fast Light User Interface Designer (fluid) version 1.0307 +// generated by Fast Light User Interface Designer (fluid) version 1.0308 #include "../FL/Fl_Help_Dialog.H" #include "flstring.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_Help_Dialog.fl new/fltk-1.3.8/src/Fl_Help_Dialog.fl --- old/fltk-1.3.7/src/Fl_Help_Dialog.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_Help_Dialog.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {../FL/Fl_Help_Dialog.H} code_name {.cxx} comment {// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_Help_View.cxx new/fltk-1.3.8/src/Fl_Help_View.cxx --- old/fltk-1.3.7/src/Fl_Help_View.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_Help_View.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -2781,7 +2781,7 @@ Fl_Help_View::get_image(const char *name, int W, int H) { const char *localname; // Local filename char dir[FL_PATH_MAX]; // Current directory - char temp[FL_PATH_MAX], // Temporary filename + char temp[2 * FL_PATH_MAX], // Temporary filename *tempptr; // Pointer into temporary name Fl_Shared_Image *ip; // Image pointer... @@ -2878,7 +2878,7 @@ if (strcmp(linkp->filename, filename_) != 0 && linkp->filename[0]) { char dir[FL_PATH_MAX]; // Current directory - char temp[FL_PATH_MAX], // Temporary filename + char temp[2 * FL_PATH_MAX], // Temporary filename *tempptr; // Pointer into temporary filename @@ -3297,7 +3297,7 @@ char *target; // Target in file char *slash; // Directory separator const char *localname; // Local filename - char error[1024]; // Error buffer + char error[2 * FL_PATH_MAX]; // Error buffer char newname[FL_PATH_MAX]; // New filename buffer // printf("load(%s)\n",f); fflush(stdout); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_Native_File_Chooser_MAC.mm new/fltk-1.3.8/src/Fl_Native_File_Chooser_MAC.mm --- old/fltk-1.3.7/src/Fl_Native_File_Chooser_MAC.mm 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_Native_File_Chooser_MAC.mm 2021-11-20 19:10:34.000000000 +0100 @@ -542,7 +542,7 @@ fname = [preset lastPathComponent]; } if (_directory && !dir) dir = [[NSString alloc] initWithUTF8String:_directory]; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 && defined(__BLOCKS__) if (fl_mac_os_version >= 100600) { bool usepath = false; NSString *path = nil; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_cocoa.mm new/fltk-1.3.8/src/Fl_cocoa.mm --- old/fltk-1.3.7/src/Fl_cocoa.mm 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_cocoa.mm 2021-11-20 19:10:34.000000000 +0100 @@ -29,7 +29,10 @@ #ifdef __APPLE__ -#define CONSOLIDATE_MOTION 0 +#ifndef FLTK_CONSOLIDATE_MOTION +#define FLTK_CONSOLIDATE_MOTION 0 +#endif + extern "C" { #include <pthread.h> } @@ -114,7 +117,7 @@ static NSMutableArray *dropped_files_list = nil; // list of files dropped at app launch typedef void (*open_cb_f_type)(const char *); static Fl_Window *starting_moved_window = NULL; // the moved window which brings its subwins with it -#if CONSOLIDATE_MOTION +#if FLTK_CONSOLIDATE_MOTION static Fl_Window* send_motion; extern Fl_Window* fl_xmousewin; #endif @@ -906,7 +909,7 @@ } fl_lock_function(); -#if CONSOLIDATE_MOTION +#if FLTK_CONSOLIDATE_MOTION if (send_motion && send_motion == fl_xmousewin) { send_motion = 0; Fl::handle(FL_MOVE, fl_xmousewin); @@ -1438,7 +1441,7 @@ main_screen_height = CGDisplayBounds(CGMainDisplayID()).size.height; int X, Y; CocoatoFLTK(window, X, Y); - window->Fl_Widget::resize(X, Y, window->w(), window->h()); + if (window->x() != X || window->y() != Y) window->position(X, Y); update_e_xy_and_e_xy_root(nsw); // at least since MacOS 10.9: OS moves subwindows contained in a moved window // setSubwindowFrame is no longer necessary. @@ -3113,22 +3116,25 @@ void Fl_Window::fullscreen_off_x(int X, int Y, int W, int H) { _clear_fullscreen(); - if (fl_mac_os_version < 101000) { - hide(); - resize(X, Y, W, H); - show(); - } else { - NSUInteger winstyle = (border() ? - (NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask) : NSBorderlessWindowMask); - if (!modal()) winstyle |= NSMiniaturizableWindowMask; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 + if (fl_mac_os_version >= 100600) { NSInteger level = NSNormalWindowLevel; if (modal()) level = modal_window_level(); else if (non_modal()) level = non_modal_window_level(); + [i->xid orderOut:nil]; [i->xid setLevel:level]; - resize(X, Y, W, H); -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 + NSUInteger winstyle = (border() ? + (NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask) : NSBorderlessWindowMask); + if (!modal()) winstyle |= NSMiniaturizableWindowMask; [i->xid setStyleMask:winstyle]; //10.6 + resize(X, Y, W, H); + [i->xid orderFront:nil]; + } else #endif + { + hide(); + resize(X, Y, W, H); + show(); } Fl::handle(FL_FULLSCREEN, this); } @@ -3304,7 +3310,7 @@ [cw center]; } else if (w->non_modal()) { [cw center]; - } else { + } else if (!w->fullscreen_active()) { static NSPoint delta = NSZeroPoint; delta = [cw cascadeTopLeftFromPoint:delta]; } @@ -3357,6 +3363,7 @@ Fl::e_number = old_event; // if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); } + if (!w->parent()) [myview did_view_resolution_change]; // to set mapped_to_retina to its current state [pool release]; } @@ -3654,6 +3661,44 @@ Fl_Display_Device::high_res_window_ = new_val; } +static NSBitmapImageRep *pdf_to_nsbitmapimagerep(NSData *pdfdata) { + NSImage *image = [[NSImage alloc] initWithData:pdfdata]; + NSInteger width = [image size].width * 2; + NSInteger height = [image size].height * 2; + NSBitmapImageRep *bitmap = [NSBitmapImageRep alloc]; + NSRect dest_r = NSMakeRect(0, 0, width, height); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 + if (fl_mac_os_version >= 100900) { + // This procedure is necessary because initWithFocusedViewRect is deprecated in macOS 10.14 + // and because it produces a bitmap with floating point pixel values with macOS 11.x on arm64 + bitmap = [bitmap initWithBitmapDataPlanes:NULL + pixelsWide:width + pixelsHigh:height + bitsPerSample:8 + samplesPerPixel:4 + hasAlpha:YES + isPlanar:NO + colorSpaceName:NSDeviceRGBColorSpace + bytesPerRow:4 * width + bitsPerPixel:32]; + NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init]; + [NSGraphicsContext saveGraphicsState]; + [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:bitmap]];// 10.4 + [image drawInRect:dest_r]; // 10.9 + [NSGraphicsContext restoreGraphicsState]; + [localPool release]; + } else +#endif + { + [image lockFocus]; + bitmap = [bitmap initWithFocusedViewRect:dest_r]; // deprecated 10.14 + [image unlockFocus]; + } + [bitmap setSize:[image size]]; + [image release]; + return bitmap; +} + void Fl_Copy_Surface::complete_copy_pdf_and_tiff() { CGContextRestoreGState(gc); @@ -3666,15 +3711,10 @@ [clip declareTypes:[NSArray arrayWithObjects:PDF_pasteboard_type, TIFF_pasteboard_type, nil] owner:nil]; [clip setData:(NSData*)pdfdata forType:PDF_pasteboard_type]; //second, transform this PDF to a bitmap image and put it as tiff in clipboard with retina resolution - NSImage *image = [[NSImage alloc] initWithData:(NSData*)pdfdata]; + NSBitmapImageRep *bitmap = pdf_to_nsbitmapimagerep((NSData*)pdfdata); CFRelease(pdfdata); - [image lockFocus]; - NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0, 0, [image size].width*2, [image size].height*2)]; - [image unlockFocus]; - [bitmap setSize:[image size]]; [clip setData:[bitmap TIFFRepresentation] forType:TIFF_pasteboard_type]; [bitmap release]; - [image release]; } //////////////////////////////////////////////////////////////// @@ -3811,12 +3851,7 @@ bitmap = [[NSBitmapImageRep alloc] initWithData:data]; } else if ([found isEqualToString:PDF_pasteboard_type] || [found isEqualToString:PICT_pasteboard_type]) { - NSImage *nsimg = [[NSImage alloc] initWithData:data]; - [nsimg lockFocus]; - bitmap = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0, 0, [nsimg size].width*2, [nsimg size].height*2)]; - [bitmap setSize:[nsimg size]]; - [nsimg unlockFocus]; - [nsimg release]; + bitmap = pdf_to_nsbitmapimagerep(data); } if (!bitmap) return NULL; int bytesPerPixel([bitmap bitsPerPixel]/8); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/Fl_x.cxx new/fltk-1.3.8/src/Fl_x.cxx --- old/fltk-1.3.7/src/Fl_x.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/Fl_x.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -20,7 +20,10 @@ //# include "Fl_mac.cxx" // now Fl_cocoa.mm #elif !defined(FL_DOXYGEN) -# define CONSOLIDATE_MOTION 1 +#ifndef FLTK_CONSOLIDATE_MOTION +# define FLTK_CONSOLIDATE_MOTION 1 +#endif + /**** Define this if your keyboard lacks a backspace key... ****/ /* #define BACKSPACE_HACK 1 */ @@ -193,10 +196,11 @@ extern int fl_send_system_handlers(void *e); -#if CONSOLIDATE_MOTION +#if FLTK_CONSOLIDATE_MOTION static Fl_Window* send_motion; extern Fl_Window* fl_xmousewin; #endif + static bool in_a_window; // true if in any of our windows, even destroyed ones static void do_queued_events() { in_a_window = true; @@ -209,7 +213,7 @@ } // we send FL_LEAVE only if the mouse did not enter some other window: if (!in_a_window) Fl::handle(FL_LEAVE, 0); -#if CONSOLIDATE_MOTION +#if FLTK_CONSOLIDATE_MOTION else if (send_motion && send_motion == fl_xmousewin) { send_motion = 0; Fl::handle(FL_MOVE, fl_xmousewin); @@ -1312,7 +1316,7 @@ static ulong ptime; static void set_event_xy() { -# if CONSOLIDATE_MOTION +# if FLTK_CONSOLIDATE_MOTION send_motion = 0; # endif Fl::e_x_root = fl_xevent->xbutton.x_root; @@ -1722,7 +1726,9 @@ if ((Atom)(data[0]) == WM_DELETE_WINDOW) { event = FL_CLOSE; } else if (message == fl_XdndEnter) { +#if FLTK_CONSOLIDATE_MOTION fl_xmousewin = window; +#endif in_a_window = true; fl_dnd_source_window = data[0]; // version number is data[1]>>24 @@ -1772,7 +1778,9 @@ break; } else if (message == fl_XdndPosition) { +#if FLTK_CONSOLIDATE_MOTION fl_xmousewin = window; +#endif in_a_window = true; fl_dnd_source_window = data[0]; Fl::e_x_root = data[2]>>16; @@ -1803,7 +1811,9 @@ break; } else if (message == fl_XdndDrop) { +#if FLTK_CONSOLIDATE_MOTION fl_xmousewin = window; +#endif in_a_window = true; fl_dnd_source_window = data[0]; fl_event_time = data[2]; @@ -2090,7 +2100,9 @@ checkdouble(); } +#if FLTK_CONSOLIDATE_MOTION fl_xmousewin = window; +#endif in_a_window = true; break; @@ -2122,14 +2134,12 @@ case MotionNotify: set_event_xy(); -# if CONSOLIDATE_MOTION - send_motion = fl_xmousewin = window; in_a_window = true; +# if FLTK_CONSOLIDATE_MOTION + send_motion = fl_xmousewin = window; return 0; # else event = FL_MOVE; - fl_xmousewin = window; - in_a_window = true; break; # endif @@ -2141,7 +2151,9 @@ xevent.xbutton.button == Button5) return 0; event = FL_RELEASE; +#if FLTK_CONSOLIDATE_MOTION fl_xmousewin = window; +#endif in_a_window = true; break; @@ -2152,7 +2164,9 @@ Fl::e_state = xevent.xcrossing.state << 16; event = FL_ENTER; +#if FLTK_CONSOLIDATE_MOTION fl_xmousewin = window; +#endif in_a_window = true; { XIMStyles *xim_styles = NULL; if(!fl_xim_im || XGetIMValues(fl_xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL)) { @@ -2166,7 +2180,9 @@ if (xevent.xcrossing.detail == NotifyInferior) break; set_event_xy(); Fl::e_state = xevent.xcrossing.state << 16; +#if FLTK_CONSOLIDATE_MOTION fl_xmousewin = 0; +#endif in_a_window = false; // make do_queued_events produce FL_LEAVE event return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/src/fl_ask.cxx new/fltk-1.3.8/src/fl_ask.cxx --- old/fltk-1.3.7/src/fl_ask.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/src/fl_ask.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -1,9 +1,7 @@ // -// "$Id$" -// // Standard dialog functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Bill Spitzak and others. +// Copyright 1998-2021 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -18,13 +16,10 @@ /** \file fl_ask.cxx - \brief Utility functions for common dialogs. + \brief Utility Functions for Common Dialogs. */ -// Implementation of fl_message, fl_ask, fl_choice, fl_input -// The three-message fl_show_x functions are for forms compatibility -// mostly. In most cases it is easier to get a multi-line message -// by putting newlines in the message. +// Implementation of fl_message, fl_ask, fl_choice, fl_input etc. #include <stdio.h> #include <stdarg.h> @@ -48,7 +43,8 @@ static Fl_Box *icon; static Fl_Button *button[3]; static Fl_Input *input; -static int ret_val; +static int ret_val; // button return value: 0, 1, 2 +static int win_closed; // window close flag (-1 = Escape, -2 = close button) static const char *iconlabel = "?"; static const char *message_title_default; Fl_Font fl_message_font_ = FL_HELVETICA; @@ -60,14 +56,27 @@ static char avoidRecursion = 0; -// Sets the global return value (ret_val) and closes the window. -// Note: this is used for the button callbacks and the window -// callback (closing the window with the close button or menu). -// The first argument (Fl_Widget *) can either be an Fl_Button* -// pointer to one of the buttons or an Fl_Window* pointer to the -// message window (message_form). +// Sets the global return value 'ret_val' according to the button +// that was pushed (0, 1, 2), sets the 'win_closed' flag = 0 +// and hides the window. + static void button_cb(Fl_Widget *, long val) { - ret_val = (int) val; + ret_val = (int)val; + win_closed = 0; + message_form->hide(); +} + +// Sets the global return value 'ret_val' = 0 (no button pushed) and +// sets the 'win_closed' flag to -1 for Escape or -2 else (Close Button) +// and hides the window. + +static void window_cb(Fl_Widget *, long val) { + ret_val = 0; + if ((Fl::event() == FL_KEYBOARD || Fl::event() == FL_SHORTCUT) && + (Fl::event_key() == FL_Escape)) + win_closed = -1; + else + win_closed = -2; message_form->hide(); } @@ -81,7 +90,7 @@ Fl_Group::current(0); // create a new top level window Fl_Window *w = message_form = new Fl_Window(410,103); - message_form->callback(button_cb); + message_form->callback(window_cb); // w->clear_border(); // w->box(FL_UP_BOX); (message = new Fl_Box(60, 25, 340, 20)) @@ -106,7 +115,6 @@ button[b]->callback(button_cb, b); } } - button[0]->shortcut(FL_Escape); // add the buttons (left to right) { for (int b=2; b>=0; b--) @@ -241,8 +249,6 @@ message_form->hotspot(button[0]); if (b0 && Fl_Widget::label_shortcut(b0)) button[0]->shortcut(0); - else - button[0]->shortcut(FL_Escape); // set default window title, if defined and a specific title is not set if (!message_form->label() && message_title_default) @@ -456,7 +462,7 @@ \retval 1 if the second button with \p b1 text is pushed \retval 2 if the third button with \p b2 text is pushed */ -int fl_choice(const char*fmt,const char *b0,const char *b1,const char *b2,...){ +int fl_choice(const char *fmt, const char *b0, const char *b1, const char *b2, ...) { if (avoidRecursion) return 0; @@ -469,6 +475,56 @@ va_end(ap); return r; } + +/** + Like fl_choice() but with extended (negative) return values. + + This function can return negative values as described below whereas + fl_choice() only returns "button values" (0, 1, 2). + + With fl_choice_n() you can arrange the buttons in a way that any button + can be the standard "cancel" button because Escape and closing the window + with the close button can be distinguished from button return codes. + + Negative values are always "special" and should be considered like "cancel". + + The special value \p -3 means that the dialog was blocked (not executed). + + Other than that both functions are the same. + + \see fl_choice() + + \since 1.3.8 + + \param[in] fmt can be used as an sprintf-like format and variables for the message text + \param[in] b0 text label of button 0 + \param[in] b1 text label of button 1 (can be 0) + \param[in] b2 text label of button 2 (can be 0) + + \retval -3 if another dialog box is still open (the dialog was blocked) + \retval -2 if the dialog window was closed by clicking the close button + \retval -1 if the dialog was closed by hitting Escape + \retval 0 if the first button with \p b0 text is pushed + \retval 1 if the second button with \p b1 text is pushed + \retval 2 if the third button with \p b2 text is pushed +*/ +int fl_choice_n(const char *fmt, const char *b0, const char *b1, const char *b2, ...) { + + if (avoidRecursion) return -3; + + va_list ap; + + // fl_beep(FL_BEEP_QUESTION); + + va_start(ap, b2); + int r = innards(fmt, ap, b0, b1, b2); + va_end(ap); + + if (win_closed != 0 && r == 0) + return win_closed; + return r; +} + /** Gets the Fl_Box icon container of the current default dialog used in many common dialogs like fl_message(), fl_alert(), fl_ask(), fl_choice(), fl_input(), fl_password() @@ -594,7 +650,7 @@ common dialogs like fl_message(), fl_alert(), fl_ask(), fl_choice(), fl_input(), fl_password(), unless a specific title has been set with fl_message_title(const char *title). - + The default is no title. You can override the default title for a single dialog with fl_message_title(const char *title). @@ -614,7 +670,3 @@ } /** @} */ - -// -// End of "$Id$". -// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/CubeViewUI.fl new/fltk-1.3.8/test/CubeViewUI.fl --- old/fltk-1.3.7/test/CubeViewUI.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/CubeViewUI.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} class CubeViewUI {open diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/ask.cxx new/fltk-1.3.8/test/ask.cxx --- old/fltk-1.3.7/test/ask.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/ask.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -1,12 +1,10 @@ // -// "$Id$" -// // Standard dialog test program for the Fast Light Tool Kit (FLTK). // // This also demonstrates how to trap attempts by the user to // close the last window by overriding Fl::exit // -// Copyright 1998-2017 by Bill Spitzak and others. +// Copyright 1998-2021 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -19,16 +17,16 @@ // http://www.fltk.org/str.php // -#include <stdio.h> -#include <string.h> #include <FL/Fl.H> #include <FL/Fl_Double_Window.H> #include <FL/Fl_Input.H> #include <FL/Fl_Button.H> #include <FL/Fl_Return_Button.H> #include <FL/Fl_Box.H> - #include <FL/fl_ask.H> + +#include <stdio.h> +#include <string.h> #include <stdlib.h> void update_input_text(Fl_Widget* o, const char *input) { @@ -52,13 +50,19 @@ int hotspot = fl_message_hotspot(); fl_message_hotspot(0); fl_message_title("note: no hotspot set for this dialog"); - int rep = fl_choice("Are you sure you want to quit?", - "Cancel", "Quit", "Dunno"); + int rep = fl_choice_n("Are you sure you want to quit?", + "Cancel", "Quit", "Dunno"); fl_message_hotspot(hotspot); - if (rep==1) + if (rep == 1) // Quit exit(0); - else if (rep==2) + else if (rep == 2) // Dunno fl_message("Well, maybe you should know before we quit."); + else if (rep == -1 || rep == -2) // Escape or close button + fl_message("Window closed by %s, continuing...", rep == -1 ? "hitting Escape" : "close button"); + else { + // ignore (cancel or dialog was blocked) + // note: we can't open another fl_message() if the dialog was blocked! + } } /* @@ -128,7 +132,3 @@ return Fl::run(); } - -// -// End of "$Id$". -// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/fast_slow.fl new/fltk-1.3.8/test/fast_slow.fl --- old/fltk-1.3.7/test/fast_slow.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/fast_slow.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} Function {} {open diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/file_chooser.cxx new/fltk-1.3.8/test/file_chooser.cxx --- old/fltk-1.3.7/test/file_chooser.cxx 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/file_chooser.cxx 2021-11-20 19:10:34.000000000 +0100 @@ -251,7 +251,7 @@ { const char *home; // Home directory char preview[FL_PATH_MAX], // Preview filename - command[FL_PATH_MAX]; // Command + command[3 * FL_PATH_MAX]; // Command if (memcmp(header, "%PDF", 4) != 0) @@ -283,7 +283,7 @@ const char *home; // Home directory char preview[FL_PATH_MAX], // Preview filename outname[FL_PATH_MAX], // Preview PS file - command[FL_PATH_MAX]; // Command + command[3 * FL_PATH_MAX]; // Command FILE *in, // Input file *out; // Output file int page; // Current page diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/inactive.fl new/fltk-1.3.8/test/inactive.fl --- old/fltk-1.3.7/test/inactive.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/inactive.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} Function {} {open diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/keyboard_ui.fl new/fltk-1.3.8/test/keyboard_ui.fl --- old/fltk-1.3.7/test/keyboard_ui.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/keyboard_ui.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} Function {make_window()} {open diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/mandelbrot_ui.fl new/fltk-1.3.8/test/mandelbrot_ui.fl --- old/fltk-1.3.7/test/mandelbrot_ui.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/mandelbrot_ui.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} decl {\#include "mandelbrot.h"} {public local diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/preferences.fl new/fltk-1.3.8/test/preferences.fl --- old/fltk-1.3.7/test/preferences.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/preferences.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} decl {\#include <FL/Fl_Preferences.H>} {public local diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/radio.fl new/fltk-1.3.8/test/radio.fl --- old/fltk-1.3.7/test/radio.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/radio.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} Function {button_cb(Fl_Button *b, void *)} { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/resize.fl new/fltk-1.3.8/test/resize.fl --- old/fltk-1.3.7/test/resize.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/resize.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} Function {} {open diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/tabs.fl new/fltk-1.3.8/test/tabs.fl --- old/fltk-1.3.7/test/tabs.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/tabs.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} Function {} {open diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/tree.fl new/fltk-1.3.8/test/tree.fl --- old/fltk-1.3.7/test/tree.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/tree.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} decl {\#include <stdio.h>} {public global diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fltk-1.3.7/test/valuators.fl new/fltk-1.3.8/test/valuators.fl --- old/fltk-1.3.7/test/valuators.fl 2021-07-25 15:16:28.000000000 +0200 +++ new/fltk-1.3.8/test/valuators.fl 2021-11-20 19:10:34.000000000 +0100 @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0307 +version 1.0308 header_name {.h} code_name {.cxx} Function {callback(Fl_Widget* o, void*)} {open private return_type void