this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Create stubs for ScriptingBridge (#286)

+250 -1
+2 -1
src/CMakeLists.txt
··· 169 169 ${CMAKE_CURRENT_SOURCE_DIR}/kperf/include 170 170 ${CMAKE_CURRENT_SOURCE_DIR}/StreamingZip/include 171 171 ${CMAKE_CURRENT_SOURCE_DIR}/external/dtrace/head 172 + ${CMAKE_CURRENT_SOURCE_DIR}/ScriptingBridge/include 172 173 ${CMAKE_CURRENT_SOURCE_DIR}/lkm/include 173 174 ) 174 175 ··· 262 263 add_subdirectory(AppleSystemInfo) 263 264 add_subdirectory(DiskImages) 264 265 add_subdirectory(PackageKit) 265 - #add_subdirectory(Cocoa) 266 266 267 267 add_subdirectory(native) 268 268 ··· 330 330 add_subdirectory(external/gdb) 331 331 add_subdirectory(external/Heimdal) 332 332 add_subdirectory(PlistBuddy) 333 + add_subdirectory(ScriptingBridge) 333 334 334 335 # /Applications 335 336 #add_subdirectory(external/TextEdit)
+20
src/ScriptingBridge/CMakeLists.txt
··· 1 + project(ScriptingBridge) 2 + 3 + set(DYLIB_COMPAT_VERSION "1.0.0") 4 + set(DYLIB_CURRENT_VERSION "1.0.0") 5 + 6 + add_framework(ScriptingBridge 7 + FAT 8 + CURRENT_VERSION 9 + VERSION "A" 10 + 11 + SOURCES 12 + src/SBApplication.m 13 + src/SBElementArray.m 14 + src/SBObject.m 15 + 16 + DEPENDENCIES 17 + system 18 + objc 19 + Foundation 20 + )
+42
src/ScriptingBridge/include/ScriptingBridge/SBApplication.h
··· 1 + #import <Foundation/Foundation.h> 2 + #import <CoreServices/CoreServices.h> 3 + #import <ScriptingBridge/SBObject.h> 4 + 5 + NS_ASSUME_NONNULL_BEGIN 6 + 7 + @protocol SBApplicationDelegate; 8 + 9 + NS_CLASS_AVAILABLE(10_5, NA) 10 + @interface SBApplication : SBObject <NSCoding> 11 + 12 + - (nullable __kindof SBApplication *) initWithBundleIdentifier:(NSString *)ident; 13 + - (nullable __kindof SBApplication *) initWithURL:(NSURL *)url; 14 + - (nullable __kindof SBApplication *) initWithProcessIdentifier:(pid_t)pid; 15 + 16 + + (nullable __kindof SBApplication *) applicationWithBundleIdentifier:(NSString *) ident; 17 + + (nullable __kindof SBApplication *) applicationWithURL:(NSURL *) url; 18 + + (nullable __kindof SBApplication *) applicationWithProcessIdentifier:(pid_t) pid; 19 + 20 + - (nullable Class) classForScriptingClass:(NSString *) className; 21 + 22 + @property (readonly, getter=isRunning) BOOL running; 23 + 24 + - (void) activate; 25 + 26 + @property (nullable, strong) id <SBApplicationDelegate> delegate; 27 + 28 + @property LSLaunchFlags launchFlags; 29 + 30 + @property AESendMode sendMode; 31 + 32 + @property long timeout; 33 + 34 + @end 35 + 36 + @protocol SBApplicationDelegate 37 + 38 + - (nullable id) eventDidFail:(const AppleEvent *)event withError:(NSError *)error; 39 + 40 + @end 41 + 42 + NS_ASSUME_NONNULL_END
+25
src/ScriptingBridge/include/ScriptingBridge/SBElementArray.h
··· 1 + #import <Foundation/Foundation.h> 2 + #import <ScriptingBridge/SBObject.h> 3 + 4 + NS_ASSUME_NONNULL_BEGIN 5 + 6 + NS_CLASS_AVAILABLE(10_5, NA) 7 + @interface SBElementArray<ObjectType> : NSMutableArray<ObjectType> 8 + { 9 + SBObject *_parent; 10 + DescType _elementCode; 11 + void *_reserved; 12 + } 13 + 14 + - (ObjectType) objectWithName:(NSString *)name; 15 + - (ObjectType) objectWithID:(id)identifier; 16 + - (ObjectType) objectAtLocation:(id)location; 17 + 18 + - (NSArray<id> *) arrayByApplyingSelector:(SEL)selector; 19 + - (NSArray<id> *) arrayByApplyingSelector:(SEL)aSelector withObject:(id)argument; 20 + 21 + - (nullable NSArray<ObjectType> *) get; 22 + 23 + @end 24 + 25 + NS_ASSUME_NONNULL_END
+41
src/ScriptingBridge/include/ScriptingBridge/SBObject.h
··· 1 + #import <Foundation/Foundation.h> 2 + #import <ApplicationServices/ApplicationServices.h> 3 + 4 + NS_ASSUME_NONNULL_BEGIN 5 + 6 + @class SBAppContext, SBElementArray; 7 + 8 + NS_CLASS_AVAILABLE(10_5, NA) 9 + @interface SBObject : NSObject <NSCoding> 10 + { 11 + AEDesc _specifier; 12 + SBAppContext *_ctx; 13 + id _reserved; 14 + } 15 + 16 + - (instancetype) init; 17 + - (instancetype) initWithProperties:(NSDictionary *)properties; 18 + - (instancetype) initWithData:(id)data; 19 + 20 + - (nullable id) get; 21 + 22 + - (nullable NSError *) lastError NS_AVAILABLE(10_6, NA); 23 + 24 + @end 25 + 26 + @interface SBObject (SBGlueInterface) 27 + 28 + - (instancetype) initWithElementCode:(DescType)code properties:(nullable NSDictionary<NSString *, id> *)properties data:(nullable id)data; 29 + 30 + - (SBObject *) propertyWithCode:(AEKeyword)code; 31 + - (SBObject *) propertyWithClass:(Class)cls code:(AEKeyword)code; 32 + 33 + - (SBElementArray *) elementArrayWithCode:(DescType)code; 34 + 35 + - (id) sendEvent:(AEEventClass)eventClass id:(AEEventID)eventID parameters:(DescType)firstParamCode, ...; 36 + 37 + - (void) setTo:(nullable id)value; 38 + 39 + @end 40 + 41 + NS_ASSUME_NONNULL_END
+3
src/ScriptingBridge/include/ScriptingBridge/ScriptingBridge.h
··· 1 + #import <ScriptingBridge/SBApplication.h> 2 + #import <ScriptingBridge/SBObject.h> 3 + #import <ScriptingBridge/SBElementArray.h>
+40
src/ScriptingBridge/src/SBApplication.m
··· 1 + #import <ScriptingBridge/SBApplication.m> 2 + 3 + @implementation SBApplication 4 + 5 + - (nullable __kindof SBApplication *) initWithBundleIdentifier:(NSString *)ident { 6 + return nil; 7 + } 8 + 9 + - (nullable __kindof SBApplication *) initWithURL:(NSURL *)url { 10 + return nil; 11 + } 12 + 13 + - (nullable __kindof SBApplication *) initWithProcessIdentifier:(pid_t)pid { 14 + return nil; 15 + } 16 + 17 + + (nullable __kindof SBApplication *) applicationWithBundleIdentifier:(NSString *) ident { 18 + return nil; 19 + } 20 + 21 + + (nullable __kindof SBApplication *) applicationWithURL:(NSURL *) url { 22 + return nil; 23 + } 24 + + (nullable __kindof SBApplication *) applicationWithProcessIdentifier:(pid_t) pid { 25 + return nil; 26 + } 27 + 28 + - (nullable Class) classForScriptingClass:(NSString *) className { 29 + return nil; 30 + } 31 + 32 + - (void) activate { 33 + 34 + } 35 + 36 + - (nullable id) eventDidFail:(const AppleEvent *)event withError:(NSError *)error { 37 + return nil; 38 + } 39 + 40 + @end
+29
src/ScriptingBridge/src/SBElementArray.m
··· 1 + #import <ScriptingBridge/SBElementArray.h> 2 + 3 + @implementation SBElementArray 4 + 5 + - (ObjectType) objectWithName:(NSString *)name { 6 + return nil; 7 + } 8 + 9 + - (ObjectType) objectWithID:(id)identifier { 10 + return nil; 11 + } 12 + 13 + - (ObjectType) objectAtLocation:(id)location { 14 + return nil; 15 + } 16 + 17 + - (NSArray<id> *) arrayByApplyingSelector:(SEL)selector { 18 + return nil; 19 + } 20 + 21 + - (NSArray<id> *) arrayByApplyingSelector:(SEL)aSelector withObject:(id)argument { 22 + return nil; 23 + } 24 + 25 + - (nullable NSArray<ObjectType> *) get { 26 + return nil; 27 + } 28 + 29 + @end
+48
src/ScriptingBridge/src/SBObject.m
··· 1 + #import <ScriptingBridge/SBObject.h> 2 + 3 + @implemtation SBObject 4 + 5 + - (instancetype) init { 6 + return nil; 7 + } 8 + - (instancetype) initWithProperties:(NSDictionary *)properties { 9 + return nil; 10 + } 11 + 12 + - (instancetype) initWithData:(id)data { 13 + return nil; 14 + } 15 + 16 + - (nullable id) get { 17 + return nil; 18 + } 19 + 20 + - (nullable NSError *) lastError { 21 + return nil; 22 + } 23 + 24 + - (instancetype) initWithElementCode:(DescType)code properties:(nullable NSDictionary<NSString *, id> *)properties data:(nullable id)data { 25 + return nil; 26 + } 27 + 28 + - (SBObject *) propertyWithCode:(AEKeyword)code { 29 + return nil; 30 + } 31 + 32 + - (SBObject *) propertyWithClass:(Class)cls code:(AEKeyword)code { 33 + return nil; 34 + } 35 + 36 + - (SBElementArray *) elementArrayWithCode:(DescType)code { 37 + return nil; 38 + } 39 + 40 + - (id) sendEvent:(AEEventClass)eventClass id:(AEEventID)eventID parameters:(DescType)firstParamCode, ... { 41 + return nil; 42 + } 43 + 44 + - (void) setTo:(nullable id)value { 45 + 46 + } 47 + 48 + @end