Update changelog

This commit is contained in:
Gregory John Casamento 2024-06-16 07:02:13 -04:00
commit f83098bd8d
22 changed files with 725 additions and 429 deletions

View file

@ -1,7 +1,7 @@
1 Announcement
**************
This is version 0.29.0 of the GNUstep GUI library ('gnustep-gui').
This is version 0.31.1 of the GNUstep GUI library ('gnustep-gui').
1.1 What is the GNUstep GUI Library?
====================================
@ -32,51 +32,25 @@ Group's libjpeg library, and a back-end component from the GNUstep
libraries. For example, to build the Cairo backend in the GNUstep Back
library, you will need to install Cairo.
1.2 Noteworthy changes in version '0.29.0'
1.2 Noteworthy changes in version '0.31.1'
==========================================
This version adds support for storyboard files and many new classes.
Plus the usual bunch of bug fixes.
This is a bugfix release
* Support loading of storyboard files.
* Add classes NSSwitch, NSFontAssetRequest,
NSMediaLibraryBrowserController, NSScrubberItemView,
NSScrubberLayout, NSScrubber, NSSharingServicePickerToolbarItem,
NSPathCell, NSPathComponentCell, NSPathControl, NSPathControlItem,
NSPersistentDocument, NSAccessibilityCustomAction,
NSAccessibilityCustomRotor, NSAccessibilityElement, NSStoryboard,
NSStoryboardSegue, NSPageController, NSSplitViewController,
NSSplitViewItem, NSTabViewController, NSLayoutAnchor,
NSLayoutConstraint, NSLayoutGuide, NSStatusBarButton,
NSTextCheckingController, NSTextFinder, NSTextInputContext,
NSGridView. Some of these classes are still skeletons.
* Fix extraline fragment in text layout.
* Better encoding handling in RTF files.
* Add more italian translations.
* Add MacOSX methods to NSNib, NSMenu and NSWindow.
* Focus handling fixes for WindowMaker.
* Fix missing colours when loading old colour lists.
* Support JPEG export as greyscale image.
* Fix memory leak in NSPopupButtonCell.
* Fix toolbar flickering.
* NSSearchFieldCell use code from GSTheme to display popup.
* Fix int decoding to get it working on 64 bit big endian machines.
* Add tab stops after last defined at default intervals.
* Stop NSWindow from handling windows that are gone, but possibly
returned by a slow window manager.
* Fix NSTableView/NSTableColumn bindings.
* Fix bug decoding menu items (breaking archive)
* Remove use of deprecated lock from base library
1.3 Where can you get it? How can you compile it?
=================================================
The gnustep-gui-0.29.0.tar.gz distribution file has been placed at
The gnustep-gui-0.31.1.tar.gz distribution file has been placed at
<ftp://ftp.gnustep.org/pub/gnustep/core>.
It is accompanied by gnustep-gui-0.29.0.tar.gz.sig, a PGP signature
It is accompanied by gnustep-gui-0.31.1.tar.gz.sig, a PGP signature
which you can validate by putting both files in the same directory and
using:
gpg --verify gnustep-gui-0.29.0.tar.gz.sig
gpg --verify gnustep-gui-0.31.1.tar.gz.sig
Signature has been created using the key with the following
fingerprint:

View file

@ -15,6 +15,40 @@
* Source/NSTableView.m: Update to use NSTableRowView
when it is view-based.
2024-06-05 Richard Frith-Macdonald <rfm@gnu.org>
* ChangeLog: Update for new release
* ANNOUNCE:
* NEWS:
* Documentation/news.texi: Update of release notes for 0.31.1.
* Version: bump to 0.31.1
2024-06-03 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSMenuitem.m:
Fix bug in decoding of archived menu item modifier mask.
2024-05-30 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSDisplayServer.m:
* Source/NSGraphicsContext.m:
* Source/NSWorkspace.m:
Avoid using old gnustep_global_lock (removed from base)
2024-05-26 Fred Kiefer <FredKiefer@gmx.de>
* ChangeLog: Update for new release
* ANNOUNCE:
* NEWS:
* Documentation/news.texi: Update of release notes for 0.31.0.
* Version: bump to 0.31.0
2024-05-13 Adam Fox <adam.fox@keysight.com>
* Source/NSParagraphStyle.m (-init): Apply the old default
tab stop behavior from +defaultParagraphStyle to -init,
and therefore also to +defaultParagraphStyle.
2024-03-18 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextView.m: Add support for NSFilenamenPboardType.

View file

@ -9,6 +9,57 @@
The currently released version of the library is @samp{@value{GNUSTEP-GUI-VERSION}}.
@end ifclear
@section Noteworthy changes in version @samp{0.31.1}
This is a bugfix release
@itemize @bullet
@item Fix bug decoding menu items (breaking archive)
@item Remove use of deprecated lock from base library
@end itemize
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.31.0}
This version adds view based cell support for NSTableView and NSOutlineView.
Plus the usual bunch of bug fixes.
@itemize @bullet
@item Add TGA detection for ImageMagick extension.
@item Correct endianess swapping for saving 16 and 32 bit TIFF images.
@item NSParagraphStyle restore old behaviour to have default tab stops.
@item Documentation updates.
@item A fix for autogsdoc documentation creation.
@item Improve theming for many classes.
@item Correct keyEquivalentModifierMask decoding in XIB files.
@item Add imageViewWithImage: to NSImageView.
@item Add implementation of NSUserInterfaceItemIdentifier to NSView.
@item Fix NSImageView intercepting mouse events when not editable
@item Move NSBox method isOpaque to GSTheme.
@item Many decoding improvements.
@item Fix compiler warnings.
@item Generate and install a gnustep-gui.pc file.
@item Add support for NSFilenamenPboardType in NSTextView.
@item Add support for NSPasteboardTypePNG in NSBitmapImageRep if the libpng is present.
@item Add support for ImageMagick >= 7.0
@item Increase pasteboard timeout to 30 seconds.
@item Add NSAppearance implementation.
@item Make PACKAGE_SCOPE public on MinGW.
@item Started implementing NSShadow.
@item Move awakeFromNib implementation to NSObject instead of NSView.
@item Changes for libGIF 5.2 and later.
@item Update NSViewController with lifeCycle methods.
@item Avoid accessing instance variables in inline functions when compiling with MSVC.
@item Add method removeAllItems to NSMenu.
@item Add badge handling to NSDockTile.
@item More improvements to layout constraints.
@item Add implementation of NSDictionaryController.
@item Add implementation of the NSCollectionView classes.
@item Improve NSDrawer opening.
@item Improver CI pipeline.
@end itemize
@section Noteworthy changes in version @samp{0.30.0}
This version adds parsing support for layout constraints, compilation with MSVC
@ -48,11 +99,8 @@ and many new classes. Plus the usual bunch of bug fixes.
@item Support ImageMagick version >= 7.
@item Add github workflow.
@item Add icon for speech synthesizer.
@item
@item
@end itemize
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.29.0}

219
NEWS
View file

@ -1,9 +1,100 @@
1 NEWS
******
The currently released version of the library is '0.29.0'.
The currently released version of the library is '0.31.1'.
1.1 Noteworthy changes in version '0.29.0'
1.1 Noteworthy changes in version '0.31.1'
==========================================
This is a bugfix release
* Fix bug decoding menu items (breaking archive)
* Remove use of deprecated lock from base library
1.2 Noteworthy changes in version '0.31.0'
==========================================
This version adds view based cell support for NSTableView and
NSOutlineView. Plus the usual bunch of bug fixes.
* Add TGA detection for ImageMagick extension.
* Correct endianess swapping for saving 16 and 32 bit TIFF images.
* NSParagraphStyle restore old behaviour to have default tab stops.
* Documentation updates.
* A fix for autogsdoc documentation creation.
* Improve theming for many classes.
* Correct keyEquivalentModifierMask decoding in XIB files.
* Add imageViewWithImage: to NSImageView.
* Add implementation of NSUserInterfaceItemIdentifier to NSView.
* Fix NSImageView intercepting mouse events when not editable
* Move NSBox method isOpaque to GSTheme.
* Many decoding improvements.
* Fix compiler warnings.
* Generate and install a gnustep-gui.pc file.
* Add support for NSFilenamenPboardType in NSTextView.
* Add support for NSPasteboardTypePNG in NSBitmapImageRep if the
libpng is present.
* Add support for ImageMagick >= 7.0
* Increase pasteboard timeout to 30 seconds.
* Add NSAppearance implementation.
* Make PACKAGE_SCOPE public on MinGW.
* Started implementing NSShadow.
* Move awakeFromNib implementation to NSObject instead of NSView.
* Changes for libGIF 5.2 and later.
* Update NSViewController with lifeCycle methods.
* Avoid accessing instance variables in inline functions when
compiling with MSVC.
* Add method removeAllItems to NSMenu.
* Add badge handling to NSDockTile.
* More improvements to layout constraints.
* Add implementation of NSDictionaryController.
* Add implementation of the NSCollectionView classes.
* Improve NSDrawer opening.
* Improver CI pipeline.
1.3 Noteworthy changes in version '0.30.0'
==========================================
This version adds parsing support for layout constraints, compilation
with MSVC and many new classes. Plus the usual bunch of bug fixes.
* Add classes NSStackView, NSGlyphInfo.
* Add more formal protocols to headers.
* Add extra pixels so that tool tip doesn't overrun the window.
* More improvements from Testplant.
* NSSplitView support different divider styles.
* Improve on Wayland support.
* NSPopUpButtonCell attempt to fix deallocation and item selection.
* NSImageCell fix refuse first responder.
* Improve NIB and XIB unarchiving.
* GSStandardWindowDecorationView fix resizing mode
* Make resize bar notch themable.
* NSButton add radio button behavior from MacOS 10.7.
* Fix clicking on test attachment cells.
* Add missing methods to GSLayoutManager.
* Add NSLayoutConstraint parsing.
* Add APPKIT_EXPORT_CLASS to support compilation with MSVC.
* Remove libgnustep-gui_INTERFACE_VERSION.
* Fix to build GSSpell in custom build dir.
* Add all new header files to DocMakefile.
* Fix memory leaks in NSView, NSTextView and NSBox.
* Add placeholder string handling in NSTextField.m.
* Apply userSpaceScaleFactor to title bar height when calculating
offsets.
* Add new constants from MacOS 10.14 to NSBezierPath.
* Add README.md file.
* Add helper methods in GSWindowDecorator protocol for pointer hit
test on window decorations.
* Improve support for 16 bit colour values in images.
* NSTextStorage update signatures to match MacOS.
* Add a preference to disable spellchecker.
* Fix crash in JPEG reading.
* Improve NSPopover and NSAccessibilityCustomAction.
* Support ImageMagick version >= 7.
* Add github workflow.
* Add icon for speech synthesizer.
1.4 Noteworthy changes in version '0.29.0'
==========================================
This version adds support for storyboard files and many new classes.
@ -37,7 +128,7 @@ Plus the usual bunch of bug fixes.
returned by a slow window manager.
* Fix NSTableView/NSTableColumn bindings.
1.2 Noteworthy changes in version '0.28.0'
1.5 Noteworthy changes in version '0.28.0'
==========================================
This version adds support for modern XIB files and many new classes.
@ -75,7 +166,7 @@ Plus the usual bunch of bug fixes.
* Lowered NSFloatingWindowLevel by one to distinguish floating panels
from menus.
1.3 Noteworthy changes in version '0.27.0'
1.6 Noteworthy changes in version '0.27.0'
==========================================
This version includes numerous bugfixes, compatibility improvements and
@ -98,7 +189,7 @@ be done on integrating NSViews with a Core Animation renderer.
* Japanese translations.
* Lots of bug fixes.
1.4 Noteworthy changes in version '0.26.2'
1.7 Noteworthy changes in version '0.26.2'
==========================================
This version is a small, but important bugfix release.
@ -106,7 +197,7 @@ This version is a small, but important bugfix release.
* printing: Fix allocation of the CUPS printing classes.
* installation: Fix the configure script.
1.5 Noteworthy changes in version '0.26.1'
1.8 Noteworthy changes in version '0.26.1'
==========================================
This version is released to conincide with version 1.25.1 of
@ -133,7 +224,7 @@ for more information.
* graphics context: Workaround for Clang+libobjc2+nonfragile ABI
issue.
1.6 Noteworthy changes in version '0.26.0'
1.9 Noteworthy changes in version '0.26.0'
==========================================
This version was bumped due to previous binary incompatibilities between
@ -164,8 +255,8 @@ system.
and methods to improve source-level compatibility.
* other bugfixes
1.7 Noteworthy changes in version '0.25.1'
==========================================
1.10 Noteworthy changes in version '0.25.1'
===========================================
* JPEG (saving) alpha channel fixes and size with resolution != 72
* JPEG resolution read support
@ -175,8 +266,8 @@ system.
* Corrected layout of empty strings
* Only update visible menus
1.8 Noteworthy changes in version '0.25.0'
==========================================
1.11 Noteworthy changes in version '0.25.0'
===========================================
* Fixes for new GIF library versions
* Theming of named images for specific applications by the use of the
@ -190,14 +281,14 @@ system.
* Numerous theme tweaks
* Spanish locale
1.9 Noteworthy changes in version '0.24.1'
==========================================
1.12 Noteworthy changes in version '0.24.1'
===========================================
From a look through ChangeLog, we can see a lot of bugfixes for this
release, with the main focus on avoiding display glitches and improving
OSX compatibility.
1.10 Noteworthy changes in version '0.24.0'
1.13 Noteworthy changes in version '0.24.0'
===========================================
New features include:
@ -209,13 +300,13 @@ New features include:
Many bugfixes.
1.11 Noteworthy changes in version '0.23.1'
1.14 Noteworthy changes in version '0.23.1'
===========================================
This is a bugfix release, primarily to deal with coding/archiving
issues.
1.12 Noteworthy changes in version '0.22.0'
1.15 Noteworthy changes in version '0.22.0'
===========================================
New features include:
@ -231,19 +322,19 @@ New features include:
selection of image reps, better support for icons). Many bugfixes,
including in Xib loading, printing, and NSView geometry.
1.13 Noteworthy changes in version '0.20.0'
1.16 Noteworthy changes in version '0.20.0'
===========================================
A new stable release. Many improvments with Nib loading, documents and
document controllers. Fixed many drawing issues, particularly ones
related to flipping. Much improved theming.
1.14 Noteworthy changes in version '0.19.0'
1.17 Noteworthy changes in version '0.19.0'
===========================================
This is an (unstable) copy of the 0.18.0 release
1.15 Noteworthy changes in version '0.18.0'
1.18 Noteworthy changes in version '0.18.0'
===========================================
A new stable release that has had many improvements. Many new Mac OS X
@ -252,20 +343,20 @@ were made (particularly with the use of the Windows theme). There is
also better compatibility with Mac OS X in terms of usage of NSInteger
and other definitions.
1.16 Noteworthy changes in version '0.17.1'
1.19 Noteworthy changes in version '0.17.1'
===========================================
* New Mac OS X 10.5 methods in NSFont
* Add live resize in NSSplitView
1.17 Noteworthy changes in version '0.17.0'
1.20 Noteworthy changes in version '0.17.0'
===========================================
* New Mac OS X 10.5 methods in many classes
* Toolbars have been completely rewritten and improved.
* Several improvements for Garbage Collection
1.18 Noteworthy changes in version '0.16.0'
1.21 Noteworthy changes in version '0.16.0'
===========================================
* Nib loading refractored and improved.
@ -273,7 +364,7 @@ and other definitions.
* NSWindowController made a subclass of NSResponder
* NSTokenField and netokenFiledCell classes added.
1.19 Noteworthy changes in version '0.14.0'
1.22 Noteworthy changes in version '0.14.0'
===========================================
* New class NSGlyphGenerator for glyph generation
@ -281,7 +372,7 @@ and other definitions.
* NSOpenGLView added some Mac OS X 10.3 methods
* Manu bug fixes.
1.20 Noteworthy changes in version '0.13.2'
1.23 Noteworthy changes in version '0.13.2'
===========================================
* Printing works a little better now.
@ -292,7 +383,7 @@ and other definitions.
* New class NSSegmentedCell.
* NSDrawer was implemented.
1.21 Noteworthy changes in version '0.13.1'
1.24 Noteworthy changes in version '0.13.1'
===========================================
* NSMenu - Added more MacOS X methods and an ivar.
@ -302,7 +393,7 @@ and other definitions.
* Added some MacOS X 10.4 methods to NSTableView.
* Changed the NSCursor hot point to 0,0 for MacOS X compatibility.
1.22 Noteworthy changes in version '0.13.0'
1.25 Noteworthy changes in version '0.13.0'
===========================================
This is an unstable release. There may be backward compatibility issues
@ -329,7 +420,7 @@ with previous releases of the gui library.
* Implementation of special connectors for Key-Value binding.
* Base library version 1.15.1 is required for this release
1.23 Noteworthy changes in version '0.12.0'
1.26 Noteworthy changes in version '0.12.0'
===========================================
It has been a long time since the last release and many things have been
@ -349,7 +440,7 @@ added and changed, including new classes, new ivars, and new methods.
* NSSpellServer and NSAffineTransform was moved to GNUstep base for
Mac OS X compatibility.
1.24 Noteworthy changes in version '0.11.0'
1.27 Noteworthy changes in version '0.11.0'
===========================================
* Added support for keyed encoding in all gui classes.
@ -358,25 +449,25 @@ added and changed, including new classes, new ivars, and new methods.
* Implemented glue code in GSNibCompatibility for classes such as
NSIBObjectData, NSClassSwapper, etc. to facilitate nib loading.
1.25 Noteworthy changes in version '0.10.3'
1.28 Noteworthy changes in version '0.10.3'
===========================================
* Horizontal menus now work
* Better support for tracking active applications.
1.26 Noteworthy changes in version '0.10.2'
1.29 Noteworthy changes in version '0.10.2'
===========================================
Mostly bug fixes.
1.27 Noteworthy changes in version '0.10.1'
1.30 Noteworthy changes in version '0.10.1'
===========================================
GNUstep now uses v19 of portaudio for the sound daemon. Version v19
hasn't been officially released, but it is still used in several
distributions (SuSE, etc) as v18 is very old.
1.28 Noteworthy changes in version '0.10.0'
1.31 Noteworthy changes in version '0.10.0'
===========================================
This release is binary incompatible with previous releases. The
@ -387,7 +478,7 @@ new version.
* Model loading supports window auto-positioning
* Keyed encoding is supported in many classes.
1.29 Noteworthy changes in version '0.9.5'
1.32 Noteworthy changes in version '0.9.5'
==========================================
* Beginnings of CUPS interface were added.
@ -396,7 +487,7 @@ new version.
* NSApplication -runModalSession behavior changed.
* You can find the GUI library's version using the Info.plist
1.30 Noteworthy changes in version '0.9.4'
1.33 Noteworthy changes in version '0.9.4'
==========================================
* The printing classes have been completely reorganized to
@ -407,7 +498,7 @@ new version.
* NSScroller, NSScrollView has a new ivar.
* Some improvement of NSDataLink classes.
1.31 Noteworthy changes in version '0.9.3'
1.34 Noteworthy changes in version '0.9.3'
==========================================
* Spell checker reimplemented using libaspell
@ -416,7 +507,7 @@ new version.
* Binary incompatibilites from ivar additions in NSView and
subclasses.
1.32 Noteworthy changes in version '0.9.2'
1.35 Noteworthy changes in version '0.9.2'
==========================================
* Working NSToolbar implementation
@ -428,21 +519,21 @@ new version.
* NSStringDrawing redesigned.
* Much improved loading of gorm files
1.33 Noteworthy changes in version '0.9.1'
1.36 Noteworthy changes in version '0.9.1'
==========================================
* NSWindow - DnD works on whole window and events are propogated up
to first DnD aware view.
* Absolute paths and DnD works in OpenPanels.
1.34 Noteworthy changes in version '0.9.0'
1.37 Noteworthy changes in version '0.9.0'
==========================================
Improvements in various classes, include NSPopUpButton,
NSBitmapImageRep, NSMenu, NSToolbar. Added support for thumbnail images
in NSWorkspace.
1.35 Noteworthy changes in version '0.8.9'
1.38 Noteworthy changes in version '0.8.9'
==========================================
Note that many headers have moved to new locations (both in the package
@ -451,13 +542,13 @@ applications may not compile because they cannot find the right header.
* New Language Setup documentation.
1.36 Noteworthy changes in version '0.8.8'
1.39 Noteworthy changes in version '0.8.8'
==========================================
* Updated LanguageSetup documentation
* Improved RTF reader (unicode support, etc).
1.37 Noteworthy changes in version '0.8.7'
1.40 Noteworthy changes in version '0.8.7'
==========================================
* NSBezierPath glyph methods implemented (depends on backend).
@ -465,7 +556,7 @@ applications may not compile because they cannot find the right header.
* Added default to load user-defined bundles (GSAppKitUserBundles
default).
1.38 Noteworthy changes in version '0.8.6'
1.41 Noteworthy changes in version '0.8.6'
==========================================
Updated to install in new locations based on changes in gnustep-make
@ -475,12 +566,12 @@ Updated to install in new locations based on changes in gnustep-make
* Speed improvements, especially in tracking mouses movements.
* Lots of menu improvements.
1.39 Noteworthy changes in version '0.8.5'
1.42 Noteworthy changes in version '0.8.5'
==========================================
Bug fixes. NSStringDrawing now uses text system implementation.
1.40 Noteworthy changes in version '0.8.4'
1.43 Noteworthy changes in version '0.8.4'
==========================================
This release features a brand new text and layout system thanks to
@ -491,7 +582,7 @@ Alexander Malmberg. Other improvements include:
* Printing fixes.
* NSToolbar partially implemented.
1.41 Noteworthy changes in version '0.8.3'
1.44 Noteworthy changes in version '0.8.3'
==========================================
* Additions for Gorm support.
@ -502,7 +593,7 @@ Alexander Malmberg. Other improvements include:
* Window focus fixes
* Key view handling rewritten.
1.42 Noteworthy changes in version '0.8.2'
1.45 Noteworthy changes in version '0.8.2'
==========================================
* Handle fonts that aren't found better.
@ -513,7 +604,7 @@ Alexander Malmberg. Other improvements include:
* NSBrowser: implement non-separate columns
* Fix firstResponder status in text fields.
1.43 Noteworthy changes in version '0.8.1'
1.46 Noteworthy changes in version '0.8.1'
==========================================
* Handle scaled curves correctly.
@ -522,23 +613,23 @@ Alexander Malmberg. Other improvements include:
* NSSound implemented. gssnd sound server.
* Spell checker starts correctly now.
1.44 Noteworthy changes in version '0.8.0'
1.47 Noteworthy changes in version '0.8.0'
==========================================
1.45 Noteworthy changes in version '0.7.9'
1.48 Noteworthy changes in version '0.7.9'
==========================================
* NSTableView, NSOutlineView improvements.
* Menus no longer work in modal loop.
* Skeleton implementation of NSToolBar
1.46 Noteworthy changes in version '0.7.8'
1.49 Noteworthy changes in version '0.7.8'
==========================================
* Wheel color picker, standard color picker (bundles) added.
* System colors now use named colors. Easier configuration
1.47 Noteworthy changes in version '0.7.7'
1.50 Noteworthy changes in version '0.7.7'
==========================================
The graphics/window interface was completely revamped. Window functions
@ -560,7 +651,7 @@ computers, although it is in a very alpha state.
* Better autolayout with GSTable and subclasses.
* NSOutlineView much improved.
1.48 Noteworthy changes in version '0.7.6'
1.51 Noteworthy changes in version '0.7.6'
==========================================
* NSOutlineView implemented.
@ -569,7 +660,7 @@ computers, although it is in a very alpha state.
* Fully-functional keybindings, including multi-stroke keybindings.
* Memory panel available from Info Panel.
1.49 Noteworthy changes in version '0.7.5'
1.52 Noteworthy changes in version '0.7.5'
==========================================
* Drag and drop and image sliding much improved.
@ -587,7 +678,7 @@ computers, although it is in a very alpha state.
* Near rewrite of Menu handling code.
* Gmodel code compiled as a separate bundle.
1.50 Noteworthy changes in version '0.7.0'
1.53 Noteworthy changes in version '0.7.0'
==========================================
* Much improvement in NSBrowser, NSMatrix, NSPopUpButton, combo
@ -598,7 +689,7 @@ computers, although it is in a very alpha state.
* simpler, faster compilation and installation.
* NSColorWell works.
1.51 Noteworthy changes in version '0.6.7'
1.54 Noteworthy changes in version '0.6.7'
==========================================
* App Icons can support documents dropped using DnD.
@ -614,7 +705,7 @@ computers, although it is in a very alpha state.
* Implemented object value and formatter support in NSCell
* Support middle mouse button.
1.52 Noteworthy changes in version '0.6.6'
1.55 Noteworthy changes in version '0.6.6'
==========================================
* Window hints for motif and generic window managers.
@ -640,7 +731,7 @@ however, that the xdps backend is still considered experimental and you
may have to deal with many problems in order to get it working. We
recommend sticking with the xgps backend (the default) for now.
1.53 Noteworthy changes in version '0.6.5'
1.56 Noteworthy changes in version '0.6.5'
==========================================
Many of the basic GUI classes have been vastly improved or rewritten,
@ -664,7 +755,7 @@ thanks to Nicola Pero <n.pero@mi.flashnet.it> and many others.
been written, thanks to Richard Frith-Macdonald
<richard@brainstorm.co.uk>
1.54 Noteworthy changes in version '0.6.0'
1.57 Noteworthy changes in version '0.6.0'
==========================================
A Huge amount of progress, although a lot still needs to be done. It's
@ -685,7 +776,7 @@ NeXT/OpenStep apps and libraries have been ported with little changes.
* Rewrite of NSSavePanel and NSOpenPanel
* Several fixes that at least double the speed of the gui.
1.55 Noteworthy changes in version '0.5.5'
1.58 Noteworthy changes in version '0.5.5'
==========================================
Too extensive to list.
@ -693,7 +784,7 @@ Too extensive to list.
* A lot of rewritting has been done to the classes, with general
cleanup of coordinate conversion code, etc.
1.56 Noteworthy changes in version '0.5.0'
1.59 Noteworthy changes in version '0.5.0'
==========================================
* NSBrowser and NSBrowserCell have been implemented. There is one
@ -742,7 +833,7 @@ Too extensive to list.
* Several cleanups and as usual, many bug fixes.
1.57 Noteworthy changes in version '0.3.0'
1.60 Noteworthy changes in version '0.3.0'
==========================================
* Completely reworked the menu class. The NSMenu class is now
@ -773,7 +864,7 @@ Too extensive to list.
retain/release policy has been fixed, the cell classes correctly
implement the NSCopying protocol and many others.
1.58 Noteworthy changes in version '0.2.0'
1.61 Noteworthy changes in version '0.2.0'
==========================================
* Additional NSImage and NSImageRep class work. Incorporated common
@ -807,7 +898,7 @@ Too extensive to list.
* Many bug fixes and minor enhancements.
1.59 Noteworthy changes in version '0.1.1'
1.62 Noteworthy changes in version '0.1.1'
==========================================
* Almost complete implementation of the PXKMenu and PXKMenuCell
@ -830,7 +921,7 @@ Too extensive to list.
* Now requires the TIFF library for reading, writing, and
manipulating tiff files and images.
1.60 Noteworthy changes in version '0.1.0'
1.63 Noteworthy changes in version '0.1.0'
==========================================
* Integration of the GNUstep X/DPS GUI Backend. This has finally

View file

@ -123,7 +123,6 @@ GSCurrentServer(void)
{
if (serverLock == nil)
{
[gnustep_global_lock lock];
if (serverLock == nil)
{
serverLock = [NSRecursiveLock new];
@ -132,7 +131,6 @@ GSCurrentServer(void)
windowmaps = NSCreateMapTable(NSNonOwnedPointerMapKeyCallBacks,
NSNonOwnedPointerMapValueCallBacks, 20);
}
[gnustep_global_lock unlock];
}
}

View file

@ -2,9 +2,11 @@
<abstract>ImageMagick image representation.</abstract>
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2024 Free Software Foundation, Inc.
Author: Eric Wasylishen <ewasylishen@gmail.com>
Riccardo Mottola
Date: June 2011
This file is part of the GNUstep Application Kit Library.
@ -123,13 +125,17 @@
return bmp;
}
#define SIGNATURE_LENGTH 18
+ (NSArray*) imageRepsWithData: (NSData *)data allImages: (BOOL)allImages
{
NSMutableArray *reps = [NSMutableArray array];
ExceptionInfo *exception = AcquireExceptionInfo();
ImageInfo *imageinfo = CloneImageInfo(NULL);
Image *images, *image;
Image *images;
Image *image;
char signature[SIGNATURE_LENGTH];
// Set the background color to transparent
// (otherwise SVG's are rendered against a white background by default)
@ -139,6 +145,14 @@
QueryColorDatabase("none", &imageinfo->background_color, exception);
#endif
memset(signature, 0, SIGNATURE_LENGTH);
[data getBytes: signature range: NSMakeRange([data length] - 18, 18)];
if (strncmp(signature, "TRUEVISION-XFILE.", 17) == 0)
{
NSWarnLog(@"Targa file detected!, giving a magick hint...");
strcpy(imageinfo->magick, "TGA");
}
images = BlobToImage(imageinfo, [data bytes], [data length], exception);
if (exception->severity != UndefinedException)

View file

@ -35,7 +35,7 @@
#import <Foundation/NSRunLoop.h>
#import <Foundation/NSThread.h>
#import <Foundation/NSValue.h>
#import <GNUstepBase/GSLock.h>
#import <Foundation/NSLock.h>
#import "AppKit/NSAnimation.h"
#import "AppKit/NSApplication.h"
@ -418,7 +418,7 @@ nsanimation_progressMarkSorter(NSAnimationProgress first, NSAnimationProgress se
(BOOL (*)(id,SEL,NSAnimation*)) NULL;
_isThreaded = NO;
_isAnimatingLock = [GSLazyRecursiveLock new];
_isAnimatingLock = [NSRecursiveLock new];
}
return self;
}
@ -430,7 +430,7 @@ nsanimation_progressMarkSorter(NSAnimationProgress first, NSAnimationProgress se
c->_progressMarks = GSIArrayCopyWithZone(_progressMarks, zone);
c->_animator = nil;
c->_isANewAnimatorNeeded = YES;
c->_isAnimatingLock = [GSLazyRecursiveLock new];
c->_isAnimatingLock = [NSRecursiveLock new];
return c;
}

View file

@ -2,7 +2,7 @@
<abstract>Bitmap image representation.</abstract>
Copyright (C) 1996-2017 Free Software Foundation, Inc.
Copyright (C) 1996-2024 Free Software Foundation, Inc.
Author: Adam Fedor <fedor@gnu.org>
Date: Feb 1996
@ -1552,6 +1552,7 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
[self _fillTIFFInfo: &info
usingCompression: compression
factor: factor];
if (NSTiffWrite(image, &info, [self bitmapData]) != 0)
{
[NSException raise: NSTIFFException format: @"Writing data"];
@ -2076,6 +2077,9 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
info->height = _pixelsHigh;
info->bitsPerSample = _bitsPerSample;
info->samplesPerPixel = _numColors;
info->isBigEndian = NO;
info->is16Bit = NO;
info->is32Bit = NO;
// resolution/density
info->xdpi = 0;
@ -2125,6 +2129,27 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
factor = 1;
info->quality = factor * 100;
info->error = 0;
if ((_format & NSBitmapFormatSixteenBitBigEndian) != 0)
{
info->isBigEndian = YES;
info->is16Bit = YES;
}
else if ((_format & NSBitmapFormatSixteenBitLittleEndian) != 0)
{
info->isBigEndian = NO;
info->is16Bit = YES;
}
else if ((_format & NSBitmapFormatThirtyTwoBitBigEndian) != 0)
{
info->isBigEndian = YES;
info->is32Bit = YES;
}
else if ((_format & NSBitmapFormatThirtyTwoBitLittleEndian) != 0)
{
info->isBigEndian = NO;
info->is32Bit = YES;
}
}
- (void) _premultiply

View file

@ -138,7 +138,6 @@ NSGraphicsContext *GSCurrentContext(void)
{
if (contextLock == nil)
{
[gnustep_global_lock lock];
if (contextLock == nil)
{
contextLock = [NSRecursiveLock new];
@ -147,7 +146,6 @@ NSGraphicsContext *GSCurrentContext(void)
classMethodTable =
[[NSMutableDictionary allocWithZone: _globalGSZone] init];
}
[gnustep_global_lock unlock];
}
}

View file

@ -40,7 +40,7 @@
#import <Foundation/NSMapTable.h>
#import <Foundation/NSValue.h>
#import <Foundation/NSValueTransformer.h>
#import <GNUstepBase/GSLock.h>
#import <Foundation/NSLock.h>
#import "AppKit/NSKeyValueBinding.h"
#import "GSBindingHelpers.h"
@ -145,7 +145,7 @@ void GSBindingInvokeAction(NSString *targetKey, NSString *argumentKey,
{
if (self == [GSKeyValueBinding class])
{
bindingLock = [GSLazyRecursiveLock new];
bindingLock = [NSRecursiveLock new];
classTable = NSCreateMapTable(NSNonOwnedPointerMapKeyCallBacks,
NSObjectMapValueCallBacks, 128);
objectTable = NSCreateMapTable(NSNonRetainedObjectMapKeyCallBacks,

View file

@ -650,7 +650,6 @@ static Class imageClass;
NSString *action;
NSString *key;
BOOL isSeparator = NO;
NSNumber *keyMask;
if ([aDecoder containsValueForKey: @"NSIsSeparator"])
{
@ -703,13 +702,13 @@ static Class imageClass;
[self setSubmenu: submenu];
}
// Set the key mask when it is present; or default to NSCommandKeyMask
// when not specified
keyMask = (NSNumber*)[aDecoder decodeObjectForKey: @"NSKeyEquivModMask"];
if (keyMask != nil)
{
[self setKeyEquivalentModifierMask: [keyMask intValue]];
/* Set the key mask when it is present; or default to NSCommandKeyMask
* when not specified
*/
if ([aDecoder containsValueForKey: @"NSKeyEquivModMask"])
{
[self setKeyEquivalentModifierMask:
[aDecoder decodeIntegerForKey: @"NSKeyEquivModMask"]];
}
else
{

View file

@ -214,19 +214,6 @@ static NSParagraphStyle *defaultStyle = nil;
if (defaultStyle == nil)
{
NSParagraphStyle *style = [[self alloc] init];
/*
int i;
for (i = 0; i < 12; i++)
{
NSTextTab *tab;
tab = [[NSTextTab alloc] initWithType: NSLeftTabStopType
location: (i + 1) * 28.0];
[style->_tabStops addObject: tab];
RELEASE(tab);
}
*/
defaultStyle = style;
}
return defaultStyle;
@ -292,6 +279,8 @@ static NSParagraphStyle *defaultStyle = nil;
{
if ((self = [super init]))
{
int i;
_alignment = NSNaturalTextAlignment;
//_firstLineHeadIndent = 0.0;
//_headIndent = 0.0;
@ -304,6 +293,16 @@ static NSParagraphStyle *defaultStyle = nil;
_baseDirection = NSWritingDirectionNaturalDirection;
_tabStops = [[NSMutableArray allocWithZone: [self zone]]
initWithCapacity: 12];
for (i = 0; i < 12; i++)
{
NSTextTab *tab;
tab = [[NSTextTab alloc] initWithType: NSLeftTabStopType
location: (i + 1) * 28.0];
[_tabStops addObject: tab];
RELEASE(tab);
}
}
return self;
}

View file

@ -131,6 +131,7 @@ static NSImage *multipleFiles = nil;
static NSImage *unknownApplication = nil;
static NSImage *unknownTool = nil;
static NSLock *classLock = nil;
static NSLock *mlock = nil;
static NSString *GSWorkspaceNotification = @"GSWorkspaceNotification";
@ -598,26 +599,22 @@ static NSDictionary *urlPreferences = nil;
{
if (self == [NSWorkspace class])
{
static BOOL beenHere = NO;
NSFileManager *mgr = [NSFileManager defaultManager];
NSString *service;
NSData *data;
NSDictionary *dict;
[self setVersion: 1];
[gnustep_global_lock lock];
if (beenHere == YES)
if (classLock)
{
[gnustep_global_lock unlock];
return;
}
beenHere = YES;
classLock = [NSLock new];
mlock = [NSLock new];
NS_DURING
{
NSFileManager *mgr = [NSFileManager defaultManager];
NSString *service;
NSData *data;
NSDictionary *dict;
service = [[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
NSUserDomainMask, YES) objectAtIndex: 0]
stringByAppendingPathComponent: @"Services"];
@ -675,12 +672,9 @@ static NSDictionary *urlPreferences = nil;
}
NS_HANDLER
{
[gnustep_global_lock unlock];
[localException raise];
}
NS_ENDHANDLER
[gnustep_global_lock unlock];
}
}
@ -698,14 +692,14 @@ static NSDictionary *urlPreferences = nil;
{
if (sharedWorkspace == nil)
{
[gnustep_global_lock lock];
[classLock lock];
if (sharedWorkspace == nil)
{
sharedWorkspace =
(NSWorkspace*)NSAllocateObject(self, 0, NSDefaultMallocZone());
[sharedWorkspace init];
}
[gnustep_global_lock unlock];
[classLock unlock];
}
return sharedWorkspace;
}

View file

@ -3,9 +3,9 @@
Functions for dealing with tiff images
Copyright (C) 1996 Free Software Foundation, Inc.
Copyright (C) 1996-2024 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@colorado.edu>
Written by: Adam Fedor <fedor@gnu.org>
Date: Feb 1996
This file is part of the GNUstep GUI Library.
@ -33,37 +33,42 @@
classes for general reading/writing of tiff files.
*/
#ifndef _GNUstep_H_tiff
#define _GNUstep_H_tiff
#ifndef _NSIMAGE_TIFF_H
#define _NSIMAGE_TIFF_H
#include <tiffio.h>
#include <inttypes.h>
/* Structure to store common information about a tiff. */
typedef struct {
uint16_t numImages; /* number of images in tiff */
uint16_t imageNumber; /* number of current image */
uint32_t subfileType;
uint32_t width;
uint32_t height;
uint16_t bitsPerSample; /* number of bits per data channel */
uint16_t samplesPerPixel; /* number of channels per pixel */
uint16_t planarConfig; /* meshed or separate */
uint16_t photoInterp; /* photometric interpretation of bitmap data, */
uint16_t compression;
uint16_t extraSamples; /* Alpha */
int assocAlpha;
int quality; /* compression quality (for jpeg) 1 to 255 */
int error;
float xdpi;
float ydpi;
typedef struct
{
uint16_t numImages; /* number of images in tiff */
uint16_t imageNumber; /* number of current image */
uint32_t subfileType;
uint32_t width;
uint32_t height;
uint16_t bitsPerSample; /* number of bits per data channel */
uint16_t samplesPerPixel; /* number of channels per pixel */
uint16_t planarConfig; /* meshed or separate */
uint16_t photoInterp; /* photometric interpretation of bitmap data, */
uint16_t compression;
uint16_t extraSamples; /* Alpha */
int assocAlpha;
int quality; /* compression quality (for jpeg) 1 to 255 */
int error;
float xdpi;
float ydpi;
char isBigEndian; /* meaningful only for 16 & 32 bit depths */
char is16Bit;
char is32Bit;
} NSTiffInfo;
typedef struct {
uint32_t size;
uint16_t *red;
uint16_t *green;
uint16_t *blue;
typedef struct
{
uint32_t size;
uint16_t *red;
uint16_t *green;
uint16_t *blue;
} NSTiffColormap;
typedef char* realloc_data_callback(char* data, long size);
@ -81,5 +86,5 @@ extern NSTiffColormap* NSTiffGetColormap(TIFF* image);
extern int NSTiffIsCodecConfigured(unsigned int codec);
#endif // _GNUstep_H_tiff
#endif // _NSIMAGE_TIFF_H

View file

@ -3,9 +3,9 @@
Functions for dealing with tiff images.
Copyright (C) 1996,1999-2010, 2017 Free Software Foundation, Inc.
Copyright (C) 1996-2024 Free Software Foundation, Inc.
Author: Adam Fedor <fedor@colorado.edu>
Author: Adam Fedor <fedor@gnu.org>
Date: Feb 1996
Support for writing tiffs: Richard Frith-Macdonald
@ -64,7 +64,9 @@
#import <Foundation/NSString.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSByteOrder.h>
#import "GSGuiPrivate.h"
#import <AppKit/NSBitmapImageRep.h>
#include <math.h>
#include <stdlib.h>
@ -78,13 +80,14 @@
typedef tsize_t tmsize_t;
#endif
typedef struct {
char* data;
typedef struct
{
char *data;
long size;
long position;
char mode;
char **outdata;
long *outposition;
char **outdata;
long *outposition;
} chandle_t;
static int tiff_error_handler_set = 0;
@ -464,21 +467,54 @@ NSTiffRead(TIFF *image, NSTiffInfo *info, unsigned char *data)
return error;
}
#define WRITE_SCANLINE(sample) \
if (TIFFWriteScanline(image, buf, row, sample) != 1) { \
error = 1; \
break; \
}
#define SWAP_LINE_ENDIANNESS \
if (info->is16Bit) \
{ \
uint16_t *inBuf = (uint16_t*)buf; \
uint16_t *outBuf = (uint16_t*)bufSwap; \
unsigned swapSample; \
for (swapSample = 0; swapSample < scan_line_size / 2; swapSample++) \
{ \
outBuf[swapSample] = GSSwapI16(inBuf[swapSample]); \
} \
} \
else if (info->is32Bit) \
{ \
uint32_t *inBuf = (uint32_t*)buf; \
uint32_t *outBuf = (uint32_t*)bufSwap; \
unsigned swapSample; \
for (swapSample = 0; swapSample < scan_line_size / 4; swapSample++) \
{ \
outBuf[swapSample] = GSSwapI32(inBuf[swapSample]); \
} \
}
#define WRITE_SCANLINE(sample) \
if (swapByteOrder) \
{ \
SWAP_LINE_ENDIANNESS; \
} \
else \
{ \
bufSwap = buf; \
} \
if (TIFFWriteScanline(image, bufSwap, row, sample) != 1) { \
error = 1; \
break; \
}
int
NSTiffWrite(TIFF *image, NSTiffInfo *info, unsigned char *data)
{
void* buf = (void*)data;
uint16_t sample_info[1];
void *buf = (void*)data;
void *bufSwap = nil;
uint16_t sample_info[1];
int i;
unsigned int row;
int error = 0;
tmsize_t scan_line_size;
BOOL swapByteOrder = NO;
if (info->numImages > 1)
{
@ -512,6 +548,18 @@ NSTiffWrite(TIFF *image, NSTiffInfo *info, unsigned char *data)
TIFFSetField(image, TIFFTAG_EXTRASAMPLES, info->extraSamples, sample_info);
scan_line_size = TIFFScanlineSize(image);
// check if image endianness is different from Host
if ((info->isBigEndian != 0) != (NSHostByteOrder() == NS_BigEndian) &&
(info->is16Bit || info->is32Bit))
{
swapByteOrder = YES;
}
if (swapByteOrder)
{
bufSwap = malloc(scan_line_size); // sizeof(unsigned char)
}
switch (info->photoInterp)
{
case PHOTOMETRIC_MINISBLACK:
@ -569,6 +617,10 @@ NSTiffWrite(TIFF *image, NSTiffInfo *info, unsigned char *data)
// Write out the directory as there may be more images comming
TIFFWriteDirectory(image);
TIFFFlush(image);
if (swapByteOrder)
{
free(bufSwap);
}
return error;
}
@ -684,5 +736,3 @@ int NSTiffIsCodecConfigured(unsigned int codec)
}
#endif
}

View file

@ -10,49 +10,60 @@
int main()
{
START_SET("GSXib5KeyedUnarchiver NSButtonCell tests")
START_SET("GSXib5KeyedUnarchiver NSButtonCell tests")
NS_DURING
{
[NSApplication sharedApplication];
}
{
[NSApplication sharedApplication];
}
NS_HANDLER
{
if ([[localException name] isEqualToString: NSInternalInconsistencyException ])
SKIP("It looks like GNUstep backend is not yet installed")
}
{
if ([[localException name]
isEqualToString: NSInternalInconsistencyException ])
{
SKIP("It looks like GNUstep backend is not yet installed")
}
}
NS_ENDHANDLER
NSData* data = [NSData dataWithContentsOfFile:@"ButtonCell.xib"];
GSXibKeyedUnarchiver* unarchiver = [GSXibKeyedUnarchiver unarchiverForReadingWithData:data];
NSData *data;
GSXibKeyedUnarchiver *unarchiver;
NSArray *rootObjects;
NSEnumerator *enumerator;
NSMatrix *matrix;
id element;
NSArray *rootObjects;
data = [NSData dataWithContentsOfFile: @"ButtonCell.xib"];
unarchiver = [GSXibKeyedUnarchiver unarchiverForReadingWithData:data];
rootObjects = [unarchiver decodeObjectForKey: @"IBDocument.RootObjects"];
NSMatrix* matrix;
for (id element in rootObjects) {
if ([element isKindOfClass:[NSMatrix class]]) {
enumerator = [rootObjects objectEnumerator];
while ((element = [enumerator nextObject]) != nil)
{
if ([element isKindOfClass: [NSMatrix class]])
{
matrix = (NSMatrix*)element;
break;
}
}
}
}
PASS(matrix != nil, "Top-level NSMatrix was found");
PASS(matrix != nil, "Top-level NSMatrix was found")
NSArray* cells = [matrix cells];
NSArray *cells = [matrix cells];
// <modifierMask key="keyEquivalentModifierMask" shift="YES"/> node
PASS_MODIFIER(0, NSShiftKeyMask);
PASS_MODIFIER(0, NSShiftKeyMask)
// <modifierMask key="keyEquivalentModifierMask" command="YES"/> node
PASS_MODIFIER(1, NSCommandKeyMask);
PASS_MODIFIER(1, NSCommandKeyMask)
// <modifierMask key="keyEquivalentModifierMask" />
PASS_MODIFIER(2, 0);
PASS_MODIFIER(2, 0)
// Unlike NSMenuItem, the default for NSButtonCell is 0
PASS_MODIFIER(3, 0);
PASS_MODIFIER(3, 0)
END_SET("GSXib5KeyedUnarchiver NSButtonCell tests")
END_SET("GSXib5KeyedUnarchiver NSButtonCell tests")
return 0;
}

View file

@ -9,56 +9,67 @@
int main()
{
START_SET("GSXib5KeyedUnarchiver NSMenu tests")
START_SET("GSXib5KeyedUnarchiver NSMenu tests")
NS_DURING
{
[NSApplication sharedApplication];
}
{
[NSApplication sharedApplication];
}
NS_HANDLER
{
if ([[localException name] isEqualToString: NSInternalInconsistencyException ])
SKIP("It looks like GNUstep backend is not yet installed")
}
{
if ([[localException name]
isEqualToString: NSInternalInconsistencyException ])
{
SKIP("It looks like GNUstep backend is not yet installed")
}
}
NS_ENDHANDLER
NSData* data = [NSData dataWithContentsOfFile:@"Menu.xib"];
GSXibKeyedUnarchiver* unarchiver = [GSXibKeyedUnarchiver unarchiverForReadingWithData:data];
NSData *data
GSXibKeyedUnarchiver *unarchiver;
NSArray *rootObjects;
NSEnumerator *enumerator;
id element;
NSMenu *menu;
NSArray *rootObjects;
data = [NSData dataWithContentsOfFile:@"Menu.xib"];
unarchiver = [GSXibKeyedUnarchiver unarchiverForReadingWithData:data];
rootObjects = [unarchiver decodeObjectForKey: @"IBDocument.RootObjects"];
enumerator = [rootObjects objectenumerator];
NSMenu* menu;
for (id element in rootObjects) {
if ([element isKindOfClass:[NSMenu class]]) {
while ((element = [enumerator nextObject]) != nil)
{
if ([element isKindOfClass: [NSMenu class]])
{
menu = (NSMenu*)element;
break;
}
}
}
}
PASS(menu != nil, "Top-level NSMenu was found");
PASS(menu != nil, "Top-level NSMenu was found")
// Empty <modifierMask key="keyEquivalentModifierMask"/> node
PASS_MODIFIER(0, 0);
PASS_MODIFIER(0, 0)
// <modifierMask key="keyEquivalentModifierMask" shift="YES"/>
PASS_MODIFIER(1, NSShiftKeyMask);
PASS_MODIFIER(1, NSShiftKeyMask)
// <modifierMask key="keyEquivalentModifierMask" command="YES"/>
PASS_MODIFIER(2, NSCommandKeyMask);
PASS_MODIFIER(2, NSCommandKeyMask)
// <modifierMask key="keyEquivalentModifierMask" option="YES"/>
PASS_MODIFIER(3, NSAlternateKeyMask);
PASS_MODIFIER(3, NSAlternateKeyMask)
// No modifierMask element
PASS_MODIFIER(4, NSCommandKeyMask);
PASS_MODIFIER(4, NSCommandKeyMask)
// No modifierMask element and no keyEquivalent attribute
PASS_MODIFIER(5, NSCommandKeyMask);
PASS_MODIFIER(5, NSCommandKeyMask)
// no modfierMask
PASS_MODIFIER(6, NSCommandKeyMask);
PASS_MODIFIER(6, NSCommandKeyMask)
// empty modifierMask
PASS_MODIFIER(7, 0);
PASS_MODIFIER(7, 0)
// explicit modifier mask
PASS_MODIFIER(8, NSCommandKeyMask);
PASS_MODIFIER(8, NSCommandKeyMask)
END_SET("GSXib5KeyedUnarchiver NSMenu tests")
END_SET("GSXib5KeyedUnarchiver NSMenu tests")
return 0;
}

View file

@ -11,159 +11,159 @@ copyright 2004 Alexander Malmberg <alexander@malmberg.org>
int main(int argc, char **argv)
{
CREATE_AUTORELEASE_POOL(arp);
NSBezierPath *p=[[NSBezierPath alloc] init];
NSRect r;
CREATE_AUTORELEASE_POOL(arp);
NSBezierPath *p=[[NSBezierPath alloc] init];
NSRect r;
pass(NSIsEmptyRect([p bounds]),"empty path gives empty bounds");
pass(NSIsEmptyRect([p bounds]),"empty path gives empty bounds");
[p moveToPoint: NSMakePoint(100,100)];
[p lineToPoint: NSMakePoint(150,150)];
[p moveToPoint: NSMakePoint(100,100)];
[p lineToPoint: NSMakePoint(150,150)];
pass(NSEqualRects([p bounds],NSMakeRect(100,100,50,50)),"bounds accuracy (1)");
pass(NSEqualRects([p controlPointBounds],NSMakeRect(100,100,50,50)),"control-point bounds accuracy (1)");
pass(NSEqualRects([p bounds],NSMakeRect(100,100,50,50)),"bounds accuracy (1)");
pass(NSEqualRects([p controlPointBounds],NSMakeRect(100,100,50,50)),"control-point bounds accuracy (1)");
[p removeAllPoints];
pass(NSIsEmptyRect([p bounds]),"empty path gives empty bounds (2)");
[p removeAllPoints];
pass(NSIsEmptyRect([p bounds]),"empty path gives empty bounds (2)");
[p moveToPoint: NSMakePoint(100,100)];
[p curveToPoint: NSMakePoint(200,100)
controlPoint1: NSMakePoint(125,50)
controlPoint2: NSMakePoint(175,150)];
[p moveToPoint: NSMakePoint(100,100)];
[p curveToPoint: NSMakePoint(200,100)
controlPoint1: NSMakePoint(125,50)
controlPoint2: NSMakePoint(175,150)];
/* Basic checking Y. */
r=[p bounds];
if (fabs(r.origin.x - 100.0000) > 0.001 ||
fabs(r.origin.y - 85.5662) > 0.001 ||
fabs(r.size.width - 100.0000) > 0.001 ||
fabs(r.size.height - 28.8678) > 0.001)
{
pass(0,"bounds accuracy (2)");
printf("expected %s, got %s\n",
[NSStringFromRect(NSMakeRect(100.0000, 85.5662, 100.0000, 28.8678)) lossyCString],
[NSStringFromRect(r) lossyCString]);
}
else
pass(1,"bounds accuracy (2)");
/* Basic checking Y. */
r=[p bounds];
if (fabs(r.origin.x - 100.0000) > 0.001 ||
fabs(r.origin.y - 85.5662) > 0.001 ||
fabs(r.size.width - 100.0000) > 0.001 ||
fabs(r.size.height - 28.8678) > 0.001)
{
pass(0,"bounds accuracy (2)");
printf("expected %s, got %s\n",
[NSStringFromRect(NSMakeRect(100.0000, 85.5662, 100.0000, 28.8678)) lossyCString],
[NSStringFromRect(r) lossyCString]);
}
else
pass(1,"bounds accuracy (2)");
pass(NSEqualRects([p controlPointBounds],NSMakeRect(100,50,100,100)),"control-point bounds accuracy (2)");
pass(NSEqualRects([p controlPointBounds],NSMakeRect(100,50,100,100)),"control-point bounds accuracy (2)");
/* Basic checking X. */
[p removeAllPoints];
[p moveToPoint: NSMakePoint(100,100)];
[p curveToPoint: NSMakePoint(100,200)
controlPoint1: NSMakePoint(50,125)
controlPoint2: NSMakePoint(150,175)];
/* Basic checking X. */
[p removeAllPoints];
[p moveToPoint: NSMakePoint(100,100)];
[p curveToPoint: NSMakePoint(100,200)
controlPoint1: NSMakePoint(50,125)
controlPoint2: NSMakePoint(150,175)];
r=[p bounds];
if (fabs(r.origin.y - 100.0000) > 0.001 ||
fabs(r.origin.x - 85.5662) > 0.001 ||
fabs(r.size.height - 100.0000) > 0.001 ||
fabs(r.size.width - 28.8678) > 0.001)
{
pass(0,"bounds accuracy (3)");
printf("expected %s, got %s\n",
[NSStringFromRect(NSMakeRect(85.5662, 100.0000, 28.8678, 100.0000)) lossyCString],
[NSStringFromRect(r) lossyCString]);
}
else
pass(1,"bounds accuracy (3)");
r=[p bounds];
if (fabs(r.origin.y - 100.0000) > 0.001 ||
fabs(r.origin.x - 85.5662) > 0.001 ||
fabs(r.size.height - 100.0000) > 0.001 ||
fabs(r.size.width - 28.8678) > 0.001)
{
pass(0,"bounds accuracy (3)");
printf("expected %s, got %s\n",
[NSStringFromRect(NSMakeRect(85.5662, 100.0000, 28.8678, 100.0000)) lossyCString],
[NSStringFromRect(r) lossyCString]);
}
else
pass(1,"bounds accuracy (3)");
/* A bit of both, and extreme values beyond the initial points. */
[p removeAllPoints];
[p moveToPoint: NSMakePoint(-100,0)];
[p curveToPoint: NSMakePoint(100,0)
controlPoint1: NSMakePoint(-118.2, 10.393)
controlPoint2: NSMakePoint( 118.2,-10.393)];
/* A bit of both, and extreme values beyond the initial points. */
[p removeAllPoints];
[p moveToPoint: NSMakePoint(-100,0)];
[p curveToPoint: NSMakePoint(100,0)
controlPoint1: NSMakePoint(-118.2, 10.393)
controlPoint2: NSMakePoint( 118.2,-10.393)];
r=[p bounds];
if (fabs(r.origin.x + 101.0) > 0.001 ||
fabs(r.origin.y + 3.0) > 0.001 ||
fabs(r.size.width - 202.0) > 0.001 ||
fabs(r.size.height - 6.0) > 0.001)
{
pass(0,"bounds accuracy (4)");
printf("expected %s, got %s\n",
[NSStringFromRect(NSMakeRect(-101.0, -3.0, 202.0, 6.0)) lossyCString],
[NSStringFromRect(r) lossyCString]);
}
else
pass(1,"bounds accuracy (4)");
r=[p bounds];
if (fabs(r.origin.x + 101.0) > 0.001 ||
fabs(r.origin.y + 3.0) > 0.001 ||
fabs(r.size.width - 202.0) > 0.001 ||
fabs(r.size.height - 6.0) > 0.001)
{
pass(0,"bounds accuracy (4)");
printf("expected %s, got %s\n",
[NSStringFromRect(NSMakeRect(-101.0, -3.0, 202.0, 6.0)) lossyCString],
[NSStringFromRect(r) lossyCString]);
}
else
pass(1,"bounds accuracy (4)");
/* Check the control-point bounding box. */
r=[p controlPointBounds];
if (fabs(r.origin.x + 118.2 ) > 0.001 ||
fabs(r.origin.y + 10.393) > 0.001 ||
fabs(r.size.width - 236.4 ) > 0.001 ||
fabs(r.size.height - 20.786) > 0.001)
{
pass(0,"control-point bounds accuracy (3)");
printf("expected %s, got %s\n",
[NSStringFromRect(NSMakeRect(-118.2, -10.393, 236.4, 20.786)) lossyCString],
[NSStringFromRect(r) lossyCString]);
}
else
pass(1,"control-point bounds accuracy (3)");
/* Check the control-point bounding box. */
r=[p controlPointBounds];
if (fabs(r.origin.x + 118.2 ) > 0.001 ||
fabs(r.origin.y + 10.393) > 0.001 ||
fabs(r.size.width - 236.4 ) > 0.001 ||
fabs(r.size.height - 20.786) > 0.001)
{
pass(0,"control-point bounds accuracy (3)");
printf("expected %s, got %s\n",
[NSStringFromRect(NSMakeRect(-118.2, -10.393, 236.4, 20.786)) lossyCString],
[NSStringFromRect(r) lossyCString]);
}
else
pass(1,"control-point bounds accuracy (3)");
/*
/*
p=(1-t)^3*a + 3*(1-t)^2*t*b + 3*(1-t)*t^2*c + t^3*d
p=(1-t)^3*a + 3*(1-t)^2*t*b + 3*(1-t)*t^2*c + t^3*d
c-2b+a +- sqrt(a(d-c)+b(-d-c)+c^2+b^2)
t= --------------------------------------
-d+3c-3b+a
c-2b+a +- sqrt(a(d-c)+b(-d-c)+c^2+b^2)
t= --------------------------------------
-d+3c-3b+a
*/
*/
if (0)
{
NSPoint a,b,c,d;
double t1,t2;
double t,ti;
NSPoint p;
if (0)
{
NSPoint a,b,c,d;
double t1,t2;
double t,ti;
NSPoint p;
a=NSMakePoint(-100,0);
b=NSMakePoint(-118.2,10.39);
c=NSMakePoint(118.2,-10.39);
d=NSMakePoint(100,0);
a=NSMakePoint(-100,0);
b=NSMakePoint(-118.2,10.39);
c=NSMakePoint(118.2,-10.39);
d=NSMakePoint(100,0);
#define D \
ti=1.0-t; \
p.x=ti*ti*ti*a.x + 3*ti*ti*t*b.x + 3*ti*t*t*c.x + t*t*t*d.x; \
p.y=ti*ti*ti*a.y + 3*ti*ti*t*b.y + 3*ti*t*t*c.y + t*t*t*d.y; \
printf(" t=%15.7f (%15.7f %15.7f)\n",t,p.x,p.y);
ti=1.0-t; \
p.x=ti*ti*ti*a.x + 3*ti*ti*t*b.x + 3*ti*t*t*c.x + t*t*t*d.x; \
p.y=ti*ti*ti*a.y + 3*ti*ti*t*b.y + 3*ti*t*t*c.y + t*t*t*d.y; \
printf(" t=%15.7f (%15.7f %15.7f)\n",t,p.x,p.y);
t=0; D
t=1; D
t=0.5; D
t=0; D
t=1; D
t=0.5; D
t1=(c.x-2*b.x+a.x + sqrt(a.x*(d.x-c.x)+b.x*(-d.x-c.x)+c.x*c.x+b.x*b.x)) / (-d.x+3*c.x-3*b.x+a.x);
t2=(c.x-2*b.x+a.x - sqrt(a.x*(d.x-c.x)+b.x*(-d.x-c.x)+c.x*c.x+b.x*b.x)) / (-d.x+3*c.x-3*b.x+a.x);
printf("x:\n");
t1=(c.x-2*b.x+a.x + sqrt(a.x*(d.x-c.x)+b.x*(-d.x-c.x)+c.x*c.x+b.x*b.x)) / (-d.x+3*c.x-3*b.x+a.x);
t2=(c.x-2*b.x+a.x - sqrt(a.x*(d.x-c.x)+b.x*(-d.x-c.x)+c.x*c.x+b.x*b.x)) / (-d.x+3*c.x-3*b.x+a.x);
printf("x:\n");
t=t1;
D
t=t2;
D
t=t1;
D
t=t2;
D
t1=(c.y-2*b.y+a.y + sqrt(a.y*(d.y-c.y)+b.y*(-d.y-c.y)+c.y*c.y+b.y*b.y)) / (-d.y+3*c.y-3*b.y+a.y);
t2=(c.y-2*b.y+a.y - sqrt(a.y*(d.y-c.y)+b.y*(-d.y-c.y)+c.y*c.y+b.y*b.y)) / (-d.y+3*c.y-3*b.y+a.y);
printf("y:\n");
t=t1;
D
t=t2;
D
}
t1=(c.y-2*b.y+a.y + sqrt(a.y*(d.y-c.y)+b.y*(-d.y-c.y)+c.y*c.y+b.y*b.y)) / (-d.y+3*c.y-3*b.y+a.y);
t2=(c.y-2*b.y+a.y - sqrt(a.y*(d.y-c.y)+b.y*(-d.y-c.y)+c.y*c.y+b.y*b.y)) / (-d.y+3*c.y-3*b.y+a.y);
printf("y:\n");
t=t1;
D
t=t2;
D
}
// printf("bounds=%@\n",NSStringFromRect([p bounds]));
DESTROY(arp);
DESTROY(arp);
return 0;
return 0;
}

View file

@ -8,44 +8,57 @@
int main()
{
START_SET("NSButtonCell encoding tests")
START_SET("NSButtonCell encoding tests")
NS_DURING
{
[NSApplication sharedApplication];
}
{
[NSApplication sharedApplication];
}
NS_HANDLER
{
if ([[localException name] isEqualToString: NSInternalInconsistencyException ])
SKIP("It looks like GNUstep backend is not yet installed")
}
{
if ([[localException name]
isEqualToString: NSInternalInconsistencyException ])
{
SKIP("It looks like GNUstep backend is not yet installed")
}
}
NS_ENDHANDLER
NSString* mask = @"NSButtonFlags2";
NSButtonCell* item = [[NSButtonCell alloc] init];
NSString *mask = @"NSButtonFlags2";
NSButtonCell *item = [[NSButtonCell alloc] init];
item.keyEquivalent = @"A";
item.keyEquivalentModifierMask = NSShiftKeyMask;
NSMutableData *data = [NSMutableData data];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
NSMutableData *data = [NSMutableData data];
NSKeyedArchiver *archiver;
[archiver encodeRootObject:item];
archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data];
[archiver encodeRootObject: item];
[archiver finishEncoding];
NSError* error;
NSDictionary* archive = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:nil error:&error];
NSError *error;
NSDictionary *archive;
NSArray* topLevelObjects = [archive objectForKey:@"$objects"];
archive = [NSPropertyListSerialization
propertyListWithData: data
options: NSPropertyListImmutable
format: nil
error: &error];
NSDictionary* dict;
NSArray *topLevelObjects = [archive objectForKey: @"$objects"];
NSEnumerator *enumerator = [topLevelObjects objectEnumerator];
NSDictionary *dict;
id element;
for (id element in topLevelObjects)
while ((element = [enumerator nextObject]) != nil)
{
if ([element isKindOfClass:[NSDictionary class]])
if ([element isKindOfClass: [NSDictionary class]])
{
dict = (NSDictionary*)element;
if ([[dict allKeys] containsObject:mask])
if ([[dict allKeys] containsObject: mask])
{
break;
}
@ -53,14 +66,22 @@ int main()
{
dict = nil;
}
}
}
}
}
PASS(dict != nil, "Found a dict with a NSButtonFlags2 entry");
NSNumber* encodedKeyMask = [dict valueForKey:mask];
NSNumber *encodedKeyMask = [dict valueForKey: mask];
int expect = (NSShiftKeyMask << 8);
int modMask = (NSEventModifierFlagDeviceIndependentFlagsMask << 8);
int found = [encodedKeyMask intValue] & modMask;
PASS(encodedKeyMask != nil, "Retrieved the NSButtonFlags2 value");
PASS([encodedKeyMask intValue] & NSEventModifierFlagDeviceIndependentFlagsMask << 8 == NSShiftKeyMask, "Encoded key mask 0x%x matches expected key mask 0x%x", [encodedKeyMask intValue] & NSEventModifierFlagDeviceIndependentFlagsMask << 8, NSShiftKeyMask << 8);
PASS(found == expect,
"Encoded key mask 0x%x matches expected key mask 0x%x",
found, expect);
END_SET("NSButtonCell encoding tests")
}
END_SET("NSButtonCell encoding tests")
return 0;
}

View file

@ -7,30 +7,42 @@
int main()
{
NSString* mask = @"NSKeyEquivModMask";
NSMenuItem* item = [[NSMenuItem alloc] init];
START_SET("NSMenuItem key equivalent mask")
NSString *mask = @"NSKeyEquivModMask";
NSMenuItem *item = [[NSMenuItem alloc] init];
NSMutableData *data = [NSMutableData data];
NSNumber *encodedKeyMask;
NSError *error = nil;
NSDictionary *dict = nil;
NSArray *topLevelObjects;
NSKeyedArchiver *archiver;
NSDictionary *archive;
NSEnumerator *enumerator;
id element;
item.keyEquivalentModifierMask = NSShiftKeyMask;
NSMutableData *data = [NSMutableData data];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data];
[archiver encodeRootObject:item];
[archiver encodeRootObject: item];
[archiver finishEncoding];
NSError* error;
NSDictionary* archive = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:nil error:&error];
archive = [NSPropertyListSerialization propertyListWithData: data
options: NSPropertyListImmutable
format: nil
error: &error];
NSArray* topLevelObjects = [archive objectForKey:@"$objects"];
topLevelObjects = [archive objectForKey: @"$objects"];
enumerator = [topLevelObjects objectEnumerator];
NSDictionary* dict;
for (id element in topLevelObjects)
while ((element = [enumerator nextObject]) != nil)
{
if ([element isKindOfClass:[NSDictionary class]])
if ([element isKindOfClass: [NSDictionary class]])
{
dict = (NSDictionary*)element;
if ([[dict allKeys] containsObject:mask])
if ([[dict allKeys] containsObject: mask])
{
break;
}
@ -43,7 +55,13 @@ int main()
PASS(dict != nil, "Found a dict with a NSKeyEquivModMask entry");
NSNumber* encodedKeyMask = [dict valueForKey:mask];
PASS(encodedKeyMask != nil, "Retrieved the NSKeyEquivModMask value");
PASS([encodedKeyMask intValue] == NSShiftKeyMask, "Encoded key mask 0x%x matches expected key mask 0x%x", [encodedKeyMask intValue], NSShiftKeyMask);
}
encodedKeyMask = [dict valueForKey: mask];
PASS(encodedKeyMask != nil, "Retrieved the NSKeyEquivModMask value")
PASS([encodedKeyMask intValue] == NSShiftKeyMask,
"Encoded key mask 0x%x matches expected key mask 0x%x",
[encodedKeyMask intValue], NSShiftKeyMask)
END_SET("NSMenuItem key equivalent mask")
return 0;
}

View file

@ -16,24 +16,27 @@
int main()
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];
NSArray **testObjects;
BOOL success = NO;
NSFileManager *mgr = [NSFileManager defaultManager];
NSString *path = [mgr currentDirectoryPath];
NSBundle *bundle = [[NSBundle alloc] initWithPath: path];
NSAutoreleasePool *arp = [NSAutoreleasePool new];
NSArray **testObjects = NULL;
BOOL success = NO;
NSFileManager *mgr = [NSFileManager defaultManager];
NSString *path = [mgr currentDirectoryPath];
NSBundle *bundle = [[NSBundle alloc] initWithPath: path];
START_SET("NSNibLoading GNUstep basic")
NS_DURING
{
[NSApplication sharedApplication];
}
{
[NSApplication sharedApplication];
}
NS_HANDLER
{
if ([[localException name] isEqualToString: NSInternalInconsistencyException ])
SKIP("It looks like GNUstep backend is not yet installed")
}
{
if ([[localException name]
isEqualToString: NSInternalInconsistencyException])
{
SKIP("It looks like GNUstep backend is not yet installed")
}
}
NS_ENDHANDLER
if ([[path lastPathComponent] isEqualToString: @"obj"])
@ -49,19 +52,22 @@ int main()
owner: [NSApplication sharedApplication]
topLevelObjects: testObjects];
PASS(success == YES, ".gorm file was loaded properly using loadNibNamed:owner:topLevelObjects:");
PASS(success == YES, ".gorm file was loaded properly"
" using loadNibNamed:owner:topLevelObjects:");
success = [bundle loadNibNamed: @"Test-xib"
owner: [NSApplication sharedApplication]
topLevelObjects: testObjects];
PASS(success == YES, ".xib file was loaded properly using loadNibNamed:owner:topLevelObjects:");
PASS(success == YES, ".xib file was loaded properly"
" using loadNibNamed:owner:topLevelObjects:");
success = [bundle loadNibNamed: @"Test-nib"
owner: [NSApplication sharedApplication]
topLevelObjects: testObjects];
PASS(success == YES, ".nib file was loaded properly using loadNibNamed:owner:topLevelObjects:");
PASS(success == YES, ".nib file was loaded properly"
" using loadNibNamed:owner:topLevelObjects:");
}
NS_HANDLER
{

View file

@ -5,15 +5,15 @@
GNUSTEP_GUI_GCC=4.0.0
# Versions for libraries that gnustep-gui is dependent upon
GNUSTEP_GUI_BASE=1.28.0
GNUSTEP_GUI_BASE=1.30.0
GNUSTEP_GUI_LIBTIFF=3.4
# The version number of this release.
GNUSTEP_GUI_MAJOR_VERSION=0
GNUSTEP_GUI_MINOR_VERSION=30
GNUSTEP_GUI_SUBMINOR_VERSION=0
GNUSTEP_GUI_MINOR_VERSION=31
GNUSTEP_GUI_SUBMINOR_VERSION=1
# numeric value should match above
VERSION_NUMBER=030.0
VERSION_NUMBER=031.1
GNUSTEP_GUI_VERSION=${GNUSTEP_GUI_MAJOR_VERSION}.${GNUSTEP_GUI_MINOR_VERSION}.${GNUSTEP_GUI_SUBMINOR_VERSION}
VERSION=${GNUSTEP_GUI_VERSION}