AppKit constants

darlinghq/darling#445
This commit is contained in:
Andrew Hyatt 2019-03-16 18:38:54 -04:00
parent 89ca94c60f
commit cdc0879572
73 changed files with 1236 additions and 368 deletions

View File

@ -374,6 +374,26 @@ set(AppKit_sources
NSAccessibility.m
NSAppearance.m
NSAccessibilityElement.m
NSKeyValueBinding.m
NSCollectionViewFlowLayout.m
NSTouchBarItem.m
NSLayoutConstraint.m
NSSpeechSynthesizer.m
NSCustomTouchBarItem.m
NSGestureRecognizer.m
NSClickGestureRecognizer.m
NSDraggingItem.m
NSGroupTouchBarItem.m
NSKeyBindingManager.m
NSPasteboardItem.m
NSPopoverTouchBarItem.m
NSSpaceTouchBarItem.m
NSStackView.m
NSTableCellView.m
NSTableRowView.m
NSTouchBar.m
NSTreeNode.m
NSVisualEffectView.m
)
set_source_files_properties(${AppKit_sources} LANGUAGE C)

View File

@ -29,6 +29,8 @@ NSString * const NSAppearanceNameAccessibilityHighContrastDarkAqua = @"NSAppeara
NSString * const NSAppearanceNameAccessibilityHighContrastVibrantLight = @"NSAppearanceNameAccessibilityVibrantLight";
NSString * const NSAppearanceNameAccessibilityHighContrastVibrantDark = @"NSAppearanceNameAccessibilityVibrantDark";
NSString *const NSAppearanceNameControlStrip = @"NSAppearanceNameControlStrip"; // Undocumented
@implementation NSAppearance
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSClickGestureRecognizer.h>
@implementation NSClickGestureRecognizer
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSCollectionViewFlowLayout.h>
NSString *const NSCollectionElementKindSectionHeader = @"UICollectionElementKindSectionHeader";
NSString *const NSCollectionElementKindSectionFooter = @"UICollectionElementKindSectionFooter";

View File

@ -18,7 +18,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <AppKit/NSTextStorage.h>
#import <Foundation/NSKeyedArchiver.h>
#import <AppKit/NSRaise.h>
#import <AppKit/NSObject+BindingSupport.h>
//#import <AppKit/NSObject+BindingSupport.h>
#import <AppKit/NSKeyValueBinding.h>
#import <objc/runtime.h>
NSString * const NSControlTextDidBeginEditingNotification=@"NSControlTextDidBeginEditingNotification";

View File

@ -0,0 +1,26 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSCustomTouchBarItem.h>
@implementation NSCustomTouchBarItem
@end
@implementation NSButtonGroupTouchBarItem
@end

26
AppKit/NSDraggingItem.m Normal file
View File

@ -0,0 +1,26 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSDraggingItem.h>
@implementation NSDraggingImageComponent
@end
@implementation NSDraggingItem
@end

View File

@ -1,41 +1,41 @@
#import <Foundation/Foundation.h>
#import <AppKit/AppKitDefines.h>
#import <AppKit/AppKitExport.h>
APPKIT_EXTERN NSExceptionName NSTextLineTooLongException;
APPKIT_EXTERN NSExceptionName NSTextNoSelectionException;
APPKIT_EXTERN NSExceptionName NSWordTablesWriteException;
APPKIT_EXTERN NSExceptionName NSWordTablesReadException;
APPKIT_EXTERN NSExceptionName NSTextReadException;
APPKIT_EXTERN NSExceptionName NSTextWriteException;
APPKIT_EXTERN NSExceptionName NSPasteboardCommunicationException;
APPKIT_EXTERN NSExceptionName NSPrintingCommunicationException;
APPKIT_EXTERN NSExceptionName NSAbortModalException;
APPKIT_EXTERN NSExceptionName NSAbortPrintingException;
APPKIT_EXTERN NSExceptionName NSIllegalSelectorException;
APPKIT_EXTERN NSExceptionName NSAppKitVirtualMemoryException;
APPKIT_EXTERN NSExceptionName NSBadRTFDirectiveException;
APPKIT_EXTERN NSExceptionName NSBadRTFFontTableException;
APPKIT_EXTERN NSExceptionName NSBadRTFStyleSheetException;
APPKIT_EXTERN NSExceptionName NSTypedStreamVersionException;
APPKIT_EXTERN NSExceptionName NSTIFFException;
APPKIT_EXTERN NSExceptionName NSPrintPackageException;
APPKIT_EXTERN NSExceptionName NSBadRTFColorTableException;
APPKIT_EXTERN NSExceptionName NSDraggingException;
APPKIT_EXTERN NSExceptionName NSColorListIOException;
APPKIT_EXTERN NSExceptionName NSColorListNotEditableException;
APPKIT_EXTERN NSExceptionName NSBadBitmapParametersException;
APPKIT_EXTERN NSExceptionName NSWindowServerCommunicationException;
APPKIT_EXTERN NSExceptionName NSFontUnavailableException;
APPKIT_EXTERN NSExceptionName NSPPDIncludeNotFoundException;
APPKIT_EXTERN NSExceptionName NSPPDParseException;
APPKIT_EXTERN NSExceptionName NSPPDIncludeStackOverflowException;
APPKIT_EXTERN NSExceptionName NSPPDIncludeStackUnderflowException;
APPKIT_EXTERN NSExceptionName NSRTFPropertyStackOverflowException;
APPKIT_EXTERN NSExceptionName NSAppKitIgnoredException;
APPKIT_EXTERN NSExceptionName NSBadComparisonException;
APPKIT_EXTERN NSExceptionName NSImageCacheException;
APPKIT_EXTERN NSExceptionName NSNibLoadingException;
APPKIT_EXTERN NSExceptionName NSBrowserIllegalDelegateException;
APPKIT_EXTERN NSExceptionName NSAccessibilityException NS_DEPRECATED_MAC(10_1, 10_11);
APPKIT_EXPORT NSExceptionName NSTextLineTooLongException;
APPKIT_EXPORT NSExceptionName NSTextNoSelectionException;
APPKIT_EXPORT NSExceptionName NSWordTablesWriteException;
APPKIT_EXPORT NSExceptionName NSWordTablesReadException;
APPKIT_EXPORT NSExceptionName NSTextReadException;
APPKIT_EXPORT NSExceptionName NSTextWriteException;
APPKIT_EXPORT NSExceptionName NSPasteboardCommunicationException;
APPKIT_EXPORT NSExceptionName NSPrintingCommunicationException;
APPKIT_EXPORT NSExceptionName NSAbortModalException;
APPKIT_EXPORT NSExceptionName NSAbortPrintingException;
APPKIT_EXPORT NSExceptionName NSIllegalSelectorException;
APPKIT_EXPORT NSExceptionName NSAppKitVirtualMemoryException;
APPKIT_EXPORT NSExceptionName NSBadRTFDirectiveException;
APPKIT_EXPORT NSExceptionName NSBadRTFFontTableException;
APPKIT_EXPORT NSExceptionName NSBadRTFStyleSheetException;
APPKIT_EXPORT NSExceptionName NSTypedStreamVersionException;
APPKIT_EXPORT NSExceptionName NSTIFFException;
APPKIT_EXPORT NSExceptionName NSPrintPackageException;
APPKIT_EXPORT NSExceptionName NSBadRTFColorTableException;
APPKIT_EXPORT NSExceptionName NSDraggingException;
APPKIT_EXPORT NSExceptionName NSColorListIOException;
APPKIT_EXPORT NSExceptionName NSColorListNotEditableException;
APPKIT_EXPORT NSExceptionName NSBadBitmapParametersException;
APPKIT_EXPORT NSExceptionName NSWindowServerCommunicationException;
APPKIT_EXPORT NSExceptionName NSFontUnavailableException;
APPKIT_EXPORT NSExceptionName NSPPDIncludeNotFoundException;
APPKIT_EXPORT NSExceptionName NSPPDParseException;
APPKIT_EXPORT NSExceptionName NSPPDIncludeStackOverflowException;
APPKIT_EXPORT NSExceptionName NSPPDIncludeStackUnderflowException;
APPKIT_EXPORT NSExceptionName NSRTFPropertyStackOverflowException;
APPKIT_EXPORT NSExceptionName NSAppKitIgnoredException;
APPKIT_EXPORT NSExceptionName NSBadComparisonException;
APPKIT_EXPORT NSExceptionName NSImageCacheException;
APPKIT_EXPORT NSExceptionName NSNibLoadingException;
APPKIT_EXPORT NSExceptionName NSBrowserIllegalDelegateException;
APPKIT_EXPORT NSExceptionName NSAccessibilityException;

View File

@ -26,6 +26,16 @@ NSString * const NSFontWeightTrait = @"NSFontWeightTrait";
NSString * const NSFontWidthTrait = @"NSFontWidthTrait";
NSString * const NSFontSlantTrait = @"NSFontSlantTrait";
const NSFontWeight NSFontWeightThin = 0xbfe3333340000000;
const NSFontWeight NSFontWeightLight = 0xbfd99999a0000000;
const NSFontWeight NSFontWeightUltraLight = 0xbfe99999a0000000;
const NSFontWeight NSFontWeightBlack = 0x3fe3d70a40000000;
const NSFontWeight NSFontWeightHeavy = 0x3fe1eb8520000000;
const NSFontWeight NSFontWeightSemibold = 0x3fd3333340000000;
const NSFontWeight NSFontWeightBold = 0x3fd99999a0000000;
const NSFontWeight NSFontWeightMedium = 0x3fcd70a3e0000000;
const NSFontWeight NSFontWeightRegular = 0x0000000000000000;
@implementation NSFontDescriptor : NSObject
-initWithFontAttributes:(NSDictionary *)attributes {

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSGestureRecognizer.h>
@implementation NSGestureRecognizer
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSGroupTouchBarItem.h>
@implementation NSGroupTouchBarItem
@end

View File

@ -79,6 +79,12 @@ NSImageName const NSImageNameUser = @"NSUser";
NSImageName const NSImageNameUserAccounts = @"NSUserAccounts";
NSImageName const NSImageNameUserGroup = @"NSUserGroup";
NSImageName const NSImageNameUserGuest = @"NSUserGuest";
NSImageName const NSImageNameGoBackTemplate = @"NSGoBackTemplate";
NSImageName const NSImageNameGoForwardTemplate = @"NSGoForwardTemplate";
NSImageName const NSImageNameTouchBarDeleteTemplate = @"NSTouchBarDeleteTemplate";
NSImageName const NSImageNameTouchBarPauseTemplate = @"NSTouchBarPauseTemplate";
NSImageName const NSImageNameTouchBarPlayTemplate = @"NSTouchBarPlayTemplate";
NSImageName const NSImageNameTouchBarRecordStopTemplate = @"NSTouchBarRecordStopTemplate";
// Private class used so the context knows the flipped status of a locked image
// 10.4 does something like that - probably for more than just getting the flippiness - 10.6 uses some special NSSnapshotBitmapGraphicsContext

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSKeyBindingManager.h>
@implementation NSKeyBindingManager
@end

View File

@ -0,0 +1,59 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSKeyValueBinding.h>
NSString *const NSObservedObjectKey = @"NSObservedObject";
NSString *const NSObservedKeyPathKey = @"NSObservedKeyPath";
NSString *const NSOptionsKey = @"NSOptions";
NSString *const NSAnimateBinding = @"animate";
NSString *const NSContentArrayBinding = @"contentArray";
NSString *const NSContentBinding = @"content";
NSString *const NSContentObjectBinding = @"contentObject";
NSString *const NSContentObjectsBinding = @"contentObjects";
NSString *const NSContentSetBinding = @"contentSet";
NSString *const NSContentValuesBinding = @"contentValues";
NSString *const NSDoubleClickTargetBinding = @"doubleClickTarget";
NSString *const NSEnabledBinding = @"enabled";
NSString *const NSHiddenBinding = @"hidden";
NSString *const NSImageBinding = @"image";
NSString *const NSInsertsNullPlaceholderBindingOption = @"NSInsertsNullPlaceholder";
NSString *const NSSelectedIndexBinding = @"selectedIndex";
NSString *const NSSelectedObjectBinding = @"selectedObject";
NSString *const NSSelectedObjectsBinding = @"selectedObjects";
NSString *const NSSelectedTagBinding = @"selectedTag";
NSString *const NSSelectionIndexesBinding = @"selectionIndexes";
NSString *const NSTitleBinding = @"title";
NSString *const NSValidatesImmediatelyBindingOption = @"NSValidatesImmediately";
NSString *const NSValueBinding = @"value";
NSString *const NSVisibleBinding = @"visible";
NSString *const NSNullPlaceholderBindingOption = @"NSNullPlaceholder";
NSString *const NSNoSelectionPlaceholderBindingOption=@"NSNoSelectionPlaceholder";
NSString *const NSMultipleValuesPlaceholderBindingOption=@"NSMultipleValuesPlaceholder";
NSString *const NSCreatesSortDescriptorBindingOption=@"NSCreatesSortDescriptors";
NSString *const NSRaisesForNotApplicableKeysBindingOption=@"NSRaisesForNotApplicableKeys";
NSString *const NSAllowsEditingMultipleValuesSelectionBindingOption=@"NSAllowsEditingMultipleValuesSelection";
NSString *const NSValueTransformerNameBindingOption=@"NSValueTransformerName";
NSString *const NSValueTransformerBindingOption=@"NSValueTransformerBinding";
NSString *const NSConditionallySetsEnabledBindingOption=@"NSConditionallySetsEnabled";
NSString *const NSConditionallySetsEditableBindingOption=@"NSConditionallySetsEditable";
NSString *const NSContinuouslyUpdatesValueBindingOption=@"NSContinuouslyUpdatesValue";
NSString *const NSDisplayPatternBindingOption=@"NSDisplayPattern";

View File

@ -10,7 +10,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <Foundation/NSDictionary.h>
#import <Foundation/NSValue.h>
#import <Foundation/NSString.h>
#import <AppKit/NSObject+BindingSupport.h>
#import <AppKit/NSObject+BindingSupport.h> // Remove soon
#import <AppKit/NSKeyValueBinding.h>
#import <AppKit/NSController.h>
#import <AppKit/NSObservationProxy.h>
#import <Foundation/NSBundle.h>
@ -22,6 +23,10 @@ static NSMutableDictionary *bindersForObjects=nil;
static NSDictionary *defaultBindingOptions=nil;
static NSMutableDictionary *defaultBindingOptionsCache=nil;
// Not actually in this file
/*
NSString * const NSObservedObjectKey=@"NSObservedObject";
NSString * const NSObservedKeyPathKey=@"NSObservedKeyPath";
NSString * const NSOptionsKey=@"NSOptions";
@ -38,7 +43,7 @@ NSString * const NSConditionallySetsEnabledBindingOption=@"NSConditionallySetsEn
NSString * const NSConditionallySetsEditableBindingOption=@"NSConditionallySetsEditable"; // Do not change.
NSString * const NSContinuouslyUpdatesValueBindingOption=@"NSContinuouslyUpdatesValue"; // Do not change.
NSString * const NSDisplayPatternBindingOption=@"NSDisplayPattern"; // Do not change.
*/
int NSBindingDebugLogLevel = 0; // Defaults to no logging

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSLayoutConstraint.h>
const CGFloat NSViewNoInstrinsicMetric = 0xbff0000000000000;
const CGFloat NSViewNoIntrinsicMetric = 0xbff0000000000000;

View File

@ -31,6 +31,8 @@ NSString * const NSOutlineViewColumnDidResizeNotification=@"NSOutlineViewColumnD
NSString * const NSOutlineViewSelectionDidChangeNotification=@"NSOutlineViewSelectionDidChangeNotification";
NSString * const NSOutlineViewSelectionIsChangingNotification=@"NSOutlineViewSelectionIsChangingNotification";
NSString *const NSOutlineViewDisclosureButtonKey = @"NSOutlineViewDisclosureButtonKey";
// We probably don't want this public, but NSOutlineView needs it, and it would prove invaluable to
// other subclasses of NSTableView.
@interface NSTableView(NSTableView_notifications)

View File

@ -37,6 +37,10 @@ NSString * const NSTabularTextPboardType=@"NSTabularTextPboardType";
NSString * const NSTIFFPboardType=@"NSTIFFPboardType";
NSString * const NSURLPboardType=@"NSURLPboardType";
NSString *const NSFilesPromisePboardType = @"Apple files promise pasteboard type";
NSString *const NSPasteboardNameDrag = @"Apple CFPasteboard drag";
NSString *const NSPasteboardURLReadingFileURLsOnlyKey = @"NSPasteboardURLReadingFileURLsOnlyKey";
NSString * const NSDragPboard=@"NSDragPboard";
NSString * const NSFindPboard=@"NSFindPboard";
NSString * const NSFontPboard=@"NSFontPboard";

23
AppKit/NSPasteboardItem.m Normal file
View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSPasteboardItem.h>
@implementation NSPasteboardItem
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSPopoverTouchBarItem.h>
@implementation NSPopoverTouchBarItem
@end

View File

@ -1,5 +0,0 @@
#import <AppKit/NSControl.h>
@interface NSRuleEditor : NSControl <NSCoding>
@end

View File

@ -1,5 +1,7 @@
#import <AppKit/NSRuleEditor.h>
NSString *const NSRuleEditorRowsDidChangeNotification = @"NSRuleEditorRowsDidChangeNotification";
@implementation NSRuleEditor
-initWithCoder:(NSCoder *)coder {

View File

@ -17,6 +17,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <AppKit/NSCursor.h>
#import <AppKit/NSRaise.h>
NSString *const NSScrollViewDidEndLiveScrollNotification = @"NSScrollViewDidEndLiveScrollNotification";
NSString *const NSScrollViewWillStartLiveScrollNotification = @"NSScrollViewWillStartLiveScrollNotification";
@implementation NSScrollView
static Class _rulerViewClass = nil;

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSSpaceTouchBarItem.h>
@implementation NSSpaceTouchBarItem
@end

View File

@ -0,0 +1,25 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSSpeechSynthesizer.h>
NSString *const NSVoiceName = @"VoiceName";
@implementation NSSpeechSynthesizer
@end

23
AppKit/NSStackView.m Normal file
View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSStackView.h>
@implementation NSStackView
@end

23
AppKit/NSTableCellView.m Normal file
View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSTableCellView.h>
@implementation NSTableCellView
@end

23
AppKit/NSTableRowView.m Normal file
View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSTableRowView.h>
@implementation NSTableRowView
@end

View File

@ -19,6 +19,8 @@ NSString * const NSTableViewSelectionDidChangeNotification=@"NSTableViewSelectio
NSString * const NSTableViewColumnDidMoveNotification=@"NSTableViewColumnDidMoveNotification";
NSString * const NSTableViewColumnDidResizeNotification=@"NSTableViewColumnDidResizeNotification";
NSString *const NSTableViewRowViewKey = @"NSTableViewRowViewKey";
const CGFloat NSTableViewDefaultRowHeight=16.0f;

23
AppKit/NSTouchBar.m Normal file
View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSTouchBar.h>
@implementation NSTouchBar
@end

28
AppKit/NSTouchBarItem.m Normal file
View File

@ -0,0 +1,28 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSTouchBarItem.h>
NSTouchBarItemIdentifier const NSTouchBarItemIdentifierFixedSpaceLarge = @"NSTouchBarItemIdentifierFixedSpaceLarge";
NSTouchBarItemIdentifier const NSTouchBarItemIdentifierFixedSpaceSmall = @"NSTouchBarItemIdentifierFixedSpaceSmall";
NSTouchBarItemIdentifier const NSTouchBarItemIdentifierFlexibleSpace = @"NSTouchBarItemIdentifierFlexibleSpace";
NSTouchBarItemIdentifier const NSTouchBarItemIdentifierOtherItemsProxy = @"NSTouchBarItemIdentifierOtherItemsProxy";
@implementation NSTouchBarItem
@end

View File

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSTreeNode.h>
@implementation NSTreeNode
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSVisualEffectView.h>
@implementation NSVisualEffectView
@end

View File

@ -56,6 +56,13 @@ NSString * const NSWindowAnimatingNotification=@"NSWindowAnimatingNotification";
NSString * const NSWindowDidAnimateNotification=@"NSWindowDidAnimateNotification";
NSString * const NSWindowDidChangeScreenNotification = @"NSWindowDidChangeScreenNotification";
NSString *const NSWindowDidEndSheetNotification = @"NSWindowDidEndSheetNotification";
NSString *const NSWindowDidEnterFullScreenNotification = @"NSWindowDidEnterFullScreenNotification";
NSString *const NSWindowDidExitFullScreenNotification = @"NSWindowDidExitFullScreenNotification";
NSString *const NSWindowDidOrderOffScreenNotification = @"NSWindowDidOrderOffScreenNotification";
NSString *const NSWindowDidOrderOnScreenNotification = @"_NSWindowDidBecomeVisible";
NSString *const NSWindowWillEnterFullScreenNotification = @"NSWindowWillEnterFullScreenNotification";
NSString *const NSWindowWillExitFullScreenNotification = @"NSWindowWillExitFullScreenNotification";
@interface CGWindow(private)
- (void)dirtyRect:(CGRect)rect;

View File

@ -17,6 +17,8 @@ NSString *const NSWorkspaceLaunchConfigurationArguments = @"NSWorkspaceLaunchCon
NSString *const NSWorkspaceLaunchConfigurationEnvironment = @"NSWorkspaceLaunchConfigurationEnvironment";
NSString *const NSWorkspaceLaunchConfigurationArchitecture = @"NSWorkspaceLaunchConfigurationArchitecture";
NSString *const NSWorkspaceActiveSpaceDidChangeNotification = @"NSWorkspaceActiveSpaceDidChangeNotification";
@implementation NSWorkspace
+(NSWorkspace *)sharedWorkspace {

View File

@ -158,5 +158,26 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <AppKit/NSWorkspace.h>
#import <AppKit/NSAppearance.h>
#import <AppKit/NSAccessibilityElement.h>
#import <AppKit/NSKeyValueBinding.h>
#import <AppKit/NSCollectionViewFlowLayout.h>
#import <AppKit/NSRuleEditor.h>
#import <AppKit/NSLayoutConstraint.h>
#import <AppKit/NSSpeechSynthesizer.h>
#import <AppKit/NSTouchBarItem.h>
#import <AppKit/NSCustomTouchBarItem.h>
#import <AppKit/NSGestureRecognizer.h>
#import <AppKit/NSClickGestureRecognizer.h>
#import <AppKit/NSDraggingItem.h>
#import <AppKit/NSGroupTouchBarItem.h>
#import <AppKit/NSKeyBindingManager.h>
#import <AppKit/NSPasteboardItem.h>
#import <AppKit/NSPopoverTouchBarItem.h>
#import <AppKit/NSSpaceTouchBarItem.h>
#import <AppKit/NSStackView.h>
#import <AppKit/NSTableCellView.h>
#import <AppKit/NSTableRowView.h>
#import <AppKit/NSTouchBar.h>
#import <AppKit/NSTreeNode.h>
#import <AppKit/NSVisualEffectView.h>
#import <ApplicationServices/ApplicationServices.h>

View File

@ -1,34 +0,0 @@
#ifndef _APPKITDEFINES_H
#define _APPKITDEFINES_H
#import <AvailabilityMacros.h>
#import <Foundation/NSObjCRuntime.h>
#ifndef AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_0
#define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_0 DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER
#define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER
#define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER
#define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER
#define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER
#define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER
#define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER
#define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
#endif
#define APPKIT_SWIFT_SDK_EPOCH_AT_LEAST(__epoch__) (!defined(SWIFT_CLASS_EXTRA) || (defined(SWIFT_SDK_OVERLAY_APPKIT_EPOCH) && SWIFT_SDK_OVERLAY_APPKIT_EPOCH >= __epoch__))
#if defined(__MACH__)
#ifdef __cplusplus
#define APPKIT_EXTERN extern "C"
#define APPKIT_PRIVATE_EXTERN __attribute__((visibility("hidden"))) extern "C"
#define APPKIT_PRIVATE __attribute__((visibility("hidden")))
#else
#define APPKIT_EXTERN extern
#define APPKIT_PRIVATE_EXTERN __attribute__((visibility("hidden"))) extern
#define APPKIT_PRIVATE __attribute__((visibility("hidden")))
#endif
#endif
#endif

View File

@ -1,4 +1,4 @@
#import <AppKit/AppKitDefines.h>
#import <AppKit/AppKitExport.h>
#import <Foundation/Foundation.h>
APPKIT_EXPORT NSString *const NSAccessibilityChildrenAttribute;

View File

@ -31,6 +31,8 @@ APPKIT_EXPORT NSString * const NSAppearanceNameAccessibilityHighContrastDarkAqua
APPKIT_EXPORT NSString * const NSAppearanceNameAccessibilityHighContrastVibrantLight;
APPKIT_EXPORT NSString * const NSAppearanceNameAccessibilityHighContrastVibrantDark;
APPKIT_EXPORT NSString *const NSAppearanceNameControlStrip; //Undocumented
@interface NSAppearance : NSObject <NSSecureCoding>
@end

View File

@ -0,0 +1,25 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/AppKitExport.h>
#import <Foundation/Foundation.h>
#import <AppKit/NSGestureRecognizer.h>
@interface NSClickGestureRecognizer : NSGestureRecognizer <NSCoding>
@end

View File

@ -0,0 +1,24 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/AppKitExport.h>
#import <Foundation/NSString.h>
APPKIT_EXPORT NSString *const NSCollectionElementKindSectionHeader;
APPKIT_EXPORT NSString *const NSCollectionElementKindSectionFooter;

View File

@ -0,0 +1,29 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/AppKitExport.h>
#import <Foundation/Foundation.h>
#import <AppKit/NSTouchBarItem.h>
@interface NSCustomTouchBarItem : NSTouchBarItem
@end
// Undocumented, used by Xcode
@interface NSButtonGroupTouchBarItem : NSCustomTouchBarItem
@end

View File

@ -0,0 +1,26 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <Foundation/NSObject.h>
@interface NSDraggingImageComponent : NSObject
@end
@interface NSDraggingItem : NSObject
@end

View File

@ -27,6 +27,18 @@ APPKIT_EXPORT NSString *const NSFontWeightTrait;
APPKIT_EXPORT NSString *const NSFontWidthTrait;
APPKIT_EXPORT NSString *const NSFontSlantTrait;
typedef CGFloat NSFontWeight;
APPKIT_EXPORT const NSFontWeight NSFontWeightThin;
APPKIT_EXPORT const NSFontWeight NSFontWeightLight;
APPKIT_EXPORT const NSFontWeight NSFontWeightUltraLight;
APPKIT_EXPORT const NSFontWeight NSFontWeightBlack;
APPKIT_EXPORT const NSFontWeight NSFontWeightHeavy;
APPKIT_EXPORT const NSFontWeight NSFontWeightSemibold;
APPKIT_EXPORT const NSFontWeight NSFontWeightBold;
APPKIT_EXPORT const NSFontWeight NSFontWeightMedium;
APPKIT_EXPORT const NSFontWeight NSFontWeightRegular;
@interface NSFontDescriptor : NSObject <NSCopying> {
NSDictionary *_attributes;
}

View File

@ -0,0 +1,24 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/AppKitExport.h>
#import <Foundation/Foundation.h>
@interface NSGestureRecognizer : NSObject <NSCoding>
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSTouchBarItem.h>
@interface NSGroupTouchBarItem : NSTouchBarItem
@end

View File

@ -186,3 +186,10 @@ APPKIT_EXPORT NSImageName const NSImageNameUser;
APPKIT_EXPORT NSImageName const NSImageNameUserAccounts;
APPKIT_EXPORT NSImageName const NSImageNameUserGroup;
APPKIT_EXPORT NSImageName const NSImageNameUserGuest;
APPKIT_EXPORT NSImageName const NSImageNameGoBackTemplate;
APPKIT_EXPORT NSImageName const NSImageNameGoForwardTemplate;
APPKIT_EXPORT NSImageName const NSImageNameTouchBarDeleteTemplate;
APPKIT_EXPORT NSImageName const NSImageNameTouchBarPauseTemplate;
APPKIT_EXPORT NSImageName const NSImageNameTouchBarPlayTemplate;
APPKIT_EXPORT NSImageName const NSImageNameTouchBarRecordStopTemplate;

View File

@ -0,0 +1,24 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/AppKitExport.h>
#import <Foundation/NSObject.h>
@interface NSKeyBindingManager : NSObject
@end

View File

@ -0,0 +1,60 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/AppKitExport.h>
#import <Foundation/NSString.h>
APPKIT_EXPORT NSString *const NSObservedObjectKey;
APPKIT_EXPORT NSString *const NSObservedKeyPathKey;
APPKIT_EXPORT NSString *const NSOptionsKey;
APPKIT_EXPORT NSString *const NSAnimateBinding;
APPKIT_EXPORT NSString *const NSContentArrayBinding;
APPKIT_EXPORT NSString *const NSContentBinding;
APPKIT_EXPORT NSString *const NSContentObjectBinding;
APPKIT_EXPORT NSString *const NSContentObjectsBinding;
APPKIT_EXPORT NSString *const NSContentSetBinding;
APPKIT_EXPORT NSString *const NSContentValuesBinding;
APPKIT_EXPORT NSString *const NSDoubleClickTargetBinding;
APPKIT_EXPORT NSString *const NSEnabledBinding;
APPKIT_EXPORT NSString *const NSHiddenBinding;
APPKIT_EXPORT NSString *const NSImageBinding;
APPKIT_EXPORT NSString *const NSInsertsNullPlaceholderBindingOption;
APPKIT_EXPORT NSString *const NSSelectedIndexBinding;
APPKIT_EXPORT NSString *const NSSelectedObjectBinding;
APPKIT_EXPORT NSString *const NSSelectedObjectsBinding;
APPKIT_EXPORT NSString *const NSSelectedTagBinding;
APPKIT_EXPORT NSString *const NSSelectionIndexesBinding;
APPKIT_EXPORT NSString *const NSTitleBinding;
APPKIT_EXPORT NSString *const NSValidatesImmediatelyBindingOption;
APPKIT_EXPORT NSString *const NSValueBinding;
APPKIT_EXPORT NSString *const NSVisibleBinding;
APPKIT_EXPORT NSString *const NSNullPlaceholderBindingOption;
APPKIT_EXPORT NSString *const NSNoSelectionPlaceholderBindingOption;
APPKIT_EXPORT NSString *const NSMultipleValuesPlaceholderBindingOption;
APPKIT_EXPORT NSString *const NSCreatesSortDescriptorBindingOption;
APPKIT_EXPORT NSString *const NSRaisesForNotApplicableKeysBindingOption;
APPKIT_EXPORT NSString *const NSAllowsEditingMultipleValuesSelectionBindingOption;
APPKIT_EXPORT NSString *const NSValueTransformerNameBindingOption;
APPKIT_EXPORT NSString *const NSValueTransformerBindingOption;
APPKIT_EXPORT NSString *const NSConditionallySetsEnabledBindingOption;
APPKIT_EXPORT NSString *const NSConditionallySetsEditableBindingOption;
APPKIT_EXPORT NSString *const NSContinuouslyUpdatesValueBindingOption;
APPKIT_EXPORT NSString *const NSDisplayPatternBindingOption;

View File

@ -0,0 +1,25 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/AppKitExport.h>
#import <Foundation/NSString.h>
#import <CoreGraphics/CoreGraphics.h>
APPKIT_EXPORT const CGFloat NSViewNoInstrinsicMetric;
APPKIT_EXPORT const CGFloat NSViewNoIntrinsicMetric;

View File

@ -8,6 +8,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <Foundation/NSObject.h>
#import <AppKit/AppKitExport.h>
#import <AppKit/NSKeyValueBinding.h>
@class NSDictionary, NSArray, NSString;
@interface NSObject (BindingSupport)
@ -57,11 +59,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
- (void)objectDidEndEditing:editor;
@end
// Not defined in this header
/*
APPKIT_EXPORT NSString *const NSObservedObjectKey;
APPKIT_EXPORT NSString *const NSObservedKeyPathKey;
APPKIT_EXPORT NSString *const NSOptionsKey;
*/
// Binding option keys
/*
APPKIT_EXPORT NSString *const NSNullPlaceholderBindingOption;
APPKIT_EXPORT NSString *const NSNoSelectionPlaceholderBindingOption;
APPKIT_EXPORT NSString *const NSMultipleValuesPlaceholderBindingOption;
@ -74,6 +82,7 @@ APPKIT_EXPORT NSString *const NSConditionallySetsEnabledBindingOption;
APPKIT_EXPORT NSString *const NSConditionallySetsEditableBindingOption;
APPKIT_EXPORT NSString *const NSContinuouslyUpdatesValueBindingOption;
APPKIT_EXPORT NSString *const NSDisplayPatternBindingOption;
*/
enum {
kNSBindingDebugLogLevel1 = 1,

View File

@ -23,6 +23,8 @@ APPKIT_EXPORT NSString *const NSOutlineViewColumnDidResizeNotification;
APPKIT_EXPORT NSString *const NSOutlineViewSelectionDidChangeNotification;
APPKIT_EXPORT NSString *const NSOutlineViewSelectionIsChangingNotification;
APPKIT_EXPORT NSString *const NSOutlineViewDisclosureButtonKey;
@interface NSOutlineView : NSTableView {
NSTableColumn *_outlineTableColumn;
NSMapTable *_rowToItem;

View File

@ -38,6 +38,10 @@ APPKIT_EXPORT NSString *const NSTabularTextPboardType;
APPKIT_EXPORT NSString *const NSTIFFPboardType;
APPKIT_EXPORT NSString *const NSURLPboardType;
APPKIT_EXPORT NSString *const NSFilesPromisePboardType;
APPKIT_EXPORT NSString *const NSPasteboardNameDrag;
APPKIT_EXPORT NSString *const NSPasteboardURLReadingFileURLsOnlyKey;
APPKIT_EXPORT NSString *const NSDragPboard;
APPKIT_EXPORT NSString *const NSFindPboard;
APPKIT_EXPORT NSString *const NSFontPboard;

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <Foundation/NSObject.h>
@interface NSPasteboardItem : NSObject
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSTouchBarItem.h>
@interface NSPopoverTouchBarItem : NSTouchBarItem
@end

View File

@ -0,0 +1,9 @@
#import <AppKit/NSControl.h>
#import <Foundation/NSString.h>
#import <AppKit/AppKitExport.h>
APPKIT_EXPORT NSString *const NSRuleEditorRowsDidChangeNotification;
@interface NSRuleEditor : NSControl <NSCoding>
@end

View File

@ -7,9 +7,14 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#import <AppKit/NSView.h>
#import <AppKit/AppKitExport.h>
#import <Foundation/NSString.h>
@class NSClipView, NSScroller, NSColor, NSRulerView;
APPKIT_EXPORT NSString *const NSScrollViewDidEndLiveScrollNotification;
APPKIT_EXPORT NSString *const NSScrollViewWillStartLiveScrollNotification;
@interface NSScrollView : NSView {
NSClipView *_clipView;
NSClipView *_headerClipView;

View File

@ -1,174 +1,26 @@
#import <AppKit/AppKitDefines.h>
#import <AppKit/NSPasteboard.h>
#import <Foundation/NSGeometry.h>
#import <Foundation/NSItemProvider.h>
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <Foundation/NSObject.h>
#import <Foundation/NSArray.h>
#define NS_SHARING_SERVICE_DELEGATE_TRANSITION_IMAGE_FOR_SHARE_ITEM_DECLARES_NULLABILITY (1)
@class NSString, NSImage, NSView, NSError, NSWindow;
@class CKShare, CKContainer;
NS_ASSUME_NONNULL_BEGIN
APPKIT_EXTERN NSString * const NSSharingServiceNamePostOnFacebook NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNamePostOnTwitter NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNamePostOnSinaWeibo NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNamePostOnTencentWeibo NS_AVAILABLE_MAC(10_9);
APPKIT_EXTERN NSString * const NSSharingServiceNamePostOnLinkedIn NS_AVAILABLE_MAC(10_9);
APPKIT_EXTERN NSString * const NSSharingServiceNameComposeEmail NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNameComposeMessage NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNameSendViaAirDrop NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNameAddToSafariReadingList NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNameAddToIPhoto NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNameAddToAperture NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNameUseAsTwitterProfileImage NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNameUseAsFacebookProfileImage NS_AVAILABLE_MAC(10_9);
APPKIT_EXTERN NSString * const NSSharingServiceNameUseAsLinkedInProfileImage NS_AVAILABLE_MAC(10_9);
APPKIT_EXTERN NSString * const NSSharingServiceNameUseAsDesktopPicture NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNamePostImageOnFlickr NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNamePostVideoOnVimeo NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNamePostVideoOnYouku NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNamePostVideoOnTudou NS_AVAILABLE_MAC(10_8);
APPKIT_EXTERN NSString * const NSSharingServiceNameCloudSharing NS_AVAILABLE_MAC(10_12);
@protocol NSSharingServiceDelegate;
NS_CLASS_AVAILABLE(10_8, NA)
@interface NSSharingService : NSObject {
@private
id _reserved;
}
@property (nullable, assign) id <NSSharingServiceDelegate> delegate;
@property (readonly, copy) NSString *title;
@property (readonly, strong) NSImage *image;
@property (nullable, readonly, strong) NSImage *alternateImage;
@property (copy) NSString *menuItemTitle NS_AVAILABLE_MAC(10_9);
@property (nullable, copy) NSArray<NSString *> *recipients NS_AVAILABLE_MAC(10_9);
@property (nullable, copy) NSString *subject NS_AVAILABLE_MAC(10_9);
@property (nullable, readonly, copy) NSString *messageBody NS_AVAILABLE_MAC(10_9);
@property (nullable, readonly, copy) NSURL *permanentLink NS_AVAILABLE_MAC(10_9);
@property (nullable, readonly, copy) NSString *accountName NS_AVAILABLE_MAC(10_9);
@property (nullable, readonly, copy) NSArray<NSURL *> *attachmentFileURLs NS_AVAILABLE_MAC(10_9);
+ (NSArray<NSSharingService *> *)sharingServicesForItems:(NSArray *)items;
+ (nullable NSSharingService *)sharingServiceNamed:(NSString *)serviceName;
- (instancetype)initWithTitle:(NSString *)title image:(NSImage *)image alternateImage:(nullable NSImage *)alternateImage handler:(void (^)(void))block NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
- (BOOL)canPerformWithItems:(nullable NSArray *)items;
- (void)performWithItems:(NSArray *)items;
@end
typedef NS_ENUM(NSInteger, NSSharingContentScope) {
NSSharingContentScopeItem,
NSSharingContentScopePartial,
NSSharingContentScopeFull
} NS_ENUM_AVAILABLE_MAC(10_8);
@protocol NSSharingServiceDelegate <NSObject>
@optional
- (void)sharingService:(NSSharingService *)sharingService willShareItems:(NSArray *)items;
- (void)sharingService:(NSSharingService *)sharingService didFailToShareItems:(NSArray *)items error:(NSError *)error;
- (void)sharingService:(NSSharingService *)sharingService didShareItems:(NSArray *)items;
- (NSRect)sharingService:(NSSharingService *)sharingService sourceFrameOnScreenForShareItem:(id)item;
#if NS_SHARING_SERVICE_DELEGATE_TRANSITION_IMAGE_FOR_SHARE_ITEM_DECLARES_NULLABILITY
- (nullable NSImage *)sharingService:(NSSharingService *)sharingService transitionImageForShareItem:(id)item contentRect:(NSRect *)contentRect;
#else
- (NSImage *)sharingService:(NSSharingService *)sharingService transitionImageForShareItem:(id)item contentRect:(NSRect *)contentRect;
#endif
- (nullable NSWindow *)sharingService:(NSSharingService *)sharingService sourceWindowForShareItems:(NSArray *)items sharingContentScope:(NSSharingContentScope *)sharingContentScope;
- (nullable NSView *)anchoringViewForSharingService:(NSSharingService *)sharingService showRelativeToRect:(NSRect *)positioningRect preferredEdge:(NSRectEdge *)preferredEdge;
@end
typedef NS_OPTIONS(NSUInteger, NSCloudKitSharingServiceOptions) {
NSCloudKitSharingServiceStandard = 0,
NSCloudKitSharingServiceAllowPublic = 1 << 0,
NSCloudKitSharingServiceAllowPrivate = 1 << 1,
NSCloudKitSharingServiceAllowReadOnly = 1 << 4,
NSCloudKitSharingServiceAllowReadWrite = 1 << 5,
} NS_ENUM_AVAILABLE_MAC(10_12);
@protocol NSCloudSharingServiceDelegate <NSSharingServiceDelegate>
@optional
- (void)sharingService:(NSSharingService *)sharingService didCompleteForItems:(NSArray *)items error:(nullable NSError *)error;
#if __OBJC2__
- (NSCloudKitSharingServiceOptions)optionsForSharingService:(NSSharingService *)cloudKitSharingService shareProvider:(NSItemProvider *)provider;
#endif
- (void)sharingService:(NSSharingService *)sharingService didSaveShare:(CKShare *)share;
- (void)sharingService:(NSSharingService *)sharingService didStopSharing:(CKShare *)share;
@end
#if __OBJC2__
@interface NSItemProvider (NSCloudKitSharing)
- (void)registerCloudKitShareWithPreparationHandler:(void (^_Nonnull)(void (^ _Nonnull preparationCompletionHandler)(CKShare * _Nullable, CKContainer * _Nullable, NSError * _Nullable)))preparationHandler NS_AVAILABLE_MAC(10_12);
- (void)registerCloudKitShare:(CKShare *)share container:(CKContainer *)container NS_AVAILABLE_MAC(10_12);
@end
#endif
@protocol NSSharingServicePickerDelegate;
NS_CLASS_AVAILABLE(10_8, NA)
@interface NSSharingServicePicker : NSObject
{
@private
id _reserved;
}
@property (nullable, assign) id <NSSharingServicePickerDelegate> delegate;
- (instancetype)initWithItems:(NSArray *)items NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
- (void)showRelativeToRect:(NSRect)rect ofView:(NSView *)view preferredEdge:(NSRectEdge)preferredEdge;
@end
@protocol NSSharingServicePickerDelegate <NSObject>
@optional
- (NSArray<NSSharingService *> *)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker sharingServicesForItems:(NSArray *)items proposedSharingServices:(NSArray<NSSharingService *> *)proposedServices;
- (nullable id <NSSharingServiceDelegate>)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker delegateForSharingService:(NSSharingService *)sharingService;
- (void)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker didChooseSharingService:(nullable NSSharingService *)service;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSTouchBarItem.h>
@interface NSSpaceTouchBarItem : NSTouchBarItem
@end

View File

@ -0,0 +1,27 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/AppKitExport.h>
#import <Foundation/NSString.h>
#import <Foundation/NSObject.h>
APPKIT_EXPORT NSString *const NSVoiceName;
@interface NSSpeechSynthesizer : NSObject
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSView.h>
@interface NSStackView : NSView
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSView.h>
@interface NSTableCellView : NSView
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSView.h>
@interface NSTableRowView : NSView
@end

View File

@ -42,6 +42,8 @@ APPKIT_EXPORT NSString *const NSTableViewSelectionDidChangeNotification;
APPKIT_EXPORT NSString *const NSTableViewColumnDidMoveNotification;
APPKIT_EXPORT NSString *const NSTableViewColumnDidResizeNotification;
APPKIT_EXPORT NSString *const NSTableViewRowViewKey;
enum {
NSTableViewGridNone,
NSTableViewSolidVerticalGridLineMask,

View File

@ -9,8 +9,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <AppKit/NSView.h>
#import <AppKit/NSSpellProtocol.h>
NS_ASSUME_NONNULL_BEGIN
@class NSColor, NSFont;
@protocol NSTextDelegate;
@ -160,5 +158,3 @@ APPKIT_EXPORT NSString *const NSTextDidChangeNotification;
- (void)textDidChange:(NSNotification *)notification;
@end
NS_ASSUME_NONNULL_END

View File

@ -17,9 +17,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <AppKit/NSTextInput.h>
#import <AppKit/NSDragging.h>
#import <AppKit/NSParagraphStyle.h>
#import <AppKit/NSTextAttachmentCell.h>
#import <AppKit/NSTouchBarItem.h>
#import <AppKit/NSSharingService.h>
#import <Foundation/NSTextCheckingResult.h>
@ -244,67 +241,6 @@ APPKIT_EXPORT NSString *const NSOldSelectedCharacterRange;
@end
@protocol NSTextViewDelegate <NSTextDelegate>
@optional
- (BOOL)textView:(NSTextView *)textView clickedOnLink:(id)link atIndex:(NSUInteger)charIndex;
- (void)textView:(NSTextView *)textView clickedOnCell:(id <NSTextAttachmentCell>)cell inRect:(NSRect)cellFrame atIndex:(NSUInteger)charIndex;
- (void)textView:(NSTextView *)textView doubleClickedOnCell:(id <NSTextAttachmentCell>)cell inRect:(NSRect)cellFrame atIndex:(NSUInteger)charIndex;
- (void)textView:(NSTextView *)view draggedCell:(id <NSTextAttachmentCell>)cell inRect:(NSRect)rect event:(NSEvent *)event atIndex:(NSUInteger)charIndex;
- (NSArray<NSString *> *)textView:(NSTextView *)view writablePasteboardTypesForCell:(id<NSTextAttachmentCell>)cell atIndex:(NSUInteger)charIndex;
- (BOOL)textView:(NSTextView *)view writeCell:(id <NSTextAttachmentCell>)cell atIndex:(NSUInteger)charIndex toPasteboard:(NSPasteboard *)pboard type:(NSString *)type;
- (NSRange)textView:(NSTextView *)textView willChangeSelectionFromCharacterRange:(NSRange)oldSelectedCharRange toCharacterRange:(NSRange)newSelectedCharRange;
- (NSArray<NSValue *> *)textView:(NSTextView *)textView willChangeSelectionFromCharacterRanges:(NSArray<NSValue *> *)oldSelectedCharRanges toCharacterRanges:(NSArray<NSValue *> *)newSelectedCharRanges;
- (BOOL)textView:(NSTextView *)textView shouldChangeTextInRanges:(NSArray<NSValue *> *)affectedRanges replacementStrings:(nullable NSArray<NSString *> *)replacementStrings;
- (NSDictionary<NSString *, id> *)textView:(NSTextView *)textView shouldChangeTypingAttributes:(NSDictionary<NSString *, id> *)oldTypingAttributes toAttributes:(NSDictionary<NSString *, id> *)newTypingAttributes;
- (void)textViewDidChangeSelection:(NSNotification *)notification;
- (void)textViewDidChangeTypingAttributes:(NSNotification *)notification;
- (nullable NSString *)textView:(NSTextView *)textView willDisplayToolTip:(NSString *)tooltip forCharacterAtIndex:(NSUInteger)characterIndex;
- (NSArray<NSString *> *)textView:(NSTextView *)textView completions:(NSArray<NSString *> *)words forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(nullable NSInteger *)index;
- (BOOL)textView:(NSTextView *)textView shouldChangeTextInRange:(NSRange)affectedCharRange replacementString:(nullable NSString *)replacementString;
- (BOOL)textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector;
- (NSInteger)textView:(NSTextView *)textView shouldSetSpellingState:(NSInteger)value range:(NSRange)affectedCharRange NS_AVAILABLE_MAC(10_5);
- (nullable NSMenu *)textView:(NSTextView *)view menu:(NSMenu *)menu forEvent:(NSEvent *)event atIndex:(NSUInteger)charIndex NS_AVAILABLE_MAC(10_5);
- (NSDictionary<NSString *, id> *)textView:(NSTextView *)view willCheckTextInRange:(NSRange)range options:(NSDictionary<NSString *, id> *)options types:(NSTextCheckingTypes *)checkingTypes NS_AVAILABLE_MAC(10_6);
- (NSArray<NSTextCheckingResult *> *)textView:(NSTextView *)view didCheckTextInRange:(NSRange)range types:(NSTextCheckingTypes)checkingTypes options:(NSDictionary<NSString *, id> *)options results:(NSArray<NSTextCheckingResult *> *)results orthography:(NSOrthography *)orthography wordCount:(NSInteger)wordCount NS_AVAILABLE_MAC(10_6);
- (nullable NSURL *)textView:(NSTextView *)textView URLForContentsOfTextAttachment:(NSTextAttachment *)textAttachment atIndex:(NSUInteger)charIndex NS_AVAILABLE_MAC(10_7);
- (nullable NSSharingServicePicker *)textView:(NSTextView *)textView willShowSharingServicePicker:(NSSharingServicePicker *)servicePicker forItems:(NSArray *)items NS_AVAILABLE_MAC(10_8);
- (nullable NSUndoManager *)undoManagerForTextView:(NSTextView *)view;
- (NSArray<NSTouchBarItemIdentifier> *)textView:(NSTextView *)textView shouldUpdateTouchBarItemIdentifiers:(NSArray<NSTouchBarItemIdentifier> *)identifiers NS_AVAILABLE_MAC(10_12_2);
- (nullable NSArray *)textView:(NSTextView *)textView candidatesForSelectedRange:(NSRange)selectedRange NS_AVAILABLE_MAC(10_12_2);
- (NSArray<NSTextCheckingResult *> *)textView:(NSTextView *)textView candidates:(NSArray<NSTextCheckingResult *> *)candidates forSelectedRange:(NSRange)selectedRange NS_AVAILABLE_MAC(10_12_2);
- (BOOL)textView:(NSTextView *)textView shouldSelectCandidateAtIndex:(NSUInteger)index NS_AVAILABLE_MAC(10_12_2);
- (BOOL)textView:(NSTextView *)textView clickedOnLink:(null_unspecified id)link NS_DEPRECATED_MAC(10_0, 10_6, "Use -textView:clickedOnLink:atIndex: instead");
- (void)textView:(NSTextView *)textView clickedOnCell:(null_unspecified id <NSTextAttachmentCell>)cell inRect:(NSRect)cellFrame NS_DEPRECATED_MAC(10_0, 10_6, "Use -textView:clickedOnCell:inRect:atIndex: instead");
- (void)textView:(NSTextView *)textView doubleClickedOnCell:(null_unspecified id <NSTextAttachmentCell>)cell inRect:(NSRect)cellFrame NS_DEPRECATED_MAC(10_0, 10_6, "Use -textView:doubleClickedOnCell:inRect:atIndex: instead");
- (void)textView:(NSTextView *)view draggedCell:(null_unspecified id <NSTextAttachmentCell>)cell inRect:(NSRect)rect event:(null_unspecified NSEvent *)event NS_DEPRECATED_MAC(10_0, 10_6, "Use -textView:draggedCell:inRect:event:atIndex: instead");
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <Foundation/NSObject.h>
@interface NSTouchBar : NSObject
@end

View File

@ -1,60 +1,32 @@
#import <AppKit/AppKitDefines.h>
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/AppKitExport.h>
#import <Foundation/Foundation.h>
typedef NSString * NSTouchBarItemIdentifier NS_EXTENSIBLE_STRING_ENUM;
typedef NSString * NSTouchBarItemIdentifier;
@class NSTouchBar, NSViewController, NSView, NSImage, NSGestureRecognizer;
@class NSString;
APPKIT_EXPORT NSTouchBarItemIdentifier const NSTouchBarItemIdentifierFixedSpaceLarge;
APPKIT_EXPORT NSTouchBarItemIdentifier const NSTouchBarItemIdentifierFixedSpaceSmall;
APPKIT_EXPORT NSTouchBarItemIdentifier const NSTouchBarItemIdentifierFlexibleSpace;
APPKIT_EXPORT NSTouchBarItemIdentifier const NSTouchBarItemIdentifierOtherItemsProxy;
NS_ASSUME_NONNULL_BEGIN
typedef float NSTouchBarItemPriority _NS_TYPED_EXTENSIBLE_ENUM NS_AVAILABLE_MAC(10_12_2);
static const NSTouchBarItemPriority NSTouchBarItemPriorityHigh NS_AVAILABLE_MAC(10_12_2) = 1000;
static const NSTouchBarItemPriority NSTouchBarItemPriorityNormal NS_AVAILABLE_MAC(10_12_2) = 0;
static const NSTouchBarItemPriority NSTouchBarItemPriorityLow NS_AVAILABLE_MAC(10_12_2) = -1000;
NS_CLASS_AVAILABLE_MAC(10_12_2)
@interface NSTouchBarItem : NSObject <NSCoding> {
@private
NSTouchBarItemIdentifier _identifier;
NSTouchBarItemPriority _visibilityPriority;
NSInteger _visibilityCount;
NSMapTable<NSTouchBar *, NSNumber *> *_touchBars;
#if !__OBJC2__
void *_touchBarItemReserved[4] __unused;
#endif
}
- (instancetype)initWithIdentifier:(NSTouchBarItemIdentifier)identifier NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
@property (readonly, copy) NSTouchBarItemIdentifier identifier;
@property NSTouchBarItemPriority visibilityPriority;
@property (readonly, nullable) NSView *view;
@property (readonly, nullable) NSViewController *viewController;
@property (readonly, copy) NSString *customizationLabel;
@property (readonly, getter=isVisible) BOOL visible;
@interface NSTouchBarItem : NSObject <NSCoding>
@end
APPKIT_EXTERN NSTouchBarItemIdentifier const NSTouchBarItemIdentifierFixedSpaceSmall NS_AVAILABLE_MAC(10_12_2);
APPKIT_EXTERN NSTouchBarItemIdentifier const NSTouchBarItemIdentifierFixedSpaceLarge NS_AVAILABLE_MAC(10_12_2);
APPKIT_EXTERN NSTouchBarItemIdentifier const NSTouchBarItemIdentifierFlexibleSpace NS_AVAILABLE_MAC(10_12_2);
APPKIT_EXTERN NSTouchBarItemIdentifier const NSTouchBarItemIdentifierOtherItemsProxy NS_AVAILABLE_MAC(10_12_2);
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <Foundation/NSObject.h>
@interface NSTreeNode : NSObject
@end

View File

@ -0,0 +1,23 @@
/*
This file is part of Darling.
Copyright (C) 2019 Lubos Dolezel
Darling is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Darling 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Darling. If not, see <http://www.gnu.org/licenses/>.
*/
#import <AppKit/NSView.h>
@interface NSVisualEffectView : NSView
@end

View File

@ -103,6 +103,13 @@ APPKIT_EXPORT NSString *const NSWindowDidEndLiveResizeNotification;
APPKIT_EXPORT NSString *const NSWindowWillBeginSheetNotification;
APPKIT_EXPORT NSString * const NSWindowDidChangeScreenNotification;
APPKIT_EXPORT NSString *const NSWindowDidEndSheetNotification;
APPKIT_EXPORT NSString *const NSWindowDidEnterFullScreenNotification;
APPKIT_EXPORT NSString *const NSWindowDidExitFullScreenNotification;
APPKIT_EXPORT NSString *const NSWindowDidOrderOffScreenNotification;
APPKIT_EXPORT NSString *const NSWindowDidOrderOnScreenNotification;
APPKIT_EXPORT NSString *const NSWindowWillEnterFullScreenNotification;
APPKIT_EXPORT NSString *const NSWindowWillExitFullScreenNotification;
@interface NSWindow : NSResponder {
NSRect _frame;

View File

@ -20,6 +20,8 @@ APPKIT_EXPORT NSString *const NSWorkspaceLaunchConfigurationArguments;
APPKIT_EXPORT NSString *const NSWorkspaceLaunchConfigurationEnvironment;
APPKIT_EXPORT NSString *const NSWorkspaceLaunchConfigurationArchitecture;
APPKIT_EXPORT NSString *const NSWorkspaceActiveSpaceDidChangeNotification;
@interface NSWorkspace : NSObject {
NSNotificationCenter *_notificationCenter;
}