Skip to content

Commit

Permalink
AppKit constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Hyatt committed Mar 17, 2019
1 parent 89ca94c commit cdc0879
Show file tree
Hide file tree
Showing 73 changed files with 1,229 additions and 361 deletions.
20 changes: 20 additions & 0 deletions AppKit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions AppKit/NSAppearance.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
NSString * const NSAppearanceNameAccessibilityHighContrastVibrantLight = @"NSAppearanceNameAccessibilityVibrantLight";
NSString * const NSAppearanceNameAccessibilityHighContrastVibrantDark = @"NSAppearanceNameAccessibilityVibrantDark";

NSString *const NSAppearanceNameControlStrip = @"NSAppearanceNameControlStrip"; // Undocumented

@implementation NSAppearance

@end
23 changes: 23 additions & 0 deletions AppKit/NSClickGestureRecognizer.m
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions AppKit/NSCollectionViewFlowLayout.m
Original file line number Diff line number Diff line change
@@ -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";
3 changes: 2 additions & 1 deletion AppKit/NSControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#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";
Expand Down
26 changes: 26 additions & 0 deletions AppKit/NSCustomTouchBarItem.m
Original file line number Diff line number Diff line change
@@ -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 changes: 26 additions & 0 deletions AppKit/NSDraggingItem.m
Original file line number Diff line number Diff line change
@@ -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
74 changes: 37 additions & 37 deletions AppKit/NSErrors.h
Original file line number Diff line number Diff line change
@@ -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;

10 changes: 10 additions & 0 deletions AppKit/NSFontDescriptor.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
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 {
Expand Down
23 changes: 23 additions & 0 deletions AppKit/NSGestureRecognizer.m
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions AppKit/NSGroupTouchBarItem.m
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions AppKit/NSImage.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
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
Expand Down
23 changes: 23 additions & 0 deletions AppKit/NSKeyBindingManager.m
Original file line number Diff line number Diff line change
@@ -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
59 changes: 59 additions & 0 deletions AppKit/NSKeyValueBinding.m
Original file line number Diff line number Diff line change
@@ -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";
Loading

0 comments on commit cdc0879

Please sign in to comment.