mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 12:09:51 +00:00
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:
parent
35e442b89e
commit
b583fd29ca
@ -393,6 +393,8 @@ set(AppKit_sources
|
|||||||
NSATSTypesetter.m
|
NSATSTypesetter.m
|
||||||
NSOpenGLLayer.m
|
NSOpenGLLayer.m
|
||||||
NSCollectionViewLayout.m
|
NSCollectionViewLayout.m
|
||||||
|
|
||||||
|
NSSharingService.m
|
||||||
)
|
)
|
||||||
|
|
||||||
set_source_files_properties(${AppKit_sources} LANGUAGE C)
|
set_source_files_properties(${AppKit_sources} LANGUAGE C)
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
#import <AppKit/NSDraggingItem.h>
|
#import <AppKit/NSDraggingItem.h>
|
||||||
|
|
||||||
|
const NSDraggingImageComponentKey NSDraggingImageComponentIconKey = @"icon";
|
||||||
|
|
||||||
@implementation NSDraggingImageComponent
|
@implementation NSDraggingImageComponent
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||||||
#import <AppKit/NSMenuView.h>
|
#import <AppKit/NSMenuView.h>
|
||||||
#import <Foundation/NSKeyedArchiver.h>
|
#import <Foundation/NSKeyedArchiver.h>
|
||||||
|
|
||||||
|
const NSNotificationName NSMenuDidEndTrackingNotification = @"NSMenuDidEndTrackingNotification";
|
||||||
|
|
||||||
@implementation NSMenu
|
@implementation NSMenu
|
||||||
|
|
||||||
+(void)popUpContextMenu:(NSMenu *)menu withEvent:(NSEvent *)event forView:(NSView *)view {
|
+(void)popUpContextMenu:(NSMenu *)menu withEvent:(NSEvent *)event forView:(NSView *)view {
|
||||||
|
4
AppKit/NSSharingService.m
Normal file
4
AppKit/NSSharingService.m
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#import <AppKit/NSSharingService.h>
|
||||||
|
|
||||||
|
@implementation NSSharingService
|
||||||
|
@end
|
@ -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 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. */
|
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/NSWorkspace.h>
|
||||||
#import <AppKit/NSRaise.h>
|
#import <AppKit/NSRaise.h>
|
||||||
|
|
||||||
@ -20,8 +22,11 @@ NSString *const NSWorkspaceLaunchConfigurationEnvironment = @"NSWorkspaceLaunchC
|
|||||||
NSString *const NSWorkspaceLaunchConfigurationArchitecture = @"NSWorkspaceLaunchConfigurationArchitecture";
|
NSString *const NSWorkspaceLaunchConfigurationArchitecture = @"NSWorkspaceLaunchConfigurationArchitecture";
|
||||||
|
|
||||||
NSString *const NSWorkspaceActiveSpaceDidChangeNotification = @"NSWorkspaceActiveSpaceDidChangeNotification";
|
NSString *const NSWorkspaceActiveSpaceDidChangeNotification = @"NSWorkspaceActiveSpaceDidChangeNotification";
|
||||||
|
const NSNotificationName NSWorkspaceDidDeactivateApplicationNotification = @"NSWorkspaceDidDeactivateApplicationNotification";
|
||||||
NSString *const NSWorkspaceDidLaunchApplicationNotification = @"NSWorkspaceDidLaunchApplicationNotification";
|
NSString *const NSWorkspaceDidLaunchApplicationNotification = @"NSWorkspaceDidLaunchApplicationNotification";
|
||||||
NSString *const NSWorkspaceDidTerminateApplicationNotification = @"NSWorkspaceDidTerminateApplicationNotification";
|
NSString *const NSWorkspaceDidTerminateApplicationNotification = @"NSWorkspaceDidTerminateApplicationNotification";
|
||||||
|
const NSNotificationName NSWorkspaceSessionDidBecomeActiveNotification = @"NSWorkspaceSessionDidBecomeActiveNotification";
|
||||||
|
const NSNotificationName NSWorkspaceSessionDidResignActiveNotification = @"NSWorkspaceSessionDidResignActiveNotification";
|
||||||
|
|
||||||
@implementation NSWorkspace
|
@implementation NSWorkspace
|
||||||
|
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Foundation/NSObject.h>
|
#import <Foundation/NSObject.h>
|
||||||
|
#import <AppKit/AppKitExport.h>
|
||||||
|
|
||||||
|
typedef NSString *NSDraggingImageComponentKey;
|
||||||
|
APPKIT_EXPORT const NSDraggingImageComponentKey NSDraggingImageComponentIconKey;
|
||||||
|
|
||||||
@interface NSDraggingImageComponent : NSObject
|
@interface NSDraggingImageComponent : NSObject
|
||||||
@end
|
@end
|
||||||
|
@ -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. */
|
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 <Foundation/Foundation.h>
|
||||||
|
#import <AppKit/AppKitExport.h>
|
||||||
|
|
||||||
@class NSScreen, NSMenu, NSMenuItem, NSWindow, NSEvent, NSView;
|
@class NSScreen, NSMenu, NSMenuItem, NSWindow, NSEvent, NSView;
|
||||||
|
|
||||||
@protocol NSMenuDelegate;
|
@protocol NSMenuDelegate;
|
||||||
|
|
||||||
|
APPKIT_EXPORT const NSNotificationName NSMenuDidEndTrackingNotification;
|
||||||
|
|
||||||
@interface NSMenu : NSObject <NSCopying> {
|
@interface NSMenu : NSObject <NSCopying> {
|
||||||
NSMenu *_supermenu;
|
NSMenu *_supermenu;
|
||||||
NSString *_title;
|
NSString *_title;
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
#import <Foundation/NSObject.h>
|
#import <Foundation/NSObject.h>
|
||||||
|
|
||||||
@interface NSSharingService : NSObject {
|
@interface NSSharingService : NSObject
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSItemProvider (NSCloudKitSharing)
|
// @interface NSItemProvider (NSCloudKitSharing)
|
||||||
@end
|
// @end
|
||||||
|
@ -23,8 +23,13 @@ APPKIT_EXPORT NSString *const NSWorkspaceLaunchConfigurationEnvironment;
|
|||||||
APPKIT_EXPORT NSString *const NSWorkspaceLaunchConfigurationArchitecture;
|
APPKIT_EXPORT NSString *const NSWorkspaceLaunchConfigurationArchitecture;
|
||||||
|
|
||||||
APPKIT_EXPORT NSString *const NSWorkspaceActiveSpaceDidChangeNotification;
|
APPKIT_EXPORT NSString *const NSWorkspaceActiveSpaceDidChangeNotification;
|
||||||
|
APPKIT_EXPORT const NSNotificationName NSWorkspaceDidDeactivateApplicationNotification;
|
||||||
APPKIT_EXPORT NSString *const NSWorkspaceDidLaunchApplicationNotification;
|
APPKIT_EXPORT NSString *const NSWorkspaceDidLaunchApplicationNotification;
|
||||||
APPKIT_EXPORT NSString *const NSWorkspaceDidTerminateApplicationNotification;
|
APPKIT_EXPORT NSString *const NSWorkspaceDidTerminateApplicationNotification;
|
||||||
|
APPKIT_EXPORT const NSNotificationName NSWorkspaceSessionDidBecomeActiveNotification;
|
||||||
|
APPKIT_EXPORT const NSNotificationName NSWorkspaceSessionDidResignActiveNotification;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@interface NSWorkspace : NSObject {
|
@interface NSWorkspace : NSObject {
|
||||||
NSNotificationCenter *_notificationCenter;
|
NSNotificationCenter *_notificationCenter;
|
||||||
|
Loading…
Reference in New Issue
Block a user