Resolve conflict after merge from master

This commit is contained in:
Gregory John Casamento 2020-05-08 04:50:39 -04:00
commit e92930756b
53 changed files with 3989 additions and 216 deletions

View file

@ -1,3 +1,5 @@
---
os: linux
language: cpp
dist: xenial
compiler:
@ -9,7 +11,7 @@ env:
- LIBRARY_COMBO=ng-gnu-gnu BASE_ABI=--disable-mixedabi RUNTIME_VERSION=gnustep-1.9
- LIBRARY_COMBO=ng-gnu-gnu RUNTIME_VERSION=gnustep-2.0
- LIBRARY_COMBO=ng-gnu-gnu BASE_ABI=--disable-mixedabi RUNTIME_VERSION=gnustep-2.0
matrix:
jobs:
exclude:
- compiler: gcc
env: LIBRARY_COMBO=ng-gnu-gnu RUNTIME_VERSION=gnustep-1.9
@ -21,7 +23,6 @@ matrix:
env: LIBRARY_COMBO=ng-gnu-gnu BASE_ABI=--disable-mixedabi RUNTIME_VERSION=gnustep-2.0
- compiler: clang
env: LIBRARY_COMBO=gnu-gnu-gnu
sudo: required
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y cmake pkg-config libgnutls28-dev libgmp-dev libffi-dev libicu-dev libxml2-dev libxslt1-dev libssl-dev libavahi-client-dev zlib1g-dev

View file

@ -1,7 +1,7 @@
1 ANNOUNCE
**********
1 Announcement
**************
This is version 0.27.0 of the GNUstep GUI library ('gnustep-gui').
This is version 0.28.0 of the GNUstep GUI library ('gnustep-gui').
1.1 What is the GNUstep GUI Library?
====================================
@ -32,40 +32,55 @@ 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.27.0'
1.2 Noteworthy changes in version '0.28.0'
==========================================
This version includes numerous bugfixes, compatibility improvements and
other changes accumulated over the last year. It also enables work to
be done on integrating NSViews with a Core Animation renderer.
This version adds support for modern XIB files and many new classes.
Plus the usual bunch of bug fixes.
* Make targetForAction safer.
* Speed up menu updates.
* Clean up speech tool compilation and switch to newer interface.
* Fix bug in CUPS subclassing introduced in last release.
* Minor improvements to typesetting.
* Add NSIsControllerMarker.
* Fix tracking on segmented cell.
* Bring slider cell closer to Cocoa implementation.
* Add ivar for Core Animation in NSView.
* Improve border calculation on printing.
* Lazy load app icon.
* Better detection of removable volumes.
* Polish translations.
* Japanese translations.
* Lots of bug fixes.
* Support loading of document XIB files.
* Improve Key Value Binding for NSArrayController and add more
bindings.
* Better support for multi monitor usage and other improvement in the
backend integration.
* Add classes NSFontCollection, NSColorSampler, NSSpeechRecognizer,
NSAppearance, NSPDFInfo, NSPICTImageRep, NSCIImageRep,
NSPDFImageRep, NSPDFPanel, NSDataAsset, NSDatePicker,
NSDatePickerCell, NSPredicateEditor, NSPredicateEditorRowTemplate,
NSRuleEditor, NSGestureRecognizer, NSButtonTouchBarItem,
NSCandidateListTouchBarItem, NSClickGestureRecognizer,
NSColorPickerTouchBarItem, NSCustomTouchBarItem,
NSGroupTouchBarItem, NSMagnificationGestureRecognizer,
NSPanGestureRecognizer, NSPickerTouchBarItem,
NSPopoverTouchBarItem, NSPressGestureRecognizer,
NSRotationGestureRecognizer, NSSharingServicePickerTouchBarItem,
NSSliderTouchBarItem, NSStepperTouchBarItem, NSTouchBarItem,
NSTouchBar, NSTouch, NSDockTile.
* Implement NSEPSImageRep.
* Better encoding handling in RTF files.
* Theming and drawing improvements.
* Increase small font size to 10.
* New cursor and stepper images.
* Move NSFileWrapper to Foundation.
* Fixed build on Debian GNU/kFreeBSD.
* With command line argument -autolaunch YES, do not activate the
application when -activateIgnoringOtherApps: is invoked.
* Improvements to WindowMaker compatibility (e.g. WMFHideApplication
support).
* Lowered NSFloatingWindowLevel by one to distinguish floating panels
from menus.
1.3 Where can you get it? How can you compile it?
=================================================
The gnustep-gui-0.27.0.tar.gz distribution file has been placed at
The gnustep-gui-0.28.0.tar.gz distribution file has been placed at
<ftp://ftp.gnustep.org/pub/gnustep/core>.
It is accompanied by gnustep-back-0.27.0.tar.gz.sig, a PGP signature
It is accompanied by gnustep-gui-0.28.0.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.27.0.tar.gz.sig
gpg --verify gnustep-gui-0.28.0.tar.gz.sig
Signature has been created using the key with the following
fingerprint:

106
ChangeLog
View file

@ -1,3 +1,107 @@
2020-05-06 Gregory John Casamento <greg.casamento@gmail.com>
* Headers/Additions/GNUstepGUI/GSTheme.h: Add declarations
for new drawing methods.
* Headers/AppKit/AppKit.h: Add headers to main header
* Headers/AppKit/NSMenu.h: Add method to draw the popup in
the appropriate positin
* Headers/AppKit/NSPathCell.h: Implementation of path cell header
* Headers/AppKit/NSPathComponentCell.h: Component cell
* Headers/AppKit/NSPathControl.h: Control
* Headers/AppKit/NSPathControlItem.h: Control item
* MISSING: Remove NSPath* classes since they have been implemented
* Source/GNUmakefile: Add files to compile and copy
* Source/GSThemeDrawing.m: Add new drawing methods.
* Source/GSXib5KeyedUnarchiver.m: Add new decoding methods
* Source/NSMenu.m: Implement method to position popup
* Source/NSPathCell.m: Implementation path cell.
* Source/NSPathComponentCell.m: Cell representation of each
component
* Source/NSPathControlItem.m: Path items
* Source/NSPathControl.m: Path control to contain path cell and
components.
2020-04-26 Gregory John Casamento <greg.casamento@gmail.com>
* Headers/Additions/GNUstepGUI/GSTheme.h: Add declarations
for new drawing methods.
* Headers/AppKit/AppKit.h: Add new headers
* Headers/AppKit/NSAccessibilityProtocols.h
* Headers/AppKit/NSCell.h: Add NSControlStateValue enum
* Headers/AppKit/NSSwitch.h: Header for NSSwitch
* MISSING: Remove NSSwitch
* Source/GNUmakefile: Add .h and .m files
* Source/GSThemeDrawing.m: Add drawing code for knob and
switch basin.
* Source/GSXib5KeyedUnarchiver.m: Add decoding for
NSControlContents. Make sure enabled is YES when not
present.
* Source/NSColor.m: Minor changes
* Source/NSMatrix.m: Remove unneeded code
* Source/NSSwitch.m: Implementation of NSSwitch
* Source/NSToolbarItem.m: Remove unneeded code
2020-04-13 Gregory John Casamento <greg.casamento@gmail.com>
* Headers/AppKit/AppKitErrors.h:
* Headers/AppKit/AppKit.h:
* Headers/AppKit/NSFontAssetRequest.h:
* Headers/AppKit/NSMediaLibraryBrowserController.h:
* Headers/AppKit/NSScrubber.h:
* Headers/AppKit/NSScrubberItemView.h:
* Headers/AppKit/NSScrubberLayout.h:
* Headers/AppKit/NSSharingServicePickerToolbarItem.h:
* Headers/AppKit/NSUserInterfaceCompression.h:
* Headers/AppKit/NSUserInterfaceItemSearching.h:
* Headers/AppKit/NSWindowRestoration.h:
* MISSING: Remove mention of these classes.
* Source/GNUmakefile
* Source/NSFontAssetRequest.m:
* Source/NSMediaLibraryBrowserController.m:
* Source/NSScrubberItemView.m:
* Source/NSScrubberLayout.m:
* Source/NSScrubber.m:
* Source/NSSharingServicePickerToolbarItem.m: Add code to allow
compilation using these classes. These are Mac specific so they
can't be implemented on any other platform due to HW or
service limitations. At some point these might be able to be
implemented, but, for now, they are here to allow apps which
use them to compile.
2020-04-13 Ivan Vucica <ivan@vucica.net>
* Documentation/announce.texi:
* ANNOUNCE:
Normalize the accompanying text for the release announcement across
core packages: standardize chapter name and GPG information.
2020-04-05 Ivan Vucica <ivan@vucica.net>
* ANNOUNCE:
* Documentation/ReleaseNotes.gsdoc:
* Documentation/news.texi:
* NEWS:
Updating documentation for the 0.28.0 release.
2020-04-01 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSAlert.m (NSBeginAlertSheet): Restore call to delegate
method which was lost a while ago.
* Source/NSAlert.m (NSBeginCriticalAlertSheet,
NSBeginInformationalAlertSheet): Remove redundant calls to close
method.
* Source/NSAlert.m (NSBeginAlertSheet, NSBeginCriticalAlertSheet,
NSBeginInformationalAlertSheet): Change arguments names to reduce
confusion about the intended use of the corresponding selectors.
2020-03-26 Fred Kiefer <FredKiefer@gmx.de>
* Documentation/news.texi: Started to fill in some details for
pending release.
* .travis.yml: Try to keep up with Niels' changes in base.
2020-03-12 Sergii Stoian <stoyan255@gmail.com>
* Model/GNUmakefile: do not overwrite ADDITIONAL_INCLUDE_DIRS
@ -508,7 +612,7 @@
* Documentation/news.texi
* NEWS
* Version:
Updating documentation for the 0.26.2 release.
Updating documentation for the 0.27.0 release.
2019-01-06 Ivan Vucica <ivan@vucica.net>

View file

@ -20,6 +20,54 @@
migrate to using a newer version of the library.
</p>
<section>
<heading>0.28.0</heading>
<p>
This version adds support for modern XIB files and many new
classes. Plus the usual bunch of bug fixes.
</p>
<deflist>
<term>XIB</term>
<desc>Support loading XIB5 files.</desc>
<term>key-value binding</term>
<desc>Improve Key Value Binding for NSArrayController and add more
bindings.</desc>
<term>multi-monitor support</term>
<desc>Better support for multi monitor usage and other improvement in
the backend integration.</desc>
<term>new classes</term>
<desc>NSFontCollection, NSColorSampler, NSSpeechRecognizer,
NSAppearance, NSPDFInfo, NSPICTImageRep, NSCIImageRep, NSPDFImageRep,
NSPDFPanel, NSDataAsset,
NSDatePicker, NSDatePickerCell, NSPredicateEditor,
NSPredicateEditorRowTemplate, NSRuleEditor, NSGestureRecognizer,
NSButtonTouchBarItem, NSCandidateListTouchBarItem,
NSClickGestureRecognizer, NSColorPickerTouchBarItem,
NSCustomTouchBarItem, NSGroupTouchBarItem,
NSMagnificationGestureRecognizer, NSPanGestureRecognizer,
NSPickerTouchBarItem, NSPopoverTouchBarItem, NSPressGestureRecognizer,
NSRotationGestureRecognizer, NSSharingServicePickerTouchBarItem,
NSSliderTouchBarItem, NSStepperTouchBarItem, NSTouchBarItem,
NSTouchBar, NSTouch, NSDockTile
</desc>
<term>formats</term>
<desc>Implement NSEPSImageRep. Marked GSImageMagickImageRep public.
PICT. Better encoding handling in RTF files.</desc>
<term>theming and drawing</term>
<desc>Increase small font size to 10. New cursor and stepper images.
Various improvements.Lowered NSFloatingWindowLevel by one to
distinguish floating panels from menus.</desc>
<term>NSFileWrapper move</term>
<desc>Move NSFileWrapper to Foundation.</desc>
<term>platform compatibility</term>
<desc>Fixed build on Debian GNU/kFreeBSD. Improvements to WindowMaker
compatibility (e.g. WMFHideApplication support).</desc>
<term>command line arguments</term>
<desc>With command line argument -autolaunch YES, do not activate the
application when -activateIgnoringOtherApps: is invoked.</desc>
</deflist>
</section>
<section>
<heading>0.27.0</heading>
<p>
@ -36,7 +84,7 @@
<term>Tools/speech</term>
<desc>Clean up speech tool compilation and switch to newer interface.</desc>
<term>printing</term>
<desc>Fix bug in CUPS subclassing introduced in last release.</term>
<desc>Fix bug in CUPS subclassing introduced in last release.</desc>
<term>typesetting</term>
<desc>Minor improvments to typesetting.</desc>
<term>NSKeyValueBinding</term>

View file

@ -1,5 +1,5 @@
@c -*- texinfo -*-
@chapter ANNOUNCE
@chapter Announcement
@ifset TEXT-ONLY
@include version.texi
@end ifset
@ -43,9 +43,10 @@ library, you will need to install Cairo.
@ifset GNUSTEP-GUI-FTP-MACHINE
The gnustep-gui-@value{GNUSTEP-GUI-VERSION}.tar.gz distribution
file has been placed at @url{ftp://@value{GNUSTEP-GUI-FTP-MACHINE}/@value{GNUSTEP-GUI-FTP-DIRECTORY}}.
@end ifset
It is accompanied by gnustep-back-@value{GNUSTEP-GUI-VERSION}.tar.gz.sig, a PGP signature which you can validate by putting both files in the same directory and using:
It is accompanied by gnustep-gui-@value{GNUSTEP-GUI-VERSION}.tar.gz.sig, a
PGP signature which you can validate by putting both files in the same
directory and using:
@example
gpg --verify gnustep-gui-@value{GNUSTEP-GUI-VERSION}.tar.gz.sig
@ -57,6 +58,7 @@ fingerprint:
@example
83AA E47C E829 A414 6EF8 3420 CA86 8D4C 9914 9679
@end example
@end ifset
Read the INSTALL file or the GNUstep-HOWTO for installation instructions.

View file

@ -9,6 +9,45 @@
The currently released version of the library is @samp{@value{GNUSTEP-GUI-VERSION}}.
@end ifclear
@section Noteworthy changes in version @samp{0.28.0}
This version adds support for modern XIB files and many new
classes. Plus the usual bunch of bug fixes.
@itemize @bullet
@item Support loading of document XIB files.
@item Improve Key Value Binding for NSArrayController and add more bindings.
@item Better support for multi monitor usage and other improvement in
the backend integration.
@item Add classes NSFontCollection, NSColorSampler, NSSpeechRecognizer,
NSAppearance, NSPDFInfo, NSPICTImageRep, NSCIImageRep, NSPDFImageRep,
NSPDFPanel, NSDataAsset,
NSDatePicker, NSDatePickerCell, NSPredicateEditor,
NSPredicateEditorRowTemplate, NSRuleEditor, NSGestureRecognizer,
NSButtonTouchBarItem, NSCandidateListTouchBarItem,
NSClickGestureRecognizer, NSColorPickerTouchBarItem,
NSCustomTouchBarItem, NSGroupTouchBarItem,
NSMagnificationGestureRecognizer, NSPanGestureRecognizer,
NSPickerTouchBarItem, NSPopoverTouchBarItem, NSPressGestureRecognizer,
NSRotationGestureRecognizer, NSSharingServicePickerTouchBarItem,
NSSliderTouchBarItem, NSStepperTouchBarItem, NSTouchBarItem, NSTouchBar,
NSTouch, NSDockTile.
@item Implement NSEPSImageRep.
@item Better encoding handling in RTF files.
@item Theming and drawing improvements.
@item Increase small font size to 10.
@item New cursor and stepper images.
@item Move NSFileWrapper to Foundation.
@item Fixed build on Debian GNU/kFreeBSD.
@item With command line argument -autolaunch YES, do not activate the
application when -activateIgnoringOtherApps: is invoked.
@item Improvements to WindowMaker compatibility (e.g. WMFHideApplication
support).
@item Lowered NSFloatingWindowLevel by one to distinguish floating panels from
menus.
@end itemize
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.27.0}
This version includes numerous bugfixes, compatibility
@ -34,7 +73,6 @@ Animation renderer.
@item Lots of bug fixes.
@end itemize
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.26.2}
This version is a small, but important bugfix release.

View file

@ -252,6 +252,8 @@
@class NSProgressIndicator;
@class NSTableHeaderCell;
@class NSTabViewItem;
@class NSPathControl;
@class NSPathComponentCell;
@class GSDrawTiles;
@class GSTitleView;
@ -958,6 +960,27 @@ APPKIT_EXPORT NSString *GSThemeWillDeactivateNotification;
*/
- (void) drawStepperHighlightDownButton: (NSRect)aRect;
// NSSwitch drawing methods
- (void) drawSwitchKnob: (NSRect)frame
forState: (NSControlStateValue)value
enabled: (BOOL)enabled;
- (void) drawSwitchBezel: (NSRect)frame
forState: (NSControlStateValue)v
enabled: (BOOL)enabled;
- (void) drawSwitchInRect: (NSRect)rect
forState: (NSControlStateValue)state
enabled: (BOOL)enabled;
// NSPathComponentCell
- (void) drawPathComponentCellWithFrame: (NSRect)f
inView: (NSPathControl *)pc
withCell: (NSPathComponentCell *)cell
isLastComponent: (BOOL)last;
// NSSegmentedControl drawing methods
- (void) drawSegmentedControlSegment: (NSCell *)cell

View file

@ -42,10 +42,12 @@
//
// GNUstep GUI Library functions
//
#import <AppKit/AppKitErrors.h>
#import <AppKit/NSGraphics.h>
#import <AppKit/NSAccessibility.h>
#import <AppKit/NSAccessibilityConstants.h>
#import <AppKit/NSAccessibilityProtocols.h>
#import <AppKit/NSActionCell.h>
#import <AppKit/NSAnimationContext.h>
#import <AppKit/NSAppearance.h>
@ -117,6 +119,9 @@
#import <AppKit/NSScreen.h>
#import <AppKit/NSScroller.h>
#import <AppKit/NSScrollView.h>
#import <AppKit/NSScrubber.h>
#import <AppKit/NSScrubberItemView.h>
#import <AppKit/NSScrubberLayout.h>
#import <AppKit/NSSelection.h>
#import <AppKit/NSSharingService.h>
#import <AppKit/NSSlider.h>
@ -157,6 +162,7 @@
#import <AppKit/NSDocumentController.h>
#import <AppKit/NSDrawer.h>
#import <AppKit/NSFileWrapperExtensions.h>
#import <AppKit/NSFontAssetRequest.h>
#import <AppKit/NSFontCollection.h>
#import <AppKit/NSFontDescriptor.h>
#import <AppKit/NSGestureRecognizer.h>
@ -173,6 +179,7 @@
#import <AppKit/NSLevelIndicator.h>
#import <AppKit/NSLevelIndicatorCell.h>
#import <AppKit/NSMagnificationGestureRecognizer.h>
#import <AppKit/NSMediaLibraryBrowserController.h>
#import <AppKit/NSMovie.h>
#import <AppKit/NSMovieView.h>
#import <AppKit/NSPanGestureRecognizer.h>
@ -185,6 +192,10 @@
#import <AppKit/NSOpenGLView.h>
#import <AppKit/NSOutlineView.h>
#import <AppKit/NSParagraphStyle.h>
#import <AppKit/NSPathControl.h>
#import <AppKit/NSPathCell.h>
#import <AppKit/NSPathComponentCell.h>
#import <AppKit/NSPathControlItem.h>
#import <AppKit/NSPickerTouchBarItem.h>
#import <AppKit/NSPredicateEditor.h>
#import <AppKit/NSPredicateEditorRowTemplate.h>
@ -201,6 +212,7 @@
#import <AppKit/NSSegmentedCell.h>
#import <AppKit/NSSegmentedControl.h>
#import <AppKit/NSShadow.h>
#import <AppKit/NSSharingServicePickerToolbarItem.h>
#import <AppKit/NSSharingServicePickerTouchBarItem.h>
#import <AppKit/NSSliderTouchBarItem.h>
#import <AppKit/NSSound.h>
@ -209,6 +221,7 @@
#import <AppKit/NSStepperTouchBarItem.h>
#import <AppKit/NSStepper.h>
#import <AppKit/NSStepperCell.h>
#import <AppKit/NSSwitch.h>
#import <AppKit/NSTableColumn.h>
#import <AppKit/NSTableHeaderCell.h>
#import <AppKit/NSTableHeaderView.h>
@ -235,6 +248,8 @@
#import <AppKit/NSTreeNode.h>
#import <AppKit/NSUserDefaultsController.h>
#import <AppKit/NSUserInterfaceItemIdentification.h>
#import <AppKit/NSUserInterfaceCompression.h>
#import <AppKit/NSUserInterfaceItemSearching.h>
#import <AppKit/NSUserInterfaceLayout.h>
#import <AppKit/NSUserInterfaceValidation.h>
#import <AppKit/NSViewController.h>

View file

@ -0,0 +1,70 @@
/* Definition of the AppKitErrors header
Copyright (C) 2019 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tues Apr 7 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _AppKitErrors_h_GNUSTEP_GUI_INCLUDE
#define _AppKitErrors_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
// All of the AppKit errors in the NSCocoaErrorDomain.
enum
{
NSFontAssetDownloadError = 66304,
NSFontErrorMinimum = 66304,
NSFontErrorMaximum = 66335,
NSServiceApplicationNotFoundError = 66560,
NSServiceApplicationLaunchFailedError = 66561,
NSServiceRequestTimedOutError = 66562,
NSServiceInvalidPasteboardDataError = 66563,
NSServiceMalformedServiceDictionaryError = 66564,
NSServiceMiscellaneousError = 66800,
NSServiceErrorMinimum = 66560,
NSServiceErrorMaximum = 66817,
NSSharingServiceNotConfiguredError = 67072,
NSSharingServiceErrorMinimum = 67072,
NSSharingServiceErrorMaximum = 67327,
NSTextReadInapplicableDocumentTypeError = 65806,
NSTextWriteInapplicableDocumentTypeError = 66062,
NSTextReadWriteErrorMinimum = 65792,
NSTextReadWriteErrorMaximum = 66303,
NSWorkspaceAuthorizationInvalidError = 67328,
NSWorkspaceErrorMinimum = 67328,
NSWorkspaceErrorMaximum = 67455,
};
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _AppKitErrors_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,61 @@
/* Definition of class NSAccessibilityProtocols
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Sun Apr 19 09:56:39 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSAccessibilityProtocols_h_GNUSTEP_GUI_INCLUDE
#define _NSAccessibilityProtocols_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@protocol NSAccessibilityElement <NSObject>
- (NSRect)accessibilityFrame;
- (NSString *)accessibilityIdentifier;
- (id)accessibilityParent;
- (BOOL)isAccessibilityFocused;
@end
@protocol NSAccessibilityButton <NSAccessibilityElement>
- (NSString *)accessibilityLabel;
- (BOOL)accessibilityPerformPress;
@end
@protocol NSAccessibilitySwitch <NSAccessibilityButton>
- (BOOL) accessibilityPerformDecrement;
- (BOOL) accessibilityPerformIncrement;
- (NSString *) accessibilityValue;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSAccessibilityProtocols_h_GNUSTEP_GUI_INCLUDE */

View file

@ -123,6 +123,18 @@ enum {
};
typedef NSUInteger NSCellStateValue;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_13, GS_API_LATEST)
/*
* Control state values as of 10.13
*/
enum {
NSControlStateValueMixed = -1,
NSControlStateValueOff = 0,
NSControlStateValueOn = 1
};
typedef NSUInteger NSControlStateValue;
#endif
/**
* <p>Enumeration of the ways that you can display an image in an
* NSImageCell. The available ones are:</p>

79
Headers/AppKit/NSErrors.h Normal file
View file

@ -0,0 +1,79 @@
/* Definition of class NSErrors
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Thu Mar 26 09:13:56 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSErrors_h_GNUSTEP_GUI_INCLUDE
#define _NSErrors_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
APPKIT_EXPORT NSExceptionName NSAbortModalException;
APPKIT_EXPORT NSExceptionName NSAbortPrintingException;
APPKIT_EXPORT NSExceptionName NSAccessibilityException;
APPKIT_EXPORT NSExceptionName NSAppKitIgnoredException;
APPKIT_EXPORT NSExceptionName NSAppKitVirtualMemoryException;
APPKIT_EXPORT NSExceptionName NSBadBitmapParametersException;
APPKIT_EXPORT NSExceptionName NSBadComparisonException;
APPKIT_EXPORT NSExceptionName NSBadRTFColorTableException;
APPKIT_EXPORT NSExceptionName NSBadRTFDirectiveException;
APPKIT_EXPORT NSExceptionName NSBadRTFFontTableException;
APPKIT_EXPORT NSExceptionName NSBadRTFStyleSheetException;
APPKIT_EXPORT NSExceptionName NSBrowserIllegalDelegateException;
APPKIT_EXPORT NSExceptionName NSColorListIOException;
APPKIT_EXPORT NSExceptionName NSColorListNotEditableException;
APPKIT_EXPORT NSExceptionName NSDraggingException;
APPKIT_EXPORT NSExceptionName NSFontUnavailableException;
APPKIT_EXPORT NSExceptionName NSIllegalSelectorException;
APPKIT_EXPORT NSExceptionName NSImageCacheException;
APPKIT_EXPORT NSExceptionName NSNibLoadingException;
APPKIT_EXPORT NSExceptionName NSPPDIncludeNotFoundException;
APPKIT_EXPORT NSExceptionName NSPPDIncludeStackOverflowException;
APPKIT_EXPORT NSExceptionName NSPPDIncludeStackUnderflowException;
APPKIT_EXPORT NSExceptionName NSPPDParseException;
APPKIT_EXPORT NSExceptionName NSPasteboardCommunicationException;
APPKIT_EXPORT NSExceptionName NSPrintPackageException;
APPKIT_EXPORT NSExceptionName NSPrintingCommunicationException;
APPKIT_EXPORT NSExceptionName NSRTFPropertyStackOverflowException;
APPKIT_EXPORT NSExceptionName NSTIFFException;
APPKIT_EXPORT NSExceptionName NSTextLineTooLongException;
APPKIT_EXPORT NSExceptionName NSTextNoSelectionException;
APPKIT_EXPORT NSExceptionName NSTextReadException;
APPKIT_EXPORT NSExceptionName NSTextWriteException;
APPKIT_EXPORT NSExceptionName NSTypedStreamVersionException;
APPKIT_EXPORT NSExceptionName NSWindowServerCommunicationException;
APPKIT_EXPORT NSExceptionName NSWordTablesReadException;
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSErrors_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,65 @@
/* Definition of class NSFontAssetRequest
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:06:56 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSFontAssetRequest_h_GNUSTEP_GUI_INCLUDE
#define _NSFontAssetRequest_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#import <Foundation/NSProgress.h>
#import <Foundation/NSError.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_13, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
enum {
NSFontAssetRequestOptionUsesStandardUI = 1 << 0, // Use standard system UI for downloading.
};
typedef NSUInteger NSFontAssetRequestOptions;
DEFINE_BLOCK_TYPE(GSFontAssetCompletionHandler, BOOL, NSError*);
@interface NSFontAssetRequest : NSObject <NSProgressReporting>
- (instancetype) initWithFontDescriptors: (NSArray *)fontDescriptors
options: (NSFontAssetRequestOptions)options;
- (NSArray *) downloadedFontDescriptors;
- (NSProgress *) progress;
- (void)downloadFontAssetsWithCompletionHandler: (GSFontAssetCompletionHandler)completionHandler;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSFontAssetRequest_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,66 @@
/* Definition of class NSMediaLibraryBrowserController
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:07:21 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSMediaLibraryBrowserController_h_GNUSTEP_GUI_INCLUDE
#define _NSMediaLibraryBrowserController_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#import <Foundation/NSGeometry.h>
#import "AppKit/NSNibDeclarations.h"
#if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
enum {
NSMediaLibraryAudio,
NSMediaLibraryImage,
NSMediaLibraryVideo,
};
typedef NSUInteger NSMediaLibrary;
@interface NSMediaLibraryBrowserController : NSObject
+ (NSMediaLibraryBrowserController *) sharedMediaLibraryBrowserController;
- (NSRect) frame;
- (IBAction) togglePanel: (id)sender;
- (BOOL) isVisible;
- (void) setVisible: (BOOL)flag;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSMediaLibraryBrowserController_h_GNUSTEP_GUI_INCLUDE */

View file

@ -434,6 +434,12 @@
withFont: (NSFont *)font;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
- (void) popUpMenuPositionItem: (NSMenuItem *)item
atLocation: (NSPoint) point
inView: (NSView *) view;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
+ (BOOL) menuBarVisible;
+ (void) setMenuBarVisible: (BOOL)flag;

128
Headers/AppKit/NSPathCell.h Normal file
View file

@ -0,0 +1,128 @@
/* Definition of class NSPathCell
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 22 18:19:07 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSPathCell_h_GNUSTEP_GUI_INCLUDE
#define _NSPathCell_h_GNUSTEP_GUI_INCLUDE
#import <AppKit/NSActionCell.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
enum {
NSPathStyleStandard,
NSPathStyleNavigationBar, // deprecated
NSPathStylePopUp
};
typedef NSUInteger NSPathStyle;
@protocol NSPathCellDelegate;
@class NSEvent, NSView, NSArray, NSString, NSAttributeString, NSColor, NSPathComponentCell, NSOpenPanel, NSURL;
@interface NSPathCell : NSActionCell
{
NSPathStyle _pathStyle;
NSColor *_backgroundColor;
NSAttributedString *_placeholderAttributedString;
NSArray *_allowedTypes;
id<NSPathCellDelegate> _delegate;
NSURL *_url;
SEL _doubleAction;
NSArray *_pathComponentCells;
NSPathComponentCell *_clickedPathComponentCell;
id _objectValue;
}
- (void)mouseEntered:(NSEvent *)event
withFrame:(NSRect)frame
inView:(NSView *)view;
- (void)mouseExited:(NSEvent *)event
withFrame:(NSRect)frame
inView:(NSView *)view;
- (void) setAllowedTypes: (NSArray *)types;
- (NSArray *) allowedTypes;
- (NSPathStyle) pathStyle;
- (void) setPathStyle: (NSPathStyle)pathStyle;
- (NSAttributedString *) placeholderAttributedString;
- (void) setPlaceholderAttributedString: (NSAttributedString *)string;
- (NSString *) placeholderString;
- (void) setPlaceholderString: (NSString *)string;
- (NSColor *) backgroundColor;
- (void) setBackgroundColor: (NSColor *)color;
+ (Class) pathComponentCellClass;
+ (void) setPathComponentCellClass: (Class)clz;
- (NSRect)rectOfPathComponentCell:(NSPathComponentCell *)cell
withFrame:(NSRect)frame
inView:(NSView *)view;
- (NSPathComponentCell *)pathComponentCellAtPoint:(NSPoint)point
withFrame:(NSRect)frame
inView:(NSView *)view;
- (NSPathComponentCell *) clickedPathComponentCell;
- (NSArray *) pathComponentCells;
- (void) setPathComponentCells: (NSArray *)cells;
- (SEL) doubleAction;
- (void) setDoubleAction: (SEL)action;
- (NSURL *) URL;
- (void) setURL: (NSURL *)url;
- (id<NSPathCellDelegate>) delegate;
- (void) setDelegate: (id<NSPathCellDelegate>)delegate;
@end
@protocol NSPathCellDelegate
- (void)pathCell:(NSPathCell *)pathCell
willDisplayOpenPanel:(NSOpenPanel *)openPanel;
- (void)pathCell:(NSPathCell *)pathCell
willPopUpMenu:(NSMenu *)menu;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSPathCell_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,60 @@
/* Definition of class NSPathComponentCell
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 22 18:19:21 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSPathComponentCell_h_GNUSTEP_GUI_INCLUDE
#define _NSPathComponentCell_h_GNUSTEP_GUI_INCLUDE
#import <AppKit/NSTextFieldCell.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@class NSImage, NSURL;
@interface NSPathComponentCell : NSTextFieldCell
{
NSImage *_image;
NSURL *_url;
BOOL _lastComponent;
}
- (NSImage *) image;
- (void) setImage: (NSImage *)image;
- (NSURL *) URL;
- (void) setURL: (NSURL *)url;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSPathComponentCell_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,122 @@
/* Definition of class NSPathControl
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 22 18:19:40 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSPathControl_h_GNUSTEP_GUI_INCLUDE
#define _NSPathControl_h_GNUSTEP_GUI_INCLUDE
#import <AppKit/NSControl.h>
#import <AppKit/NSDragging.h>
#import <AppKit/NSPathCell.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@protocol NSPathControlDelegate;
@class NSColor, NSPathComponentCell, NSArray, NSURL, NSAttributedString, NSString,
NSMenu, NSPasteboard, NSOpenPanel, NSPathControlItem;
@interface NSPathControl : NSControl
{
NSArray *_pathItems;
id<NSPathControlDelegate> _delegate;
NSDragOperation _localMask;
NSDragOperation _remoteMask;
NSTrackingRectTag _trackingTag;
}
- (void) setPathStyle: (NSPathStyle)style;
- (NSPathStyle) pathStyle;
- (NSColor *) backgroundColor;
- (void) setBackgroundColor: (NSColor *)backgroundColor;
- (NSPathComponentCell *) clickedPathComponentCell;
- (NSArray *) pathComponentCells;
- (void) setPathComponentCells: (NSArray *)cells;
- (SEL) doubleAction;
- (void) setDoubleAction: (SEL)doubleAction;
- (NSURL *) URL;
- (void) setURL: (NSURL *)url;
- (id<NSPathControlDelegate>) delegate;
- (void) setDelegate: (id<NSPathControlDelegate>) delegate;
- (void) setDraggingSourceOperationMask: (NSDragOperation)mask
forLocal: (BOOL)local;
- (NSArray *) allowedTypes;
- (void) setAllowedTypes: (NSArray *)allowedTypes;
- (NSPathControlItem *) clickedPathItem;
- (NSArray *) pathItems;
- (void) setPathItems: (NSArray *)items;
- (NSAttributedString *) placeholderAttributedString;
- (void) setPlaceholderAttributedString: (NSAttributedString *)string;
- (NSString *) placeholderString;
- (void) setPlaceholderString: (NSString *)string;
@end
@protocol NSPathControlDelegate
- (BOOL)pathControl: (NSPathControl *)pathControl
shouldDragPathComponentCell: (NSPathComponentCell *)pathComponentCell
withPasteboard: (NSPasteboard *)pasteboard;
- (NSDragOperation) pathControl: (NSPathControl *)pathControl
validateDrop: (id<NSDraggingInfo>)info;
- (BOOL) pathControl: (NSPathControl *)pathControl
acceptDrop: (id<NSDraggingInfo>)info;
- (void) pathControl: (NSPathControl *)pathControl
willDisplayOpenPanel: (NSOpenPanel *)openPanel;
- (void) pathControl: (NSPathControl *)pathControl
willPopUpMenu: (NSMenu *)menu;
- (BOOL) pathControl: (NSPathControl *)pathControl
shouldDragItem: (NSPathControlItem *)pathItem
withPasteboard: (NSPasteboard *)pasteboard;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSPathControl_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,65 @@
/* Interface of class NSPathControlItem
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 22 18:20:16 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSPathControlItem_h_GNUSTEP_GUI_INCLUDE
#define _NSPathControlItem_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@class NSURL, NSAttributedString, NSImage, NSString;
@interface NSPathControlItem : NSObject
{
NSURL *_url;
NSAttributedString *_attributedTitle;
NSImage *_image;
}
- (NSURL *) URL;
- (void) setURL: (NSURL *)url;
- (NSAttributedString *) attributedTitle;
- (void) setAttributedTitle: (NSAttributedString *)attributedTitle;
- (NSImage *) image;
- (void) setImage: (NSImage *)image;
- (NSString *) title;
- (void) setTitle: (NSString *)title;
@end
#if defined(__cplusplus)
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSPathControlItem_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,47 @@
/* Definition of class NSScrubber
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 8 09:16:14 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSScrubber_h_GNUSTEP_GUI_INCLUDE
#define _NSScrubber_h_GNUSTEP_GUI_INCLUDE
#import "AppKit/NSView.h"
#if OS_API_VERSION(MAC_OS_X_VERSION_10_12, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@interface NSScrubber : NSView
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSScrubber_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,51 @@
/* Definition of class NSScrubberItemView
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 8 09:17:27 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSScrubberItemView_h_GNUSTEP_GUI_INCLUDE
#define _NSScrubberItemView_h_GNUSTEP_GUI_INCLUDE
#import "AppKit/NSView.h"
#if OS_API_VERSION(MAC_OS_X_VERSION_10_12, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@interface NSScrubberArrangedView : NSView
@end
@interface NSScrubberItemView : NSScrubberArrangedView
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSScrubberItemView_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,93 @@
/* Definition of class NSScrubberLayout
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 8 09:20:18 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSScrubberLayout_h_GNUSTEP_GUI_INCLUDE
#define _NSScrubberLayout_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#import <Foundation/NSCoder.h>
#import <Foundation/NSGeometry.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_12, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@class NSScrubber;
@interface NSScrubberLayoutAttributes : NSObject <NSCopying>
+ (NSScrubberLayoutAttributes *) layoutAttributesForItemAtIndex: (NSInteger)index;
- (CGFloat) alpha;
- (NSRect) frame;
- (NSInteger) itemIndex;
@end
@interface NSScrubberLayout : NSObject <NSCoding>
// Configuring
- (Class) layoutAttributesClass;
- (NSScrubber *) scrubber;
- (NSRect) visibleRect;
- (void) invalidateLayout;
// Subclassing layout
- (void) prepareLayout;
- (NSSize) scrubberContentSize;
- (NSScrubberLayoutAttributes *) layoutAttributesForItemAtIndex: (NSInteger)index;
- (NSScrubberLayoutAttributes *) layoutAttributesForItemsInRect: (NSRect)rect;
- (BOOL) shouldInvalidateLayoutForHighlightChange;
- (BOOL) shouldInvalidateLayoutForSelectionChange;
- (BOOL) shouldInvalidateLayoutForChangeFromVisibleRect: (NSRect)fromRect
toVisibleRect: (NSRect)toRect;
- (BOOL) automaticallyMirrorsInRightToLeftLayout;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSScrubberLayout_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,63 @@
/* Definition of class NSSharingServicePickerToolbarItem
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:11:46 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSSharingServicePickerToolbarItem_h_GNUSTEP_GUI_INCLUDE
#define _NSSharingServicePickerToolbarItem_h_GNUSTEP_GUI_INCLUDE
#import "AppKit/NSToolbarItem.h"
#if OS_API_VERSION(MAC_OS_X_VERSION_10_15, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@protocol NSSharingServicePickerToolbarItemDelegate;
@interface NSSharingServicePickerToolbarItem : NSToolbarItem
- (id) activityItemsConfiguration;
- (void) setActivityItemsConfiguration: (id)items;
- (id<NSSharingServicePickerToolbarItemDelegate>) delegate;
- (void) setDelegate: (id<NSSharingServicePickerToolbarItemDelegate>) delegate;
@end
@protocol NSSharingServicePickerToolbarItemDelegate
- (NSArray *) itemsForSharingServicePickerToolbarItem: (NSSharingServicePickerToolbarItem *)items;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSSharingServicePickerToolbarItem_h_GNUSTEP_GUI_INCLUDE */

58
Headers/AppKit/NSSwitch.h Normal file
View file

@ -0,0 +1,58 @@
/* Definition of class NSSwitch
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 8 22:01:02 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSSwitch_h_GNUSTEP_GUI_INCLUDE
#define _NSSwitch_h_GNUSTEP_GUI_INCLUDE
#import <AppKit/NSControl.h>
#import <AppKit/NSCell.h>
#import <AppKit/NSAccessibilityProtocols.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_15, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@interface NSSwitch : NSControl <NSAccessibilitySwitch>
{
NSControlStateValue _state;
id _target;
SEL _action;
BOOL _enabled;
}
- (void) setState: (NSControlStateValue)s;
- (NSControlStateValue) state;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSSwitch_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,84 @@
/* Definition of class NSUserInterfaceCompression
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:13:30 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSUserInterfaceCompression_h_GNUSTEP_GUI_INCLUDE
#define _NSUserInterfaceCompression_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_13, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@class NSSet, NSString, NSArray;
@interface NSUserInterfaceCompressionOptions : NSObject <NSCopying, NSCoding>
- (instancetype) initWithIdentifier: (NSString *)identifier;
- (instancetype) initWithCompressionOptions: (NSSet *)opts;
- (BOOL) containsOptions: (NSUserInterfaceCompressionOptions *)opts;
- (BOOL) intersectsOptions: (NSUserInterfaceCompressionOptions *)opts;
- (BOOL) isEmpty;
- (NSUserInterfaceCompressionOptions *) optionsByAddingOptions: (NSUserInterfaceCompressionOptions *)opts;
- (NSUserInterfaceCompressionOptions *) optionsByRemovingOptions: (NSUserInterfaceCompressionOptions *)opts;
+ (NSUserInterfaceCompressionOptions *) hideImagesOption;
+ (NSUserInterfaceCompressionOptions *) hideTextOption;
+ (NSUserInterfaceCompressionOptions *) reduceMetricsOption;
+ (NSUserInterfaceCompressionOptions *) breakEqualWidthsOption;
+ (NSUserInterfaceCompressionOptions *) standardOptions;
@end
@protocol NSUserInterfaceCompression
- (void) compressWithPrioritizedCompressionOptions: (NSArray *)prioritizedOptions;
- (NSSize) minimumSizeWithPrioritizedCompressionOptions: (NSArray *)prioritizedOptions;
- (NSUserInterfaceCompressionOptions *) activeCompressionOptions;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSUserInterfaceCompression_h_GNUSTEP_GUI_INCLUDE */

View file

@ -1,44 +1,61 @@
/** NSUserInterfaceItemIdentification.h
<abstract>Associate a unique identifier with objects in your user interface</abstract>
Copyright <copy>(C) 2017 Free Software Foundation, Inc.</copy>
/* Definition of class NSUserInterfaceItemIdentification
Copyright (C) 2020 Free Software Foundation, Inc.
Author: Daniel Ferreira <dtf@stanford.edu>
Date: 2017
This file is part of the GNUstep GUI Library.
Author: Gregory John Casamento
Date: Tue Apr 14 13:46:36 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _GNUstep_H_NSUserInterfaceItemIdentification
#define _GNUstep_H_NSUserInterfaceItemIdentification
#ifndef _NSUserInterfaceItemIdentification_h_GNUSTEP_GUI_INCLUDE
#define _NSUserInterfaceItemIdentification_h_GNUSTEP_GUI_INCLUDE
@class NSString;
#import <Foundation/NSObject.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
@protocol NSUserInterfaceItemIdentification
#if GS_HAS_DECLARED_PROPERTIES
@property (copy) NSString *identifier;
#else
- (NSString *) identifier;
- (void) setIdentifier: (NSString *)identifier;
#if defined(__cplusplus)
extern "C" {
#endif
@end
@class NSString;
typedef NSString *NSUserInterfaceItemIdentifier;
@protocol NSUserInterfaceItemIdentification
#if GS_HAS_DECLARED_PROPERTIES
@property (copy) NSUserInterfaceItemIdentifier identifier;
#else
- (NSUserInterfaceItemIdentifier) identifier;
- (void) setIdentifier: (NSUserInterfaceItemIdentifier)identifier;
#endif
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSUserInterfaceItemIdentification_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,80 @@
/* Definition of class NSUserInterfaceItemSearching
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:13:44 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSUserInterfaceItemSearching_h_GNUSTEP_GUI_INCLUDE
#define _NSUserInterfaceItemSearching_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#import <Foundation/NSRange.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
@class NSArray, NSString;
DEFINE_BLOCK_TYPE(GSSearchItemsMatchedItemHandler, void, NSArray*);
@protocol NSUserInterfaceItemSearching <NSObject>
// @required
- (void) searchForItemsWithSearchString: (NSString *)searchString
resultLimit: (NSInteger)resultLimit
matchedItemHandler: (GSSearchItemsMatchedItemHandler)handleMatchedItems;
- (NSArray *)localizedTitlesForItem:(id)item;
// @optional
- (void)performActionForItem:(id)item;
- (void)showAllHelpTopicsForSearchString:(NSString *)searchString;
@end
@interface NSApplication (NSUserInterfaceItemSearching)
- (void) registerUserInterfaceItemSearchHandler: (id<NSUserInterfaceItemSearching>)handler;
- (void) unregisterUserInterfaceItemSearchHandler: (id<NSUserInterfaceItemSearching>)handler;
- (BOOL) searchString:(NSString *)searchString
inUserInterfaceItemString:(NSString *)stringToSearch
searchRange:(NSRange)searchRange
foundRange:(NSRange *)foundRange;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSUserInterfaceItemSearching_h_GNUSTEP_GUI_INCLUDE */

View file

@ -0,0 +1,55 @@
/* Definition of class NSWindowRestoration
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 14:35:13 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#ifndef _NSWindowRestoration_h_GNUSTEP_GUI_INCLUDE
#define _NSWindowRestoration_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#import <Foundation/NSCoder.h>
#import "AppKit/NSUserInterfaceItemIdentification.h"
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
DEFINE_BLOCK_TYPE(GSWindowRestorationHandler, void, NSWindow*, NSError*);
@protocol NSWindowRestoration
+ (void)restoreWindowWithIdentifier: (NSUserInterfaceItemIdentifier)identifier
state: (NSCoder *)state
completionHandler: (GSWindowRestorationHandler)handler;
@end
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSWindowRestoration_h_GNUSTEP_GUI_INCLUDE */

32
MISSING
View file

@ -1,11 +1,9 @@
MISSING HEADERS
---
> AppKitErrors.h
> NSATSTypesetter.h
> NSAccessibilityCustomAction.h
> NSAccessibilityCustomRotor.h
> NSAccessibilityElement.h
> NSAccessibilityProtocols.h
> NSCollectionViewCompositionalLayout.h
> NSCollectionViewFlowLayout.h
> NSCollectionViewGridLayout.h
@ -15,30 +13,19 @@ MISSING HEADERS
> NSDiffableDataSource.h
> NSDraggingItem.h
> NSDraggingSession.h
> NSErrors.h
> NSFilePromiseProvider.h
> NSFilePromiseReceiver.h
> NSFontAssetRequest.h
> NSGlyphInfo.h
> NSGridView.h
> NSItemProvider.h
> NSLayoutAnchor.h
> NSLayoutConstraint.h
> NSLayoutGuide.h
> NSMediaLibraryBrowserController.h
> NSMenuToolbarItem.h
> NSOpenGLLayer.h
> NSPageController.h
> NSPathCell.h
> NSPathComponentCell.h
> NSPathControl.h
> NSPathControlItem.h
> NSPersistentDocument.h
> NSRuleEditor.h
> NSScrubber.h
> NSScrubberItemView.h
> NSScrubberLayout.h
> NSSharingServicePickerToolbarItem.h
> NSSliderAccessory.h
> NSSplitViewController.h
> NSSplitViewItem.h
@ -46,7 +33,6 @@ MISSING HEADERS
> NSStatusBarButton.h
> NSStoryboard.h
> NSStoryboardSegue.h
> NSSwitch.h
> NSTabViewController.h
> NSTableCellView.h
> NSTableRowView.h
@ -59,27 +45,9 @@ MISSING HEADERS
> NSTitlebarAccessoryViewController.h
> NSTypesetter.h
> NSUserActivity.h
> NSUserInterfaceCompression.h
> NSUserInterfaceItemSearching.h
> NSWindowRestoration.h
> NSWindowTab.h
> NSWindowTabGroup.h
Completed
---
> NSCIIImageRep.h
> NSPDFImageRep.h
> NSPDFInfo.h
> NSPDFPanel.h
> NSPICTImageRep.h
> NSDockTile.h
> NSAppearance.h
> NSDataAsset.h
> NSTouch.h
> NSTouchBar.h
> NSSpeechRecognizer.h
> NSColorSampler.h
Mac Specific
---
> NSButtonTouchBarItem.h

158
NEWS
View file

@ -1,9 +1,47 @@
1 NEWS
******
The currently released version of the library is '0.27.0'.
The currently released version of the library is '0.28.0'.
1.1 Noteworthy changes in version '0.27.0'
1.1 Noteworthy changes in version '0.28.0'
==========================================
This version adds support for modern XIB files and many new classes.
Plus the usual bunch of bug fixes.
* Support loading of document XIB files.
* Improve Key Value Binding for NSArrayController and add more
bindings.
* Better support for multi monitor usage and other improvement in the
backend integration.
* Add classes NSFontCollection, NSColorSampler, NSSpeechRecognizer,
NSAppearance, NSPDFInfo, NSPICTImageRep, NSCIImageRep,
NSPDFImageRep, NSPDFPanel, NSDataAsset, NSDatePicker,
NSDatePickerCell, NSPredicateEditor, NSPredicateEditorRowTemplate,
NSRuleEditor, NSGestureRecognizer, NSButtonTouchBarItem,
NSCandidateListTouchBarItem, NSClickGestureRecognizer,
NSColorPickerTouchBarItem, NSCustomTouchBarItem,
NSGroupTouchBarItem, NSMagnificationGestureRecognizer,
NSPanGestureRecognizer, NSPickerTouchBarItem,
NSPopoverTouchBarItem, NSPressGestureRecognizer,
NSRotationGestureRecognizer, NSSharingServicePickerTouchBarItem,
NSSliderTouchBarItem, NSStepperTouchBarItem, NSTouchBarItem,
NSTouchBar, NSTouch, NSDockTile.
* Implement NSEPSImageRep.
* Better encoding handling in RTF files.
* Theming and drawing improvements.
* Increase small font size to 10.
* New cursor and stepper images.
* Move NSFileWrapper to Foundation.
* Fixed build on Debian GNU/kFreeBSD.
* With command line argument -autolaunch YES, do not activate the
application when -activateIgnoringOtherApps: is invoked.
* Improvements to WindowMaker compatibility (e.g. WMFHideApplication
support).
* Lowered NSFloatingWindowLevel by one to distinguish floating panels
from menus.
1.2 Noteworthy changes in version '0.27.0'
==========================================
This version includes numerous bugfixes, compatibility improvements and
@ -26,7 +64,7 @@ be done on integrating NSViews with a Core Animation renderer.
* Japanese translations.
* Lots of bug fixes.
1.2 Noteworthy changes in version '0.26.2'
1.3 Noteworthy changes in version '0.26.2'
==========================================
This version is a small, but important bugfix release.
@ -34,7 +72,7 @@ This version is a small, but important bugfix release.
* printing: Fix allocation of the CUPS printing classes.
* installation: Fix the configure script.
1.3 Noteworthy changes in version '0.26.1'
1.4 Noteworthy changes in version '0.26.1'
==========================================
This version is released to conincide with version 1.25.1 of
@ -61,7 +99,7 @@ for more information.
* graphics context: Workaround for Clang+libobjc2+nonfragile ABI
issue.
1.4 Noteworthy changes in version '0.26.0'
1.5 Noteworthy changes in version '0.26.0'
==========================================
This version was bumped due to previous binary incompatibilities between
@ -92,7 +130,7 @@ system.
and methods to improve source-level compatibility.
* other bugfixes
1.5 Noteworthy changes in version '0.25.1'
1.6 Noteworthy changes in version '0.25.1'
==========================================
* JPEG (saving) alpha channel fixes and size with resolution != 72
@ -103,7 +141,7 @@ system.
* Corrected layout of empty strings
* Only update visible menus
1.6 Noteworthy changes in version '0.25.0'
1.7 Noteworthy changes in version '0.25.0'
==========================================
* Fixes for new GIF library versions
@ -118,14 +156,14 @@ system.
* Numerous theme tweaks
* Spanish locale
1.7 Noteworthy changes in version '0.24.1'
1.8 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.8 Noteworthy changes in version '0.24.0'
1.9 Noteworthy changes in version '0.24.0'
==========================================
New features include:
@ -137,13 +175,13 @@ New features include:
Many bugfixes.
1.9 Noteworthy changes in version '0.23.1'
==========================================
1.10 Noteworthy changes in version '0.23.1'
===========================================
This is a bugfix release, primarily to deal with coding/archiving
issues.
1.10 Noteworthy changes in version '0.22.0'
1.11 Noteworthy changes in version '0.22.0'
===========================================
New features include:
@ -159,19 +197,19 @@ New features include:
selection of image reps, better support for icons). Many bugfixes,
including in Xib loading, printing, and NSView geometry.
1.11 Noteworthy changes in version '0.20.0'
1.12 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.12 Noteworthy changes in version '0.19.0'
1.13 Noteworthy changes in version '0.19.0'
===========================================
This is an (unstable) copy of the 0.18.0 release
1.13 Noteworthy changes in version '0.18.0'
1.14 Noteworthy changes in version '0.18.0'
===========================================
A new stable release that has had many improvements. Many new Mac OS X
@ -180,20 +218,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.14 Noteworthy changes in version '0.17.1'
1.15 Noteworthy changes in version '0.17.1'
===========================================
* New Mac OS X 10.5 methods in NSFont
* Add live resize in NSSplitView
1.15 Noteworthy changes in version '0.17.0'
1.16 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.16 Noteworthy changes in version '0.16.0'
1.17 Noteworthy changes in version '0.16.0'
===========================================
* Nib loading refractored and improved.
@ -201,7 +239,7 @@ and other definitions.
* NSWindowController made a subclass of NSResponder
* NSTokenField and netokenFiledCell classes added.
1.17 Noteworthy changes in version '0.14.0'
1.18 Noteworthy changes in version '0.14.0'
===========================================
* New class NSGlyphGenerator for glyph generation
@ -209,7 +247,7 @@ and other definitions.
* NSOpenGLView added some Mac OS X 10.3 methods
* Manu bug fixes.
1.18 Noteworthy changes in version '0.13.2'
1.19 Noteworthy changes in version '0.13.2'
===========================================
* Printing works a little better now.
@ -220,7 +258,7 @@ and other definitions.
* New class NSSegmentedCell.
* NSDrawer was implemented.
1.19 Noteworthy changes in version '0.13.1'
1.20 Noteworthy changes in version '0.13.1'
===========================================
* NSMenu - Added more MacOS X methods and an ivar.
@ -230,7 +268,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.20 Noteworthy changes in version '0.13.0'
1.21 Noteworthy changes in version '0.13.0'
===========================================
This is an unstable release. There may be backward compatibility issues
@ -257,7 +295,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.21 Noteworthy changes in version '0.12.0'
1.22 Noteworthy changes in version '0.12.0'
===========================================
It has been a long time since the last release and many things have been
@ -277,7 +315,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.22 Noteworthy changes in version '0.11.0'
1.23 Noteworthy changes in version '0.11.0'
===========================================
* Added support for keyed encoding in all gui classes.
@ -286,25 +324,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.23 Noteworthy changes in version '0.10.3'
1.24 Noteworthy changes in version '0.10.3'
===========================================
* Horizontal menus now work
* Better support for tracking active applications.
1.24 Noteworthy changes in version '0.10.2'
1.25 Noteworthy changes in version '0.10.2'
===========================================
Mostly bug fixes.
1.25 Noteworthy changes in version '0.10.1'
1.26 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.26 Noteworthy changes in version '0.10.0'
1.27 Noteworthy changes in version '0.10.0'
===========================================
This release is binary incompatible with previous releases. The
@ -315,7 +353,7 @@ new version.
* Model loading supports window auto-positioning
* Keyed encoding is supported in many classes.
1.27 Noteworthy changes in version '0.9.5'
1.28 Noteworthy changes in version '0.9.5'
==========================================
* Beginnings of CUPS interface were added.
@ -324,7 +362,7 @@ new version.
* NSApplication -runModalSession behavior changed.
* You can find the GUI library's version using the Info.plist
1.28 Noteworthy changes in version '0.9.4'
1.29 Noteworthy changes in version '0.9.4'
==========================================
* The printing classes have been completely reorganized to
@ -335,7 +373,7 @@ new version.
* NSScroller, NSScrollView has a new ivar.
* Some improvement of NSDataLink classes.
1.29 Noteworthy changes in version '0.9.3'
1.30 Noteworthy changes in version '0.9.3'
==========================================
* Spell checker reimplemented using libaspell
@ -344,7 +382,7 @@ new version.
* Binary incompatibilites from ivar additions in NSView and
subclasses.
1.30 Noteworthy changes in version '0.9.2'
1.31 Noteworthy changes in version '0.9.2'
==========================================
* Working NSToolbar implementation
@ -356,21 +394,21 @@ new version.
* NSStringDrawing redesigned.
* Much improved loading of gorm files
1.31 Noteworthy changes in version '0.9.1'
1.32 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.32 Noteworthy changes in version '0.9.0'
1.33 Noteworthy changes in version '0.9.0'
==========================================
Improvements in various classes, include NSPopUpButton,
NSBitmapImageRep, NSMenu, NSToolbar. Added support for thumbnail images
in NSWorkspace.
1.33 Noteworthy changes in version '0.8.9'
1.34 Noteworthy changes in version '0.8.9'
==========================================
Note that many headers have moved to new locations (both in the package
@ -379,13 +417,13 @@ applications may not compile because they cannot find the right header.
* New Language Setup documentation.
1.34 Noteworthy changes in version '0.8.8'
1.35 Noteworthy changes in version '0.8.8'
==========================================
* Updated LanguageSetup documentation
* Improved RTF reader (unicode support, etc).
1.35 Noteworthy changes in version '0.8.7'
1.36 Noteworthy changes in version '0.8.7'
==========================================
* NSBezierPath glyph methods implemented (depends on backend).
@ -393,7 +431,7 @@ applications may not compile because they cannot find the right header.
* Added default to load user-defined bundles (GSAppKitUserBundles
default).
1.36 Noteworthy changes in version '0.8.6'
1.37 Noteworthy changes in version '0.8.6'
==========================================
Updated to install in new locations based on changes in gnustep-make
@ -403,12 +441,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.37 Noteworthy changes in version '0.8.5'
1.38 Noteworthy changes in version '0.8.5'
==========================================
Bug fixes. NSStringDrawing now uses text system implementation.
1.38 Noteworthy changes in version '0.8.4'
1.39 Noteworthy changes in version '0.8.4'
==========================================
This release features a brand new text and layout system thanks to
@ -419,7 +457,7 @@ Alexander Malmberg. Other improvements include:
* Printing fixes.
* NSToolbar partially implemented.
1.39 Noteworthy changes in version '0.8.3'
1.40 Noteworthy changes in version '0.8.3'
==========================================
* Additions for Gorm support.
@ -430,7 +468,7 @@ Alexander Malmberg. Other improvements include:
* Window focus fixes
* Key view handling rewritten.
1.40 Noteworthy changes in version '0.8.2'
1.41 Noteworthy changes in version '0.8.2'
==========================================
* Handle fonts that aren't found better.
@ -441,7 +479,7 @@ Alexander Malmberg. Other improvements include:
* NSBrowser: implement non-separate columns
* Fix firstResponder status in text fields.
1.41 Noteworthy changes in version '0.8.1'
1.42 Noteworthy changes in version '0.8.1'
==========================================
* Handle scaled curves correctly.
@ -450,23 +488,23 @@ Alexander Malmberg. Other improvements include:
* NSSound implemented. gssnd sound server.
* Spell checker starts correctly now.
1.42 Noteworthy changes in version '0.8.0'
1.43 Noteworthy changes in version '0.8.0'
==========================================
1.43 Noteworthy changes in version '0.7.9'
1.44 Noteworthy changes in version '0.7.9'
==========================================
* NSTableView, NSOutlineView improvements.
* Menus no longer work in modal loop.
* Skeleton implementation of NSToolBar
1.44 Noteworthy changes in version '0.7.8'
1.45 Noteworthy changes in version '0.7.8'
==========================================
* Wheel color picker, standard color picker (bundles) added.
* System colors now use named colors. Easier configuration
1.45 Noteworthy changes in version '0.7.7'
1.46 Noteworthy changes in version '0.7.7'
==========================================
The graphics/window interface was completely revamped. Window functions
@ -488,7 +526,7 @@ computers, although it is in a very alpha state.
* Better autolayout with GSTable and subclasses.
* NSOutlineView much improved.
1.46 Noteworthy changes in version '0.7.6'
1.47 Noteworthy changes in version '0.7.6'
==========================================
* NSOutlineView implemented.
@ -497,7 +535,7 @@ computers, although it is in a very alpha state.
* Fully-functional keybindings, including multi-stroke keybindings.
* Memory panel available from Info Panel.
1.47 Noteworthy changes in version '0.7.5'
1.48 Noteworthy changes in version '0.7.5'
==========================================
* Drag and drop and image sliding much improved.
@ -515,7 +553,7 @@ computers, although it is in a very alpha state.
* Near rewrite of Menu handling code.
* Gmodel code compiled as a separate bundle.
1.48 Noteworthy changes in version '0.7.0'
1.49 Noteworthy changes in version '0.7.0'
==========================================
* Much improvement in NSBrowser, NSMatrix, NSPopUpButton, combo
@ -526,7 +564,7 @@ computers, although it is in a very alpha state.
* simpler, faster compilation and installation.
* NSColorWell works.
1.49 Noteworthy changes in version '0.6.7'
1.50 Noteworthy changes in version '0.6.7'
==========================================
* App Icons can support documents dropped using DnD.
@ -542,7 +580,7 @@ computers, although it is in a very alpha state.
* Implemented object value and formatter support in NSCell
* Support middle mouse button.
1.50 Noteworthy changes in version '0.6.6'
1.51 Noteworthy changes in version '0.6.6'
==========================================
* Window hints for motif and generic window managers.
@ -568,7 +606,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.51 Noteworthy changes in version '0.6.5'
1.52 Noteworthy changes in version '0.6.5'
==========================================
Many of the basic GUI classes have been vastly improved or rewritten,
@ -592,7 +630,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.52 Noteworthy changes in version '0.6.0'
1.53 Noteworthy changes in version '0.6.0'
==========================================
A Huge amount of progress, although a lot still needs to be done. It's
@ -613,7 +651,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.53 Noteworthy changes in version '0.5.5'
1.54 Noteworthy changes in version '0.5.5'
==========================================
Too extensive to list.
@ -621,7 +659,7 @@ Too extensive to list.
* A lot of rewritting has been done to the classes, with general
cleanup of coordinate conversion code, etc.
1.54 Noteworthy changes in version '0.5.0'
1.55 Noteworthy changes in version '0.5.0'
==========================================
* NSBrowser and NSBrowserCell have been implemented. There is one
@ -670,7 +708,7 @@ Too extensive to list.
* Several cleanups and as usual, many bug fixes.
1.55 Noteworthy changes in version '0.3.0'
1.56 Noteworthy changes in version '0.3.0'
==========================================
* Completely reworked the menu class. The NSMenu class is now
@ -701,7 +739,7 @@ Too extensive to list.
retain/release policy has been fixed, the cell classes correctly
implement the NSCopying protocol and many others.
1.56 Noteworthy changes in version '0.2.0'
1.57 Noteworthy changes in version '0.2.0'
==========================================
* Additional NSImage and NSImageRep class work. Incorporated common
@ -735,7 +773,7 @@ Too extensive to list.
* Many bug fixes and minor enhancements.
1.57 Noteworthy changes in version '0.1.1'
1.58 Noteworthy changes in version '0.1.1'
==========================================
* Almost complete implementation of the PXKMenu and PXKMenuCell
@ -758,7 +796,7 @@ Too extensive to list.
* Now requires the TIFF library for reading, writing, and
manipulating tiff files and images.
1.58 Noteworthy changes in version '0.1.0'
1.59 Noteworthy changes in version '0.1.0'
==========================================
* Integration of the GNUstep X/DPS GUI Backend. This has finally

View file

@ -65,7 +65,16 @@ NSMutableDictionary *EnumeratePrinters(DWORD flags)
if (!EnumPrinters(flags, NULL,
2, (LPBYTE) prninfo, needed, &needed, &returned))
{
NSLog(@"Error: %s\n", GetLastError());
DWORD errorCode = GetLastError();
char *errorText = NULL;
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM||FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
errorCode,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&errorText,
0, NULL);
NSLog(@"Error: %lu: %s\n", errorCode, errorText);
LocalFree(errorText);
}
else
{

View file

@ -105,6 +105,7 @@ NSEPSImageRep.m \
NSEvent.m \
NSFileWrapperExtensions.m \
NSFont.m \
NSFontAssetRequest.m \
NSFontCollection.m \
NSFontDescriptor.m \
NSFontManager.m \
@ -114,6 +115,10 @@ NSFormCell.m \
NSGroupTouchBarItem.m \
NSMagnificationGestureRecognizer.m \
NSPanGestureRecognizer.m \
NSPathCell.m \
NSPathComponentCell.m \
NSPathControl.m \
NSPathControlItem.m \
NSPickerTouchBarItem.m \
NSPopoverTouchBarItem.m \
NSPressGestureRecognizer.m \
@ -121,6 +126,7 @@ NSRotationGestureRecognizer.m \
NSSharingServicePickerTouchBarItem.m \
NSSliderTouchBarItem.m \
NSStepperTouchBarItem.m \
NSSwitch.m \
NSTouch.m \
NSTouchBar.m \
NSTouchBarItem.m \
@ -143,11 +149,13 @@ NSLayoutManager.m \
NSLevelIndicator.m \
NSLevelIndicatorCell.m \
NSMagnificationGestureRecognizer.m \
NSMediaLibraryBrowserController.m \
NSPanGestureRecognizer.m \
NSPickerTouchBarItem.m \
NSPopoverTouchBarItem.m \
NSPressGestureRecognizer.m \
NSRotationGestureRecognizer.m \
NSSharingServicePickerToolbarItem.m \
NSSharingServicePickerTouchBarItem.m \
NSSliderTouchBarItem.m \
NSStepperTouchBarItem.m \
@ -208,6 +216,9 @@ NSSegmentedControl.m \
NSScreen.m \
NSScroller.m \
NSScrollView.m \
NSScrubber.m \
NSScrubberItemView.m \
NSScrubberLayout.m \
NSSecureTextField.m \
NSSelection.m \
NSShadow.m \
@ -255,6 +266,8 @@ NSTrackingArea.m \
NSTreeController.m \
NSTreeNode.m \
NSUserDefaultsController.m \
NSUserInterfaceCompression.m \
NSUserInterfaceItemSearching.m \
NSView.m \
NSViewController.m \
NSVisualEffectView.m \
@ -340,9 +353,11 @@ Cocoa.h
APPKIT_HEADERS = \
AppKit.h \
AppKitDefines.h \
AppKitErrors.h \
AppKitExceptions.h \
NSAccessibility.h \
NSAccessibilityConstants.h \
NSAccessibilityProtocols.h \
NSActionCell.h \
NSAffineTransform.h \
NSAlert.h \
@ -393,10 +408,12 @@ NSDocument.h \
NSDocumentController.h \
NSDrawer.h \
NSEPSImageRep.h \
NSErrors.h \
NSEvent.h \
NSFileWrapper.h \
NSFileWrapperExtensions.h \
NSFont.h \
NSFontAssetRequest.h \
NSFontCollection.h \
NSFontDescriptor.h \
NSFontManager.h \
@ -423,6 +440,7 @@ NSLevelIndicator.h \
NSLevelIndicatorCell.h \
NSMagnificationGestureRecognizer.h \
NSMatrix.h \
NSMediaLibraryBrowserController.h \
NSMenu.h \
NSMenuItem.h \
NSMenuItemCell.h \
@ -437,6 +455,10 @@ NSOutlineView.h \
NSPageLayout.h \
NSPanel.h \
NSPanGestureRecognizer.h \
NSPathCell.h \
NSPathComponentCell.h \
NSPathControl.h \
NSPathControlItem.h \
NSParagraphStyle.h \
NSPasteboard.h \
NSPasteboardItem.h \
@ -467,6 +489,9 @@ NSSavePanel.h \
NSScreen.h \
NSScrollView.h \
NSScroller.h \
NSScrubber.h \
NSScrubberItemView.h \
NSScrubberLayout.h \
NSSearchField.h \
NSSearchFieldCell.h \
NSSecureTextField.h \
@ -475,6 +500,7 @@ NSSegmentedControl.h \
NSSelection.h \
NSShadow.h \
NSSharingService.h \
NSSharingServicePickerToolbarItem.h \
NSSharingServicePickerTouchBarItem.h \
NSSlider.h \
NSSliderCell.h \
@ -491,6 +517,7 @@ NSStepperTouchBarItem.h \
NSStringDrawing.h \
NSStatusBar.h \
NSStatusItem.h \
NSSwitch.h \
NSTabView.h \
NSTabViewItem.h \
NSTableColumn.h \
@ -525,6 +552,7 @@ NSViewController.h \
NSVisualEffectView.h \
NSWindow.h \
NSWindowController.h \
NSWindowRestoration.h \
NSWorkspace.h \
NSAttributedString.h \
NSColorPicking.h \
@ -537,6 +565,8 @@ NSNibDeclarations.h \
NSNibLoading.h \
NSNib.h \
NSSpellProtocol.h \
NSUserInterfaceCompression.h \
NSUserInterfaceItemSearching.h \
NSUserInterfaceItemIdentification.h \
NSUserInterfaceValidation.h \
DPSOperators.h \

View file

@ -59,7 +59,9 @@
#import "AppKit/NSTabViewItem.h"
#import "AppKit/PSOperators.h"
#import "AppKit/NSSliderCell.h"
#import "AppKit/NSPathCell.h"
#import "AppKit/NSPathControl.h"
#import "AppKit/NSPathComponentCell.h"
#import "GNUstepGUI/GSToolbarView.h"
#import "GNUstepGUI/GSTitleView.h"
@ -816,6 +818,222 @@
[self drawStepperDownButton: downRect];
}
// NSSwitch drawing methods
- (void) drawSwitchBezel: (NSRect)frame
forState: (NSControlStateValue)v
enabled: (BOOL)enabled
{
NSBezierPath *p;
NSPoint point;
CGFloat radius;
NSColor *backgroundColor;
if (enabled == NO)
{
backgroundColor = [NSColor disabledControlTextColor];
}
else if (NSControlStateValueOn != v)
{
backgroundColor = [NSColor windowBackgroundColor]; // offColor
}
else
{
backgroundColor = [NSColor selectedControlColor]; // onColor
}
// make smaller than enclosing frame
frame = NSInsetRect(frame, 4, 4);
radius = frame.size.height / 2.0;
point = frame.origin;
point.x += radius;
point.y += radius - 0.5;
// Draw initial path to enclose the button...
// left half-circle
p = [NSBezierPath bezierPath];
[p appendBezierPathWithArcWithCenter: point
radius: radius
startAngle: 90.0
endAngle: 270.0];
// line to first point and right halfcircle
point.x += frame.size.width - frame.size.height;
[p appendBezierPathWithArcWithCenter: point
radius: radius
startAngle: 270.0
endAngle: 90.0];
[p closePath];
// fill with background color
[backgroundColor set];
[p fill];
// and stroke rounded button
[[NSColor shadowColor] set];
[p stroke];
// Add highlights...
point = frame.origin;
point.x += radius - 0.5;
point.y += radius - 0.5;
p = [NSBezierPath bezierPath];
[p setLineWidth: 1.0];
[p appendBezierPathWithArcWithCenter: point
radius: radius
startAngle: 135.0
endAngle: 270.0];
// line to first point and right halfcircle
point.x += frame.size.width - frame.size.height;
[p appendBezierPathWithArcWithCenter: point
radius: radius
startAngle: 270.0
endAngle: 315.0];
[[NSColor controlLightHighlightColor] set];
[p stroke];
}
- (void) drawSwitchKnob: (NSRect)frame
forState: (NSControlStateValue)value
enabled: (BOOL)enabled
{
NSColor *backgroundColor = enabled ? [NSColor windowBackgroundColor] : [NSColor disabledControlTextColor];
NSBezierPath *oval;
NSRect rect = NSZeroRect;
CGFloat w = (frame.size.width / 2) - 2;
CGFloat h = frame.size.height - 6;
CGFloat y = frame.origin.y + 2;
CGFloat radius = frame.size.height / 2.0;
[backgroundColor set];
if (value == NSControlStateValueOff)
{
rect = NSMakeRect(frame.origin.x + 4,
y,
w,
h);
}
else
{
rect = NSMakeRect(frame.origin.x + ((frame.size.width - 2 * radius) + 2), // ((frame.size.width - w) - 2)
y,
w,
h);
}
oval = [NSBezierPath bezierPathWithOvalInRect: NSInsetRect(rect, 1, 1)];
// fill oval with background color
[backgroundColor set];
[oval fill];
// and stroke rounded button
[[NSColor shadowColor] set];
[oval stroke];
}
- (void) drawSwitchInRect: (NSRect)rect
forState: (NSControlStateValue)state
enabled: (BOOL)enabled
{
// Draw the well bezel
[self drawSwitchBezel: rect
forState: state
enabled: enabled];
// Draw the knob
[self drawSwitchKnob: rect
forState: state
enabled: enabled];
}
// NSPathComponentCell
- (void) drawPathComponentCellWithFrame: (NSRect)frame
inView: (NSPathControl *)pc
withCell: (NSPathComponentCell *)cell
isLastComponent: (BOOL)last
{
NSImage *img = [cell image];
NSURL *url = [cell URL];
NSString *string = [[url path] lastPathComponent];
NSRect textFrame = frame;
NSRect imgFrame = frame;
NSRect arrowFrame = frame;
NSImage *arrowImage = [NSImage imageNamed: @"NSMenuArrow"];
NSPathStyle style= [pc pathStyle];
NSRect newFrame = frame;
if (style == NSPathStylePopUp)
{
newFrame = [pc frame];
// Reset coodinates.
newFrame.origin.x = 0.0;
newFrame.origin.y = 0.0;
// Use control frame...
textFrame = newFrame;
imgFrame = newFrame;
arrowFrame = newFrame;
}
// Modify positions...
imgFrame.size.width = 17.0;
imgFrame.size.height = 17.0;
imgFrame.origin.x += 2.0;
imgFrame.origin.y += 2.0;
textFrame.origin.x += imgFrame.size.width + 5.0; // the width of the image plus a few pixels.
textFrame.origin.y += 5.0; // center with the image...
arrowFrame.origin.x += newFrame.size.width - 17.0;
arrowFrame.size.width = 8.0;
arrowFrame.size.height = 8.0;
arrowFrame.origin.y += 5.0;
if (style== NSPathStyleStandard || style== NSPathStyleNavigationBar)
{
// Draw the image...
[img drawInRect: imgFrame];
// Draw the text...
[[NSColor textColor] set];
[string drawAtPoint: textFrame.origin
withAttributes: nil];
// Draw the arrow...
if (last == NO)
{
[arrowImage drawInRect: arrowFrame];
}
}
else if (style == NSPathStylePopUp)
{
if (last == YES)
{
arrowImage = [NSImage imageNamed: @"common_ArrowDown"];
// Draw border...
[[NSColor controlShadowColor] set];
NSFrameRectWithWidth(newFrame, 1.0);
// Draw the image...
[img drawInRect: imgFrame];
// Draw the text...
[[NSColor textColor] set];
[string drawAtPoint: textFrame.origin
withAttributes: nil];
// Draw the arrow...
[arrowImage drawInRect: arrowFrame];
}
}
}
// NSSegmentedControl drawing methods
- (void) drawSegmentedControlSegment: (NSCell *)cell

View file

@ -47,6 +47,8 @@
#import "AppKit/NSMenuItem.h"
#import "AppKit/NSNib.h"
#import "AppKit/NSParagraphStyle.h"
#import "AppKit/NSPathCell.h"
#import "AppKit/NSPathComponentCell.h"
#import "AppKit/NSPopUpButton.h"
#import "AppKit/NSPopUpButtonCell.h"
#import "AppKit/NSScroller.h"
@ -164,6 +166,10 @@ static NSString *ApplicationClass = nil;
@implementation GSScene
@end
@interface NSPathCell (Private)
+ (NSArray *) _generateCellsForURL: (NSURL *)url;
@end
@implementation GSXib5KeyedUnarchiver
static NSDictionary *XmlTagToObjectClassMap = nil;
@ -391,7 +397,9 @@ static NSArray *XmlBoolDefaultYes = nil;
@"decodeDividerStyleForElement:", @"NSDividerStyle",
@"decodeToolbarIdentifiedItemsForElement:", @"NSToolbarIBIdentifiedItems",
@"decodeToolbarImageForElement:", @"NSToolbarItemImage",
nil];
@"decodeControlContentsForElement:", @"NSControlContents",
@"decodePathStyle:", @"NSPathStyle",
nil];
RETAIN(XmlKeyToDecoderSelectorMap);
// boolean fields that should be treated as YES when missing.
@ -400,6 +408,7 @@ static NSArray *XmlBoolDefaultYes = nil;
@"bordered",
@"prefersToBeShown",
@"editable",
@"enabled",
nil];
}
}
@ -1436,6 +1445,8 @@ didStartElement: (NSString*)elementName
size = [NSFont labelFontSize];
else if ([metaFont containsString: @"system"])
size = [NSFont systemFontSize];
else if ([metaFont containsString: @"toolTip"])
size = [NSFont smallSystemFontSize];
else if (metaFont)
NSWarnMLog(@"unknown meta font value: %@", metaFont);
}
@ -2200,6 +2211,11 @@ didStartElement: (NSString*)elementName
{
object = [element attributeForKey: @"stringValue"];
}
else if ([class isSubclassOfClass: [NSPathCell class]])
{
GSXibElement *el = [element elementForKey: @"url"];
object = [NSURL URLWithString: [el attributeForKey: @"string"]];
}
else
{
// Try the title attribute first as it is the more common encoding...
@ -2735,6 +2751,44 @@ didStartElement: (NSString*)elementName
return [self findResourceWithName: name];
}
- (id) decodeControlContentsForElement: (GSXibElement *)element
{
NSNumber *num = [NSNumber numberWithInteger: 0];
id obj = [element attributeForKey: @"state"];
if ([obj isEqualToString: @"on"])
{
num = [NSNumber numberWithInteger: 1];
}
return num;
}
- (id) decodePathStyle: (GSXibElement *)element
{
NSNumber *num = [NSNumber numberWithInteger: 0];
id obj = [element attributeForKey: @"pathStyle"];
if ([obj isEqualToString: @"standard"])
{
num = [NSNumber numberWithInteger: NSPathStyleStandard];
}
else if ([obj isEqualToString: @"popUp"])
{
num = [NSNumber numberWithInteger: NSPathStylePopUp];
}
else if ([obj isEqualToString: @"navigationBar"])
{
num = [NSNumber numberWithInteger: NSPathStyleNavigationBar];
}
else // if not specified then assume standard...
{
num = [NSNumber numberWithInteger: NSPathStyleStandard];
}
return num;
}
- (id) objectForXib: (GSXibElement*)element
{
id object = [super objectForXib: element];
@ -2798,7 +2852,6 @@ didStartElement: (NSString*)elementName
else if ([object respondsToSelector: @selector(setHeaderToolTip:)])
[object setHeaderToolTip: [element attributeForKey: @"toolTip"]];
}
// Process IB runtime attributes for element...
// Ensure we don't process the placeholders...
if ([element elementForKey: @"userDefinedRuntimeAttributes"] &&
@ -3162,6 +3215,11 @@ didStartElement: (NSString*)elementName
{
hasValue = [currentElement attributeForKey: @"title"] != nil;
hasValue |= [currentElement attributeForKey: @"image"] != nil;
hasValue |= [currentElement attributeForKey: @"string"] != nil;
}
else if ([@"NSControlContents" isEqualToString: key])
{
hasValue = [currentElement attributeForKey: @"state"] != nil;
}
else if ([@"NSAlternateContents" isEqualToString: key])
{

View file

@ -1651,8 +1651,8 @@ void NSBeginAlertSheet(NSString *title,
NSString *otherButton,
NSWindow *docWindow,
id modalDelegate,
SEL willEndSelector,
SEL didEndSelector,
SEL didDismissSelector,
void *contextInfo,
NSString *msg, ...)
{
@ -1676,8 +1676,16 @@ void NSBeginAlertSheet(NSString *title,
[NSApp beginSheet: panel
modalForWindow: docWindow
modalDelegate: modalDelegate
didEndSelector: willEndSelector
didEndSelector: didEndSelector
contextInfo: contextInfo];
if (modalDelegate && [modalDelegate respondsToSelector: didDismissSelector])
{
void (*didDismiss)(id, SEL, id, NSInteger, void*);
didDismiss = (void (*)(id, SEL, id, NSInteger, void*))[modalDelegate
methodForSelector: didDismissSelector];
didDismiss(modalDelegate, didDismissSelector, panel, [panel result],
contextInfo);
}
NSReleaseAlertPanel(panel);
}
@ -1688,8 +1696,8 @@ void NSBeginCriticalAlertSheet(NSString *title,
NSString *otherButton,
NSWindow *docWindow,
id modalDelegate,
SEL willEndSelector,
SEL didEndSelector,
SEL didDismissSelector,
void *contextInfo,
NSString *msg, ...)
{
@ -1707,15 +1715,15 @@ void NSBeginCriticalAlertSheet(NSString *title,
[NSApp beginSheet: panel
modalForWindow: docWindow
modalDelegate: modalDelegate
didEndSelector: willEndSelector
didEndSelector: didEndSelector
contextInfo: contextInfo];
[panel close];
if (modalDelegate && [modalDelegate respondsToSelector: didEndSelector])
if (modalDelegate && [modalDelegate respondsToSelector: didDismissSelector])
{
void (*didEnd)(id, SEL, id, NSInteger, void*);
didEnd = (void (*)(id, SEL, id, NSInteger, void*))[modalDelegate
methodForSelector: didEndSelector];
didEnd(modalDelegate, didEndSelector, panel, [panel result], contextInfo);
void (*didDismiss)(id, SEL, id, NSInteger, void*);
didDismiss = (void (*)(id, SEL, id, NSInteger, void*))[modalDelegate
methodForSelector: didDismissSelector];
didDismiss(modalDelegate, didDismissSelector, panel, [panel result],
contextInfo);
}
NSReleaseAlertPanel(panel);
@ -1727,8 +1735,8 @@ void NSBeginInformationalAlertSheet(NSString *title,
NSString *otherButton,
NSWindow *docWindow,
id modalDelegate,
SEL willEndSelector,
SEL didEndSelector,
SEL didDismissSelector,
void *contextInfo,
NSString *msg, ...)
{
@ -1748,15 +1756,15 @@ void NSBeginInformationalAlertSheet(NSString *title,
[NSApp beginSheet: panel
modalForWindow: docWindow
modalDelegate: modalDelegate
didEndSelector: willEndSelector
didEndSelector: didEndSelector
contextInfo: contextInfo];
[panel close];
if (modalDelegate && [modalDelegate respondsToSelector: didEndSelector])
if (modalDelegate && [modalDelegate respondsToSelector: didDismissSelector])
{
void (*didEnd)(id, SEL, id, NSInteger, void*);
didEnd = (void (*)(id, SEL, id, NSInteger, void*))[modalDelegate
methodForSelector: didEndSelector];
didEnd(modalDelegate, didEndSelector, panel, [panel result], contextInfo);
void (*didDismiss)(id, SEL, id, NSInteger, void*);
didDismiss = (void (*)(id, SEL, id, NSInteger, void*))[modalDelegate
methodForSelector: didDismissSelector];
didDismiss(modalDelegate, didDismissSelector, panel, [panel result],
contextInfo);
}
NSReleaseAlertPanel(panel);

View file

@ -899,7 +899,7 @@ systemColorWithName(NSString *name)
return systemColorWithName(@"toolTipTextColor");
}
+ (NSColor *)windowBackgroundColor
+ (NSColor *) windowBackgroundColor
{
return systemColorWithName(@"windowBackgroundColor");
}

View file

@ -0,0 +1,52 @@
/* Implementation of class NSFontAssetRequest
Copyright (C) 2019 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:06:56 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "AppKit/NSFontAssetRequest.h"
@implementation NSFontAssetRequest
- (instancetype) initWithFontDescriptors: (NSArray *)fontDescriptors
options: (NSFontAssetRequestOptions)options
{
return [super init];
}
- (NSArray *) downloadedFontDescriptors
{
return nil;
}
- (NSProgress *) progress
{
return [NSProgress progressWithTotalUnitCount: 0.0];
}
- (void)downloadFontAssetsWithCompletionHandler: (GSFontAssetCompletionHandler)completionHandler
{
NSError *error = nil;
CALL_BLOCK(completionHandler, error);
}
@end

View file

@ -130,12 +130,6 @@ typedef struct {
NSInteger height;
} MRect;
static inline MPoint MakePoint (NSInteger x, NSInteger y)
{
MPoint point = { x, y };
return point;
}
@interface NSMatrix (PrivateMethods)
- (void) _renewRows: (NSInteger)row
columns: (NSInteger)col

View file

@ -0,0 +1,53 @@
/* Implementation of class NSMediaLibraryBrowserController
Copyright (C) 2019 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:07:21 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "AppKit/NSMediaLibraryBrowserController.h"
@implementation NSMediaLibraryBrowserController
+ (NSMediaLibraryBrowserController *) sharedMediaLibraryBrowserController
{
return nil;
}
- (NSRect) frame
{
return NSZeroRect;
}
- (IBAction) togglePanel: (id)sender
{
}
- (BOOL) isVisible
{
return NO;
}
- (void) setVisible: (BOOL)flag
{
}
@end

View file

@ -1619,13 +1619,33 @@ static BOOL menuBarVisible = YES;
}
+ (void) popUpContextMenu: (NSMenu *)menu
withEvent: (NSEvent *)event
withEvent: (NSEvent *)event
forView: (NSView *)view
withFont: (NSFont *)font
{
[menu _rightMouseDisplay: event];
}
- (void) popUpMenuPositionItem: (NSMenuItem *)item
atLocation: (NSPoint) point
inView: (NSView *) view
{
NSRect cellFrame = [view convertRect: [view bounds] toView: nil];
NSWindow *w = [view window];
NSMenuView *mr = [self menuRepresentation];
NSUInteger selectedItem = [self indexOfItem: item];
cellFrame = [[view window] convertRectToScreen: cellFrame];
cellFrame.origin.x += point.x;
cellFrame.origin.y += point.y;
[[GSTheme theme] displayPopUpMenu: mr
withCellFrame: cellFrame
controlViewWindow: w
preferredEdge: NSMinYEdge
selectedItem: selectedItem];
}
/*
* NSObject Protocol
*/

365
Source/NSPathCell.m Normal file
View file

@ -0,0 +1,365 @@
/* Implementation of class NSPathCell
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 22 18:19:07 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "AppKit/NSPathCell.h"
#import "AppKit/NSWorkspace.h"
#import "AppKit/NSImage.h"
#import "AppKit/NSPathComponentCell.h"
static Class pathComponentCellClass;
@interface NSPathCell (Private)
+ (NSArray *) _generateCellsForURL: (NSURL *)url;
@end
@interface NSPathComponentCell (Private)
- (void) _setLastComponent: (BOOL)f;
@end
@implementation NSPathCell
+ (void) initialize
{
if (self == [NSPathCell class])
{
[self setVersion: 1.0];
[self setPathComponentCellClass: [NSPathComponentCell class]];
}
}
- (void) dealloc
{
RELEASE(_backgroundColor);
RELEASE(_placeholderAttributedString);
RELEASE(_allowedTypes);
RELEASE(_url);
RELEASE(_pathComponentCells);
[super dealloc];
}
- (void)mouseEntered:(NSEvent *)event
withFrame:(NSRect)frame
inView:(NSView *)view
{
// This is the method where the expansion of the cell happens
// if the path component cells are shortened.
// This is currently not implemented.
}
- (void)mouseExited:(NSEvent *)event
withFrame:(NSRect)frame
inView:(NSView *)view
{
// This is the method where the contraction of the cell happens
// if the path component cells are shortened.
// This is currently not implemented.
}
- (void) setAllowedTypes: (NSArray *)types
{
ASSIGNCOPY(_allowedTypes, types);
}
- (NSArray *) allowedTypes
{
return _allowedTypes;
}
- (NSPathStyle) pathStyle
{
return _pathStyle;
}
- (void) setPathStyle: (NSPathStyle)pathStyle
{
_pathStyle = pathStyle;
}
- (NSAttributedString *) placeholderAttributedString
{
return _placeholderAttributedString;
}
- (void) setPlaceholderAttributedString: (NSAttributedString *)string
{
ASSIGNCOPY(_placeholderAttributedString, string);
}
- (NSString *) placeholderString
{
return [_placeholderAttributedString string];
}
- (void) setPlaceholderString: (NSString *)string
{
NSAttributedString *as = [[NSAttributedString alloc] initWithString: string];
[self setPlaceholderAttributedString: as];
RELEASE(as);
}
- (NSColor *) backgroundColor
{
return _backgroundColor;
}
- (void) setBackgroundColor: (NSColor *)color
{
ASSIGNCOPY(_backgroundColor, color);
}
+ (Class) pathComponentCellClass
{
return pathComponentCellClass;
}
+ (void) setPathComponentCellClass: (Class)clz
{
pathComponentCellClass = clz;
}
- (NSRect)rectOfPathComponentCell:(NSPathComponentCell *)cell
withFrame:(NSRect)frame
inView:(NSView *)view
{
NSUInteger index = [_pathComponentCells indexOfObject: cell];
CGFloat cellWidth = (frame.size.width / (CGFloat)[_pathComponentCells count]);
return NSMakeRect(frame.origin.x + (cellWidth * (CGFloat)index),
frame.origin.y,
cellWidth,
frame.size.height);
}
- (NSPathComponentCell *)pathComponentCellAtPoint:(NSPoint)point
withFrame:(NSRect)frame
inView:(NSView *)view
{
NSUInteger c = [_pathComponentCells count];
NSUInteger woc = frame.size.width / c;
NSUInteger item = (NSUInteger)point.x / woc;
return [_pathComponentCells objectAtIndex: item];
}
- (NSPathComponentCell *) clickedPathComponentCell
{
return _clickedPathComponentCell;
}
- (NSArray *) pathComponentCells
{
return _pathComponentCells;
}
- (void) setPathComponentCells: (NSArray *)cells
{
ASSIGNCOPY(_pathComponentCells, cells);
}
- (SEL) doubleAction
{
return _doubleAction;
}
- (void) setDoubleAction: (SEL)action
{
_doubleAction = action;
}
- (id) objectValue
{
return _objectValue;
}
- (void) setObjectValue: (id)obj
{
ASSIGN(_objectValue, obj);
[self setPathComponentCells:
[NSPathCell _generateCellsForURL: (NSURL *)_objectValue]];
}
- (NSURL *) URL
{
return [self objectValue];
}
- (void) setURL: (NSURL *)url
{
[self setObjectValue: url];
}
- (id<NSPathCellDelegate>) delegate
{
return _delegate;
}
- (void) setDelegate: (id<NSPathCellDelegate>)delegate
{
_delegate = delegate;
}
- (void) drawInteriorWithFrame: (NSRect)frame inView: (NSView *)controlView
{
NSUInteger count = [_pathComponentCells count];
[super drawInteriorWithFrame: frame
inView: controlView];
NSEnumerator *en = [_pathComponentCells objectEnumerator];
NSPathComponentCell *cell = nil;
while ((cell = (NSPathComponentCell *)[en nextObject]) != nil)
{
NSRect f = [self rectOfPathComponentCell: cell
withFrame: frame
inView: controlView];
[cell drawInteriorWithFrame: f
inView: controlView];
}
}
- (id) initWithCoder: (NSCoder *)coder
{
self = [super initWithCoder: coder];
if ([coder allowsKeyedCoding])
{
[self setPathStyle: NSPathStyleStandard];
if ([coder containsValueForKey: @"NSPathStyle"])
{
[self setPathStyle: [coder decodeIntegerForKey: @"NSPathStyle"]];
}
}
else
{
[coder decodeValueOfObjCType: @encode(NSUInteger)
at: &_pathStyle];
[self setPathComponentCells: [coder decodeObject]];
}
return self;
}
- (void) encodeWithCoder: (NSCoder *)coder
{
[super encodeWithCoder: coder];
if ([coder allowsKeyedCoding])
{
[coder encodeInteger: [self pathStyle]
forKey: @"NSPathStyle"];
[coder encodeObject: [self pathComponentCells]
forKey: @"NSPathComponentCells"];
}
else
{
[coder encodeValueOfObjCType: @encode(NSUInteger)
at: &_pathStyle];
[coder encodeObject: [self pathComponentCells]];
}
}
@end
@implementation NSPathCell (Private)
// Private...
+ (NSArray *) _generateCellsForURL: (NSURL *)url
{
NSMutableArray *array = [NSMutableArray arrayWithCapacity: 10];
// Create cells
if (url != nil)
{
BOOL isDir = NO;
BOOL at_root = NO;
NSFileManager *fm = [NSFileManager defaultManager];
NSURL *u = url;
// Decompose string...
while (at_root == NO)
{
NSPathComponentCell *cell = [[NSPathComponentCell alloc] init];
NSImage *image = nil;
NSString *string = [u path];
[cell setURL: u];
[fm fileExistsAtPath: string
isDirectory: &isDir];
if ([string isEqualToString: @"/"])
{
at_root = YES;
}
if (isDir && at_root == NO)
{
image = [NSImage imageNamed: @"NSFolder"];
}
else if (isDir == YES && at_root == YES)
{
image = [NSImage imageNamed: @"NSComputer"];
}
else
{
image = [[NSWorkspace sharedWorkspace] iconForFile: [[url path] lastPathComponent]];
}
[cell setImage: image];
if ([array count] == 0) // the element we are adding is the last component that will show
{
[cell _setLastComponent: YES];
}
else
{
[cell _setLastComponent: NO];
}
[array insertObject: cell
atIndex: 0];
RELEASE(cell);
string = [string stringByDeletingLastPathComponent];
u = [NSURL URLWithString: string
relativeToURL: nil];
if (u == nil && at_root == NO)
{
// Because when we remove the last path component
// all that is left is a blank... so we add the "/" so that
// it is shown.
u = [NSURL URLWithString: @"/"];
}
}
}
return [array copy];
}
@end
@implementation NSPathComponentCell (Private)
- (void) _setLastComponent: (BOOL)f
{
_lastComponent = f;
}
@end

View file

@ -0,0 +1,73 @@
/* Implementation of class NSPathComponentCell
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 22 18:19:21 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import <Foundation/NSURL.h>
#import <Foundation/NSGeometry.h>
#import "AppKit/NSPathComponentCell.h"
#import "AppKit/NSImage.h"
#import "GNUstepGUI/GSTheme.h"
@implementation NSPathComponentCell
- (void) dealloc
{
RELEASE(_image);
RELEASE(_url);
[super dealloc];
}
- (NSImage *) image
{
return _image;
}
- (void) setImage: (NSImage *)image
{
ASSIGNCOPY(_image, image);
}
- (NSURL *) URL
{
return _url;
}
- (void) setURL: (NSURL *)url
{
ASSIGNCOPY(_url, url);
}
- (void) drawInteriorWithFrame: (NSRect)f
inView: (NSView *)v
{
[super drawInteriorWithFrame: f inView: v];
[[GSTheme theme] drawPathComponentCellWithFrame: f
inView: (NSPathControl *)v
withCell: self
isLastComponent: _lastComponent];
}
@end

575
Source/NSPathControl.m Normal file
View file

@ -0,0 +1,575 @@
/* Implementation of class NSPathControl
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 22 18:19:40 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import <Foundation/NSNotification.h>
#import "AppKit/NSPathControl.h"
#import "AppKit/NSPathCell.h"
#import "AppKit/NSGraphics.h"
#import "AppKit/NSDragging.h"
#import "AppKit/NSPasteboard.h"
#import "AppKit/NSMenu.h"
#import "AppKit/NSOpenPanel.h"
#import "AppKit/NSPathComponentCell.h"
#import "AppKit/NSPathControlItem.h"
#import "AppKit/NSEvent.h"
#import "AppKit/NSTrackingArea.h"
static NSNotificationCenter *nc = nil;
static Class pathCellClass;
@interface NSPathCell (PathControlPrivate)
- (void) _setClickedPathComponentCell: (NSPathComponentCell *)c;
@end
@interface NSPathComponentCell (PathControlPrivate)
- (NSPathControlItem *) _pathControlItem;
@end
@implementation NSPathControl
+ (void) initialize
{
if (self == [NSPathControl class])
{
[self setVersion: 1.0];
[self setCellClass: [NSPathCell class]];
nc = [NSNotificationCenter defaultCenter];
}
}
+ (Class) cellClass
{
return pathCellClass;
}
+ (void) setCellClass: (Class)classId
{
pathCellClass = classId;
}
- (void) resetCursorRects
{
[[self superview] removeTrackingRect: _trackingTag];
_trackingTag = [[self superview] addTrackingRect: [self frame]
owner: self
userData: nil
assumeInside: YES];
}
- (instancetype) init
{
self = [super init];
if (self != nil)
{
[self setPathStyle: NSPathStyleStandard];
[self setURL: nil];
[self setDelegate: nil];
[self setAllowedTypes: [NSArray arrayWithObject: NSFilenamesPboardType]];
}
return self;
}
- (void) dealloc
{
[[self superview] removeTrackingRect: _trackingTag];
[super dealloc];
}
- (void) mouseEntered: (NSEvent *)event
{
[_cell mouseEntered: event
withFrame: [self frame]
inView: self];
}
- (void) mouseExited: (NSEvent *)event
{
[_cell mouseExited: event
withFrame: [self frame]
inView: self];
}
- (void) setPathStyle: (NSPathStyle)style
{
[_cell setPathStyle: style];
[self setNeedsDisplay];
}
- (NSPathStyle) pathStyle
{
return [_cell pathStyle];
}
- (NSPathComponentCell *) clickedPathComponentCell
{
return [_cell clickedPathComponentCell];
}
- (NSArray *) pathComponentCells
{
return [_cell pathComponentCells];
}
- (void) setPathComponentCells: (NSArray *)cells
{
[_cell setPathComponentCells: cells];
[self setNeedsDisplay];
}
- (SEL) doubleAction;
{
return [_cell doubleAction];
}
- (void) setDoubleAction: (SEL)doubleAction
{
[_cell setDoubleAction: doubleAction];
}
- (void) _createPathItems
{
NSArray *a = [_cell pathComponentCells];
NSEnumerator *en = [a objectEnumerator];
NSPathComponentCell *c = nil;
NSMutableArray *items = [NSMutableArray arrayWithCapacity: [a count]];
while ((c = [en nextObject]) != nil)
{
NSPathControlItem *pi = [c _pathControlItem];
[items addObject: pi];
}
[self setPathItems: [items copy]];
}
- (NSURL *) URL
{
return [_cell URL];
}
- (void) setURL: (NSURL *)url
{
[_cell setURL: url];
[self _createPathItems];
[self setNeedsDisplay];
}
- (id<NSPathControlDelegate>) delegate
{
return _delegate;
}
- (void) setDelegate: (id<NSPathControlDelegate>) delegate
{
_delegate = delegate;
}
- (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL)flag
{
if (flag)
{
return _localMask;
}
return _remoteMask;
}
- (void) setDraggingSourceOperationMask: (NSDragOperation)mask
forLocal: (BOOL)local
{
if (local)
{
_localMask = mask;
}
else
{
_remoteMask = mask;
}
}
- (NSArray *) allowedTypes;
{
return [_cell allowedTypes];
}
- (void) setAllowedTypes: (NSArray *)allowedTypes
{
[_cell setAllowedTypes: allowedTypes];
[self registerForDraggedTypes: allowedTypes];
}
- (NSPathControlItem *) clickedPathItem
{
return [[self clickedPathComponentCell] _pathControlItem];
}
- (NSArray *) pathItems
{
return _pathItems;
}
- (void) setPathItems: (NSArray *)items
{
NSEnumerator *en = [items objectEnumerator];
NSMutableArray *array = [NSMutableArray arrayWithCapacity: [items count]];
NSPathControlItem *item = nil;
while ((item = [en nextObject]) != nil)
{
NSPathComponentCell *cell = [[NSPathComponentCell alloc] init];
[cell setImage: [item image]];
[cell setURL: [item URL]];
[array addObject: cell];
}
[self setPathComponentCells: array];
ASSIGNCOPY(_pathItems, items);
[self setNeedsDisplay];
}
- (NSAttributedString *) placeholderAttributedString
{
return [_cell placeholderAttributedString];
}
- (void) setPlaceholderAttributedString: (NSAttributedString *)string
{
[_cell setPlaceholderAttributedString: string];
[self setNeedsDisplay];
}
- (NSString *) placeholderString
{
return [_cell placeholderString];
}
- (void) setPlaceholderString: (NSString *)string
{
[_cell setPlaceholderString: string];
[self setNeedsDisplay];
}
- (NSColor *) backgroundColor
{
return [_cell backgroundColor];
}
- (void) setBackgroundColor: (NSColor *)color
{
[_cell setBackgroundColor: color];
[self setNeedsDisplay];
}
- (void) _doMenuAction: (id)sender
{
NSPathComponentCell *cc = (NSPathComponentCell *)[sender representedObject];
[_cell _setClickedPathComponentCell: cc];
if ([[self cell] action])
{
[self sendAction: [[self cell] action]
to: [[self cell] target]];
}
[[sender menu] close];
}
- (void) _doChooseMenuAction: (id)sender
{
NSOpenPanel *op = [NSOpenPanel openPanel];
int result = 0;
NSFileManager *fm = [NSFileManager defaultManager];
BOOL isDir = NO;
NSString *path = nil;
NSString *file = nil;
[fm fileExistsAtPath: [[self URL] path]
isDirectory: &isDir];
if (isDir)
{
path = [[self URL] path];
}
else
{
path = [[[self URL] path] stringByDeletingLastPathComponent];
file = [[[self URL] path] lastPathComponent];
}
[op setAllowsMultipleSelection: NO];
[op setCanChooseFiles: YES];
[op setCanChooseDirectories: YES];
if ([(id)_delegate respondsToSelector: @selector(pathCell:willPopUpMenu:)])
{
[_delegate pathControl: self
willDisplayOpenPanel: op];
}
if ([(id)[_cell delegate] respondsToSelector: @selector(pathCell:willPopUpMenu:)])
{
[[_cell delegate] pathCell: _cell
willDisplayOpenPanel: op];
}
result = [op runModalForDirectory: path
file: file
types: nil];
if (result == NSOKButton)
{
NSArray *urls = [op URLs];
NSURL *url = [urls objectAtIndex: 0];
[self setURL: url];
}
[[sender menu] close];
}
- (void) mouseDown: (NSEvent *)event
{
if (![self isEnabled])
{
[super mouseDown: event];
return;
}
if ([self pathStyle] == NSPathStylePopUp)
{
NSPathCell *acell = (NSPathCell *)[self cell];
NSArray *array = [acell pathComponentCells];
NSMenu *menu = AUTORELEASE([[NSMenu alloc] initWithTitle: nil]);
NSPathComponentCell *c = nil;
NSEnumerator *en = [array objectEnumerator];
while ((c = [en nextObject]) != nil)
{
NSURL *u = [c URL];
NSString *s = [[u path] lastPathComponent];
NSMenuItem *i = [[NSMenuItem alloc] init];
[i setTitle: s];
[i setTarget: self];
[i setAction: @selector(_doMenuAction:)];
[i setRepresentedObject: c];
[menu insertItem: i
atIndex: 0];
RELEASE(i);
}
// Add separator
[menu insertItem: [NSMenuItem separatorItem]
atIndex: 0];
// Add choose menu option
NSMenuItem *i = [[NSMenuItem alloc] init];
[i setTitle: _(@"Choose...")];
[i setTarget: self];
[i setAction: @selector(_doChooseMenuAction:)];
[menu insertItem: i
atIndex: 0];
RELEASE(i);
[self setMenu: menu];
if (_delegate)
{
if ([(id)_delegate respondsToSelector: @selector(pathControl:willPopUpMenu:)])
{
[_delegate pathControl: self
willPopUpMenu: menu];
}
}
if ([_cell delegate])
{
if ([(id)[_cell delegate] respondsToSelector: @selector(pathCell:willPopUpMenu:)])
{
[[_cell delegate] pathCell: _cell
willPopUpMenu: menu];
}
}
[menu popUpMenuPositionItem: [menu itemAtIndex: 0]
atLocation: NSMakePoint(0.0, 0.0)
inView: self];
}
else
{
NSPathComponentCell *pcc = [_cell pathComponentCellAtPoint: [event locationInWindow]
withFrame: [self frame]
inView: self];
[_cell _setClickedPathComponentCell: pcc];
if ([[self cell] action])
{
[self sendAction: [[self cell] action]
to: [[self cell] target]];
}
}
}
- (NSDragOperation) draggingEntered: (id<NSDraggingInfo>)sender
{
if (_delegate != nil)
{
NSDragOperation dop = [_delegate pathControl: self
validateDrop: sender];
return dop;
}
return NSDragOperationCopy;
}
- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender
{
NSPasteboard *pb = [sender draggingPasteboard];
if ([[pb types] containsObject: NSFilenamesPboardType])
{
NSArray *files = [pb propertyListForType: NSFilenamesPboardType];
if ([files count] > 0)
{
NSString *file = [files objectAtIndex: 0];
NSURL *u = [NSURL URLWithString: file];
BOOL accept = NO;
if ([self delegate])
{
accept = [_delegate pathControl: self
acceptDrop: sender];
}
else
{
accept = YES;
}
if (accept)
{
[self setURL: u];
}
}
}
return YES;
}
- (instancetype) initWithCoder: (NSKeyedUnarchiver *)coder
{
self = [super initWithCoder: coder];
if (self != nil)
{
if ([coder allowsKeyedCoding])
{
if ([coder containsValueForKey: @"NSBackgroundColor"])
{
[self setBackgroundColor: [coder decodeObjectForKey: @"NSBackgroundColor"]];
}
else
{
[self setBackgroundColor: [NSColor windowBackgroundColor]];
}
if ([coder containsValueForKey: @"NSDragTypes"])
{
[self setAllowedTypes: [coder decodeObjectForKey: @"NSDragTypes"]];
}
else
{
[self setAllowedTypes: [NSArray arrayWithObject: NSFilenamesPboardType]];
}
if ([coder containsValueForKey: @"NSControlAction"])
{
NSString *s = [coder decodeObjectForKey: @"NSControlAction"];
[self setAction: NSSelectorFromString(s)];
}
if ([coder containsValueForKey: @"NSControlTarget"])
{
id t = [coder decodeObjectForKey: @"NSControlTarget"];
[self setTarget: t];
}
}
else
{
[self setBackgroundColor: [coder decodeObject]];
[self setAllowedTypes: [coder decodeObject]];
[self setAction: NSSelectorFromString([coder decodeObject])];
[self setTarget: [coder decodeObject]];
}
}
return self;
}
- (void) encodeWithCoder: (NSCoder *)coder
{
[super encodeWithCoder: coder];
if ([coder allowsKeyedCoding])
{
[coder encodeObject: [self backgroundColor]
forKey: @"NSBackgroundColor"];
[coder encodeObject: [self allowedTypes]
forKey: @"NSDragTypes"];
[coder encodeObject: NSStringFromSelector([self action])
forKey: @"NSControlAction"];
[coder encodeObject: [self target]
forKey: @"NSControlTarget"];
}
else
{
[coder encodeObject: [self backgroundColor]];
[coder encodeObject: [self allowedTypes]];
[coder encodeObject: NSStringFromSelector([self action])];
[coder encodeObject: [self target]];
}
}
@end
@implementation NSPathCell (PathControlPrivate)
- (void) _setClickedPathComponentCell: (NSPathComponentCell *)c
{
_clickedPathComponentCell = c;
}
@end
@implementation NSPathComponentCell (PathControlPrivate)
- (NSPathControlItem *) _pathControlItem
{
NSPathControlItem *pi = [[NSPathControlItem alloc] init];
NSURL *u = [self URL];
NSString *path = [u path];
[pi setImage: [self image]];
[pi setURL: u];
[pi setTitle: [path lastPathComponent]];
AUTORELEASE(pi);
return pi;
}
@end

View file

@ -0,0 +1,84 @@
/* Implementation of class NSPathControlItem
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 22 18:20:16 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import <Foundation/NSString.h>
#import <Foundation/NSURL.h>
#import <Foundation/NSAttributedString.h>
#import "AppKit/NSPathControlItem.h"
#import "AppKit/NSImage.h"
@implementation NSPathControlItem
- (NSAttributedString *) attributedTitle
{
return _attributedTitle;
}
- (void) setAttributedTitle: (NSAttributedString *)attributedTitle
{
ASSIGNCOPY(_attributedTitle, attributedTitle);
}
- (NSImage *) image
{
return _image;
}
- (void) setImage: (NSImage *)image
{
ASSIGNCOPY(_image, image);
}
- (NSURL *) URL
{
return _url;
}
- (void) setURL: (NSURL *)url
{
ASSIGNCOPY(_url, url);
}
- (NSString *) title
{
return [_attributedTitle string];
}
- (void) setTitle: (NSString *)title
{
NSAttributedString *attrTitle = [[NSAttributedString alloc] initWithString: title];
[self setAttributedTitle: attrTitle];
RELEASE(attrTitle);
}
- (void) dealloc
{
RELEASE(_attributedTitle);
RELEASE(_image);
RELEASE(_url);
[super dealloc];
}
@end

30
Source/NSScrubber.m Normal file
View file

@ -0,0 +1,30 @@
/* Implementation of class NSScrubber
Copyright (C) 2019 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 8 09:16:14 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "AppKit/NSScrubber.h"
@implementation NSScrubber
@end

View file

@ -0,0 +1,34 @@
/* Implementation of class NSScrubberItemView
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 8 09:17:27 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "AppKit/NSScrubberItemView.h"
@implementation NSScrubberArrangedView
@end
@implementation NSScrubberItemView
@end

135
Source/NSScrubberLayout.m Normal file
View file

@ -0,0 +1,135 @@
/* Implementation of class NSScrubberLayout
Copyright (C) 2019 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 8 09:20:18 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "AppKit/NSScrubberLayout.h"
@implementation NSScrubberLayoutAttributes
+ (NSScrubberLayoutAttributes *) layoutAttributesForItemAtIndex: (NSInteger)index
{
return nil;
}
- (CGFloat) alpha
{
return 0.0;
}
- (NSRect) frame
{
return NSZeroRect;
}
- (NSInteger) itemIndex
{
return 0;
}
- (instancetype) copyWithZone: (NSZone *)z
{
return nil;
}
@end
@implementation NSScrubberLayout
// Configuring
- (Class) layoutAttributesClass
{
return nil;
}
- (NSScrubber *) scrubber
{
return nil;
}
- (NSRect) visibleRect
{
return NSZeroRect;
}
- (void) invalidateLayout
{
}
// Subclassing layout
- (void) prepareLayout
{
}
- (NSSize) scrubberContentSize
{
return NSZeroSize;
}
- (NSScrubberLayoutAttributes *) layoutAttributesForItemAtIndex: (NSInteger)index
{
return nil;
}
- (NSScrubberLayoutAttributes *) layoutAttributesForItemsInRect: (NSRect)rect
{
return nil;
}
- (BOOL) shouldInvalidateLayoutForHighlightChange
{
return NO;
}
- (BOOL) shouldInvalidateLayoutForSelectionChange
{
return NO;
}
- (BOOL) shouldInvalidateLayoutForChangeFromVisibleRect: (NSRect)fromRect
toVisibleRect: (NSRect)toRect
{
return NO;
}
- (BOOL) automaticallyMirrorsInRightToLeftLayout
{
return NO;
}
- (instancetype) init
{
self = [super init];
return self;
}
- (instancetype) initWithCoder: (NSCoder *)coder
{
self = [super init];
return self;
}
- (void) encodeWithCoder: (NSCoder *)coder
{
}
@end

View file

@ -0,0 +1,48 @@
/* Implementation of class NSSharingServicePickerToolbarItem
Copyright (C) 2019 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:11:46 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "AppKit/NSSharingServicePickerToolbarItem.h"
@implementation NSSharingServicePickerToolbarItem
- (id) activityItemsConfiguration
{
return nil;
}
- (void) setActivityItemsConfiguration: (id)items
{
}
- (id<NSSharingServicePickerToolbarItemDelegate>) delegate
{
return nil;
}
- (void) setDelegate: (id<NSSharingServicePickerToolbarItemDelegate>) delegate
{
}
@end

291
Source/NSSwitch.m Normal file
View file

@ -0,0 +1,291 @@
/* Implementation of class NSSwitch
Copyright (C) 2020 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Wed Apr 8 22:01:02 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import "AppKit/NSSwitch.h"
#import "GNUstepGUI/GSTheme.h"
@implementation NSSwitch
+ (void) initialize
{
if (self == [NSSwitch class])
{
[self setVersion: 1];
}
}
- (void) setState: (NSControlStateValue)s
{
_state = s;
[self setNeedsDisplay];
}
- (NSControlStateValue) state
{
return _state;
}
- (void) setAction: (SEL)action
{
_action = action;
}
- (SEL) action
{
return _action;
}
- (void) setTarget: (id)target
{
_target = target;
}
- (id) target
{
return _target;
}
- (void) setEnabled: (BOOL)flag
{
_enabled = flag;
[self setNeedsDisplay];
}
- (BOOL) isEnabled
{
return _enabled;
}
- (void) setDoubleValue: (double)val
{
if (val < 1.0)
{
[self setState: NSControlStateValueOff];
}
else
{
[self setState: NSControlStateValueOn];
}
}
- (double) doubleValue
{
return (double)(([self state] == NSControlStateValueOn) ? 1.0 : 0.0);
}
- (void) setFloatValue: (float)val
{
[self setDoubleValue: (double)val];
}
- (float) floatValue
{
return (float)[self doubleValue];
}
- (void) setIntValue: (int)val
{
[self setDoubleValue: (double)val];
}
- (int) intValue
{
return (int)[self doubleValue];
}
- (void) setIntegerValue: (NSInteger)val
{
[self setDoubleValue: (double)val];
}
- (NSInteger) integerValue
{
return (NSInteger)[self doubleValue];
}
- (void) setStringValue: (NSString *)val
{
[self setDoubleValue: [val doubleValue]];
}
- (NSString *) stringValue
{
return [NSString stringWithFormat: @"%ld", [self integerValue]];
}
- (void) setObjectValue: (id)obj
{
if ([obj respondsToSelector: @selector(stringValue)])
{
[self setStringValue: [obj stringValue]];
}
}
- (id) objectValue
{
return [self stringValue];
}
- (void) drawRect: (NSRect)rect
{
[[GSTheme theme] drawSwitchInRect: rect
forState: _state
enabled: [self isEnabled]];
}
- (void) mouseDown: (NSEvent *)event
{
if (![self isEnabled])
{
[super mouseDown: event];
return;
}
if (_state == NSControlStateValueOn)
{
[self setState: NSControlStateValueOff];
}
else
{
[self setState: NSControlStateValueOn];
}
if (_action)
{
[self sendAction: _action
to: _target];
}
}
// Accessibility
- (NSRect)accessibilityFrame
{
return [self frame];
}
- (NSString *)accessibilityIdentifier
{
return nil;
}
- (id)accessibilityParent
{
return nil;
}
- (BOOL)isAccessibilityFocused
{
return NO;
}
- (NSString *)accessibilityLabel
{
return nil;
}
- (BOOL)accessibilityPerformPress
{
return NO;
}
- (BOOL) accessibilityPerformDecrement
{
return NO;
}
- (BOOL) accessibilityPerformIncrement
{
return NO;
}
- (NSString *) accessibilityValue
{
return nil;
}
// NSCoding
- (id) initWithCoder: (NSCoder *)coder
{
if ((self = [super initWithCoder: coder]) != nil)
{
if ([coder allowsKeyedCoding])
{
if ([coder containsValueForKey: @"NSControlContents"])
{
[self setState: [coder decodeIntegerForKey: @"NSControlContents"]];
}
if ([coder containsValueForKey: @"NSControlAction"])
{
NSString *s = [coder decodeObjectForKey: @"NSControlAction"];
[self setAction: NSSelectorFromString(s)];
}
if ([coder containsValueForKey: @"NSControlTarget"])
{
id t = [coder decodeObjectForKey: @"NSControlTarget"];
[self setTarget: t];
}
if ([coder containsValueForKey: @"NSEnabled"])
{
BOOL e = [coder decodeBoolForKey: @"NSEnabled"];
// NSControl decodes this, but does not use the value which
// is decoded. See comment in NSControl.m initWithCoder:.
[self setEnabled: e];
}
}
else
{
[coder decodeValueOfObjCType: @encode(NSInteger)
at: &_state];
[self setAction: NSSelectorFromString((NSString *)[coder decodeObject])];
[self setTarget: [coder decodeObject]];
}
}
return self;
}
- (void) encodeWithCoder: (NSCoder *)coder
{
[super encodeWithCoder: coder];
if ([coder allowsKeyedCoding])
{
[coder encodeInteger: _state
forKey: @"NSControlContents"];
[coder encodeObject: NSStringFromSelector(_action)
forKey: @"NSControlAction"];
[coder encodeObject: _target
forKey: @"NSControlTarget"];
}
else
{
[coder encodeValueOfObjCType: @encode(NSInteger)
at: &_state];
[coder encodeObject: NSStringFromSelector([self action])];
[coder encodeObject: [self target]];
}
}
@end

View file

@ -84,7 +84,7 @@ typedef enum {
static const int ItemBackViewX = 0;
static const int ItemBackViewY = 0;
static const int InsetItemViewX = 10;
static const int InsetItemViewY = 26;
// static const int InsetItemViewY = 26;
static const int InsetItemTextX = 3;
static const int InsetItemTextY = 4;

View file

@ -0,0 +1,110 @@
/* Implementation of class NSSharingServicePickerToolbarItem
Copyright (C) 2019 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:11:46 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSCoder.h>
#import <Foundation/NSSet.h>
#import <Foundation/NSString.h>
#import "AppKit/NSUserInterfaceCompression.h"
@implementation NSUserInterfaceCompressionOptions
- (instancetype) initWithIdentifier: (NSString *)identifier
{
return nil;
}
- (instancetype) initWithCompressionOptions: (NSSet *)opts
{
return nil;
}
- (BOOL) containsOptions: (NSUserInterfaceCompressionOptions *)opts
{
return NO;
}
- (BOOL) intersectsOptions: (NSUserInterfaceCompressionOptions *)opts
{
return NO;
}
- (BOOL) isEmpty
{
return NO;
}
- (NSUserInterfaceCompressionOptions *) optionsByAddingOptions: (NSUserInterfaceCompressionOptions *)opts
{
return nil;
}
- (NSUserInterfaceCompressionOptions *) optionsByRemovingOptions: (NSUserInterfaceCompressionOptions *)opts
{
return nil;
}
+ (NSUserInterfaceCompressionOptions *) hideImagesOption
{
return nil;
}
+ (NSUserInterfaceCompressionOptions *) hideTextOption
{
return nil;
}
+ (NSUserInterfaceCompressionOptions *) reduceMetricsOption
{
return nil;
}
+ (NSUserInterfaceCompressionOptions *) breakEqualWidthsOption
{
return nil;
}
+ (NSUserInterfaceCompressionOptions *) standardOptions
{
return nil;
}
- (void) encodeWithCoder: (NSCoder *)coder
{
}
- (id) initWithCoder: (NSCoder *)coder
{
self = [super init];
return self;
}
- (id) copyWithZone: (NSZone *)z
{
return self;
}
@end

View file

@ -0,0 +1,50 @@
/* Implementation of class NSUserInterfaceItemSearching
Copyright (C) 2019 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Tue Apr 7 08:11:46 EDT 2020
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSCoder.h>
#import "AppKit/NSApplication.h"
#import "AppKit/NSUserInterfaceItemSearching.h"
@implementation NSApplication (NSUserInterfaceItemSearching)
- (void) registerUserInterfaceItemSearchHandler: (id<NSUserInterfaceItemSearching>)handler
{
}
- (void) unregisterUserInterfaceItemSearchHandler: (id<NSUserInterfaceItemSearching>)handler
{
}
- (BOOL) searchString:(NSString *)searchString
inUserInterfaceItemString:(NSString *)stringToSearch
searchRange:(NSRange)searchRange
foundRange:(NSRange *)foundRange
{
return NO;
}
@end

View file

@ -29,6 +29,8 @@
#import "config.h"
#import <Foundation/NSString.h>
#import <Foundation/NSObjCRuntime.h>
#import "AppKit/NSApplication.h"
#import "AppKit/NSEvent.h"
#import "AppKit/NSAppearance.h"
@ -43,43 +45,43 @@ const double NSAppKitVersionNumber = NSAppKitVersionNumber10_4;
//
// Global Exception Strings
//
NSString *NSAbortModalException = @"NSAbortModalException";
NSString *NSAbortPrintingException = @"NSAbortPrintingException";
NSString *NSAppKitIgnoredException = @"NSAppKitIgnoredException";
NSString *NSAppKitVirtualMemoryException = @"NSAppKitVirtualMemoryException";
NSString *NSBadBitmapParametersException = @"NSBadBitmapParametersException";
NSString *NSBadComparisonException = @"NSBadComparisonException";
NSString *NSBadRTFColorTableException = @"NSBadRTFColorTableException";
NSString *NSBadRTFDirectiveException = @"NSBadRTFDirectiveException";
NSString *NSBadRTFFontTableException = @"NSBadRTFFontTableException";
NSString *NSBadRTFStyleSheetException = @"NSBadRTFStyleSheetException";
NSString *NSBrowserIllegalDelegateException = @"NSBrowserIllegalDelegateException";
NSString *NSColorListIOException = @"NSColorListIOException";
NSString *NSColorListNotEditableException = @"NSColorListNotEditableException";
NSString *NSDraggingException = @"NSDraggingException";
NSString *NSFontUnavailableException = @"NSFontUnavailableException";
NSString *NSIllegalSelectorException = @"NSIllegalSelectorException";
NSString *NSImageCacheException = @"NSImageCacheException";
NSString *NSNibLoadingException = @"NSNibLoadingException";
NSString *NSPPDIncludeNotFoundException = @"NSPPDIncludeNotFoundException";
NSString *NSPPDIncludeStackOverflowException = @"NSPPDIncludeStackOverflowException";
NSString *NSPPDIncludeStackUnderflowException = @"NSPPDIncludeStackUnderflowException";
NSString *NSPPDParseException = @"NSPPDParseException";
NSString *NSPrintOperationExistsException = @"NSPrintOperationExistsException";
NSString *NSPrintPackageException = @"NSPrintPackageException";
NSString *NSPrintingCommunicationException = @"NSPrintingCommunicationException";
NSString *NSRTFPropertyStackOverflowException = @"NSRTFPropertyStackOverflowException";
NSString *NSTIFFException = @"NSTIFFException";
NSString *NSTextLineTooLongException = @"NSTextLineTooLongException";
NSString *NSTextNoSelectionException = @"NSTextNoSelectionException";
NSString *NSTextReadException = @"NSTextReadException";
NSString *NSTextWriteException = @"NSTextWriteException";
NSString *NSTypedStreamVersionException = @"NSTypedStreamVersionException";
NSString *NSWindowServerCommunicationException = @"NSWindowServerCommunicationException";
NSString *NSWordTablesReadException = @"NSWordTablesReadException";
NSString *NSWordTablesWriteException = @"NSWordTablesWriteException";
NSExceptionName NSAbortModalException = @"NSAbortModalException";
NSExceptionName NSAbortPrintingException = @"NSAbortPrintingException";
NSExceptionName NSAppKitIgnoredException = @"NSAppKitIgnoredException";
NSExceptionName NSAppKitVirtualMemoryException = @"NSAppKitVirtualMemoryException";
NSExceptionName NSBadBitmapParametersException = @"NSBadBitmapParametersException";
NSExceptionName NSBadComparisonException = @"NSBadComparisonException";
NSExceptionName NSBadRTFColorTableException = @"NSBadRTFColorTableException";
NSExceptionName NSBadRTFDirectiveException = @"NSBadRTFDirectiveException";
NSExceptionName NSBadRTFFontTableException = @"NSBadRTFFontTableException";
NSExceptionName NSBadRTFStyleSheetException = @"NSBadRTFStyleSheetException";
NSExceptionName NSBrowserIllegalDelegateException = @"NSBrowserIllegalDelegateException";
NSExceptionName NSColorListIOException = @"NSColorListIOException";
NSExceptionName NSColorListNotEditableException = @"NSColorListNotEditableException";
NSExceptionName NSDraggingException = @"NSDraggingException";
NSExceptionName NSFontUnavailableException = @"NSFontUnavailableException";
NSExceptionName NSIllegalSelectorException = @"NSIllegalSelectorException";
NSExceptionName NSImageCacheException = @"NSImageCacheException";
NSExceptionName NSNibLoadingException = @"NSNibLoadingException";
NSExceptionName NSPPDIncludeNotFoundException = @"NSPPDIncludeNotFoundException";
NSExceptionName NSPPDIncludeStackOverflowException = @"NSPPDIncludeStackOverflowException";
NSExceptionName NSPPDIncludeStackUnderflowException = @"NSPPDIncludeStackUnderflowException";
NSExceptionName NSPPDParseException = @"NSPPDParseException";
NSExceptionName NSPrintOperationExistsException = @"NSPrintOperationExistsException";
NSExceptionName NSPrintPackageException = @"NSPrintPackageException";
NSExceptionName NSPrintingCommunicationException = @"NSPrintingCommunicationException";
NSExceptionName NSRTFPropertyStackOverflowException = @"NSRTFPropertyStackOverflowException";
NSExceptionName NSTIFFException = @"NSTIFFException";
NSExceptionName NSTextLineTooLongException = @"NSTextLineTooLongException";
NSExceptionName NSTextNoSelectionException = @"NSTextNoSelectionException";
NSExceptionName NSTextReadException = @"NSTextReadException";
NSExceptionName NSTextWriteException = @"NSTextWriteException";
NSExceptionName NSTypedStreamVersionException = @"NSTypedStreamVersionException";
NSExceptionName NSWindowServerCommunicationException = @"NSWindowServerCommunicationException";
NSExceptionName NSWordTablesReadException = @"NSWordTablesReadException";
NSExceptionName NSWordTablesWriteException = @"NSWordTablesWriteException";
NSString *GSWindowServerInternalException = @"WindowServerInternal";
NSExceptionName GSWindowServerInternalException = @"WindowServerInternal";
// NSAnimation
NSString* NSAnimationProgressMarkNotification