mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 04:00:00 +00:00
Add missing symbols and stubs for AppKit
This commit is contained in:
parent
1af135a557
commit
c1b75488c7
@ -1,5 +1,6 @@
|
||||
#import <AppKit/AppKitExport.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <AppKit/NSAccessibilityConstants.h>
|
||||
|
||||
NSString *const NSAccessibilityChildrenAttribute =
|
||||
@"NSAccessibilityChildrenAttribute";
|
||||
@ -567,6 +568,12 @@ NSString *const NSAccessibilityLayoutChangedNotification = @"AXLayoutChanged";
|
||||
NSString *const NSAccessibilityUIElementsKey = @"AXUIElementsKey";
|
||||
NSString *const NSAccessibilityToggleSubrole = @"NSAccessibilityToggleSubrole";
|
||||
|
||||
NSString *const NSAccessibilityFullScreenButtonSubrole = @"AXFullScreenButton";
|
||||
|
||||
NSString *const NSAccessibilityAnnouncementKey = @"AXAnnouncementKey";
|
||||
NSString *const NSAccessibilityAnnouncementRequestedNotification = @"AXAnnouncementRequested";
|
||||
NSString *const NSAccessibilityPriorityKey = @"AXPriorityKey";
|
||||
|
||||
void NSAccessibilityPostNotification(id element, NSString *notification) {
|
||||
}
|
||||
|
||||
@ -577,3 +584,22 @@ NSString *NSAccessibilityRoleDescription(NSString *role, NSString *subrole) {
|
||||
id NSAccessibilityUnignoredAncestor(id element) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
id NSAccessibilityUnignoredDescendant(id element) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSArray *NSAccessibilityUnignoredChildren(NSArray *originalChildren) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSArray *NSAccessibilityUnignoredChildrenForOnlyChild(id originalChild) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
void NSAccessibilityPostNotificationWithUserInfo(id element,
|
||||
NSAccessibilityNotificationName notification,
|
||||
NSDictionary<NSAccessibilityNotificationUserInfoKey, id> *userInfo)
|
||||
{
|
||||
printf("STUB %s\n", __PRETTY_FUNCTION__);
|
||||
}
|
||||
|
@ -111,6 +111,7 @@ NSImageName const NSImageNameTouchBarRecordStopTemplate =
|
||||
@"NSTouchBarRecordStopTemplate";
|
||||
|
||||
NSImageHintKey const NSImageHintInterpolation = @"NSImageHintInterpolation";
|
||||
NSImageHintKey const NSImageHintCTM = @"NSImageHintCTM";
|
||||
|
||||
// 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
|
||||
|
@ -26,8 +26,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
#import <AppKit/NSWindow.h>
|
||||
#import <Foundation/NSKeyedArchiver.h>
|
||||
|
||||
const NSNotificationName NSMenuDidEndTrackingNotification =
|
||||
@"NSMenuDidEndTrackingNotification";
|
||||
const NSNotificationName NSMenuDidBeginTrackingNotification = @"NSMenuDidBeginTrackingNotification";
|
||||
const NSNotificationName NSMenuDidEndTrackingNotification = @"NSMenuDidEndTrackingNotification";
|
||||
|
||||
@implementation NSMenu
|
||||
|
||||
|
@ -32,6 +32,7 @@ const NSPasteboardType NSPasteboardTypeTabularText = @"NSTabularTextPboardType";
|
||||
const NSPasteboardType NSPasteboardTypeFont = @"NSFontPboardType";
|
||||
const NSPasteboardType NSPasteboardTypeRuler = @"NSRulerPboardType";
|
||||
const NSPasteboardType NSPasteboardTypeColor = @"NSColorPboardType";
|
||||
const NSPasteboardType NSPasteboardTypeFileURL = @"public.file-url";
|
||||
|
||||
const NSPasteboardType NSColorPboardType = @"NSColorPboardType";
|
||||
const NSPasteboardType NSFileContentsPboardType = @"NSFileContentsPboardType";
|
||||
@ -179,4 +180,12 @@ const NSPasteboardReadingOptionKey
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) canReadItemWithDataConformingToTypes:(NSArray<NSString *> *) types {
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (nullable NSArray *)readObjectsForClasses:(NSArray<Class> *)classArray options:(nullable NSDictionary<NSPasteboardReadingOptionKey, id> *) options {
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -62,6 +62,10 @@ const NSNotificationName
|
||||
NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification =
|
||||
@"NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification";
|
||||
|
||||
NSNotificationName NSWorkspaceDidMountNotification = @"NSWorkspaceDidMountNotification";
|
||||
NSNotificationName NSWorkspaceDidUnmountNotification = @"NSWorkspaceDidUnmountNotification";
|
||||
NSNotificationName NSWorkspaceWillUnmountNotification = @"NSWorkspaceWillUnmountNotification";
|
||||
|
||||
@implementation NSWorkspace
|
||||
|
||||
+ (NSWorkspace *) sharedWorkspace {
|
||||
@ -312,3 +316,10 @@ const NSNotificationName
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSWorkspaceOpenConfiguration
|
||||
+ (instancetype)configuration {
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
@ -11,6 +11,9 @@ APPKIT_EXPORT NSString *const NSAccessibilityRoleDescription(NSString *role,
|
||||
NSString *subrole);
|
||||
|
||||
APPKIT_EXPORT id NSAccessibilityUnignoredAncestor(id element);
|
||||
APPKIT_EXPORT id NSAccessibilityUnignoredDescendant(id element);
|
||||
APPKIT_EXPORT NSArray *NSAccessibilityUnignoredChildren(NSArray *originalChildren);
|
||||
APPKIT_EXPORT NSArray *NSAccessibilityUnignoredChildrenForOnlyChild(id originalChild);
|
||||
|
||||
@interface NSObject (NSAccessibility)
|
||||
- (NSArray *) accessibilityAttributeNames;
|
||||
|
@ -98,7 +98,6 @@ APPKIT_EXPORT NSString *const NSAccessibilityWindowsAttribute;
|
||||
APPKIT_EXPORT NSString *const NSAccessibilityColumnCountAttribute;
|
||||
APPKIT_EXPORT NSString *const NSAccessibilityOrderedByRowAttribute;
|
||||
APPKIT_EXPORT NSString *const NSAccessibilityRowCountAttribute;
|
||||
|
||||
APPKIT_EXPORT NSString *const NSAccessibilityColumnHeaderUIElementsAttribute;
|
||||
APPKIT_EXPORT NSString *const NSAccessibilityColumnsAttribute;
|
||||
APPKIT_EXPORT NSString *const NSAccessibilityRowHeaderUIElementsAttribute;
|
||||
@ -346,3 +345,17 @@ APPKIT_EXPORT NSString *const NSAccessibilityLayoutChangedNotification;
|
||||
APPKIT_EXPORT NSString *const NSAccessibilityUIElementsKey;
|
||||
|
||||
APPKIT_EXPORT NSString *const NSAccessibilityToggleSubrole;
|
||||
|
||||
APPKIT_EXPORT NSString *const NSAccessibilityFullScreenButtonSubrole;
|
||||
|
||||
typedef NSString * NSAccessibilityNotificationName;
|
||||
typedef NSString * NSAccessibilityNotificationUserInfoKey;
|
||||
|
||||
APPKIT_EXPORT NSAccessibilityNotificationUserInfoKey const NSAccessibilityAnnouncementKey;
|
||||
APPKIT_EXPORT NSAccessibilityNotificationName const NSAccessibilityAnnouncementRequestedNotification;
|
||||
APPKIT_EXPORT NSAccessibilityNotificationUserInfoKey const NSAccessibilityPriorityKey;
|
||||
|
||||
APPKIT_EXPORT void NSAccessibilityPostNotificationWithUserInfo(id element,
|
||||
NSAccessibilityNotificationName notification,
|
||||
NSDictionary<NSAccessibilityNotificationUserInfoKey, id> *userInfo);
|
||||
|
||||
|
@ -231,3 +231,4 @@ APPKIT_EXPORT NSImageName const NSImageNameTouchBarPlayTemplate;
|
||||
APPKIT_EXPORT NSImageName const NSImageNameTouchBarRecordStopTemplate;
|
||||
|
||||
APPKIT_EXPORT NSImageHintKey const NSImageHintInterpolation;
|
||||
APPKIT_EXPORT NSImageHintKey const NSImageHintCTM;
|
||||
|
@ -24,6 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
@protocol NSMenuDelegate;
|
||||
|
||||
APPKIT_EXPORT const NSNotificationName NSMenuDidBeginTrackingNotification;
|
||||
APPKIT_EXPORT const NSNotificationName NSMenuDidEndTrackingNotification;
|
||||
|
||||
@interface NSMenu : NSObject <NSCopying> {
|
||||
|
@ -36,6 +36,7 @@ APPKIT_EXPORT const NSPasteboardType NSPasteboardTypeTabularText;
|
||||
APPKIT_EXPORT const NSPasteboardType NSPasteboardTypeFont;
|
||||
APPKIT_EXPORT const NSPasteboardType NSPasteboardTypeRuler;
|
||||
APPKIT_EXPORT const NSPasteboardType NSPasteboardTypeColor;
|
||||
APPKIT_EXPORT const NSPasteboardType NSPasteboardTypeFileURL;
|
||||
|
||||
// Old Pasteboard Types
|
||||
APPKIT_EXPORT const NSPasteboardType NSColorPboardType;
|
||||
@ -108,6 +109,8 @@ APPKIT_EXPORT const NSPasteboardReadingOptionKey
|
||||
- (BOOL) setData: (NSData *) data forType: (NSPasteboardType) type;
|
||||
- (BOOL) setString: (NSString *) string forType: (NSPasteboardType) type;
|
||||
- (BOOL) setPropertyList: plist forType: (NSPasteboardType) type;
|
||||
- (BOOL) canReadItemWithDataConformingToTypes:(NSArray<NSString *> *) types;
|
||||
- (NSArray *)readObjectsForClasses:(NSArray<Class> *)classArray options:(NSDictionary<NSPasteboardReadingOptionKey, id> *) options;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -42,7 +42,10 @@ APPKIT_EXPORT const NSNotificationName NSWorkspaceScreensDidSleepNotification;
|
||||
APPKIT_EXPORT const NSNotificationName NSWorkspaceScreensDidWakeNotification;
|
||||
APPKIT_EXPORT const NSNotificationName NSWorkspaceWillSleepNotification;
|
||||
APPKIT_EXPORT const NSNotificationName NSWorkspaceSessionDidBecomeActiveNotification;
|
||||
APPKIT_EXPORT const NSNotificationName NSWorkspaceSessionDidResignActiveNotification;
|
||||
|
||||
APPKIT_EXPORT NSNotificationName NSWorkspaceDidMountNotification;
|
||||
APPKIT_EXPORT NSNotificationName NSWorkspaceDidUnmountNotification;
|
||||
APPKIT_EXPORT NSNotificationName NSWorkspaceWillUnmountNotification;
|
||||
|
||||
typedef NSUInteger NSWorkspaceIconCreationOptions;
|
||||
|
||||
@ -144,3 +147,22 @@ typedef NSUInteger NSWorkspaceIconCreationOptions;
|
||||
- (BOOL) isFileHiddenAtPath: (NSString *) path;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSWorkspaceOpenConfiguration : NSObject <NSCopying>
|
||||
+ (instancetype)configuration;
|
||||
|
||||
@property BOOL requiresUniversalLinks;
|
||||
@property (getter=isForPrinting) BOOL forPrinting;
|
||||
@property BOOL activates;
|
||||
@property BOOL addsToRecentItems;
|
||||
@property BOOL allowsRunningApplicationSubstitution;
|
||||
@property BOOL createsNewApplicationInstance;
|
||||
@property BOOL hides;
|
||||
@property BOOL hidesOthers;
|
||||
@property BOOL promptsUserIfNeeded;
|
||||
@property (strong) NSAppleEventDescriptor *appleEvent;
|
||||
@property (copy) NSArray<NSString *> *arguments;
|
||||
@property (copy) NSDictionary<NSString *, NSString *> *environment;
|
||||
@property cpu_type_t architecture;
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user