From ba310e8b58d686ee9897b26a7edab5b778a8d96f Mon Sep 17 00:00:00 2001 From: jnj Date: Thu, 13 Nov 2008 18:59:12 +0000 Subject: Add remaining plugins git-svn-id: https://blacktree-elements-public.googlecode.com/svn/trunk@41 57e2f9b5-c12c-0410-8e95-a1ee7272c91a --- .../A/PrivateHeaders/NDComponentInstance.h | 138 +++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDComponentInstance.h (limited to 'QSFoundation.framework/Versions/A/PrivateHeaders/NDComponentInstance.h') diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDComponentInstance.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDComponentInstance.h new file mode 100644 index 0000000..5e2061e --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDComponentInstance.h @@ -0,0 +1,138 @@ +/*! + @header NDComponentInstance + @abstract Header file for NDComponentInstance. + @discussion Declare the class NDComponentInstance which is used with NDAppleScriptObject + + Created by Nathan Day on Tue May 20 2003. + Copyright © 2002 Nathan Day. All rights reserved. + */ + +#import +#import "NDAppleScriptObject_Protocols.h" + +/*! + @class NDComponentInstance + @abstract A class to represent a component instance. + @discussion A component instance is a connection to a component (osa component) used to compile and execute AppleScripts. This class is to be used with NDAppleScriptObject. + */ +@interface NDComponentInstance : NSObject +{ +@private + ComponentInstance scriptingComponent; + id sendAppleEventTarget; + id activeTarget; + OSASendUPP defaultSendProcPtr; + long defaultSendProcRefCon; + OSAActiveProcPtr defaultActiveProcPtr; + long defaultActiveProcRefCon; + +} + +/*! + @method sharedComponentInstance + @abstract Returns the shared component instance. + @discussion This is the single component all NDAppleScriptObjects use if you do not give it a NDComponentInstance. The shared component instance has a connection with the default OSA Apple component. + @result Returns NDComponentInstance component. + */ ++ (id)sharedComponentInstance; + +/*! + @method closeSharedComponentInstance + @abstract Close the shared component instance. + @discussion This can be called before you application closes or when it has finished with the shared component instance. + */ ++ (void)closeSharedComponentInstance; + +/*! + @method findNextComponent: + @abstract Finds the next OSA component. + @discussion Can be used by init methods that take a component parameter so that a script can be connected to it own OSA component. This is useful if you want to execute AppleScripts within separate threads as each OSA component is not thread safe. + @result Returns a OSA component. + */ ++ (Component)findNextComponent; + +/*! + @method componentInstance + @abstract Allocates and initializes a NDComponentInstance + @discussion Returns a NDComponentInstance with a connection to the default OSA Apple component. + @result A NDComponentInstance + */ ++ (id)componentInstance; +/*! + @method componentInstanceWithComponent: + @abstract Allocates and initializes a NDComponentInstance + @discussion Returns a NDComponentInstance with a connection to the supplied component. + @param component A component, if NULL then the default AppleScript component is used.. + @result A NDComponentInstance + */ ++ (id)componentInstanceWithComponent:(Component)component; + +/*! + @method init + @abstract Intializes a NDComponentInstance. + @discussion The receiver opens a connection with the default AppleScript component. + @result The initialized NDComponentInstance + */ +- (id)init; +/*! + @method initWithComponent: + @abstract Intialize a NDComponentInstance. + @discussion The receiver opens a connection with the supplied component. + @param component A component, if NULL then the default AppleScript component is used.. + @result The initialized NDComponentInstance + */ +- (id)initWithComponent:(Component)component; + +/*! + @method setFinderAsDefaultTarget. + @abstract sets the default target as Finder for any AppleEvents + @discussion passes the Finders creator code to setDefaultTargetAsCreator:. + */ +- (void)setFinderAsDefaultTarget; + /*! + @method setDefaultTarget: + @abstract sets the default target for any AppleEvents. + @discussion any AppleEvents not enclosed in a tell statement by default go to the current + process (your application). With this method you can provide a different default target. + @param defaultTarget an NSAppleEventDescriptor containing the target descriptor + */ +- (void)setDefaultTarget:(NSAppleEventDescriptor *)defaultTarget; +/*! + @method setDefaultTargetAsCreator: + @abstract sets the default target, specified by creator code, for any AppleEvents + @discussion same as setDefaultTarget: but passing the creator code of an application to specify the + target process. + @param creator an OSType creator code of the processes application. + */ +- (void)setDefaultTargetAsCreator:(OSType)creator; +/*! + @method setAppleEventSendTarget:. + @abstract sets the object that any handles any AppleEvent the script atempts to send. + @discussion If the send target is set any AppleEvents are sent to the send target to be processed, otherwise NDComponentInstance will handle the event itself by utilising the OSA default send procedure. One use of this is when executing a script in thread any AppleEvents that require user interaction sent to the current procees need to be sent from the main thread. + @param target An object that implements the protocol NDAppleScriptObjectSendEvent. + */ +- (void)setAppleEventSendTarget:(id)target; +/*! + @method appleEventSendTarget + @abstract returns the object that handles any AppleEvents + @discussion See the method setAppleEventSendTarget: for a discussion. + @result the AppleEvent send target. + */ +- (id)appleEventSendTarget; + +/*! + @method setActiveTarget: + @abstract sets the object which is periodicly sent the message appleScriptActive:. + @discussion will the script is running it will periodocly give up time for you to do some other processing. + @param target An object that implements the protocol NDAppleScriptObjectActive. + */ +- (void)setActiveTarget:(id)target; + +/*! + @method activeTarget + @abstract returns the active target as set by the method setActiveTarget: + @discussion See the method setActiveTarget: for a discussion. + */ +- (id)activeTarget; + +@end -- cgit