Implement stubs for iTerm2 (#2)

* Implements the following variables for NSDraggingItem

NSDraggingImageComponentIconKey
NSDraggingImageComponentKey

* Implement NSMenuDidEndTrackingNotification for NSMenu

* Implements the following variables for NSWorkspace.m

NSWorkspaceDidDeactivateApplicationNotification
NSWorkspaceSessionDidBecomeActiveNotification
NSWorkspaceSessionDidResignActiveNotification

* Fix NSSharingService

* Use APPKIT_EXPORT instead of extern
This commit is contained in:
CuriousTommy 2019-07-30 15:03:33 -07:00 committed by Andrew Hyatt
parent 35e442b89e
commit b583fd29ca
9 changed files with 30 additions and 3 deletions

View File

@ -393,6 +393,8 @@ set(AppKit_sources
NSATSTypesetter.m
NSOpenGLLayer.m
NSCollectionViewLayout.m
NSSharingService.m
)
set_source_files_properties(${AppKit_sources} LANGUAGE C)

View File

@ -19,6 +19,8 @@
#import <AppKit/NSDraggingItem.h>
const NSDraggingImageComponentKey NSDraggingImageComponentIconKey = @"icon";
@implementation NSDraggingImageComponent
@end

View File

@ -15,6 +15,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <AppKit/NSMenuView.h>
#import <Foundation/NSKeyedArchiver.h>
const NSNotificationName NSMenuDidEndTrackingNotification = @"NSMenuDidEndTrackingNotification";
@implementation NSMenu
+(void)popUpContextMenu:(NSMenu *)menu withEvent:(NSEvent *)event forView:(NSView *)view {

View File

@ -0,0 +1,4 @@
#import <AppKit/NSSharingService.h>
@implementation NSSharingService
@end

View File

@ -5,6 +5,8 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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 <Foundation/Foundation.h>
#import <AppKit/NSWorkspace.h>
#import <AppKit/NSRaise.h>
@ -20,8 +22,11 @@ NSString *const NSWorkspaceLaunchConfigurationEnvironment = @"NSWorkspaceLaunchC
NSString *const NSWorkspaceLaunchConfigurationArchitecture = @"NSWorkspaceLaunchConfigurationArchitecture";
NSString *const NSWorkspaceActiveSpaceDidChangeNotification = @"NSWorkspaceActiveSpaceDidChangeNotification";
const NSNotificationName NSWorkspaceDidDeactivateApplicationNotification = @"NSWorkspaceDidDeactivateApplicationNotification";
NSString *const NSWorkspaceDidLaunchApplicationNotification = @"NSWorkspaceDidLaunchApplicationNotification";
NSString *const NSWorkspaceDidTerminateApplicationNotification = @"NSWorkspaceDidTerminateApplicationNotification";
const NSNotificationName NSWorkspaceSessionDidBecomeActiveNotification = @"NSWorkspaceSessionDidBecomeActiveNotification";
const NSNotificationName NSWorkspaceSessionDidResignActiveNotification = @"NSWorkspaceSessionDidResignActiveNotification";
@implementation NSWorkspace

View File

@ -18,6 +18,10 @@
*/
#import <Foundation/NSObject.h>
#import <AppKit/AppKitExport.h>
typedef NSString *NSDraggingImageComponentKey;
APPKIT_EXPORT const NSDraggingImageComponentKey NSDraggingImageComponentIconKey;
@interface NSDraggingImageComponent : NSObject
@end

View File

@ -7,11 +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 <Foundation/Foundation.h>
#import <AppKit/AppKitExport.h>
@class NSScreen, NSMenu, NSMenuItem, NSWindow, NSEvent, NSView;
@protocol NSMenuDelegate;
APPKIT_EXPORT const NSNotificationName NSMenuDidEndTrackingNotification;
@interface NSMenu : NSObject <NSCopying> {
NSMenu *_supermenu;
NSString *_title;

View File

@ -19,8 +19,8 @@
#import <Foundation/NSObject.h>
@interface NSSharingService : NSObject {
@interface NSSharingService : NSObject
@end
@interface NSItemProvider (NSCloudKitSharing)
@end
// @interface NSItemProvider (NSCloudKitSharing)
// @end

View File

@ -23,8 +23,13 @@ APPKIT_EXPORT NSString *const NSWorkspaceLaunchConfigurationEnvironment;
APPKIT_EXPORT NSString *const NSWorkspaceLaunchConfigurationArchitecture;
APPKIT_EXPORT NSString *const NSWorkspaceActiveSpaceDidChangeNotification;
APPKIT_EXPORT const NSNotificationName NSWorkspaceDidDeactivateApplicationNotification;
APPKIT_EXPORT NSString *const NSWorkspaceDidLaunchApplicationNotification;
APPKIT_EXPORT NSString *const NSWorkspaceDidTerminateApplicationNotification;
APPKIT_EXPORT const NSNotificationName NSWorkspaceSessionDidBecomeActiveNotification;
APPKIT_EXPORT const NSNotificationName NSWorkspaceSessionDidResignActiveNotification;
@interface NSWorkspace : NSObject {
NSNotificationCenter *_notificationCenter;