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 --- .../Versions/A/Headers/QSMDPredicate.h | 18 + .../Versions/A/PrivateHeaders/NDAlias+AliasFile.h | 77 ++ .../Versions/A/PrivateHeaders/NDAlias+QSMods.h | 15 + .../Versions/A/PrivateHeaders/NDAlias.h | 190 ++++ .../A/PrivateHeaders/NDAppleScriptObject.h | 688 ++++++++++++ .../PrivateHeaders/NDAppleScriptObject_Protocols.h | 49 + .../A/PrivateHeaders/NDComponentInstance.h | 138 +++ .../Versions/A/PrivateHeaders/NDHotKeyControl.h | 59 ++ .../Versions/A/PrivateHeaders/NDHotKeyEvent.h | 427 ++++++++ .../A/PrivateHeaders/NDHotKeyEvent_QSMods.h | 24 + .../A/PrivateHeaders/NDLaunchServicesObject.h | 66 ++ .../Versions/A/PrivateHeaders/NDProcess+QSMods.h | 21 + .../Versions/A/PrivateHeaders/NDProcess.h | 333 ++++++ .../A/PrivateHeaders/NDResourceFork+OtherSorces.h | 42 + .../Versions/A/PrivateHeaders/NDResourceFork.h | 259 +++++ .../NSAppleEventDescriptor+NDAppleScriptObject.h | 1113 ++++++++++++++++++++ .../PrivateHeaders/NSAppleEventDescriptor_QSMods.h | 18 + .../PrivateHeaders/NSAppleScript_BLTRExtensions.h | 30 + .../PrivateHeaders/NSApplication_BLTRExtensions.h | 57 + .../A/PrivateHeaders/NSArray_BLTRExtensions.h | 43 + .../A/PrivateHeaders/NSBezierPath_BLTRExtensions.h | 14 + .../A/PrivateHeaders/NSBundle_BLTRExtensions.h | 17 + .../A/PrivateHeaders/NSColor_QSModifications.h | 23 + .../A/PrivateHeaders/NSCursor_InformExtensions.h | 15 + .../A/PrivateHeaders/NSData_RangeExtensions.h | 14 + .../A/PrivateHeaders/NSEvent+BLTRExtensions.h | 26 + .../A/PrivateHeaders/NSException_TraceExtensions.h | 14 + .../PrivateHeaders/NSFileManager_BLTRExtensions.h | 37 + .../A/PrivateHeaders/NSGeometry_BLTRExtensions.h | 44 + .../A/PrivateHeaders/NSImage_BLTRExtensions.h | 49 + .../A/PrivateHeaders/NSObject+ReaperExtensions.h | 15 + .../A/PrivateHeaders/NSPasteboard_BLTRExtensions.h | 13 + .../A/PrivateHeaders/NSScreen_BLTRExtensions.h | 16 + .../A/PrivateHeaders/NSStatusItem_BLTRExtensions.h | 27 + .../A/PrivateHeaders/NSString+NDCarbonUtilities.h | 95 ++ .../A/PrivateHeaders/NSString+NDUtilities.h | 337 ++++++ .../A/PrivateHeaders/NSString_BLTRExtensions.h | 76 ++ .../A/PrivateHeaders/NSTableView_BLTRExtensions.h | 16 + .../A/PrivateHeaders/NSTask+BLTRExtensions.h | 15 + .../A/PrivateHeaders/NSURL+NDCarbonUtilities.h | 174 +++ .../A/PrivateHeaders/NSURL_BLTRExtensions.h | 16 + .../PrivateHeaders/NSUserDefaults_BLTRExtensions.h | 14 + .../A/PrivateHeaders/NSView_BLTRExtensions.h | 14 + .../A/PrivateHeaders/NSWindow_BLTRExtensions.h | 22 + .../A/PrivateHeaders/NSWorkspace_BLTRExtensions.h | 37 + .../Versions/A/PrivateHeaders/QSFoundation.h | 15 + .../Versions/A/PrivateHeaders/QSImageAndTextCell.h | 25 + .../Versions/A/PrivateHeaders/QSImageView.h | 18 + .../A/PrivateHeaders/QSKeyCodeTranslator.h | 31 + QSFoundation.framework/Versions/A/QSFoundation | Bin 0 -> 2352268 bytes .../Versions/A/Resources/Info.plist | 20 + QSFoundation.framework/Versions/Current | 1 + 52 files changed, 4917 insertions(+) create mode 100644 QSFoundation.framework/Versions/A/Headers/QSMDPredicate.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias+AliasFile.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias+QSMods.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDAppleScriptObject.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDAppleScriptObject_Protocols.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDComponentInstance.h create mode 100755 QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyControl.h create mode 100755 QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyEvent.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyEvent_QSMods.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDLaunchServicesObject.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDProcess+QSMods.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDProcess.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDResourceFork+OtherSorces.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NDResourceFork.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleEventDescriptor+NDAppleScriptObject.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleEventDescriptor_QSMods.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleScript_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSApplication_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSArray_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSBezierPath_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSBundle_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSColor_QSModifications.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSCursor_InformExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSData_RangeExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSEvent+BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSException_TraceExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSFileManager_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSGeometry_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSImage_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSObject+ReaperExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSPasteboard_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSScreen_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSStatusItem_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSString+NDCarbonUtilities.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSString+NDUtilities.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSString_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSTableView_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSTask+BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSURL+NDCarbonUtilities.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSURL_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSUserDefaults_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSView_BLTRExtensions.h create mode 100755 QSFoundation.framework/Versions/A/PrivateHeaders/NSWindow_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/NSWorkspace_BLTRExtensions.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/QSFoundation.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/QSImageAndTextCell.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/QSImageView.h create mode 100644 QSFoundation.framework/Versions/A/PrivateHeaders/QSKeyCodeTranslator.h create mode 100755 QSFoundation.framework/Versions/A/QSFoundation create mode 100644 QSFoundation.framework/Versions/A/Resources/Info.plist create mode 120000 QSFoundation.framework/Versions/Current (limited to 'QSFoundation.framework/Versions') diff --git a/QSFoundation.framework/Versions/A/Headers/QSMDPredicate.h b/QSFoundation.framework/Versions/A/Headers/QSMDPredicate.h new file mode 100644 index 0000000..84d0718 --- /dev/null +++ b/QSFoundation.framework/Versions/A/Headers/QSMDPredicate.h @@ -0,0 +1,18 @@ +// +// QSMDPredicate.h +// QSSpotlightPlugIn +// +// Created by Alcor on 5/6/05. +// Copyright 2005 Blacktree, Inc. All rights reserved. +// + +#import + + +@interface QSMDQueryPredicate : NSPredicate { + NSString *query; +} ++ (id)predicateWithString:(NSString *)aQuery; +- (NSString *)query; +- (void)setQuery:(NSString *)aQuery; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias+AliasFile.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias+AliasFile.h new file mode 100644 index 0000000..6f29958 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias+AliasFile.h @@ -0,0 +1,77 @@ +/* + * NDAlias+AliasFile.h category + * NDAliasProject + * + * Created by Nathan Day on Tue Dec 03 2002. + * Copyright (c) 2002 Nathan Day. All rights reserved. + */ +/*! + @header NDAlias+AliasFile + @abstract Defines a category of the class NDAlias + @discussion This category add additional functionality to NDAlias for reading and writing NDAlias instances to Finder alias files. Though this could be used for archiving purposed, the methods of the adopted protocol NSCoding are probable better suited. The method of NDAlias (AliasFile) are mainly for creating alias files that are visible in Finder to the user. +

As well as the class NDAlias and the classes and categories it uses, NDAlias (AliasFile) also requires the class NDResourceFork and it's category NDResourceFork (OtherSorces). If the additional functionality of NDAlias (AliasFile) is not required then the files for NDAlias (AliasFile), NDResourceFork and NDResourceFork (OtherSorces) can be excluded from your project.

+ */ + +#import +#import "NDAlias.h" + +/*! + @category NDAlias(AliasFile) + @abstract A category of the class NDAlias + @discussion This category add additional functionality to NDAlias for reading and writing NDAlias instances to Finder alias files. Though this could be used for archiving purposed, the methods of the adopted protocol NSCoding are probable better suited. The method of NDAlias (AliasFile) are mainly for creating alias files that are visible in Finder to the user. +

As well as the class NDAlias and the classes and categories it uses, NDAlias (AliasFile) also requires the class NDResourceFork and it's category NDResourceFork (OtherSorces). If the additional functionality of NDAlias (AliasFile) is not required then the files for NDAlias (AliasFile), NDResourceFork and NDResourceFork (OtherSorces) can be excluded from your project.

+ */ +@interface NDAlias (AliasFile) + +/*! + @method aliasWithContentsOfFile: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithContentsOfFile: allocates and initalises an NDAlias with the alias record data within the Finder alias file pointed to by the NSString path aPath. + @param aPath the path to an alias file. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithContentsOfFile:(NSString *)aPath; + /*! + @method aliasWithContentsOfURL: + @abstract Initalises a NDAlias. + @discussion The method aliasWithContentsOfURL: allocates and initalises an NDAlias with the alias record data within the Finder NSURL alias file pointed to pay the file url aURL + @param aURL the file url to the alias file. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithContentsOfURL:(NSURL *)aURL; + +/*! + @method initWithContentsOfFile: + @abstract Initalises a NDAlias. + @discussion The method initWithContentsOfFile: initalises the receiver with the alias record data within the Finder alias file pointed to by the NSString path aPath + @param aPath the path to the alias file. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithContentsOfFile:(NSString *)aPath; +/*! + @method initWithContentsOfURL: + @abstract Initalises a NDAlias. + @discussion The method initWithContentsOfURL: initalises the reciever with the alias record data within the Finder NSURL alias file pointed to pay the file url aURL. + @param aURL the file url to the alias file. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithContentsOfURL:(NSURL *)aURL; + +/*! + @method writeToFile: + @abstract Writes an NDAlias to a Finder alias file. + @discussion The method writeToFile: writes the alias record data contained within the reciever to a Finder alias file at the path aPath. writeToFile: can be used to create alias files that the user can see in Finder and use. + @param aPath the path for the alias file. Not the path the alias record represents. + @result «result» + */ +- (BOOL)writeToFile:(NSString *)aPath; +/*! + @method writeToURL: + @abstract Writes an NDAlias to a Finder alias file. + @discussion The method writeToURL: writes the alias record data contained within the reciever to a Finder alias file at the file url aURL. writeToFile: can be used to create alias files that the user can see in Finder and use. + @param aURL the file url for the alias file. Not the file url the alias record represents. + @result «result» + */ +- (BOOL)writeToURL:(NSURL *)aURL; + +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias+QSMods.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias+QSMods.h new file mode 100644 index 0000000..40fab2c --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias+QSMods.h @@ -0,0 +1,15 @@ +// +// NDAlias+QSMods.h +// Quicksilver +// +// Created by Alcor on Fri Mar 05 2004. +// Copyright (c) 2004 Blacktree, Inc.. All rights reserved. +// + +#import + +#import "NDAlias.h" + +@interface NDAlias (QSMods) +- (NSString *)quickPath; +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias.h new file mode 100644 index 0000000..ac92090 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAlias.h @@ -0,0 +1,190 @@ +/* + * NDAlias.h + * NDAliasProject + * + * Created by Nathan Day on Thu Feb 07 2002. + * Copyright (c) 2002 Nathan Day. All rights reserved. + */ + +#import + +/*! + @header NDAliasProject + Declare the interface for the class NDAlias. + */ + +/*! + @class NDAlias + @abstract A class to access the Alias Manager from Cocoa + @discussion Your application can use a NDAlias to refere to file system objects (that is, files, directories, and volumes) in a way that does expect the file system objects path to be maintained. The user then can move or rename the file system object with out your program lossing track of it. This behaviour is not always desirable, for intance with library resources. But for file system objects like documents of user folders, it is what Mac OS users have come to expect + */ +@interface NDAlias : NSObject +{ + AliasHandle aliasHandle; + Boolean changed; +} + +/*! + @method aliasWithURL: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithURL: creates an NDAlias that contains only the minimum information necessary to describe the target: the target name, the parent directory ID, the volume name and creation date, and the volume mounting information. The aliasWithURL: method uses the standard alias record data structure, but it fills in only parts of the record. +

The methods url and path never update a minimal alias record.

+ @param aURL the file url for the target of the alias. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithURL:(NSURL *)aURL; +/*! + @method aliasWithURL:fromURL: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithURL:fromURL: creates a NDAlias that describes the specified target. aliasWithURL:fromURL: always records the name and file or directory ID of the target, its creation date, the parent directory name and ID, and the volume name and creation date. It also records the full pathname of the target and a collection of other information relevant to locating the target, verifying the target, and mounting the target's volume, if necessary. aliasWithURL:fromURL: also stores relative path information as well by supplying a starting point for a relative path. + @param aURL the file url for the target of the alias. + @param aFromURL The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromURL and aURL, must reside on the same volume. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithURL:(NSURL *)aURL fromURL:(NSURL *)aFromURL; +/*! + @method aliasWithPath: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithPath: creates an NDAlias that contains only the minimum information necessary to describe the target: the target name, the parent directory ID, the volume name and creation date, and the volume mounting information. The aliasWithPath: method uses the standard alias record data structure, but it fills in only parts of the record. +

The methods url and path never update a minimal alias record.

+ @param aPath the path for the target of the alias. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithPath:(NSString *)aPath; +/*! + @method aliasWithPath:fromPath: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithPath:fromPath: creates a NDAlias that describes the specified target. aliasWithPath:fromPath: always records the name and file or directory ID of the target, its creation date, the parent directory name and ID, and the volume name and creation date. It also records the full pathname of the target and a collection of other information relevant to locating the target, verifying the target, and mounting the target's volume, if necessary. aliasWithPath:fromPath: also stores relative path information as well by supplying a starting point for a relative path. + @param aURL the file url for the target of the alias. + @param aFromPath The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromPath and aURL, must reside on the same volume. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithPath:(NSString *)aPath fromPath:(NSString *)aFromPath; + +/*! + @method aliasWithData: + @abstract Creates and initalises a NDAlias. + @discussion The method aliasWithData: creates a NDAlias that describes the specified target. aliasWithData: creates the NDAlias from the data that was returned from the method data + @param aData The NSData instaqnces that contains the data returned previously from the method data. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ ++ (id)aliasWithData:(NSData *)aData; + +/*! + @method initWithURL: + @abstract Initalises a NDAlias. + @discussion The method initWithURL: initalises an NDAlias that contains only the minimum information necessary to describe the target: the target name, the parent directory ID, the volume name and creation date, and the volume mounting information. The initWithURL: method uses the standard alias record data structure, but it fills in only parts of the record. +

The methods url and path never update a minimal alias record.

+ @param aURL the file url for the target of the alias. + @result A NDAlias instance, returns nil if NDAlias creation fails. + */ +- (id)initWithURL:(NSURL *)aURL; +/*! + @method initWithPath:fromURL: + @abstract Initalises a NDAlias. + @discussion The method initWithPath:fromURL: initalises a NDAlias that describes the specified target. initWithPath:fromURL: always records the name and file or directory ID of the target, its creation date, the parent directory name and ID, and the volume name and creation date. It also records the full pathname of the target and a collection of other information relevant to locating the target, verifying the target, and mounting the target's volume, if necessary. initWithPath:fromURL: also stores relative path information as well by supplying a starting point for a relative path. + @param aURL the file url for the target of the alias. + @param aFromURL The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromURL and aURL, must reside on the same volume. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithURL:(NSURL *)aURL fromURL:(NSURL *)aFromURL; +/*! + @method initWithPath: + @abstract Initalises a NDAlias. + @discussion The method initWithPath: initalises an NDAlias that contains only the minimum information necessary to describe the target: the target name, the parent directory ID, the volume name and creation date, and the volume mounting information. The initWithPath: method uses the standard alias record data structure, but it fills in only parts of the record. +

The methods url and path never update a minimal alias record.

+ @param aPath the path for the target of the alias. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithPath:(NSString *)aPath; +/*! + @method initWithPath:fromPath: + @abstract Initalises a NDAlias. + @discussion The method initWithPath:fromPath: initalises a NDAlias that describes the specified target. initWithPath:fromPath: always records the name and file or directory ID of the target, its creation date, the parent directory name and ID, and the volume name and creation date. It also records the full pathname of the target and a collection of other information relevant to locating the target, verifying the target, and mounting the target's volume, if necessary. initWithPath:fromPath: also stores relative path information as well by supplying a starting point for a relative path. + @param aPath the file url for the target of the alias. + @param aFromPath The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromPath and aPath, must reside on the same volume. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithPath:(NSString *)aPath fromPath:(NSString *)aFromPath; + + /*! + @method initWithData: + @abstract Initalises a NDAlias. + @discussion The method initWithData: initalises a NDAlias that describes the specified target. initWithData: creates the NDAlias from the data that was returned from the method data + @param aData The NSData instaqnces that contains the data returned previously from the method data. + @result An initalises NDAlias, returns nil if initalises fails. + */ +- (id)initWithData:(NSData *)aData; + +/*! + @method url + @abstract Returns the single most likely target for the receiver. + @discussion The url method performs a fast search for the target of the receiver. If the resolution is successful, url returns a file NSURL for the target file system object, updates the receiver if necessary, and reports (through the method changed) whether the receiver was updated. If the target is on an unmounted AppleShare volume, url automatically mounts the volume. If the target is on an unmounted ejectable volume, url asks the user to insert the volume. +

After it identifies a target, url compares some key information about the target with the information in the receiver. If the information differs, url updates the receiver to match the target.

+

The url method displays the standard dialog boxes when it needs input from the user, such as a name and password for mounting a remote volume. The user can cancel the resolution through these dialog boxes.

+ @result A file NSURL to the target of the receiver. nil is returned if no target could be found. + */ +- (NSURL *)url; +/*! + @method path + @abstract Returns the single most likely target for the receiver. + @discussion The method path performs a fast search for the target of the receiver. If the resolution is successful, path returns a path NSString for the target file system object, updates the receiver if necessary, and reports (through the method changed) whether the receiver was updated. If the target is on an unmounted AppleShare volume, path automatically mounts the volume. If the target is on an unmounted ejectable volume, path asks the user to insert the volume. +

After it identifies a target, path compares some key information about the target with the information in the receiver. If the information differs, path updates the receiver to match the target.

+

The path method displays the standard dialog boxes when it needs input from the user, such as a name and password for mounting a remote volume. The user can cancel the resolution through these dialog boxes.

+ @result A path NSString to the target of the receiver. nil is returned if no target could be found. + */ +- (NSString *)path; +/*! + @method changed + @abstract Reports whether the receiver was updated. + @discussion The method changed indicates whether the receiver was updated because it contained some outdated information about the target. If it the receiver is updated, YES is returned. Otherwise, it return NO. (url and path never update a NDAlias that was created with no relative path.) + @result YES if the receiver was updated, NO if it was not updated. + */ +- (BOOL)changed; + +/*! + @method setURL: + @abstract Updates an the reciever with a new target. + @discussion The method setURL: rebuilds the entire recievers alias record . + @param aURL the file url for the target of the alias. + @result Returns YES if setting the target succeeded, otherwise returns NO. + */ +- (BOOL)setURL:(NSURL *)aURL; +/*! + @method setURL:fromURL: + @abstract Updates an the reciever with a new target. + @discussion The method setURL:fromURL: rebuilds the entire recievers alias record . +

The setURL:fromURL: function always creates a complete alias record. When you use setURL:fromURL: to update a minimal alias record, you convert the minimal record to a complete record.

+ @param aURL the file url for the target of the reciever. + @param aFromURL The starting point for a relative path, to be used later in a relative search. The two file or directory url's, aFromURL and aURL, must reside on the same volume. + @result Returns YES if setting the target succeeded, otherwise returns NO. + */ +- (BOOL)setURL:(NSURL *)aURL fromURL:(NSURL *)aFromURL; +/*! + @method setPath: + @abstract Updates an the reciever with a new target. + @discussion The method setPath: rebuilds the entire recievers alias record . + @param aPath the path for the target of the reciever. + @result Returns YES if setting the target succeeded, otherwise returns NO. + */ +- (BOOL)setPath:(NSString *)aPath; +/*! + @method setURL:fromURL: + @abstract Updates an the reciever with a new target. + @discussion The method setURL:fromURL: rebuilds the entire recievers alias record . +

The setURL:fromURL: function always creates a complete alias record. When you use setURL:fromURL: to update a minimal alias record, you convert the minimal record to a complete record.

+ @param aPath the path for the target of the reciever. + @param aFromPath The starting point for a relative path, to be used later in a relative search. The two file or directory paths, aFromPath and aPath, must reside on the same volume. + @result Returns YES if setting the target succeeded, otherwise returns NO. + */ +- (BOOL)setPath:(NSString *)aPath fromPath:(NSString *)aFromPath; + +/*! + @method data + @abstract Returns a NSData instance for the reciever. + @discussion The method data returns the contents of the recievers as an NSData, this can be used for archiving perposes though NDAlias does implement the NSCoding protocol. + @result Returns an NSData instance. + */ +- (NSData *)data; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDAppleScriptObject.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAppleScriptObject.h new file mode 100644 index 0000000..63ab756 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAppleScriptObject.h @@ -0,0 +1,688 @@ +/*! + @header NDAppleScriptObject + @abstract Header file for NDAppleScriptObject. + @discussion NDAppleScriptObject is used to represent compiled AppleScripts within Cocoa. The only restriction for use of this code is that you keep the comments with the head files especial my name. Use of this code is at your own risk yada yada yada... + + Created by nathan on Thu Nov 29 2001. + Copyright © 2001 Nathan Day. All rights reserved. + */ + + +#import +#import +#import "NDAppleScriptObject_Protocols.h" + +extern const short kScriptResourceID; +extern const NSString * NDAppleScriptOffendingObject; +extern const NSString * NDAppleScriptPartialResult; + +@class NDComponentInstance; + +/*! + @class NDAppleScriptObject + @abstract Class to represent an AppleScript. + @discussion As well as representing an AppleScript, NDAppleScriptObject also can maintain seperate context for each AppleScript, useful if you want to run each script within a seperate thread. NDAppleScriptObject is interface compatabile with NSAppleScript + */ +@interface NDAppleScriptObject : NSObject +{ +@private + OSAID compiledScriptID, + resultingValueID; + NDComponentInstance * componentInstance; + NSString * scriptSource; + long executionModeFlags; +} + +/*! + @method compileExecuteString: + @abstract compiles and executes the apple script within the passed string. + @discussion Executes the script by calling it’s run handler. + @param string A string that contains the AppleScipt source to be compiled and executed. + @result Returns the result of executing the AppleScript as a Objective-C object, see objectValue: for more details. + */ ++ (id)compileExecuteString:(NSString *)string; + +/*! + @method compileExecuteString:componentInstance: + @abstract compiles and executes the apple script within the passed string. + @discussion Executes the script by calling it’s run handler. + @param string A string that contains the AppleScipt source to be compiled and executed. + @param componentInstance The NDComponentInstance to use the AppleScipt with. + @result Returns the result of executing the AppleScript as a Objective-C object, see resultObject for more details. + */ ++ (id)compileExecuteString:(NSString *)string componentInstance:(NDComponentInstance *)componentInstance; + +/*! + @method appleScriptObjectWithString: + @abstract returns an NDAppleScriptObject compiled from passed string. + @discussion An autorelease version of initWithString: with mode flags set to kOSAModeCompileIntoContext. + @param string A string that contains the AppleScipt source to be compiled. + @result Returns the NDAppleScriptObject instance. + */ ++ (id)appleScriptObjectWithString:(NSString *)string; +/*! + @method appleScriptObjectWithString:componentInstance: + @abstract returns an NDAppleScriptObject compiled from passed string. + @discussion An autorelease version of initWithString: with mode flags set to kOSAModeCompileIntoContext. + @param string A string that contains the AppleScipt source to be compiled. + @param componentInstance The NDComponentInstance to use the AppleScipt with. + @result Returns the NDAppleScriptObject instance. + */ ++ (id)appleScriptObjectWithString:(NSString *)string componentInstance:(NDComponentInstance *)componentInstance; + +/*! + @method appleScriptObjectWithData: + @abstract returns an NDAppleScriptObject from the NSData containing a compiled AppleScript. + @discussion An autorelease version of initWithData:. + @param string A string that contains the AppleScipt source to be compiled. + @result Returns the NDAppleScriptObject instance. + */ ++ (id)appleScriptObjectWithData:(NSData *)data; + +/*! + @method appleScriptObjectWithData:componentInstance: + @abstract returns an NDAppleScriptObject from the NSData containing a compiled AppleScript. + @discussion An autorelease version of initWithData:. + @param string A string that contains the AppleScipt source to be compiled. + @param componentInstance The NDComponentInstance to use the AppleScipt with. + @result Returns the NDAppleScriptObject instance. + */ ++ (id)appleScriptObjectWithData:(NSData *)data componentInstance:(NDComponentInstance *)componentInstance; +/*! + @method appleScriptObjectWithContentsOfFile: + @abstract returns an NDAppleScriptObject by reading in the compiled AppleScipt at passed path. + @discussion An autorelease version of initWithContentsOfFile:. + @param path A path to the compiled AppleScipt file. + @result Returns the NDAppleScriptObject instance. + */ ++ (id)appleScriptObjectWithContentsOfFile:(NSString *)path; + +/*! + @method appleScriptObjectWithContentsOfFile:componentInstance: + @abstract returns an NDAppleScriptObject by reading in the compiled AppleScipt at passed path. + @discussion An autorelease version of initWithContentsOfFile:. + @param path A path to the compiled AppleScipt file. + @param componentInstance The NDComponentInstance to use the AppleScipt with. + @result Returns the NDAppleScriptObject instance. + */ ++ (id)appleScriptObjectWithContentsOfFile:(NSString *)aPath componentInstance:(NDComponentInstance *)componentInstance; +/*! + @method appleScriptObjectWithContentsOfURL: + @abstract returns an NDAppleScriptObject by reading in the compiled AppleScipt at passed file URL. + @discussion An autorelease version of initWithContentsOfURL:. + @param URL A file url to the compiled AppleScipt file. + @result Returns the NDAppleScriptObject instance. + */ ++ (id)appleScriptObjectWithContentsOfURL:(NSURL *)URL; +/*! + @method appleScriptObjectWithContentsOfURL:componentInstance: + @abstract returns an NDAppleScriptObject by reading in the compiled AppleScipt at passed file URL. + @discussion An autorelease version of initWithContentsOfURL:. + @param URL A file url to the compiled AppleScipt file. + @param componentInstance The NDComponentInstance to use the AppleScipt with. + @result Returns the NDAppleScriptObject instance. + */ ++ (id)appleScriptObjectWithContentsOfURL:(NSURL *)URL componentInstance:(NDComponentInstance *)componentInstance; + +/*! + @method initWithString: + @abstract returns an NDAppleScriptObject compiled from passed string. + @discussion initWithString: with the default component and mode flags of kOSAModeCompileIntoContext. + @param string A string that contains the AppleScipt source to be compiled. + @result Returns the NDAppleScriptObject instance. + */ +- (id)initWithString:(NSString *)string; + +/*! + @method initWithString:modeFlags: + @abstract returns an NDAppleScriptObject compiled from passed string. + @discussion initWithString:modeFlags: with the default component. + @param string A string that contains the AppleScipt source to be compiled. + @param modeFlags Mode flags passed to OSACompile (see Apple OSA documentation). + @result Returns the NDAppleScriptObject instance. + */ +- (id)initWithString:(NSString *)string modeFlags:(long)modeFlags; +/*! + @method initWithContentsOfFile: + @abstract Intialises receiver with a compiled AppleScipt file. + @discussion Initialize the receiver with the compiled AppleScipt file at the supplied path, the compiled AppleScipt can be in either the resource fork or the data fork. If the file is not complied and is instead a AppleScipt as text then use the initWithString:modeFlags: method instead obtaining the string with the method-[NSString initWithFile:]. + @param path The path for the compiled AppleScipt file. + @result An initialized NDAppleScriptObject + */ +- (id)initWithContentsOfFile:(NSString *)path; +/*! + @method initWithContentsOfFile:component: + @abstract Intialises receiver with a compiled AppleScipt file. + @discussion Initialize the receiver with the compiled AppleScipt file at the supplied path and a NDComponentInstance as returned from the method +[NDComponentInstance findNextComponent], the compiled AppleScipt can be in either the resource fork or the data fork. If the file is not complied and is instead a AppleScipt as text then use the initWithString:modeFlags: method instead obtaining the string with the method-[NSString initWithFile:]. + @param path The path for the compiled AppleScipt file. + @param componentInstance The NDComponentInstance to use the AppleScipt with. + @result An initialized NDAppleScriptObject + */ +- (id)initWithContentsOfFile:(NSString *)path componentInstance:(NDComponentInstance *)componentInstance; +/*! + @method initWithContentsOfURL: + @abstract Intialises receiver with a compiled AppleScipt file. + @discussion Initialize the receiver with the compiled AppleScipt file at the supplied file url, the compiled AppleScipt can be in either the resource fork or the data fork. If the file is not complied and is instead a AppleScipt as text then use the initWithString:modeFlags: method instead obtaining the string with the method-[NSString initWithURL:]. + @param URL The file url for the compiled AppleScipt file. + @result An initialized NDAppleScriptObject + */ +- (id)initWithContentsOfURL:(NSURL *)URL; +/*! + @method initWithContentsOfURL:component: + @abstract Intialises receiver with a compiled AppleScipt file. + @discussion Initialize the receiver with the compiled AppleScipt file at the supplied file url and a NDComponentInstance as returned from the method +[NDComponentInstance findNextComponent], the compiled AppleScipt can be in either the resource fork or the data fork. If the file is not complied and is instead a AppleScipt as text then use the initWithString:modeFlags: method instead obtaining the string with the method-[NSString initWithURL:]. + @param URL The file url for the compiled AppleScipt file. + @param componentInstance The NDComponentInstance to use the AppleScipt with. + @result An initialized NDAppleScriptObject + */ +- (id)initWithContentsOfURL:(NSURL *)URL componentInstance:(NDComponentInstance *)componentInstance; +/*! + @method initWithData: + @abstract Intialises receiver with compiled AppleScipt data. + @discussion Initialize the with a NSData object containing the data for an compiled AppleScipt. + @param data A NSData object containing the compiled AppleScipt. + @result An initialized NDAppleScriptObject + */ +- (id)initWithData:(NSData *)data; + +/*! + @method initWithString:modeFlags:component: + @abstract returns an NDAppleScriptObject compiled from passed string. + @discussion Initialzes the recieve by compiling the recieved source, if compilation failes then the error can be returned with the method error and the method isCompiled returns false. + @param URL A file url to the compiled AppleScipt file. + @result Returns the NDAppleScriptObject instance. + */ +- (id)initWithString:(NSString *)string modeFlags:(long)modeFlags componentInstance:(NDComponentInstance *)componentInstance; +/*! + @method initWithData:component: + @abstract Intialises receiver with compiled AppleScipt data. + @discussion Initialize the with a NSData object containing the data for an compiled AppleScipt and a NDComponentInstance as returned from the method +[NDComponentInstance findNextComponent]. + @param data A NSData object containing the compiled AppleScipt. + @param componentInstance The NDComponentInstance to use the AppleScipt with. + @result An initialized NDAppleScriptObject + */ +- (id)initWithData:(NSData *)data componentInstance:(NDComponentInstance *)componentInstance; + +/*! + @method data + @abstract returns the compiled script within a NSData instance. + @discussion the returned NSData instance contains a compiled script which can be + passed to the initWithData:component: method. + @result Returns an NSData instance. + */ +- (NSData *)data; + +/*! + @method execute + @abstract executes the script. + @discussion executes the script by calling it run handler. + @result returns YES if execution was successful. + */ +- (BOOL)execute; + +/*! + @method executeOpen + @abstract sends an open event. + @discussion executes the script by calling it open handler passing an alias list creaed from parameters. + @param parameters an NSArray containing paths (NSString) or NSURL’s which is + converted into an alias list. + @result returns YES if execution was successful. + */ +- (BOOL)executeOpen:(NSArray *)parameters; + +/*! + @method executeEvent: + @abstract execute an AppleEvent. + @discussion sends an AppleEvent to the script. + @param event an NSAppleEventDescriptor containing the apple event. + @result returns YES if execution was successful. + */ +- (BOOL)executeEvent:(NSAppleEventDescriptor *)event; + +/*! + @method executeSubroutineNamed:argumentsArray: + @abstract execute an AppleScript function. + @discussion Executs the AppleScript subroutine name passing the objects within array as positional arguments after being converted to NSAppleEventDescriptors with the method -[NSAppleEventDescriptor descriptorWithObject:]. + @param name The function name, this is case insensitive. + @param array An array of arguments. + @result returns YES if execution was successful. + */ +- (BOOL)executeSubroutineNamed:(NSString *)name argumentsArray:(NSArray *)array; + +/*! + @method executeSubroutineNamed:arguments:... + @abstract execute an AppleScript function. + @discussion Executs the AppleScript subroutine name passing the objects starting with firstObject as positional arguments after being converted to NSAppleEventDescriptors with the method -[NSAppleEventDescriptor descriptorWithObject:]. + @param name The function name, this is case insensitive. + @param firstObject The first object of a list of arguments terminated with nil. + @result returns YES if execution was successful. + */ +- (BOOL)executeSubroutineNamed:(NSString *)name arguments:(id)firstObject, ...; + +/*! + @method executeSubroutineNamed:labelsAndArguments: + @abstract execute an AppleScript function. + @discussion

executeSubroutineNamed:labelsAndArguments: executes an AppleScript subroutine with labeled arguments starting with the label label, if the keyword keyASPrepositionGiven is found the remaining arguments will be passed to the method userRecordDescriptorWithObjectAndKeys:arguments: and the result is given the keyword keyASUserRecordFields.

+

For example to execute the AppleScript subroutine +

+
foo for arg1 given argument:arg2 
+
+ you would do the following +
+
theSubroutine = [theAppleScript executeSubroutineNamed:@"foo"
+			labelsAndArguments:keyASPrepositionFor, arg1,
+			keyASPrepositionGiven, arg2, @"argument", nil];
+
+ which is equivalent to +
+
theSubroutine = [theAppleScript executeSubroutineNamed:@"foo"
+				labelsAndArguments:keyASPrepositionFor, arg1, keyASUserRecordFields,
+				[NSAppleEventDescriptor userRecordDescriptorWithObjectAndKeys:arg2, @"argument", nil],
+				(AEKeyword)0];
+

+

Possible keywords are; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key WordAppleScript key word
keyASPrepositionAboutabout
keyASPrepositionAboveabove
keyASPrepositionAgainstagainst
keyASPrepositionApartFromapart from
keyASPrepositionAroundaround
keyASPrepositionAsideFromaside from
keyASPrepositionAtat
keyASPrepositionBelowbelow
keyASPrepositionBeneathbeneath
keyASPrepositionBesidebeside
keyASPrepositionBetweenbetween
keyASPrepositionByby
keyASPrepositionForfor
keyASPrepositionFromfrom
keyASPrepositionGivengiven
keyASPrepositionInin
keyASPrepositionInsteadOfinstead of
keyASPrepositionIntointo
keyASPrepositionOnon
keyASPrepositionOntoonto
keyASPrepositionOutOfout of
keyASPrepositionOverover
keyASPrepositionSincesince
keyASPrepositionThroughthrough
keyASPrepositionThruthru
keyASPrepositionToto
keyASPrepositionUnderunder
keyASPrepositionUntiluntil
keyASPrepositionWithwith
keyASPrepositionWithoutwithout
keyASUserRecordFieldskey for a list descriptor of user record fields
+

+

To find out the rules for use of the key words see the AppleScript language documentation.

+ @param name The function name, this is case insensitive. + @param label The first label of a list of labels and arguments, terminated with a 0 AEKeyword or nil if the end arguments follow the keyword keyASPrepositionGiven. + @result returns YES if execution was successful. + */ +- (BOOL)executeSubroutineNamed:(NSString *)name labelsAndArguments:(AEKeyword)label, ...; + +/*! + @method arrayOfEventIdentifier + @abstract returns all event identifies the script respondes to. + @discussion returns and NSArray of NSDictionarys with the keys "EventClass" and "EventID". + @result returns an NSArray of event identifier NSDictionarys. + */ +- (NSArray *)arrayOfEventIdentifier; +/*! + @method respondsToEventClass:eventID: + @abstract Tests whether the script responds to an AppleEvent. + @discussion This method test whether the script responds to the passed event identifier. + @param eventClass the event class. + @param eventID the event identifier. + @result returns true if the script reponds to the event identifier. + */ +- (BOOL)respondsToEventClass:(AEEventClass)eventClass eventID:(AEEventID)eventID; + +/*! + @method respondsToSubroutine: + @abstract Tests whether the script responds to a subroutine call. + @discussion This method test whether the script inplements the subroutine name, subroutine names are case insensitive and so the string name is converted to lower case first. + @param name The subroutine name. + @result returns true if the script reponds to the subroutine call. + */ +- (BOOL)respondsToSubroutine:(NSString *)name; + +/*! + @method resultAppleEventDescriptor + @abstract Returs the result as an AppleEvent type.. + @discussion returns the result of the last script execution as an AppleEvent type within an NSAppleEventDescriptor. + @result the NSAppleEventDescriptor contains the AppleEvent type result. + */ +- (NSAppleEventDescriptor *)resultAppleEventDescriptor; + +/*! + @method resultObject + @abstract Returs the result as an Objective-C object. + @discussion converts the AppleEvent type returned from the last script execution into an + Objective-C object. The types currently supported are +
+ + + + + + + + + +
AppleScript TypeObjective-C Class
listNSArray
recordNSDictionary
aliasNSURL
stringNSString
real
integer
boolean
NSNumber
scriptNDAppleScriptObject
anything elseNSData
+
+ @result A subclass of NSObject. + */ +- (id)resultObject; + +/*! + @method resultData + @abstract Returs the result as an NSData instance. + @discussion returns the raw bytes from the result AppleEvent type. + @result the NSData instance. + */ +- (id)resultData; + +/*! + @method resultAsString + @abstract returns the result as an OSA formated string. + @discussion returns the result as a string by calling OSA’s OSADisplay function. The result is + in the same format as seen in Script Editor’s result window. + @result the NSString result. + */ +- (NSString *)resultAsString; + +/*! + @method componentInstance + @abstract Get the component instance. + @discussion The NDComponentInstance represents the connection to the OSA component. + @result A NDComponentInstance + */ +- (NDComponentInstance *)componentInstance; +/*! + @method executionModeFlags + @abstract returns the execution mode flags. + @discussion The flags are eqivelent to AESend flags. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FlagDescription
kOSAModeNeverInteractThe server application should never interact with the user in response to any of the AppleEvents.
kOSAModeCanInteractThe server application can interact with the user in response to any AppleEvents.
kOSAModeAlwaysInteractThe server applcation can interact with the user.
kOSAModeCantSwitchLayerIf both the client and the sever allow interaction, and if the client application is the active application on the local computer and is waiting for a reply (that is, it has set the kAEWAitReply flag), kOSAModeCantSwitchLayer brings the server directly to the forground. Otherwise the Notification Manager is used to request the user bring the server application to the foreground.
kOSAModeDontReconnectThe AppleEvent Manager mus not automaticlly try to reconect if the receives a sessClosedErr result code from the PPC Toolbox.
kOSAModeDoRecordPrevents use of kAEDontRecord in sendMode parameter if AESend for the events sent when the script is executed.
+
+ + @result a long contains the execution mode flag bits. + */ +- (long)executionModeFlags; +/*! + @method setExecutionModeFlags: + @abstract sets the execution mode flags. + @discussion The flags are eqivelent to AESend flags. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FlagDescription
kOSAModeNeverInteractThe server application should never interact with the user in response to any of the AppleEvents.
kOSAModeCanInteractThe server application can interact with the user in response to any AppleEvents.
kOSAModeAlwaysInteractThe server applcation can interact with the user.
kOSAModeCantSwitchLayerIf both the client and the sever allow interaction, and if the client application is the active application on the local computer and is waiting for a reply (that is, it has set the kAEWAitReply flag), kOSAModeCantSwitchLayer brings the server directly to the forground. Otherwise the Notification Manager is used to request the user bring the server application to the foreground.
kOSAModeDontReconnectThe AppleEvent Manager mus not automaticlly try to reconect if the receives a sessClosedErr result code from the PPC Toolbox.
kOSAModeDoRecordPrevents use of kAEDontRecord in sendMode parameter if AESend for the events sent when the script is executed.
+
+ @param modeFlags a long containing the execution mode flag bits. + */ +- (void)setExecutionModeFlags:(long)modeFlags; + +/*! + @method appleEventTarget + @abstract returns an AppleEvent desriptor that can be used in constructing complete AppleEvents. + @discussion When construction AppleEvents using the NSAppleEventDescriptor method appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID: to send to the script with the NDAppleScriptObject method executeEvent: the NSAppleEventDescriptor return from this method can be used as the target discriptor. + @result A NSAppleEventDescriptor to be used as an AppleEvent target. + */ +- (NSAppleEventDescriptor *)appleEventTarget; + +/*! + @method error + @abstract Get Apple Script Errors. + @discussion You can use error to get information about errors that occured durring execution or compilation. The returned error info dictionary may contain entries that use any combination of the following keys, including no entries at all. The dictionary returns all of the same keys as within the error dictionary returned with some of Apples NSAppleScript methods. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstantDescription
NSAppleScriptErrorMessageAn NSString that supplies a detailed description of the error condition.
NSAppleScriptErrorNumberAn NSNumber that specifies the error number.
NSAppleScriptErrorAppNameAn NSString that specifies the name of the application that generated the error.
NSAppleScriptErrorBriefMessageAn NSString that provides a brief description of the error.
NSAppleScriptErrorRangeAn NSValue that specifies a range.
NDAppleScriptOffendingObjectAn NSAppleEventDescriptor that specifies an offending object.
NDAppleScriptPartialResultAn object that represent a partial result
+
+ @result A NSDictionary containing error information + */ +- (NSDictionary *)error; + +/*! + @method compile + @abstract Compile a AppleScript. + @discussion Compiles the receiver with a mode flag of kOSAModeCompileIntoContext, if it is not already compiled. Returns YES for success or if the script was already compiled, NO otherwise. Currently NDAppleScriptObject compiles scripts at initalization an will only be uncompiled if compilation failed. + @result Returns YES if successful. + */ +- (BOOL)compile; + +/*! + @method compileWithModeFlags: + @abstract Compile a AppleScript. + @discussion Compiles the receiver with the supplied mode flags, if it is not already compiled. Returns YES for success or if the script was already compiled, NO otherwise. Currently NDAppleScriptObject compiles scripts at initalization an will only be uncompiled if compilation failed. + @param modeFlags Mode flags passed to OSACompile (see Apple OSA documentation). + @result Returns YES if successful. + */ +- (BOOL)compileWithModeFlags:(long)modeFlags; + +/*! + @method isCompiled + @abstract Is the AppleScript compiled. + @discussion Returns YES if the receiver is already compiled, NO otherwise. + @result Returns YES if the receiver is compiled. + */ +- (BOOL)isCompiled; + + /*! + @method source + @abstract Get the AppleScript source + @discussion Returns the source code of the receiver if it is available, nil otherwise. It is possible for an NDAppleScriptObject to be a script for which the source code is not available but is nonetheless executable. + + @result A NSString + */ +- (NSString *)source; + +/*! + @method writeToURL: + @abstract Writes the receiver as a complied AppleScript. + @discussion the compiled script is written to the 'scpt' resource, id 128 of the resource fork of the file. + @param URL A file url for the compiled AppleScipt file. + @result Returns YES if writting succeeded. + */ +- (BOOL)writeToURL:(NSURL *)URL; +/*! + @method writeToURL:inDataFork:atomically: + @abstract Writes the receiver as a complied AppleScript. + @discussion if inDataFork is YES then the compiled script is written to the data forke of the file otherwise the compiled script is written to the 'scpt' resource, id 128 of the resource fork of the file. If atomically is YES and inDataFork is YES then the receiver is written to a copy of the file which then replaces the original. + @param URL A file url for the compiled AppleScipt file. + @param inDataFork YES to write the receiver to the data fork instead of the resource fork. + @param atomically Write the file attomically. + @result return YES if writting succeeded. + */ +- (BOOL)writeToURL:(NSURL *)URL inDataFork:(BOOL)inDataFork atomically:(BOOL)atomically; + + /*! + @method writeToURL:Id: + @abstract Writes the receiver as a complied AppleScript. + @discussion the compiled script is written to the 'scpt' resource, with the passed id of the resource fork of the file. + @param URL A file url for the compiled AppleScipt file. + @param ID The resource id for the compiled AppleScipt data. + @result return YES if writting succeeded. + */ +- (BOOL)writeToURL:(NSURL *)URL Id:(short)ID; +/*! + @method writeToFile: + @abstract Writes the receiver as a complied AppleScript. + @discussion the compiled script is written to the 'scpt' resource, id 128 of the resource fork of the file. + @param path A path for the compiled AppleScipt file. + @result return YES if writting succeeded. + */ +- (BOOL)writeToFile:(NSString *)path; +/*! + @method writeToFile:inDataFork:atomically: + @abstract Writes the receiver as a complied AppleScript. + @discussion if inDataFork is YES then the compiled script is written to the data fork of the file otherwise the compiled script is written to the 'scpt' resource, id 128 of the resource fork of the file. If atomically is YES and inDataFork is YES then the receiver is written to a copy of the file which then replaces the original. + @param path A path for the compiled AppleScipt file. + @param inDataFork YES to write the receiver to the data fork instead of the resource fork. + @param atomically Write the file attomically. + @result return YES if writting succeeded. + */ +- (BOOL)writeToFile:(NSString *)path inDataFork:(BOOL)inDataFork atomically:(BOOL)atomically; +/*! + @method writeToFile:Id: + @abstract Writes the receiver as a complied AppleScript. + @discussion the compiled script is written to the 'scpt' resource, with the passed id of the resource fork of the file. + @param path A path for the compiled AppleScipt file. + @param ID The resource id for the compiled AppleScipt data. + @result return YES if writting succeeded. +*/ +- (BOOL)writeToFile:(NSString *)path Id:(short)ID; + +@end + +/*! + @category NSAppleEventDescriptor(NDAppleScriptValueExtension) + @abstract category of NSAppleEventDescriptor. + @discussion adds a method to NSAppleEventDescriptor retrieve a NDAppleScriptObject from a NSAppleEventDescriptor. + */ +@interface NSAppleEventDescriptor (NDAppleScriptObjectValueExtension) +/*! + @method appleScriptValue + @abstract Category method for NSAppleEventDescriptor (NDAppleScriptObjectValueExtension), converts any script data within a AppleEvent descriptor into an NDAppleScriptObject + @discussion If an AppleScript return a AppleScript as it’s result, this method can be used to convert the result NSAppleEventDescriptor into a NDAppleScriptObject. The NSAppleEventDescriptor method objectValue will use this method if available. + @result a NDAppleScriptObject object for the AppleScript contained within the AppleEvent descriptor. + */ +- (NDAppleScriptObject *)appleScriptValue; +@end + +/*! + @category NDAppleScriptObject(NSAppleScriptCompatibility) + @abstract Provides interface compatability with Apples NSAppleScript + @discussion Adds methods to NDAppleScriptObject to make it interface compatible with NSAppleScript. The methods are initWithContentsOfURL:error:, initWithSource:, compileAndReturnError:, executeAndReturnError: and executeAppleEvent:error:. + */ +@interface NDAppleScriptObject (NSAppleScriptCompatibility) +/*! + @method initWithContentsOfURL:error: + @abstract Initialize a NDAppleScriptObject. + @discussion This method is for interface compatability with Apples NSAppleScript + @param url A file url for the compiled AppleScipt file. + @param errorInfo On return contains a NSDictionary contain errror information. + @result An initalized NDAppleScriptObject + */ +- (id)initWithContentsOfURL:(NSURL *)url error:(NSDictionary **)errorInfo; + +/*! + @method initWithSource: + @abstract Initialize a NDAppleScriptObject. + @discussion This method is for interface compatability with Apples NSAppleScript, it is equivelent to initWithString: but without compiling of the source. + @result A NDAppleScriptObject object. + */ +- (id)initWithSource:(NSString *)source; + +/*! + @method compileAndReturnError: + @abstract Compile an AppleScipt. + @discussion This method is for interface compatability with Apples NSAppleScript + @param errorInfo On return contains a NSDictionary contain errror information. + @result Returns YES on success. + */ +- (BOOL)compileAndReturnError:(NSDictionary **)errorInfo; + +/*! + @method executeAndReturnError: + @abstract Execute an AppleScript. + @discussion This method is for interface compatability with Apples NSAppleScript + @param errorInfo On return contains a NSDictionary contain errror information. + @result Returns YES on success. + */ +- (NSAppleEventDescriptor *)executeAndReturnError:(NSDictionary **)errorInfo; + +/*! + @method executeAppleEvent:error: + @abstract Execute an AppleScript. + @discussion This method is for interface compatability with Apples NSAppleScript + @param event an NSAppleEventDescriptor containing the apple event. + @param errorInfo On return contains a NSDictionary contain errror information. + @result Returns the result NSAppleEventDescriptor on success, nil otherwise. + */ +- (NSAppleEventDescriptor *)executeAppleEvent:(NSAppleEventDescriptor *)event error:(NSDictionary **)errorInfo; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDAppleScriptObject_Protocols.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAppleScriptObject_Protocols.h new file mode 100644 index 0000000..b0f8a2d --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDAppleScriptObject_Protocols.h @@ -0,0 +1,49 @@ +/*! + @header NDAppleScriptObject_Protocols + @abstract Header file for the protocols NDAppleScriptObjectSendEvent and NDAppleScriptObjectActive + @discussion The protocols NDAppleScriptObjectSendEvent and NDAppleScriptObjectActive are used by NDAppleScriptObject + + Created by Nathan Day on Sat Feb 16 2002. + Copyright © 2001 Nathan Day. All rights reserved. + */ + +#import +#import + +/*! + @protocol NDAppleScriptObjectSendEvent + @abstract Protocol used by NDAppleScriptObject + @discussion The protocol NDAppleScriptObjectSendEvent is implemented by any object that wishes to act as an AppleEvent send target as passed to the method setAppleEventSendTarget:. + */ +@protocol NDAppleScriptObjectSendEvent +/*! + @method sendAppleEvent:sendMode:sendPriority:timeOutInTicks:idleProc:filterProc: + @abstract Passes an event to be executed by a AppleScript to the receiver + @discussion Called every time the AppleScript is about to send an AppleEvent. The method sendAppleEvent:sendMode:sendPriority:timeOutInTicks:idleProc:filterProc: can be used to intercept every AppleEvent that the AppleScript would send so that it can be modified or redirected. For example AppleEvent for GUI interaction like “display dialog” need to be sent within the main run loop and thread. The class NDAppleScriptObject implements this protocol it’s self and so you can pass this message onto your NDAppleScriptObject object. + @param appleEventDescriptor An NSAppleEventDescriptor containing the event to be sent. + @param sendMode Specifies various options for how the server application should handle the Apple event. To obtain a value for this parameter, you add together constants to set bits that specify the reply mode, the interaction level, the application switch mode, the reconnection mode, and the return receipt mode. The constants are described in AESendMode . + @param sendPriority A value that specifies the priority for processing the Apple event. You can specify normal or high priority, using the constants described in AESendMode . + @param timeOutInTicks If the reply mode specified in the sendMode parameter is kAEWaitReply, or if a return receipt is requested, this parameter specifies the length of time (in ticks) that the client application is willing to wait for the reply or return receipt from the server application before timing out. Most applications should use the kAEDefaultTimeout constant, which tells the Apple Event Manager to provide an appropriate timeout duration. If the value of this parameter is kNoTimeOut, the Apple event never times out. These constants are described in “Timeout Constants” . + @param idleProc

A universal procedure pointer to a function that handles events (such as update, operating-system, activate, and null events) that your application receives while waiting for a reply. Your idle function can also perform other tasks (such as displaying a wristwatch or spinning beach ball cursor) while waiting for a reply or a return receipt.

+

If your application specifies the kAEWaitReply flag in the sendMode parameter then it must provide an idle function—otherwise, you can pass a value of NULL for this parameter. For more information on the idle function, see AEIdleProcPtr.

+ @param filterProc A universal procedure pointer to a function that determines which incoming Apple events should be received while the handler waits for a reply or a return receipt. If your application doesn’t need to filter Apple events, you can pass a value of NULL for this parameter. If you do so, no application-oriented Apple events are processed while waiting. For more information on the filter function, see AEFilterProcPtr. + @result A NSAppleEventDescriptor contain the result. + */ +- (NSAppleEventDescriptor *)sendAppleEvent:(NSAppleEventDescriptor *)appleEventDescriptor sendMode:(AESendMode)sendMode sendPriority:(AESendPriority)sendPriority timeOutInTicks:(long)timeOutInTicks idleProc:(AEIdleUPP)idleProc filterProc:(AEFilterUPP)filterProc; +@end + +/*! +@protocol NDAppleScriptObjectActive +@abstract Protocol used by NDAppleScriptObject +@discussion The protocol NDAppleScriptObjectActive is implemented by any object that wishes to. +*/ +@protocol NDAppleScriptObjectActive +/*! + @method appleScriptActive + @abstract Method called periodical during script execution. + @discussion Allows you to do some processing durring execution of a AppleScript with the same thread. + @result Returns NO to specify some error occurred. + */ +- (BOOL)appleScriptActive; +@end + 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 diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyControl.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyControl.h new file mode 100755 index 0000000..511d37f --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyControl.h @@ -0,0 +1,59 @@ +/*! + @header NDHotKeyControl.h + @abstract Header file for a subclass of NSTextField for getting hot key combinations from the user. + @discussion The NDHotKeyControl can be used to get a NDHotKeyEvent for the last key combination pressed by the user. + + Created by Nathan Day on Wed Mar 05 2003. + Copyright (c) 2002 Nathan Day. All rights reserved. + */ + +#import + +@class NDHotKeyEvent; + +/*! + @class NDHotKeyControl + @abstract Subclass of NSTextField for getting hot key combinations from the user. + @discussion The NDHotKeyControl can be used to get a NDHotKeyEvent for the last key combination pressed by the user. + */ +@interface NDHotKeyControl : NSTextField +{ +@private + unsigned short keyCode; + unichar character; + unsigned long modifierFlags; +} + +/*! + @method keyCode + @abstract Get key code. + @discussion Returns the key code for the last key combination the user pressed while the reciever was active. + @result A unsigned short containing key code. + */ +- (unsigned short)keyCode; + +/*! + @method character + @abstract Get unicode character. + @discussion Returns the unicode character for the last key combination the user pressed while the reciever was active. + @result A unichar containing character. + */ +- (unichar)character; + +/*! + @method modifierFlags + @abstract Get modifer flags. + @discussion Returns the modifer flags for the last key combination the user pressed while the reciever was active. + @result A unsigned long containing modifer flags. + */ +- (unsigned long)modifierFlags; + +/*! + @method hotKeyEvent + @abstract Get NDHotKeyEvent + @discussion Returns the NDHotKeyEvent instance for the last key combination the user pressed while the reciever was active. The NDHotKeyEvent returned will either be one that has already been created or a newly created one otherwise. + @result A NDHotKeyEvent for the hot key event. + */ +- (NDHotKeyEvent *)hotKeyEvent; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyEvent.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyEvent.h new file mode 100755 index 0000000..b04b0f3 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyEvent.h @@ -0,0 +1,427 @@ +/*! + @header NDHotKeyEvent.h + @abstract Header file for the class NDHotKeyEvent + @discussion

NDHotKeyEvent provides a thread safe Objective-C interface to HotKey events as well as some aditional feature to key track of all the hot keys in your application.

+ +

Thread Saftey

By default the class object NDHotKeyEvent is not thread safe as the underlying functions that it relies on are not thread safe and the mechanism for keeping track of all of the NDHotKeyEvent instances is not thread safe either. Thread saftey can be enable be defining the flag NDHotKeyEventThreadSafe before compiling.

+

Even with the flag NDHotKeyEventThreadSafe defined instances of NDHotKeyEvent will still not be thread safe, that is, it is safe to invoke methods of different instance with different threads as well as class methods, but it is not safe to invoke methods of the same instance with different threads.

+

The functions stringForKeyCodeAndModifierFlags and unicharForKeyCode are never thread safe.

+ +

Created by Nathan Day on Wed Feb 26 2003.
+ Copyright © 2002 Nathan Day. All rights reserved.

+ */ + +#import +#import + +/*! + @defined NDHotKeyEventThreadSafe + @abstract A flag to enable thread safety. + @discussion By default the class object NDHotKeyEvent is not thread safe. Defining the this flag will make th class methods of NDHotKeyEvent thread safe, see introduction for more details.. + */ +enum +{ +/*! + @const NDHotKeyNoEvent + @abstract A value returned from the method -[NDHotKeyEvent currentEventType] + @discussion This value is returned if the hot key has not been pressed yet. + */ + NDHotKeyNoEvent = 0, +/*! + @const NDHotKeyPressedEvent + @abstract A value returned from the method -[NDHotKeyEvent currentEventType] + @discussion This value is returned if hot key was pressed last. + */ + NDHotKeyPressedEvent, +/*! + @const NDHotKeyReleasedEvent + @abstract A value returned from the method -[NDHotKeyEvent currentEventType] + @discussion This value is returned if hot key was released last. + */ + NDHotKeyReleasedEvent +}; + +/*! + @const NDHotKeyDefaultSignature + @abstract The default signature + @discussion This is the default signature that will be used if you start using NDHotKeyEvent without setting the signature first. + */ +extern const OSType NDHotKeyDefaultSignature; + +/*! + @class NDHotKeyEvent + @abstract Class to represent a HotKey + @discussion

This class is a wrapper for Carbon Event HotKeys and provides some feature to key track of all the hot keys in your application. It can be used to be notified of key down as well as key up evernts and when a hot key is being taken by another object (see the protocol NDHotKeyEventTragetWillChange)

+ + */ +@interface NDHotKeyEvent : NSObject +{ +@private + EventHotKeyRef reference; + unsigned short keyCode; + unichar character; + unsigned int modifierFlags; + int currentEventType; + id target; + SEL selectorReleased, + selectorPressed; + struct + { + unsigned individual : 1; + unsigned collective : 1; + } isEnabled; +} + +/*! + @method install + @abstract Install the event key handler + @discussion install is called before hot keys can be used. You normally don't need to invoke this method your self but in a multithreaded you might want to invoke this method before creating any threads. install is designed to be thread safe but the effects of calling Apples InstallEventHandler() funtion from anything other than the main thread is unknown. + @result Returns true if install succeeded. + */ ++ (BOOL)install; + + /*! + @method setSignature: + @abstract Set the hot key signature for this application + @discussion This should only be called once, before trying to enable any hot keys. + @param signature The four char code signature to identify all hot keys for this application, could your applications signature. + */ ++ (void)setSignature:(OSType)signature; + +/*! + @method signature + @abstract Get the hot key signature for this application + @discussion Used to identify the hot key handler for this application. + @result The four char code signature. + */ ++ (OSType)signature; + +/*! + @method setAllEnabled: + @abstract Set enabled for all instances of NDHotKeyEvent + @discussion Used to enable or disable all hot keys. This method is not the same as sending the message setEnabled: to every single NDHotKeyEvent instance. Enabling with this method only enables the hot keys that where enable prior to using this method to disable all hot keys. + @param flag YES to enable, NO to disable. + @result Returns YES if succesful. + */ ++ (BOOL)setAllEnabled:(BOOL)flag; + +/*! + @method isEnabledKeyCode:modifierFlags: + @abstract Is hot key combination enabled. + @abstract Test to see if a key code and modifier flaf combination are enabled. + @param keyCode The key code used by the keyboard, can vary across hardware. + @param modifierFlags The modifer flags, ( NSCommandKeyMask, NSControlKeyMask, NSAlternateKeyMask, NSShiftKeyMask ). + @result Returns YES if enabled. + */ ++ (BOOL)isEnabledKeyCode:(unsigned short)keyCode modifierFlags:(unsigned int)modifierFlags; + +/*! + @method getHotKeyForKeyCode:modifierFlags: + @abstract Get an NDHotKeyEvent + @discussion Gets a NDHotKeyEvent for the supplied key code and modifer flags by either finding one that has already been created or by creating a new one.. + @param keyCode The key code used by the keyboard, can vary across hardware. + @param aChar The character, used for display purposes only. + @param modifierFlags The modifer flags, ( NSCommandKeyMask, NSControlKeyMask, NSAlternateKeyMask, NSShiftKeyMask ). + @result The NDHotKeyEvent obejct or nil if failure. + */ ++ (NDHotKeyEvent *)getHotKeyForKeyCode:(unsigned short)keyCode character:(unichar)aChar modifierFlags:(unsigned int)modifierFlags; +/*! + @method findHotKeyForKeyCode:modifierFlags: + @abstract Find an NDHotKeyEvent + @discussion Finds the NDHotKeyEvent for the supplied key code and modifer flags. + @param keyCode The key code used by the keyboard, can vary across hardware. + @param modifierFlags The modifer flags, ( NSCommandKeyMask, NSControlKeyMask, NSAlternateKeyMask, NSShiftKeyMask ). + @result The NDHotKeyEvent obejct or nil if none found. + */ ++ (NDHotKeyEvent *)findHotKeyForKeyCode:(unsigned short)keyCode modifierFlags:(unsigned int)modifierFlags; + +/*! + @method hotKeyWithKeyCode:character:modifierFlags: + @abstract Get a NDHotKeyEvent object. + @discussion Returns a new hot key for the supplied hot key combination, if there is already a hot key for the supplied key code and modifer flags then nil is returned. + @param keyCode The key code used by the keyboard, can vary across hardware. + @param aChar The character, used for display purposes only. + @param modifierFlags The modifer flags, ( NSCommandKeyMask, NSControlKeyMask, NSAlternateKeyMask, NSShiftKeyMask ). + @result An new NDHotKeyEvent or nil if failure. + */ ++ (id)hotKeyWithKeyCode:(unsigned short)keyCode character:(unichar)aChar modifierFlags:(unsigned int)modifer; + +/*! + @method hotKeyWithKeyCode:character:modifierFlags:target:selector: + @abstract Get a NDHotKeyEvent object. + @discussion Returns a new hot key for the supplied hot key combination and target object and selector, if there is already a hot key for the supplied key code and modifer flags then nil is returned. + @param keyCode The key code used by the keyboard, can vary across hardware. + @param aChar The character, used for display purposes only. + @param modifierFlags The modifer flags, ( NSCommandKeyMask, NSControlKeyMask, NSAlternateKeyMask, NSShiftKeyMask ). + @param target The target of hot key event. + @param selector The selector sent when hot key is released + @result A new NDHotKeyEvent + */ ++ (id)hotKeyWithKeyCode:(unsigned short)keyCode character:(unichar)aChar modifierFlags:(unsigned int)modifer target:(id)target selector:(SEL)selector; + +/*! + @method initWithPropertyList: + @abstract creates a NDHotKeyEvent with a property list. + @discussion This can be used for archiving purposes, but it is possible that it will not work if the users keyboard is changed, ie between machines. + @param propertyList A property list object + @result A initialized NDHotKeyEvent + */ ++ (id)hotKeyWithWithPropertyList:(id)propertyList; +/*! + @method initWithKeyCode:character:modifierFlags:target:selector: + @abstract Initialize a NDHotKeyEvent object. + @discussion Initialize the reciever with the supplied hot key combination and target object and selector, if there is already a hot key for the supplied key code and modifer flags then nil is returned. + @param keyCode The key code used by the keyboard, can vary across hardware. + @param aChar The character, used for display purposes only. + @param modifierFlags The modifer flags, ( NSCommandKeyMask, NSControlKeyMask, NSAlternateKeyMask, NSShiftKeyMask ). + @param target The target of hot key event. + @param selector The selector sent when hot key is released + @result A initialized NDHotKeyEvent + */ +- (id)initWithKeyCode:(unsigned short)keyCode character:(unichar)aChar modifierFlags:(unsigned int)modifer target:(id)target selector:(SEL)selector; + +/*! + @method initWithKeyCode:character:modifierFlags + @abstract Initialize a NDHotKeyEvent object. + @discussion Initialize the reciever with the supplied hot key combination, if there is already a hot key for the supplied key code and modifer flags then nil is returned. + @param keyCode The key code used by the keyboard, can vary across hardware. + @param aChar The character, used for display purposes only. + @param modifierFlags The modifer flags, ( NSCommandKeyMask, NSControlKeyMask, NSAlternateKeyMask, NSShiftKeyMask ). + @result A initialized NDHotKeyEvent + */ +- (id)initWithKeyCode:(unsigned short)keyCode character:(unichar)aChar modifierFlags:(unsigned int)modifer; + +/*! + @method initWithPropertyList: + @abstract Initializes the reciever with a property list. + @discussion This can be used for archiving purposes, but it is possible that it will not work if the users keyboard is changed, ie between machines. The following properties are initialised +
    +
  • Key Code
  • +
  • Character
  • +
  • Modifier Flags
  • +
  • Selector Pressed
  • +
  • Selector Released
  • +
+ @param propertyList A property list object + @result A initialized NDHotKeyEvent + */ +- (id)initWithPropertyList:(id)propertyList; +/*! + @method propertyList + @abstract Returns a property list for the reciever. + @discussion This can be used for archiving purposes, but it is possible that it will not work if the users keyboard is changed, ie between machines. The property list returned contains the following properties; +
    +
  • Key Code
  • +
  • Character
  • +
  • Modifier Flags
  • +
  • Selector Pressed
  • +
  • Selector Released
  • +
+ @result The property list object. + */ +- (id)propertyList; + +/*! + @method initWithCoder: + @abstract Initializes a newly allocated instance from data in decoder. + @discussion Decodes the following properties of a NDHotKeyEvent; +
    +
  • Key Code
  • +
  • Character
  • +
  • Modifier Flags
  • +
  • Selector Pressed
  • +
  • Selector Released
  • +
+ Will use Keyed Coding if [decoder allowsKeyedCoding] == YES. + @param decoder A subclass of NSCoder + @result A initialized NDHotKeyEvent + */ +- (id)initWithCoder:(NSCoder *)decoder; + +/*! + @method encodeWithCoder: + @abstract Encodes the receiver using encoder + @discussion Encodes the following properties of a NDHotKeyEvent; +
    +
  • Key Code
  • +
  • Character
  • +
  • Modifier Flags
  • +
  • Selector Pressed
  • +
  • Selector Released
  • +
+ Will use Keyed Coding if [encoder allowsKeyedCoding] == YES. + @param encoder A subclass of NSCoder. + */ +- (void)encodeWithCoder:(NSCoder *)encoder; + +/*! + @method setEnabled: + @abstract Set the hot key enabled or disable. + @discussion setEnabled: registers or unregisters the recievers hot key combination. + @param flag YES to enable, NO to disable. + @result Returns YES if successful + */ +- (BOOL)setEnabled:(BOOL)flag; + +/*! + @method isEnabled + @abstract Find out if a hot key is enabled. + @discussion Returns YES if the hot key is registered. + @result YES if enabled. + */ +- (BOOL)isEnabled; + +/*! + @method target + @abstract Get the hot key event target. + @discussion Returns the object that is sent the key pressed and key released hot key events, see the methods -selector, -selectorReleased and selectorPressed. + @result The target object. + */ +- (id)target; + +/*! + @method selector + @abstract The selector for a key released event. + @discussion This is the selector sent when the hot key combination for the reciever is released. This is the same selector has returned from the method [NDHotKeyEvent selectorReleased] + @result The method selector. + */ +- (SEL)selector; + +/*! + @method selectorReleased + @abstract The selector for a key released event. + @discussion This is the selector sent when the hot key combination for the reciever is released. This is the same selector has returned from the method [NDHotKeyEvent selector] + @result The method selector. + */ +- (SEL)selectorReleased; + +/*! + @method selectorPressed + @abstract The selector for a key pressed event. + @discussion This is the selector sent when the hot key combination for the reciever is pressed. + @result The method selector. + */ +- (SEL)selectorPressed; + +/*! + @method currentEventType + @abstract Get the current hot key event type. + @discussion This value returns what event last occured. Can be used in your target when it is sent a event message to find out what event occured, possible values are +
+ + + + + +
ValueDescription
NDHotKeyNoEventThe hot key has not been pressed yet.
NDHotKeyPressedEventThe hot key was pressed last.
NDHotKeyReleasedEventThe hot key was released last.
+
+ @result The last event type. + */ +- (int)currentEventType; + +/*! + @method setTarget:selector: + @abstract Set the hot key target. + @discussion Set the target object and selector to be sent when the hot key is released. + @param target The traget object. + @param selector The selector. + @result returns YES if successful. + */ +- (BOOL)setTarget:(id)target selector:(SEL)selector; + +/*! + @method setTarget:selectorReleased:selectorPressed: + @abstract Set the hot key target. + @discussion Set the target object and selector to be sent when the hot key is pressed and wehn it is released. + @param target The traget object. + @param selectorReleased The key released selector. + @param selectorPressed The key pressed selector. + @result returns YES if successful. + */ +- (BOOL)setTarget:(id)target selectorReleased:(SEL)selectorReleased selectorPressed:(SEL)selectorPressed; + +/*! + @method performHotKeyReleased + @abstract Invoke the target with the release selector. + @discussion Use to send the selector for a release event, though this method can be called by you. + */ +- (void)performHotKeyReleased; + +/*! + @method performHotKeyPressed + @abstract Invoke the target with the press selector. + @discussion Use to send the selector for a presse event, though this method can be called by you. + */ +- (void)performHotKeyPressed; + +/*! + @method keyCode + @abstract Get the hot key key code. + @discussion The key code for the hot key, this is hardware specific. + @result The key code. + */ +- (unsigned short)keyCode; + +/*! + @method character + @abstract Get the hot key character. + @discussion This is the character for the key code, without modifier keys. The character is for display purposes only and dose not determine the key code. + @result A uni code character. + */ +- (unichar)character; + +/*! + @method modifierFlags + @abstract Get the hot key modifer key flags. + @discussion The modifierFlags can be a bitwise and combination of NSControlKeyMask, NSAlternateKeyMask, NSShiftKeyMask, and NSCommandKeyMask. + @result The modifer key flags. + */ +- (unsigned int)modifierFlags; + +/*! + @method stringValue + @abstract Get a string got the hot keys. + @discussion This is a string that can be used for display purposes. + @result A NSString + */ +- (NSString *)stringValue; + +@end + +/*! + @protocol NSObject(NDHotKeyEventTragetWillChange) + @abstract Informal protocol used to inform a NDHotKeyEvent target of events. + @discussion The informal protocol NDHotKeyEventTragetWillChange defines a method used to notify a NDHotKeyEvent target that the target will change. + */ +@interface NSObject (NDHotKeyEventTragetWillChange) + +/*! + @method targetWillChangeToObject:forHotKeyEvent: + @abstract Message sent to a target object to inform it that the target is going to change. + @discussion This method can be used to notify the receiver that it will no longer be the target for a NDHotKeyEvent or used to prevent the target from changing by returning NO + @param target The new target for the NDHotKeyEvent + @param hotKeyEvent The NDHotKeyEvent for which the target is changing. + @result Return NO to prevent the target from changing, otherwise return YES. + */ +- (BOOL)targetWillChangeToObject:(id)target forHotKeyEvent:(NDHotKeyEvent *)hotKeyEvent; + +@end + +/*! + @function stringForKeyCodeAndModifierFlags + @abstract Get a string for hot key parameters. + @discussion Returns a string representation of the passed in hot key values. + @param keyCode A key code. + @param aChar A character representation of the key code. + @param modifierFlags modifer flags, comman, option, shift and control. + @result A NSString representing the hot key combination. + */ +NSString * stringForKeyCodeAndModifierFlags( unsigned short keyCode, unichar aChar, unsigned int modifierFlags ); +/*! + @function unicharForKeyCode + @abstract Get a unicode charater for the key combination. + @discussion The uncode chararter for the key combination. + @param keyCode The key code used by the keyboard, can vary across hardware. + @result A unichar + */ +unichar unicharForKeyCode( unsigned short keyCode ); diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyEvent_QSMods.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyEvent_QSMods.h new file mode 100644 index 0000000..525cebe --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyEvent_QSMods.h @@ -0,0 +1,24 @@ +// +// NDHotKeyEvent_QSMods.h +// Quicksilver +// +// Created by Alcor on 8/16/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + +#import "NDHotKeyEvent.h" +unsigned int carbonModifierFlagsToCocoaModifierFlags( unsigned int aModifierFlags ); +@interface QSHotKeyEvent : NDHotKeyEvent{ + NSString *identifier; +} +- (NSString *)identifier; +- (void)setIdentifier:(NSString *)anIdentifier; ++ (QSHotKeyEvent *)hotKeyWithIdentifier:(NSString *)identifier; ++ (QSHotKeyEvent *)hotKeyWithDictionary:(NSDictionary *)dict; +@end + +@interface NDHotKeyEvent (QSMods) ++ (NDHotKeyEvent *)getHotKeyForKeyCode:(unsigned short)aKeyCode character:(unichar)aChar safeModifierFlags:(unsigned int)aModifierFlags; +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDLaunchServicesObject.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDLaunchServicesObject.h new file mode 100644 index 0000000..1594dc9 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDLaunchServicesObject.h @@ -0,0 +1,66 @@ +/* + * NDLaunchServicesObject.h + * Popup Launcher + * + * Created by Nathan Day on Wed Dec 26 2001. + * Copyright (c) 2001 Nathan Day. All rights reserved. + */ + +#import + +@interface NDLaunchServicesObject : NSObject +{ +} + ++ (NDLaunchServicesObject *)defaultLaunchServices; ++ (void)terminateDefault; // call when your app quits + +- initWithFlags:(LSInitializeFlags)aFlags; + +- (BOOL)copyItemInfo:(LSRequestedInfo)aWhichInfo forURL:(NSURL *)aURL outInfo:(LSItemInfoRecord *)anOutInfo; + +- (NSString *)displayNameForURL:(NSURL *)aURL; +- (BOOL)setExtensionHidden:(BOOL)aHide forURL:(NSURL *)aURL; +- (NSString *)kindStringForURL:(NSURL *)aURL; + +- (NSURL *)applicationForType:(OSType)aType creator:(OSType)aCreator extension:(NSString *)anExtension inRole:(LSRolesMask)aRole; +- (NSURL *)applicationForURL:(NSURL *)aURL inRole:(LSRolesMask)aRole; +- (NSURL *)findApplicationForCreator:(OSType)aCreator bundleID:(NSString *)aBundleID name:(NSString *)aName; + +- (BOOL)canURL:(NSURL *)aURL acceptURL:(NSURL *)aTargetURL inRole:(LSRolesMask)aRole acceptanceFlags:(LSAcceptanceFlags)aFlags; +- (BOOL)canURL:(NSURL *)aURL acceptURL:(NSURL *)aTargetURL inRole:(LSRolesMask)aRole; + +- (NSURL *)openURL:(NSURL *)aURL; +- (NSURL *)openURLs:(NSArray *)anArray usingApplication:(NSURL *)anApplication; +- (NSURL *)openURLs:(NSArray *)anArray usingApplication:(NSURL *)anApplication params:(NSAppleEventDescriptor *)aParams launchFlags:(LSLaunchFlags)aFlags asyncRefCon:(void *)asyncRefCon; + +- (OSType)filetypeOfURL:(NSURL *)aURL; +- (OSType)creatorOfURL:(NSURL *)aURL; +- (NSString *)extensionOfURL:(NSURL *)aURL; + +@end + +/* + * methods to get access LSItemInfoFlags + */ +@interface NDLaunchServicesObject (LSItemInfoFlags) + +- (BOOL)isPlainFileAtURL:(NSURL *)aURL; +- (BOOL)isPackageAtURL:(NSURL *)aURL; +- (BOOL)isApplicationAtURL:(NSURL *)aURL; +- (BOOL)isContainerAtURL:(NSURL *)aURL; +- (BOOL)isAliasFileAtURL:(NSURL *)aURL; +- (BOOL)isSymlinkAtURL:(NSURL *)aURL; +- (BOOL)isInvisibleAtURL:(NSURL *)aURL; +- (BOOL)isNativeAppAtURL:(NSURL *)aURL; +- (BOOL)isClassicAppAtURL:(NSURL *)aURL; +- (BOOL)doesAppPrefersNativeAtURL:(NSURL *)aURL; +- (BOOL)doesAppPrefersClassicAtURL:(NSURL *)aURL; +- (BOOL)isAppIsScriptableAtURL:(NSURL *)aURL; +- (BOOL)isVolumeAtURL:(NSURL *)aURL; +- (BOOL)isExtensionIsHiddenAtURL:(NSURL *)aURL; + +- (LSItemInfoFlags)itemInfoFlagAtURL:(NSURL *)aURL whichInfo:(LSRequestedInfo)aWhichInfo; +- (LSItemInfoFlags)basicItemInfoFlagAtURL:(NSURL *)aURL; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDProcess+QSMods.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDProcess+QSMods.h new file mode 100644 index 0000000..4ae0e70 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDProcess+QSMods.h @@ -0,0 +1,21 @@ +// +// NDProcess+QSMods.h +// Quicksilver +// +// Created by Alcor on 9/3/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + +#import "NDProcess.h" + +@interface NDProcess (QSMods) +- (pid_t)pid; +- (NSDictionary *)processInfo; + +- (BOOL)isVisible; +- (BOOL)isBackground; +- (BOOL)isCarbon; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDProcess.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDProcess.h new file mode 100644 index 0000000..3048639 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDProcess.h @@ -0,0 +1,333 @@ +/*! + @header NDProcess.h + @abstract Header file for the class NDProcess and categories of NDProcess + @discussion

NDProcess is a cocoa wrapper for Apples Process Manager

+ +

Created by Nathan Day on Mon May 27 2002.
+ Copyright © 2002 Nathan Day. All rights reserved.

+ */ + + +#import +#import + +/*! + @class NDProcess + @abstract Class to represent a process. + @discussion Provides a simplified Cocoa interface to Apples Pocess Manager API. Some of the methods will return instances that are reused if you do not retain them, methods that do so are identified in there documentation. + */ +@interface NDProcess : NSObject +{ +@private + ProcessSerialNumber processSerialNumber; + ProcessInfoRec infoRec; + NSString * name; + NSURL * url; +} + +/*! + @method initWithProcessSerialNumber: + @abstract Initialises a NDProcess. + @discussion Intializes a the recevier with a process serial number. + @param processSerialNumber The process serial number. + @result A initialised NDProcess + */ +- (id)initWithProcessSerialNumber:(ProcessSerialNumber)processSerialNumber; + +/*! + @method processSerialNumber + @abstract Get the Process Serial Number + @discussion Returns the process serial number for the recevier + @result A process serial number. + */ +- (ProcessSerialNumber)processSerialNumber; + +/*! + @method isFrontProcess + @abstract Is the process the front process. + @discussion Determines if the recevier is for a process that is currently front. + @result Returns YES if the process is front. + */ +- (BOOL)isFrontProcess; + +/*! + @method isCurrentProcess + @abstract Is the process the current process. + @discussion Determines if the recevier is for a process that is current. + @result Returns YES if the process is current. + */ +- (BOOL)isCurrentProcess; + +/*! + @method makeFrontProcess + @abstract Bring the process to front. + @discussion Attempts to bring the process to front. + @result Returns YES if the process did come to front. + */ +- (BOOL)makeFrontProcess; + +/*! + @method wakeUpProcess + @abstract Wake up the process. + @discussion Wakes up the process. + @result Returns YES if the process did wakr up.. + */ +- (BOOL)wakeUpProcess; + + +@end + +/*! + @category NDProcess(Construction) + @abstract NDProcess construction methods. + @discussion Most of the time you should use one of these methods to create NDProcess objects. + */ +@interface NDProcess (Construction) + +/*! + @method initWithCurrentProcess + @abstract Initialises a NDProcess. + @discussion Initialises the recevier for the current process. + @result A initialised NDProcess + */ +- (id)initWithCurrentProcess; + +/*! + @method initWithFrontProcess + @abstract Initialises a NDProcess. + @discussion Initialises the recevier for the front process. + @result A initialised NDProcess + */ +- (id)initWithFrontProcess; + +/*! + @method everyProcess + @abstract Get every process. + @discussion Returns a NSArray of NDProcesss for every process. + @result An NSArray of NDProcesss. + */ ++ (NSArray *)everyProcess; + +/*! + @method everyProcessNamed: + @abstract Get every process of supplied name. + @discussion Returns every process with a given name, the process name does not have to unique. + @param name The process name to find. + @result An NSArray of NDProcesss. + */ ++ (NSArray *)everyProcessNamed:(NSString *)name; + + +/*! + @method processWithProcessSerialNumber: + @abstract Returns a new NDProcess. + @discussion Returns a NDProcess for the process with the given process serial number. WARNING: this method returns an instance that will be reused unless you retain it. + @param processSerialNumber A valid process serial number. + @result A NDProcess object. + */ ++ (NDProcess *)processWithProcessSerialNumber:(ProcessSerialNumber)processSerialNumber; + +/*! + @method currentProcess + @abstract Returns a new NDProcess. + @discussion Returns a NDProcess for the current process. WARNING: this method returns an instance that will be reused unless you retain it. + @result A NDProcess object. + */ ++ (NDProcess *)currentProcess; + +/*! + @method frontProcess + @abstract Returns a new NDProcess. + @discussion Returns a NDProcess for the front process. WARNING: this method returns an instance that will be reused unless you retain it. + @result A NDProcess object. + */ ++ (NDProcess *)frontProcess; + +/*! + @method firstProcessNamed: + @abstract Returns a new NDProcess. + @discussion Returns a NDProcess for the first process with the supplied name. WARNING: this method returns an instance that will be reused unless you retain it. + @param name The name to look for. + @result A NDProcess object. + */ ++ (NDProcess *)firstProcessNamed:(NSString *)name; + +/*! + @method processForURL: + @abstract Returns a new NDProcess. + @discussion Returns a NDProcess for the process with the supplied url, the url can be to the executable file within an appication package. WARNING: this method returns an instance that will be reused unless you retain it. + @param URL The url of the process to return. + @result A NDProcess object. + */ ++ (NDProcess *)processForURL:(NSURL *)URL; + +/*! + @method processForPath: + @abstract Returns a new NDProcess. + @discussion Returns a NDProcess for the process with the supplied path, the path can be to the executable file within an appication package. WARNING: this method returns an instance that will be reused unless you retain it. + @param path The path of the process to return. + @result A NDProcess object. + */ ++ (NDProcess *)processForPath:(NSString *)path; + +/*! + @method processForApplicationURL: + @abstract Returns a new NDProcess. + @discussion Returns a NDProcess for the process with the supplied url, if the url is to an application package then the NDProcess returned is for the file identified by the CFBundleExecutable key int the Info.plist file. WARNING: this method returns an instance that will be reused unless you retain it. + @param URL The url of the process to return. + @result A NDProcess object. + */ ++ (NDProcess *)processForApplicationURL:(NSURL *)URL; + +/*! + @method processForApplicationPath: + @abstract Returns a new NDProcess. + @discussion Returns a NDProcess for the process with the supplied path, if the path is to an application package then the NDProcess returned is for the file identified by the CFBundleExecutable key int the Info.plist file. WARNING: this method returns an instance that will be reused unless you retain it. + @result A NDProcess object. + */ ++ (NDProcess *)processForApplicationPath:(NSString *)path; + + /*! + @method everyProcessForBeginingWithURL: + @abstract Returns a new NDProcess. + @discussion Returns a NSArray of NDProcess for the processes with in the supplied url, the url can be to the executable file within an appication package or a package its self or even a folder. + @param URL The url of the process to return. + @result A NDProcess object. + */ ++ (NSArray *)everyProcessBeginingWithURL:(NSURL *)URL; + +/*! + @method everyProcessBeginingWithPath: + @abstract Returns a NSArray of NDProcesss contained within the given path.. + @discussion Returns a NSArray of NDProcess for the processes with in the supplied path, the path can be to the executable file within an appication package or a package its self or even a folder. + @param path The path of the process to return. + @result A NDProcess object. + */ ++ (NSArray *)everyProcessBeginingWithPath:(NSString *)path; + +/*! + @method processesEnumerater + @abstract Returns a NSEnumerator for every process. + @discussion The NSEnumerator will step through every process. WARNING: the instances returned from this enumerator will be reuses unless you retain them, before calling nextObject again. + @result A NSEnumerator for every process. + */ ++ (NSEnumerator *)processesEnumerater; + +/*! + @method isNoProcess + @abstract Get type of process. + @discussion Is the process serial number kNoProcess. + @result Returns YES if process serial number is kNoProcess + */ +- (BOOL)isNoProcess; + +/*! + @method isSystemProcess + @abstract Get type of process. + @discussion Is the process serial number kSystemProcess. + @result Returns YES if process serial number is kSystemProcess + */ +- (BOOL)isSystemProcess; + +/*! + @method isValid + @abstract Is the process valid. + @discussion Attempts to get ProcessInfoRec and return true if no error. The process may not be running any more. + @result Returns YES if the is process valid. + */ +- (BOOL)isValid; + +@end + +/*! + @category NDProcess(ProcessInfoRec) + @abstract Methods to get additional process info. + @discussion These methods return information from the ProcessInfoRec sttruct. + */ +@interface NDProcess (ProcessInfoRec) + +/*! + @method name + @abstract Process name. + @discussion The name of the process. For applications, this field contains the name of the application as designated by the user at the time the application was opened. For example, for foreground applications, the name is the name as it appears in the Dock. + @result A NSString containing the name. + */ +- (NSString *)name; + +/*! + @method type + @abstract Process type + @discussion The file type of the application, generally 'APPL' for applications and 'appe' for background-only applications launched at startup. + @result A four char code. + */ +- (OSType)type; + +/*! + @method signature + @abstract Process signature + @discussion The signature of the file containing the process (for example, the signature of the TeachText application is 'ttxt'). + @result A four char code. + */ +- (OSType)signature; + +/*! + @method mode + @abstract Process mode + @discussion Process mode flags. These flags indicate whether the process is an application or desk accessory. For applications, this field also returns information specified in the application’s 'SIZE' resource. This information is returned as flags that can be combined with a bitwise or, though they probable are not all relevent to Mac OS X +
    +
  • modeReserved
  • +
  • modeControlPanel
  • +
  • modeDeskAccessory
  • +
  • modeMultiLaunch
  • +
  • modeNeedSuspendResume
  • +
  • modeCanBackground
  • +
  • modeDoesActivateOnFGSwitch
  • +
  • modeOnlyBackground
  • +
  • modeGetFrontClicks
  • +
  • modeGetAppDiedMsg
  • +
  • mode32BitCompatible
  • +
  • modeHighLevelEventAware
  • +
  • modeLocalAndRemoteHLEvents
  • +
  • modeStationeryAware
  • +
  • modeUseTextEditServices
  • +
  • modeDisplayManagerAware
  • +
+ @result A combination of the previously list values. + */ + +- (UInt32)mode; + +/*! + @method launcher + @abstract Process launcher + @discussion A NDProcess for the process that launched the application. If the original launcher of the process is no longer open, the NDProcess will have the process serial number kNoProcess. + @result A NDProcess for the receviers launching process. + */ +- (NDProcess *)launcher; + +/*! + @method launchTime + @abstract Launch time in seconds + @discussion The value of the Ticks global variable in secods at the time that the process was launched. + @result The time in NSTimeInterval (seconds). + */ +- (NSTimeInterval)launchTime; + +/*! + @method url + @abstract Process url. + @discussion The url for the receviers process, this may be within the contents of some application package. + @result A file url NSURL to a file containing the process. + */ +- (NSURL *)url; + +/*! + @method path + @abstract Process path. + @discussion The path for the receviers process, this may be within the contents of some application package. + @result A path NSString to a file containing the process. + */ +- (NSString *)path; + + +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDResourceFork+OtherSorces.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDResourceFork+OtherSorces.h new file mode 100644 index 0000000..1c7ad89 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDResourceFork+OtherSorces.h @@ -0,0 +1,42 @@ +/* + * NDResourceFork+OtherSorces.h category + * NDResourceFork + * + * Created by Nathan Day on Thu Dec 05 2002. + * Copyright (c) 2002 Nathan Day. All rights reserved. + */ + +#import +#import "NDResourceFork.h" + +/*! + @header NDResourceFork(OtherSorces) + @abstract Defines the interface for a category of the class NDResourceFork. + @discussion Defines method for NDResourceFork for retrieving resource type data from non resource fork sources, at lest not directly. The category OtherSorces can be omitted from your project if the additonal functionalty is not desired. + */ + +/*! + @category NDResourceFork(OtherSorces) + @abstract A category of the class NDResourceFork. + @discussion The category OtherSorces adds method to NDResourceFork for retrieving resource type data from non resource fork sources, at lest not directly. This category can be omitted from your project if the additonal functionalty is not desired. + */ +@interface NDResourceFork (OtherSorces) + +/*! + @method iconFamilyDataForURL: + @abstract Gets a files or directories Icon Family Data. + @discussion iconFamilyDataForURL: returns the Icon Family Data for any file or directory. The file does not have to have an actual resource fork with the Icon Family Data in it, neither does a directory have to have an Icon/r file with the Icon Family Data. + @param aURL The file url for which the Icon Family Data is required. + @result A NSData contain the Icon Family Data, returns nil if iconFamilyDataForURL: failed. + */ ++ (NSData *)iconFamilyDataForURL:(NSURL *)aURL; +/*! + @method iconFamilyDataForFile: + @abstract Gets a files or directories Icon Family Data. + @discussion iconFamilyDataForURL: returns the Icon Family Data for any file or directory. The file does not have to have an actual resource fork with the Icon Family Data in it, neither does a directory have to have an Icon/r file with the Icon Family Data. + @param aPath The path for which the Icon Family Data is required. + @result A NSData contain the Icon Family Data, returns nil if iconFamilyDataForURL: failed. + */ ++ (NSData *)iconFamilyDataForFile:(NSString *)aPath; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NDResourceFork.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NDResourceFork.h new file mode 100644 index 0000000..7b25747 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NDResourceFork.h @@ -0,0 +1,259 @@ +/*! + @header NDResourceFork + @abstract Defines the interface for the class NDResourceFork. + @discussion NDResourceFork allows your cocoa application create, delete, open, read, modify, and write resources; get information about them. A resource is data of any kind stored in a defined format in a file's resource fork. On intialization, NDResourceFork open the resource fork and then closes the resource for when it is deallocated. + + Created by nathan on Wed Dec 05 2001. + Copyright © 2001 Nathan Day. All rights reserved. + */ + +#import +#import + +/*! + @class NDResourceFork + @abstract A class to access manipulate resource forks from Cocoa. + @discussion NDResourceFork allows your cocoa application create, delete, open, read, modify, and write resources; get information about them. A resource is data of any kind stored in a defined format in a file's resource fork. On intialization, NDResourceFork open the resource fork and then closes the resource for when it is deallocated. + */ +@interface NDResourceFork : NSObject +{ +@private + short int fileReference; +} + +/*! +@method resourceForkForReadingAtURL: + @abstract Creates and initalises a NDResourceFork. + @discussion Creates and intializes a NDResourceFork and opens a resource fork for reading using the file url.. The NDResourceFork resource fork is closed when the receiver is deallocated. + @param URL A file url specifying the name and location of the file whose resource fork is to be opened. + @result A NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or Create and initalise failed. + */ ++ (id)resourceForkForReadingAtURL:(NSURL *)URL; +/*! + @method resourceForkForWritingAtURL: + @abstract Creates and initalises a NDResourceFork. + @discussion Creates and intializes a NDResourceFork and opens a resource fork for writting, creating it before hand if it does not already exists, using the file url. The NDResourceFork resource fork is closed when the receiver is deallocated. + @param URL A file url specifying the name and location of the file whose resource fork is to be opened. + @result A NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or Create and initalise failed. + */ ++ (id)resourceForkForWritingAtURL:(NSURL *)URL; +/*! + @method resourceForkForReadingAtPath: + @abstract Creates and initalises a NDResourceFork. + @discussion Creates and intializes a NDResourceFork and opens a resource fork for reading using the path. The receivers resource fork is closed when the receiver is deallocated. + @param path A path specifying the name and location of the file whose resource fork is to be opened. + @result A NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or Create and initalise failed. + */ ++ (id)resourceForkForReadingAtPath:(NSString *)path; +/*! + @method resourceForkForWritingAtPath: + @abstract Creates and initalises a NDResourceFork. + @discussion Creates and intializes a NDResourceForkr and opens a resource fork for writting, creating it before hand if it does not already exists, using the path. The receivers resource fork is closed when the receiver is deallocated. + @param path A path specifying the name and location of the file whose resource fork is to be opened. + @result A NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or Create and initalise failed. + */ ++ (id)resourceForkForWritingAtPath:(NSString *)path; + +/*! + @method initForReadingAtURL: + @abstract Initalises a NDResourceFork. + @discussion Intializes the receiver and opens a resource fork for reading using the file url. + @param URL A file url specifying the name and location of the file whose resource fork is to be opened. The receivers resource fork is closed when the receiver is deallocated. + @result An initialized NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or initalization failed. + */ +- (id)initForReadingAtURL:(NSURL *)URL; +/*! + @method initForReadingAtURL: + @abstract Initalises a NDResourceFork. + @discussion Intializes the receiver and opens a resource fork for writting, creating it before hand if it does not already exists, using the file url. The receivers resource fork is closed when the receiver is deallocated. + @param URL A file url specifying the name and location of the file whose resource fork is to be opened. + @result An initialized NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or initalization failed. + */ +- (id)initForWritingAtURL:(NSURL *)URL; +/*! + @method initForReadingAtPath: + @abstract Initalises a NDResourceFork. + @discussion Intializes the receiver and opens a resource fork for reading using the path. The receivers resource fork is closed when the receiver is deallocated. + @param path A path specifying the name and location of the file whose resource fork is to be opened. + @result An initialized NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or initalization failed. + */ +- (id)initForReadingAtPath:(NSString *)path; +/*! + @method initForWritingAtPath: + @abstract Initalises a NDResourceFork. + @discussion Intializes the receiver and opens a resource fork for writting, creating it before hand if it does not already exists, using the path. The receivers resource fork is closed when the receiver is deallocated. + @param path A path specifying the name and location of the file whose resource fork is to be opened. + @result An initialized NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or initalization failed. + */ +- (id)initForWritingAtPath:(NSString *)path; +/*! + @method initForPermission:AtURL: + @abstract Initalises a NDResourceFork. + @discussion Intializes the receiver and opens a resource fork for reading and/or writting using the file url. If write permission is specified, then an empty resource fork created before hand if it does not already exists. The receivers resource fork is closed when the receiver is deallocated.Possible permission values are as follows; +
+ + + + + + + + + + + + + + + +
fsCurPermRequests whatever permissions are currently allowed. If write access in unavailable (because the file is locked or the file is already open with write permission), then read permission is granted. Otherwise read/write permission is granted.
fsRdPermRequests permission to read the file.
fsWrPermRequests permission to write to the file. If write permission is granted, no other access paths are granted write permission. Note, however, that the File Manager does not support write-only access to a file. Thus, fsWrPerm is synonymous with fsRdWrPerm .
fsRdWrPermRequests exclusive read and write permission. If exclusive read/ write permission is granted, no other users are granted permission to write to the file. Other users may, however, be granted permission to read the file.
fsRdWrShPermRequests shared read and write permission. Shared read/ write permission allows mutliple access paths for reading and writing. This is safe only if there is some way of locking portions of the file before writing to them. Use the functions PBLockRangeSync and PBUnlockRangeSync to lock and unlock ranges of bytes within a file. On Mac OS 8 and 9, these functions are supported only on remotely mounted volumes, or on local volumes that are shareable on the network. You should check that range locking is available before requesting shared read/ write permission. On Mac OS X, range locking is available on all volumes.
fsRdDenyPermRequests that any other paths be prevented from having read access. A path cannot be opened if you request read permission (with the fsRdPerm constant) but some other path has requested deny-read access. Similarly, the path cannot be opened if you request deny-read permission, but some other path already has read access. This constant is used with the PBHOpenDenySync and PBHOpenRFDenySync functions.
fsWrDenyPermRequests that any other paths be prevented from having write access. A path cannot be opened if you request write permission (with the fsWrPerm constant) but some other path has requested deny-write access. Similarly, the path cannot be opened if you request deny-write permission, but some other path already has write access. This constant is used with the PBHOpenDenySync and PBHOpenRFDenySync functions.
+
+ @param permission read/write permissions for the opened resource fork. + @param URL A file url specifying the name and location of the file whose resource fork is to be opened. + @result An initialized NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or initalization failed. + */ +- (id)initForPermission:(char)permission AtURL:(NSURL *)URL; +/*! + @method initForPermission:AtPath: + @abstract Initalises a NDResourceFork. + @discussion Intializes the receiver and opens a resource fork for reading and/or writting using the path. If write permission is specified, then an empty resource fork created before hand if it does not already exists. The receivers resource fork is closed when the receiver is deallocated. Possible permission values are as follows; +
+ + + + + + + + + + + + + + + +
fsCurPermRequests whatever permissions are currently allowed. If write access in unavailable (because the file is locked or the file is already open with write permission), then read permission is granted. Otherwise read/write permission is granted.
fsRdPermRequests permission to read the file.
fsWrPermRequests permission to write to the file. If write permission is granted, no other access paths are granted write permission. Note, however, that the File Manager does not support write-only access to a file. Thus, fsWrPerm is synonymous with fsRdWrPerm .
fsRdWrPermRequests exclusive read and write permission. If exclusive read/ write permission is granted, no other users are granted permission to write to the file. Other users may, however, be granted permission to read the file.
fsRdWrShPermRequests shared read and write permission. Shared read/ write permission allows mutliple access paths for reading and writing. This is safe only if there is some way of locking portions of the file before writing to them. Use the functions PBLockRangeSync and PBUnlockRangeSync to lock and unlock ranges of bytes within a file. On Mac OS 8 and 9, these functions are supported only on remotely mounted volumes, or on local volumes that are shareable on the network. You should check that range locking is available before requesting shared read/ write permission. On Mac OS X, range locking is available on all volumes.
fsRdDenyPermRequests that any other paths be prevented from having read access. A path cannot be opened if you request read permission (with the fsRdPerm constant) but some other path has requested deny-read access. Similarly, the path cannot be opened if you request deny-read permission, but some other path already has read access. This constant is used with the PBHOpenDenySync and PBHOpenRFDenySync functions.
fsWrDenyPermRequests that any other paths be prevented from having write access. A path cannot be opened if you request write permission (with the fsWrPerm constant) but some other path has requested deny-write access. Similarly, the path cannot be opened if you request deny-write permission, but some other path already has write access. This constant is used with the PBHOpenDenySync and PBHOpenRFDenySync functions.
+
+ @param permission read/write permissions for the opened resource fork. + @param path A path specifying the name and location of the file whose resource fork is to be opened. + @result An initialized NDResourceFork for an opened resource fork, returns nil if the resource fork could not be opened or initalization failed. + */ +- (id)initForPermission:(char)permission AtPath:(NSString *)path; + +/*! + @method addData:type:Id:name: + @abstract Adds a resource to the receivers resource file. + @discussion addData:type:name: doesn't verify whether the resource ID you pass in the parameter ID is already assigned to another resource of the same type. You should use the methods addData:type:name: or dataForType:named: to get a unique resource ID when adding a resource . addData:type:Id:named: returns YES on success + @param data An NSData object containing the data to be added as a resource to the receivers resource file. + @param type The resource type of the resource to be added. + @param ID The resource ID of the resource to be added. + @param name The name of the resource to be added. + @result Returns YES if the resource was successfully added, otherwise it returns NO. + */ +- (BOOL)addData:(NSData *)data type:(ResType)type Id:(short int)ID name:(NSString *)name; +/*! + @method addData:type:name: + @abstract Adds a resource to the receivers resource file. + @discussion addData:type:name: uses an unique resource ID when adding a resource . addData:type:Id:named: returns YES on success + @param data An NSData object containing the data to be added as a resource to the receivers resource file. + @param type The resource type of the resource to be added. + @param name The name of the resource to be added. + @result Returns YES if the resource was successfully added, otherwise it returns NO. + */ +- (BOOL)addData:(NSData *)data type:(ResType)type name:(NSString *)name; +/*! + @method dataForType:Id: + @abstract Gets resource data for a resource in the receivers resource file. + @discussion dataForType:Id: searches the receivers resource file's resource map in memory for the specified resource. + @param type The resource type of the resource which you wish to retrieve data. + @param ID An integer that uniquely identifies the resource which you wish to retrieve data. + @result Returns an NSData object if successful otherwise returns nil. + */ +- (NSData *)dataForType:(ResType)type Id:(short int)ID; +/*! + @method dataForType:named: + @abstract Gets resource data for a resource in the receivers resource file. + @discussion dataForType:Id: searches the receivers resource file's resource map in memory for the specified resource. + @param type The resource type of the resource which you wish to retrieve data. + @param name A name that uniquely identifies the resource which you wish to retrieve data. Strings passed in this parameter are case-sensitive. + @result Returns an NSData object if successful otherwise returns nil. + */ +- (NSData *)dataForType:(ResType)type named:(NSString *)name; + +/*! + @method removeType:Id: + @abstract Removes a resource's entry from the receivers resource file. + @discussion If the resProtected attribute for the resource is set, removeType:Id: does nothing, and returns NO. + @param type The resource type of the resource which you wish to remove. + @param ID An integer that uniquely identifies the resource which you wish to remove. + @result Returns YES if the resource was successfully removed, otherwise if returns NO. + */ +- (BOOL)removeType:(ResType)type Id:(short int)ID; + +/*! + @method everyResourceType + @abstract Gets every resource type available in the receivers resource file. + @discussion everyResourceType returns an NSArray of NSNumbers each containing a unsigned long or ResTypes. + @result A NSArray of NSNumbers containing ResTypes. + */ +- (NSArray *)everyResourceType; + +/*! + @method nameOfResourceType:Id: + @abstract Gets a resource's resource name. + @discussion Returns a resources name as an NSString. + @param type The resource type of the resource for which you wish to retrieve the name. + @param ID An integer that uniquely identifies the resource for which you wish to retrieve the name. + @result An NSString containing the resources name. + */ +- (NSString *)nameOfResourceType:(ResType)type Id:(short int)ID; +/*! + @method getId:ofResourceType:named: + @abstract Gets a named resource's resource id. + @discussion Returns a resources id in a pointer to a short int and returns YES if retrieval of the id is succeeded. If getId:ofResourceType:named: returns NO then the value returned through the pointer ID is garabage. + @param ID A pointer to an short int that on return contains the resources id, if the returned value is YES. + @param type The resource type of the resource for which you wish to retrieve the id. + @param name The resource name of the resource for which you wish to retrieve the id. + @result A YES if retrieval was successful. + */ +- (BOOL)getId:(short int *)ID ofResourceType:(ResType)type named:(NSString *)name; + +/*! + @method getAttributeFlags:forResourceType:Id: + @abstract Gets a resource's attributes. + @discussion Returns the attributes for a resource in a pointer to a short int and returns YES if retrieval of the attributes is succeeded. If getAttributeFlags:forResourceType:Id: returns NO then the value returned through the pointer attributes is garabage. + @param attributes A pointer to an short int that on return contains the resources attributes, if the returned value is YES. + @param type The resource type of the resource for which you wish to retrieve the attributes. + @param ID An integer that uniquely identifies the resource for which you wish to retrieve the attributes. + @result A YES if retrieval was successful. + */ +- (BOOL)getAttributeFlags:(short int*)attributes forResourceType:(ResType)type Id:(short int)ID; +/*! + @method setAttributeFlags:forResourceType:Id: + @abstract Sets a resource's attributes. + @discussion Set the attributes for a resource in attributes and returns YES if setting of the attributes is succeeded. + @param attributes A short int that contains the resources attributes to be set. + @param type The resource type of the resource for which you wish to set the attributes. + @param ID An integer that uniquely identifies the resource for which you wish to set the attributes. + @result A YES if setAttributeFlags:forResourceType:Id: was successful in setting the resources attributes. + */ +- (BOOL)setAttributeFlags:(short int)attributes forResourceType:(ResType)type Id:(short int)ID; + +/*! + @method dataForEntireResourceFork + @abstract Reads the receivers entire resource data. + @discussion dataForEntireResourceFork returns a NSData object that contains the entire contents of the resource fork. dataForEntireResourceFork and it's conpanion method writeEntireResourceFork can be used for duplicating the resource fork for on file to the resource fork of another. dataForEntireResourceFork can also be used to convert a resource stored in a files resource fork into a resource stored in a data fork, simple by using the NSData methods writeToFile:atomically: or writeToURL:atomically:. + @result A NSData object containing the resources data. + */ +- (NSData *)dataForEntireResourceFork; +/*! + @method writeEntireResourceFork: + @abstract Writes complete resource data to the receivers resource fork. + @discussion writeEntireResourceFork: writes the data in the NSData object out the the recievers resource fork. writeEntireResourceFork and it's conpanion method dataForEntireResourceFork can be used for duplicating the resource fork for on file to the resource fork of another. writeEntireResourceFork: can also be used to convert a resource stored in a files data fork into a resource stored in a files resource fork, simple by creating the NSData object with the methods dataWithContentsOfFile or dataWithContentsOfURL:. + @param data The complete resource data in a NSData object. + @result Returns YES if writting was successful, returns NO otherwise. + */ +- (BOOL)writeEntireResourceFork:(NSData *)data; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleEventDescriptor+NDAppleScriptObject.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleEventDescriptor+NDAppleScriptObject.h new file mode 100644 index 0000000..f8d8cff --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleEventDescriptor+NDAppleScriptObject.h @@ -0,0 +1,1113 @@ +/*! + @header NSAppleEventDescriptor+NDAppleScriptObject + @abstract Declares the category NSAppleEventDescriptor (NDAppleScriptObject) + @discussion Additional methods initially created for use with NDAppleScriptObject but could have other applications especially with Cocoa's NSAppleScript. + + Created by Nathan Day on Fri Dec 14 2001. + Copyright © 2001 Nathan Day. All rights reserved. + */ + +#import +#import + +/*! + @category NSAppleEventDescriptor(NDAppleScriptObject) + @abstract Category of NSAppleEventDescriptor. + @discussion Add some methods for use with AppleScripts and AppleEvents. + */ +@interface NSAppleEventDescriptor (NDAppleScriptObject) + +/*! + @method descriptorWithAEDescNoCopy: + @abstract Returns a NSAppleEventDescriptor for the AEDesc. + @discussion Allocates, initializes and returns an NSAppleEventDescriptor that takes ownership of the Carbon AEDesc structure pointed to by aeDesc. Returns nil if an error occurs. The initialized object takes responsibility for calling the AEDisposeDesc function on the AEDesc at object deallocation time. + @param aeDesc A Carbon AEDesc structure. + @result A NSAppleEventDescriptor + */ ++ (id)descriptorWithAEDescNoCopy:(const AEDesc *)aeDesc; + +/*! + @method descriptorWithAEDesc: + @abstract Returns a NSAppleEventDescriptor for the AEDesc. + @discussion Allocates, initializes and returns an NSAppleEventDescriptor that copies the Carbon AEDesc structure pointed to by aeDesc. Returns nil if an error occurs. + @param aeDesc A Carbon AEDesc structure + @result A NSAppleEventDescriptor + */ ++ (id)descriptorWithAEDesc:(const AEDesc *)aeDesc; + +/*! + @method initWithAEDesc: + @abstract Intializes a NSAppleEventDescriptor with a AEDesc. + @discussion Initializes and returns an NSAppleEventDescriptor that copies the Carbon AEDesc structure pointed to by aeDesc. Returns nil if an error occurs. + @param aeDesc A Carbon AEDesc structure + @result A NSAppleEventDescriptor + */ +- (id)initWithAEDesc:(const AEDesc *)aeDesc; + +/*! + @method isTargetCurrentProcess + @abstract Determines if target is current process. + @discussion If the recevier is a AppleEvent that contains a target ProcessSerialNumber that is the current process (ie you application) then this method returns YES. + @result Returns YES if the recevier is an AppleEvent for the current process. + */ +- (BOOL)isTargetCurrentProcess; + +/*! + @method getAEDesc: + @abstract Get the receviers AEDesc. + @discussion Copies the receviers AEDesc to the supplied AEDesc. + @param aeDescPtr The address of an empty AEDesc. + @result Returns YES if successful. + */ +- (BOOL)getAEDesc:(AEDesc *)aeDescPtr; + +@end + +/*! + @category NSAppleEventDescriptor(NDConversion) + @abstract Category of NSAppleEventDescriptor. + @discussion

Adds methods for converting between AppleEvent types and Objective-C types.

+

The following type conversions are supported in 'either direction' or 'both directions'; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Objective-C TypeDescriptor Type
niltypeNull
NSNumber<BOOL>typeBoolean
NSNumber<short int>
NSNumber<char>
typeSInt16
typeShortInteger
typeSMInt
NSNumber<int>
NSNumber<long int>
typeSInt32
typeLongInteger
typeInteger
NSNumber<float>typeIEEE32BitFloatingPoint
typeShortFloat
typeSMFloat
NSNumber<double>typeIEEE64BitFloatingPoint
typeFloat
typeLongFloat
NSNumber<long double>type128BitFloatingPoint
NSNumber<unsigned char>
NSNumber<unsigned short int>
NSNumber<unsigned int>
NSNumber<unsigned long int>
typeUInt32
NSNumber<unsigned long long>
NSNumber<long long>
no 64 bit unsigned
typeSInt64
NSValue<NSRange>typeOSAErrorRange
NSStringtypeText
kTXNUnicodeTextData
+ typeAlias

see aliasListDescriptorWithArray: and aliasDescriptorWithString:
NSArraytypeAEList
typeAEList<typeAlias>

see aliasListDescriptorWithArray:
NSDictionarytypeAERecord
see descriptorWithDictionary:
+ typeAEList
see userRecordDescriptorWithDictionary:
NSURLtypeAlias
typeFileURL
NDAppleScriptObjectcScript
short inttypeShortInteger
inttypeInteger
unsigned int
typeMagnitude
long inttypeLongInteger
floattypeShortFloat
doubletypeLongFloat
BOOLtypeBoolean
typeTrue
typeFalse
char*typeText
id*typeAEList
typeAERecord
va_listtypeAEList
typeAERecord
+

+ */ +@interface NSAppleEventDescriptor (NDConversion) + +/*! + @method currentProcessDescriptor + @abstract Returns a NSAppleEventDescriptor for the current process. + @discussion Returns a AppleEvent descriptor for the current process, ProcessSerialNumber { 0, kCurrentProcess } + @result A NSAppleEventDescriptor. + */ ++ (NSAppleEventDescriptor *)currentProcessDescriptor; + +/*! + @method targetProcessSerialNumber + @abstract Returns the receviers target ProcessSerialNumber. + @discussion If the recevier is a AppleEvent that contains a target ProcessSerialNumber, then this method will return it otherwise the result undefined. + @result The target ProcessSerialNumber. + */ +- (ProcessSerialNumber)targetProcessSerialNumber; + +/*! + @method targetCreator + @abstract Returns the receviers target Creator. + @discussion If the recevier is a AppleEvent that contains a target Creator, then this method will return it otherwise the result value is garbage. + @result The target type creator. + */ +- (OSType)targetCreator; + +/*! + @method aliasListDescriptorWithArray: + @abstract Returns an list descriptor of alias descriptors. + @discussion Takes a NSArray or file url NSURLs and/or path NSStrings and returns a list descriptor of alias descriptors for all of the files. + @param array A NSArray of file url NSURLs and/or path NSStrings. + @result A NSAppleEventDescriptor containing a list descriptor of alias descriptors. + */ ++ (NSAppleEventDescriptor *)aliasListDescriptorWithArray:(NSArray *)array; + +/*! + @method descriptorWithURL: + @abstract Returns a url descriptor. + @discussion Returns a new url descriptor from the supplied NSURL. + @param URL A NSURL object. + @result A NSAppleEventDescriptor containing a url descriptor. + */ ++ (id)descriptorWithURL:(NSURL *)URL; + +/*! + @method aliasDescriptorWithURL: + @abstract Returns a alias descriptor. + @discussion Returns a new alias descriptor from the supplied file url NSURL. + @param URL A file url NSURL object. + @result A NSAppleEventDescriptor containing a alias descriptor. + */ ++ (NSAppleEventDescriptor *)aliasDescriptorWithURL:(NSURL *)URL; + +/*! + @method aliasDescriptorWithString: + @abstract Returns a alias descriptor. + @discussion Returns a new alias descriptor from the supplied pathNSString. + @param path A file path. + @result A NSAppleEventDescriptor containing a alias descriptor. + */ ++ (NSAppleEventDescriptor *)aliasDescriptorWithString:(NSString *)path; + +/*! + @method aliasDescriptorWithFile: + @abstract Returns a alias descriptor. + @discussion Returns a new alias descriptor from the supplied object which can be either a path NSString or a NSURL. + @param aFile A file object of type NSString or NSURL. + @result A NSAppleEventDescriptor containing a alias descriptor. + */ ++ (NSAppleEventDescriptor *)aliasDescriptorWithFile:(id)aFile; + +/*! + @method descriptorWithTrueBoolean + @abstract Returns a NSAppleEventDescriptor containing a true boolean descriptor. + @discussion Returns a NSAppleEventDescriptortypeTrue + @result A NSAppleEventDescriptor containing a true boolean descriptor. + */ ++ (id)descriptorWithTrueBoolean; + +/*! + @method descriptorWithFalseBoolean + @abstract Returns a NSAppleEventDescriptor containing a false boolean descriptor. + @discussion Returns a NSAppleEventDescriptortypeFalse + @result A NSAppleEventDescriptor containing a false boolean descriptor. + */ ++ (id)descriptorWithFalseBoolean; + +/*! + @method descriptorWithShort: + @abstract Returns a NSAppleEventDescriptor containing a short integer descriptor. + @discussion Returns a NSAppleEventDescriptortypeShortInteger + @param value The short int. + @result A NSAppleEventDescriptor containing a short integer descriptor. + */ ++ (id)descriptorWithShort:(short int)value; + +/*! + @method descriptorWithLong: + @abstract Returns a NSAppleEventDescriptor containing a long integer descriptor. + @discussion Returns a NSAppleEventDescriptortypeLongInteger + @param value The long int. + @result A NSAppleEventDescriptor containing a lon integer descriptor. + */ ++ (id)descriptorWithLong:(long int)value; + +/*! + @method descriptorWithInt: + @abstract Returns a NSAppleEventDescriptor containing a integer descriptor. + @discussion Returns a NSAppleEventDescriptor containing a descriptor of type typeInteger + @param value The int. + @result A NSAppleEventDescriptor containing a int descriptor. + */ ++ (id)descriptorWithInt:(int)value; + +/*! + @method descriptorWithFloat: + @abstract Returns a NSAppleEventDescriptor containing a float descriptor. + @discussion Returns a NSAppleEventDescriptor containing a descriptor of type typeShortFloat + @param value The float. + @result A NSAppleEventDescriptor containing a float descriptor. + */ ++ (id)descriptorWithFloat:(float)value; + +/*! + @method descriptorWithDouble: + @abstract Returns a NSAppleEventDescriptor containing a double descriptor. + @discussion Returns a NSAppleEventDescriptor containing a descriptor of type typeLongFloat + @param value The double. + @result A NSAppleEventDescriptor containing a double descriptor. + */ ++ (id)descriptorWithDouble:(double)value; + +/*! + @method descriptorWithUnsignedInt: + @abstract Returns a NSAppleEventDescriptor containing a unsigned integer descriptor. + @discussion Returns a NSAppleEventDescriptor containing a descriptor of type typeMagnitude + @param value The unsigned int. + @result A NSAppleEventDescriptor containing a unsigned integer descriptor. + */ ++ (id)descriptorWithUnsignedInt:(unsigned int)value; +/*! + @method descriptorWithCString: + @abstract Returns a NSAppleEventDescriptor containing a string the c string.. + @discussion Returns a NSAppleEventDescriptor containing a descriptor of type typeText or typeChar + @param aString A c string. + @result A NSAppleEventDescriptor containing plain text. + */ ++ (id)descriptorWithCString:(const char *)aString; +/*! + @method descriptorWithNumber: + @abstract Returns a NSAppleEventDescriptor containing a number descriptor. + @discussion Returns a NSAppleEventDescriptor containing a descriptor for the value contained within number. The value is determined by object-C type returned frome the method -[NSNumber objCType] with the following mappings; +
+ + + + + + + + + + + + + + + + +
Objective-C TypeDescriptor Type
floattypeIEEE32BitFloatingPoint
doubletypeIEEE64BitFloatingPoint
long doubletype128BitFloatingPoint
unsigned chartypeUInt32
chartypeSInt16
unsigned short inttypeUInt32
short inttypeSInt16
unsigned inttypeUInt32
inttypeSInt32
unsigned long inttypeUInt32
long inttypeSInt32
unsigned long longtypeSInt64
long longtypeSInt64
BOOLtypeBoolean
+
+ @param number The NSNumber. + @result A NSAppleEventDescriptor containing a number. + */ ++ (id)descriptorWithNumber:(NSNumber *)number; + +/*! + @method descriptorWithValue: + @abstract Returns a NSAppleEventDescriptor containing a value descriptor. + @discussion Returns a NSAppleEventDescriptor containing a descriptor for the value contained within value. The value is determined by object-C type returned frome the method -[NSValue objCType] with the following mappings; +
+ + + +
Objective-C TypeDescriptor Type
NSRangetypeRangeDescriptor
+
+ @param value The NSValue + @result A NSAppleEventDescriptor containing a value. + */ ++ (id)descriptorWithValue:(NSValue *)value; + +/*! + @method descriptorWithObject: + @abstract Returns a NSAppleEventDescriptor. + @discussion

descriptorWithObject: will return the best descriptor for the given the object using one of the other -[NSAppleEventDescriptor descriptorWithXXXX:] methods. descriptorWithObject: works recursivly so if object is of type NSArray or NSDictionary then the objects contained within object will also be converted to descriptors using the this method.

+

The following type classes are supported; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Objective-C ClassDescriptor Type
niltypeNull
NSNumber<BOOL>typeBoolean
NSNumber<short int>
+ NSNumber<char>
typeSInt16
+ typeShortInteger
+ typeSMInt
NSNumber<int>
+ NSNumber<long int>
typeSInt32
+ typeLongInteger
+ typeInteger
NSNumber<float>typeIEEE32BitFloatingPoint
+ typeShortFloat
+ typeSMFloat
NSNumber<double>typeIEEE64BitFloatingPoint
+ typeFloat
+ typeLongFloat
NSNumber<long double>type128BitFloatingPoint
NSNumber<unsigned char>
+ NSNumber<unsigned short int>
+ NSNumber<unsigned int>
+ NSNumber<unsigned long int>
typeUInt32
NSNumber<unsigned long long>
+ NSNumber<long long>
no 64 bit unsigned
+ typeSInt64
NSValue<NSRange>typeOSAErrorRange
NSStringtypeText
+ kTXNUnicodeTextData
NSArraytypeAEList
NSDictionarytypeAERecord
NSURLtypeAlias
NSAppleEventDescriptor[object typeCodeValue]
returns object unmodified
NDAppleScriptObjectcScript
+

+ @param object An object that can be converted into a descriptor. + @result A NSAppleEventDescriptor. + */ ++ (id)descriptorWithObject:(id)object; + +/*! + @method descriptorWithArray: + @abstract Returns a list descriptor. + @discussion descriptorWithArray: returns a list decriptor containing AppleEvent decriptors returned from the method descriptorWithObject: when passed each of array's objects. + @param array The array to create a NSAppleEventDescriptor from. + @result A NSAppleEventDescriptor for a list descriptor. + */ ++ (id)descriptorWithArray:(NSArray *)array; + +/*! + @method listDescriptorWithObjects:... + @abstract Returns a list descriptor. + @discussion descriptorWithArray: returns a list decriptor containing AppleEvent decriptors returned from the method descriptorWithObject: when passed each of object arguments. + @param firstObject The argument list terminated with nil. + @result A NSAppleEventDescriptor for a list descriptor. + */ ++ (id)listDescriptorWithObjects:(id)firstObject, ...; + +/*! + @method listDescriptorWithObjects:arguments: + @abstract Returns a list descriptor. + @discussion descriptorWithArray: returns a list decriptor containing AppleEvent decriptors returned from the method descriptorWithObject: when passed each of object arguments. + @param firstObject The first object of the argument list. + @param argList The argument list. + @result A NSAppleEventDescriptor for a list descriptor. + */ ++ (id)listDescriptorWithObjects:(id)object arguments:(va_list)argList; + +/*! + @method recordDescriptorWithObjects:keywords:count: + @abstract Returns a record descriptor + @discussion Returns a record descriptor with the supplied object and keys. The objects are converted into NSAppleEventDescriptor with the method descriptorWithObject:. + @param objects A pointer to an array of objects. + @param keywords A pointer to an array of keywords + @param count The number of objects and keywords. + @result A NSAppleEventDescriptor for a record descriptor. + */ ++ (NSAppleEventDescriptor *)recordDescriptorWithObjects:(id *)objects keywords:(AEKeyword *)keywords count:(unsigned int)count; + + /*! + @method recordDescriptorWithDictionary: + @abstract Returns a record descriptor + @discussion The dictionary keys must be NSNumber, preferable NSNumber<unsigned long int>, representing AEKeyword. The values are converted to NSAppleEventDescriptor's with the method descriptorWithObject:. If you are after a record as typically used in apple scripts then see the method descriptorWithDictionary: + @param dictionary A dictionary where the keys are all NSNumber<unsigned long int> + @result A NSAppleEventDescriptor for a record descriptor. + */ ++ (NSAppleEventDescriptor *)recordDescriptorWithDictionary:(NSDictionary *)dictionary; + +/*! + @method descriptorWithDictionary: + @abstract Returns a record descriptor + @discussion Returns a record descriptor with one key value pair where the keyword is keyASUserRecordFields and the value is descriptor of the type typeAEList as returned from the method userRecordDescriptorWithDictionary:. This is how record types in AppleScript are represented using AppleEvents + @param aDictionary A dictionary where the key can be represented as case insensitive strings. + @result A NSAppleEventDescriptor for a record descriptor. + */ ++ (id)descriptorWithDictionary:(NSDictionary *)aDictionary; + +/*! + @method descriptorWithObjectAndKeys:... + @abstract Returns a record descriptor + @discussion Returns a record descriptor with one key value pair where the keyword is keyASUserRecordFields and the value is descriptor of the type typeAEList as returned from the method userRecordDescriptorWithObjectAndKeys:arguments:. This is how record types in AppleScript are represented using AppleEvents + @param object The first object is a list of object/key pairs terminated with nil. + @result A NSAppleEventDescriptor for a record descriptor. +*/ ++ (id)descriptorWithObjectAndKeys:(id)object, ...; + + +/*! + @method descriptorWithObjectAndKeys:arguments: + @abstract Returns a record descriptor + @discussion Returns a record descriptor with one key value pair where the keyword is keyASUserRecordFields and the value is descriptor of the type typeAEList as returned from the method userRecordDescriptorWithObjectAndKeys:arguments:. This is how record types in AppleScript are represented using AppleEvents + @param object The first object is a list of object/key pairs. + @param argList The argument list. + @result A NSAppleEventDescriptor for a record descriptor. + */ ++ (id)descriptorWithObjectAndKeys:(id)object arguments:(va_list)argList; + + +/*! + @method userRecordDescriptorWithObjectAndKeys:... + @abstract Returns a user record. + @discussion Create a list descriptor that can be used as the value for the key keyASUserRecordFields in record descriptors of AppleEvents representing AppleScript subroutine calls, this is how records in AppleScripts represented. The resulting descriptor is identical to the descriptor returned from the method listDescriptorWithObjects:... if the keys and object are swap around and all of the keys are of type NSString. userRecordDescriptorWithObjectAndKeys:... has the advantage over listDescriptorWithObjects:... in that the keys are converted to NSString using the method -[NSObject description]. + @param object A list of object and keys terminated with a nil. + @result A NSAppleEventDescriptor for a list descriptor representing a user record. + */ ++ (id)userRecordDescriptorWithObjectAndKeys:(id)object, ...; + +/*! + @method userRecordDescriptorWithObjectAndKeys:arguments: + @abstract Returns a user record. + @discussion Create a list descriptor that can be used as the value for the key keyASUserRecordFields in record descriptors of AppleEvents representing AppleScript subroutine calls, this is how records in AppleScripts represented. The objects are converted to NSAppleEventDescriptor using the method descriptorWithObject:. + @param object The first object in a list of objects and keys. + @param argList The arguments list. + @result A NSAppleEventDescriptor for a list descriptor representing a user record. + */ ++ (NSAppleEventDescriptor *)userRecordDescriptorWithObjectAndKeys:(id)object arguments:(va_list)argList; + +/*! + @method userRecordDescriptorWithObjects:keys:count: + @abstract Returns a user record. + @discussion Create a list descriptor that can be used as the value for the key keyASUserRecordFields in record descriptors of AppleEvents representing AppleScript subroutine calls, this is how records in AppleScripts represented. The objects are converted to NSAppleEventDescriptor using the method descriptorWithObject:. + @param objects A pointer to an array of objects. + @param keys A pointer to an array of NSStrings representing keys. + @param count The number of objects and keys. + @result A NSAppleEventDescriptor for a list descriptor representing a user record. + */ ++ (NSAppleEventDescriptor *)userRecordDescriptorWithObjects:(id *)objects keys:(NSString **)keys count:(unsigned int)count; + + /*! + @method userRecordDescriptorWithDictionary: + @abstract Returns a user record descriptor. + @discussion Create a list descriptor that can be used as the value for the key keyASUserRecordFields in record descriptors of AppleEvents representing AppleScript subroutine calls, this is how records in AppleScripts represented. The objects are converted to NSAppleEventDescriptor using the method descriptorWithObject:. + @param dictionary A dictionay where the keys are all NSStrings + @result A NSAppleEventDescriptor for a list descriptor representing a user record. + */ ++ (NSAppleEventDescriptor *)userRecordDescriptorWithDictionary:(NSDictionary *)dictionary; + +/*! + @method arrayValue + @abstract Returns an NSArray for a list descriptor. + @discussion Returns a NSArray if the receviers contains list descriptor with each element convert to an appropriate object as determined by the method -[NSAppleEventDescriptor objectValue]. If the recevier does not contain a list descriptor then an NSArray filled with garbage is returned. + @result A NSArray. + */ +- (NSArray *)arrayValue; + +/*! + @method dictionaryValueFromRecordDescriptor + @abstract Returns an NSDictionary for a record descriptor. + @discussion Returns a NSDictionary if the receviers is a record descriptor with each element convert to an appropriate object as determined by the method -[NSAppleEventDescriptor objectValue] and the key converted to a NSNumbers. If the recevier does not contain a record descriptor then the resut is undefined. + @result A NSDictionary. + */ +- (NSDictionary *)dictionaryValueFromRecordDescriptor; + +/*! + @method dictionaryValue + @abstract Returns an NSDictionary for a record descriptor. + @discussion Returns a NSDictionary if the receviers is a record descriptor with a list value for the key keyASUserRecordFields, this is how records from AppleScripts are represented. Each even numbered element of the list is converted in to an appropriate object as determined by the method -[NSAppleEventDescriptor objectValue] and each odd numbered element is used as the key and converted to a NSString. If the recevier is not a record descriptor that contains a list value for the key keyASUserRecordFields then the resut is undefined. + @result A NSDictionary with keys all of type NSString + */ +- (NSDictionary *)dictionaryValue; + +/*! + @method urlValue + @abstract Returns a NSURL for the recevier.. + @discussion Returns a file url NSURL for an alias descriptor. If the recevier does not contain an alias descriptor the nil is returned. Currently url descriptors are not handled. + @result A NSURL. + */ +- (NSURL *)urlValue; + +/*! + @method unsignedIntValue + @abstract Returns a unsigned int value for the recevier. + @discussion Returns a unsigned int value if the recevier contains a unsigned integer descriptor, otherwise it returns 0. + @result An unsigned int value. +*/ +- (unsigned int)unsignedIntValue; + +/*! + @method floatValue + @abstract Returns a float value for the recevier. + @discussion Returns a float value if the recevier contains a float descriptor, otherwise it returns 0. + @result An float value. +*/ +- (float)floatValue; + +/*! + @method doubleValue + @abstract Returns a double value for the recevier. + @discussion Returns a double value if the recevier contains a double descriptor, otherwise it returns 0. + @result An double value. +*/ +- (double)doubleValue; + +/*! + @method value + @abstract Returns a NSValue object for the recevier. + @discussion Returns a NSValue object for the recevier if it contains a any value or number type descriptor, otherwise it returns nil. For most values value is identical to numberValue. + @result An NSValue object. +*/ +- (NSValue *)value; + +/*! + @method numberValue + @abstract Returns a NSNumber object for the recevier. + @discussion Returns a NSNumber object for the recevier if it contains a any number type descriptor, otherwise it returns nil. + @result An NSNumber object. +*/ +- (NSNumber *)numberValue; + +/*! + @method objectValue + @abstract Returns a object for the recevier. + @discussion

Returns a subclass of NSObject by determining the type of the receviers descriptor and converting it into the appropriate instance of a Objective-C class.

+

Descriptor types are mapped to classes in the following ways. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Descriptor TypeObjective-C Class
typeNullNSNull
typeBoolean
+ typeShortInteger
+ typeSMInt
+ typeLongInteger
+ typeInteger
+ typeIEEE32BitFloatingPoint
+ typeShortFloat
+ typeSMFloat
+ typeIEEE64BitFloatingPoint
+ typeFloat
+ typeLongFloat
+ typeExtended
+ typeComp
+ typeMagnitude
+ typeTrue
+ typeFalse
NSNumber
typeCharNSString
typeAEListNSArray
typeAERecordNSDictionary
typeAlias
+ typeFileURL
NSULR
cScriptNDAppleScriptObject if available.
NSAppleEventDescriptor otherwise.
cEventIdentifierNSNumber
All Other TypesNSAppleEventDescriptor
+

+ @result A subclass of NSObject + */ +- (id)objectValue; + +@end + +/*! + @category NSAppleEventDescriptor(NDCompleteEvents) + @abstract Category of NSAppleEventDescriptor. + @discussion Adds methods for creating complete AppleEvents. + */ +@interface NSAppleEventDescriptor (NDCompleteEvents) + + + /*! + @method openEventDescriptorWithTargetDescriptor: + @abstract Get a NSAppleEventDescriptor for an open event. + @discussion Creates a NSAppleEventDescriptor for an open application event, kAEOpenApplication. + @param targetDescriptor an NSAppleEventDescriptor that identifies the target application for the Apple event. + @result A NSAppleEventDescriptor containing an open application event descriptor. + */ ++ (NSAppleEventDescriptor *)openEventDescriptorWithTargetDescriptor:(NSAppleEventDescriptor *)targetDescriptor; +/*! + @method openEventDescriptorWithTargetDescriptor:array: + @abstract Get a NSAppleEventDescriptor for an open event. + @discussion Creates a NSAppleEventDescriptor for an open document event, kAEOpenDocuments. The objects within array have to be NSString paths or file NSULRs, which are converted into typeAlias. + @param targetDescriptor an NSAppleEventDescriptor that identifies the target application for the Apple event. + @param array A NSArray of file url NSURLs and/or path NSStrings. + @result A NSAppleEventDescriptor containing an open application event or an open documents event descriptor. + */ ++ (NSAppleEventDescriptor *)openEventDescriptorWithTargetDescriptor:(NSAppleEventDescriptor *)targetDescriptor array:(NSArray *)array; +/*! + @method quitEventDescriptorWithTargetDescriptor: + @abstract Get a NSAppleEventDescriptor for a quit event. + @discussion Creates a NSAppleEventDescriptor for an quit event, kAEQuitApplication. + @param targetDescriptor an NSAppleEventDescriptor that identifies the target application for the Apple event. + @result A NSAppleEventDescriptor containing a quit event descriptor. + */ ++ (NSAppleEventDescriptor *)quitEventDescriptorWithTargetDescriptor:(NSAppleEventDescriptor *)targetDescriptor; +/*! + @method descriptorWithSubroutineName:argumentsListDescriptor: + @abstract Returns a NSAppleEventDescriptor for calling AppleScript routines. + @discussion AppleScript routines can be called by name, descriptorWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to do so. The routineName is the name of the routine to be called, AppleScript routines are case insensitive, routineName is converted to all lower case. + @param routineName The rountine name to be called. + @param param The parameters descriptors. + @result A NSAppleEventDescriptor + */ ++ (id)descriptorWithSubroutineName:(NSString *)routineName argumentsListDescriptor:(NSAppleEventDescriptor *)param; + +/*! + @method descriptorWithSubroutineName:argumentsArray: + @abstract Returns a NSAppleEventDescriptor for calling an AppleScript subroutine with positional arguments. + @discussion descriptorWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to call a AppleScript subroutine with positional arguments. AppleScript routines are case insensitive so routineName is converted to all lower case. + @param routineName The rountine name to be called. + @param paramArray A NSArray of Objective-C class that are converted into NSAppleEventDescriptor using the function descriptorWithObject:NSAppleEventDescriptor for a subroutine with positional arguments. + */ ++ (id)descriptorWithSubroutineName:(NSString *)routineName argumentsArray:(NSArray *)paramArray; + +/*! + @method descriptorWithSubroutineName:labels:argumentObjects:count: + @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. + @discussion

descriptorWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to call a AppleScript subroutine with labeled arguments. AppleScript routines are case insensitive so routineName is converted to all lower case. paramArray is an array of objective-C types that are converted into NSAppleEventDescriptor using the function descriptorWithObject:.

+

The possible keywords are; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key WordAppleScript key word
keyASPrepositionAboutabout
keyASPrepositionAboveabove
keyASPrepositionAgainstagainst
keyASPrepositionApartFromapart from
keyASPrepositionAroundaround
keyASPrepositionAsideFromaside from
keyASPrepositionAtat
keyASPrepositionBelowbelow
keyASPrepositionBeneathbeneath
keyASPrepositionBesidebeside
keyASPrepositionBetweenbetween
keyASPrepositionByby
keyASPrepositionForfor
keyASPrepositionFromfrom
keyASPrepositionGivengiven
keyASPrepositionInin
keyASPrepositionInsteadOfinstead of
keyASPrepositionIntointo
keyASPrepositionOnon
keyASPrepositionOntoonto
keyASPrepositionOutOfout of
keyASPrepositionOverover
keyASPrepositionSincesince
keyASPrepositionThroughthrough
keyASPrepositionThruthru
keyASPrepositionToto
keyASPrepositionUnderunder
keyASPrepositionUntiluntil
keyASPrepositionWithwith
keyASPrepositionWithoutwithout
keyASUserRecordFieldskey for a list descriptor of user record fields
+

+

To find out the rules for use of the key words see the AppleScript language documentation.

+ @param routineName The rountine name to be called. + @param labels A c array of keywords + @param objects A c array of Objective-C class that are converted into NSAppleEventDescriptor using the function descriptorWithObject:NSAppleEventDescriptor for a subroutine with labled arguments. + */ ++ (id)descriptorWithSubroutineName:(NSString *)routineName labels:(AEKeyword*)labels argumentObjects:(id *)objects count:(unsigned int)count; + +/*! + @method descriptorWithSubroutineName:labels:argumentDescriptors:count: + @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. + @discussion

descriptorWithSubroutineName:labels:argumentDescriptors:count: returns a NSAppleEventDescriptor to call a AppleScript subroutine with labeled arguments. AppleScript routines are case insensitive so routineName is converted to all lower case. If keyASUserRecordFields is used as a keyword then the NSAppleEventDescriptor should be a list descriptor alternating between keys and parameter begining with a key, as returned from one of the userRecordDescriptorWith... methods.

+

The possible keywords are; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key WordAppleScript key word
keyASPrepositionAboutabout
keyASPrepositionAboveabove
keyASPrepositionAgainstagainst
keyASPrepositionApartFromapart from
keyASPrepositionAroundaround
keyASPrepositionAsideFromaside from
keyASPrepositionAtat
keyASPrepositionBelowbelow
keyASPrepositionBeneathbeneath
keyASPrepositionBesidebeside
keyASPrepositionBetweenbetween
keyASPrepositionByby
keyASPrepositionForfor
keyASPrepositionFromfrom
keyASPrepositionGivengiven
keyASPrepositionInin
keyASPrepositionInsteadOfinstead of
keyASPrepositionIntointo
keyASPrepositionOnon
keyASPrepositionOntoonto
keyASPrepositionOutOfout of
keyASPrepositionOverover
keyASPrepositionSincesince
keyASPrepositionThroughthrough
keyASPrepositionThruthru
keyASPrepositionToto
keyASPrepositionUnderunder
keyASPrepositionUntiluntil
keyASPrepositionWithwith
keyASPrepositionWithoutwithout
keyASUserRecordFieldskey for a list descriptor of user record fields
+

+ To find out the rules for use of the key words see the AppleScript language documentation. + @param routineName The rountine name to be called. + @param labels A c array of keyword labels. + @param params A c array of NSAppleEventDescriptor for the parameters. + @param count The number of keywords and parameters. + @result A NSAppleEventDescriptor for a subroutine with labled arguments. + */ ++ (id)descriptorWithSubroutineName:(NSString *)routineName labels:(AEKeyword*)labels argumentDescriptors:(NSAppleEventDescriptor **)params count:(unsigned int)count; + +/*! + @method descriptorWithSubroutineName:labelsAndArguments:... + @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. + @discussion

descriptorWithSubroutineName:labelsAndArguments:... returns a NSAppleEventDescriptor to call a AppleScript subroutine with labeled arguments. AppleScript routines are case insensitive so routineName is converted to all lower case. If keyASPrepositionGiven is used as a keyword then the arguments following it are passed to the method userRecordDescriptorWithObjectAndKeys:. and resulting descriptor is given the key keyASUserRecordFields

+

For example to get a subroutine descriptor to call the AppleScript subroutine +

+
foo for arg1 given argument:arg2 
+
+ you would do the following +
+
theSubroutine = [NSAppleEventDescriptor descriptorWithSubroutineName:@"foo"
+				labelsAndArguments:keyASPrepositionFor, arg1,
+				keyASPrepositionGiven, arg2, @"argument", nil];
+
+ which is equivalent to +
+
theSubroutine = [NSAppleEventDescriptor descriptorWithSubroutineName:@"foo"
+				labelsAndArguments:keyASPrepositionFor, arg1, keyASUserRecordFields,
+				[NSAppleEventDescriptor userRecordDescriptorWithObjectAndKeys:arg2, @"argument", nil],
+				(AEKeyword)0];
+

+

The possible keywords are; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key WordAppleScript key word
keyASPrepositionAboutabout
keyASPrepositionAboveabove
keyASPrepositionAgainstagainst
keyASPrepositionApartFromapart from
keyASPrepositionAroundaround
keyASPrepositionAsideFromaside from
keyASPrepositionAtat
keyASPrepositionBelowbelow
keyASPrepositionBeneathbeneath
keyASPrepositionBesidebeside
keyASPrepositionBetweenbetween
keyASPrepositionByby
keyASPrepositionForfor
keyASPrepositionFromfrom
keyASPrepositionGivengiven
keyASPrepositionInin
keyASPrepositionInsteadOfinstead of
keyASPrepositionIntointo
keyASPrepositionOnon
keyASPrepositionOntoonto
keyASPrepositionOutOfout of
keyASPrepositionOverover
keyASPrepositionSincesince
keyASPrepositionThroughthrough
keyASPrepositionThruthru
keyASPrepositionToto
keyASPrepositionUnderunder
keyASPrepositionUntiluntil
keyASPrepositionWithwith
keyASPrepositionWithoutwithout
keyASUserRecordFieldskey for a list descriptor of user record fields
+

+

To find out the rules for use of the key words see the AppleScript language documentation.

+ @param routineName The subroutine name. + @param keyWord The first label of a list of labels and objects terminated with a 0 keyword or a nil if the end arguments follow the keyword keyASPrepositionGiven + @result A NSAppleEventDescriptor for a subroutine with labled arguments. + */ ++ (id)descriptorWithSubroutineName:(NSString *)routineName labelsAndArguments:(AEKeyword)keyWord, ...; + +/*! + @method initWithSubroutineName:argumentsDescriptor: + @abstract Initialises a NSAppleEventDescriptor for calling AppleScript routines. + @discussion AppleScript routines can be called by name, initWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to do so. The routineName is the name of the routine to be called, AppleScript routines are case insensitive, routineName is converted to all lower case. + @param routineName The rountine name to be called. + @param param The parameters descriptors. + @result A NSAppleEventDescriptor for a subroutine with positional arguments. + */ +- (id)initWithSubroutineName:(NSString *)routineName argumentsListDescriptor:(NSAppleEventDescriptor *)param; + +/*! + @method initWithSubroutineName:argumentsArray: + @abstract Initialises a NSAppleEventDescriptor for calling AppleScript routines. + @discussion AppleScript routines can be called by name, initWithSubroutineName:argumentsDescriptor: returns a NSAppleEventDescriptor to do so. The routineName is the name of the routine to be called, AppleScript routines are case insensitive, routineName is converted to all lower case. paramArray is an array of objective-C types that can be converted into AppleScript types. + @param routineName The rountine name to be called. + @param paramArray The parameters. + @result A NSAppleEventDescriptor for a subroutine with positional arguments. + */ +- (id)initWithSubroutineName:(NSString *)routineName argumentsArray:(NSArray *)paramArray; + +/*! + @method initWithSubroutineName:labels:argumentDescriptors:count: + @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. + @discussion

initWithSubroutineName:labels:argumentDescriptors:count: inirializes a NSAppleEventDescriptor with a AppleScript subroutine descriptors with labeled arguments. The keyword label keyASUserRecordFields must be for a list descriptor similar to that returned from the one of the userRecordDescriptorWithXXX: methods.

+

The possible keywords are; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key WordAppleScript key word
keyASPrepositionAboutabout
keyASPrepositionAboveabove
keyASPrepositionAgainstagainst
keyASPrepositionApartFromapart from
keyASPrepositionAroundaround
keyASPrepositionAsideFromaside from
keyASPrepositionAtat
keyASPrepositionBelowbelow
keyASPrepositionBeneathbeneath
keyASPrepositionBesidebeside
keyASPrepositionBetweenbetween
keyASPrepositionByby
keyASPrepositionForfor
keyASPrepositionFromfrom
keyASPrepositionGivengiven
keyASPrepositionInin
keyASPrepositionInsteadOfinstead of
keyASPrepositionIntointo
keyASPrepositionOnon
keyASPrepositionOntoonto
keyASPrepositionOutOfout of
keyASPrepositionOverover
keyASPrepositionSincesince
keyASPrepositionThroughthrough
keyASPrepositionThruthru
keyASPrepositionToto
keyASPrepositionUnderunder
keyASPrepositionUntiluntil
keyASPrepositionWithwith
keyASPrepositionWithoutwithout
keyASUserRecordFieldskey for a list descriptor of user record fields
+

+

To find out the rules for use of the key words see the AppleScript language documentation.

+ @param routineName The rountine name to be called. + @param labels A c array of AEKeywords. + @param param A c array of NSAppleEventDescriptors + @param count The number of keywords and NSAppleEventDescriptors + @result A NSAppleEventDescriptor for a subroutine with labeled arguments. + */ +- (id)initWithSubroutineName:(NSString *)routineName labels:(AEKeyword*)labels argumentDescriptors:(NSAppleEventDescriptor **)aParam count:(unsigned int)count; +/*! + @method initWithSubroutineName:labels:arguments:count: + @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. + @discussion

initWithSubroutineName:labels:arguments:count: initializes a NSAppleEventDescriptor with a AppleScript subroutine descriptor with labeled arguments. If the the keyword keyASPrepositionGiven is used it should be the last label and have a argument of kind NSDictionary or NSAppleEventDescriptor as return from one of the userRecordDescriptorWithXXXX:.

+

The possible keywords are; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key WordAppleScript key word
keyASPrepositionAboutabout
keyASPrepositionAboveabove
keyASPrepositionAgainstagainst
keyASPrepositionApartFromapart from
keyASPrepositionAroundaround
keyASPrepositionAsideFromaside from
keyASPrepositionAtat
keyASPrepositionBelowbelow
keyASPrepositionBeneathbeneath
keyASPrepositionBesidebeside
keyASPrepositionBetweenbetween
keyASPrepositionByby
keyASPrepositionForfor
keyASPrepositionFromfrom
keyASPrepositionGivengiven
keyASPrepositionInin
keyASPrepositionInsteadOfinstead of
keyASPrepositionIntointo
keyASPrepositionOnon
keyASPrepositionOntoonto
keyASPrepositionOutOfout of
keyASPrepositionOverover
keyASPrepositionSincesince
keyASPrepositionThroughthrough
keyASPrepositionThruthru
keyASPrepositionToto
keyASPrepositionUnderunder
keyASPrepositionUntiluntil
keyASPrepositionWithwith
keyASPrepositionWithoutwithout
keyASUserRecordFieldskey for a list descriptor of user record fields
+

+

To find out the rules for use of the key words see the AppleScript language documentation.

+ @param routineName The rountine name to be called. + @param labels A c array of keywords + @param objects A c array of objects that can be converted to NSAppleEventDescriptor with the method descriptorWithObject: + @param count The number of keywords and objects. + @result A NSAppleEventDescriptor for a subroutine with labeled arguments. + */ +- (id)initWithSubroutineName:(NSString *)routineName labels:(AEKeyword*)labels arguments:(id *)objects count:(unsigned int)count; + +/*! + @method initWithSubroutineName:labelsAndArguments:arguments: + @abstract Returns a NSAppleEventDescriptor for calling an AppleScript routine with labeled arguments. + @discussion

initWithSubroutineName:labelsAndArguments:arguments: initializes a NSAppleEventDescriptor with an AppleScript subroutine with labeled arguments, if the keyword keyASPrepositionGiven is found the remaining arguments will be passed to the method userRecordDescriptorWithObjectAndKeys:arguments: and the result is given the keyword keyASUserRecordFields.

+

The possible keywords are; +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key WordAppleScript key word
keyASPrepositionAboutabout
keyASPrepositionAboveabove
keyASPrepositionAgainstagainst
keyASPrepositionApartFromapart from
keyASPrepositionAroundaround
keyASPrepositionAsideFromaside from
keyASPrepositionAtat
keyASPrepositionBelowbelow
keyASPrepositionBeneathbeneath
keyASPrepositionBesidebeside
keyASPrepositionBetweenbetween
keyASPrepositionByby
keyASPrepositionForfor
keyASPrepositionFromfrom
keyASPrepositionGivengiven
keyASPrepositionInin
keyASPrepositionInsteadOfinstead of
keyASPrepositionIntointo
keyASPrepositionOnon
keyASPrepositionOntoonto
keyASPrepositionOutOfout of
keyASPrepositionOverover
keyASPrepositionSincesince
keyASPrepositionThroughthrough
keyASPrepositionThruthru
keyASPrepositionToto
keyASPrepositionUnderunder
keyASPrepositionUntiluntil
keyASPrepositionWithwith
keyASPrepositionWithoutwithout
keyASUserRecordFieldskey for a list descriptor of user record fields
+

+

To find out the rules for use of the key words see the AppleScript language documentation.

+

See descriptorWithSubroutineName:labelsAndArguments:... for more details

+ @param routineName The rountine name to be called. + @param label The first keyword of a list of labels and objects. + @param argList The argument list struct. + @result A NSAppleEventDescriptor for a subroutine with labeled arguments. + */ +- (id)initWithSubroutineName:(NSString *)routineName labelsAndArguments:(AEKeyword)label arguments:(va_list)argList; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleEventDescriptor_QSMods.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleEventDescriptor_QSMods.h new file mode 100644 index 0000000..3bd2383 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleEventDescriptor_QSMods.h @@ -0,0 +1,18 @@ +// +// NSAppleEventDescriptor+NDAppleScriptObject_QSMods.h +// Quicksilver +// +// Created by Alcor on 8/19/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + +#import "NSAppleEventDescriptor+NDAppleScriptObject.h" +@interface NSAppleEventDescriptor (NDAppleScriptObject_QSMods) + +//+ (NSAppleEventDescriptor *)targetDescriptorWithBundleID:(NSString *)bundleID; ++ (NSAppleEventDescriptor *)targetDescriptorWithTypeSignature:(OSType)type; +- (NSAppleEventDescriptor *)AESend; +- (NSAppleEventDescriptor *)AESendWithSendMode:(AESendMode)sendMode priority:(AESendPriority)sendPriority timeout:(long) timeOutInTicks; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleScript_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleScript_BLTRExtensions.h new file mode 100644 index 0000000..8a3aee6 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSAppleScript_BLTRExtensions.h @@ -0,0 +1,30 @@ +// +// NSAppleScript_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on Thu Aug 28 2003. +// Copyright (c) 2003 Blacktree. All rights reserved. +// + +#import + + +@interface NSAppleScript (Subroutine) +- (NSAppleEventDescriptor *)executeSubroutine:(NSString *)name arguments:(id)arguments error:(NSDictionary **)errorInfo; +- (BOOL)storeInFile:(NSString *)path; +@end + +@interface NSAppleScript (Constructors) ++ (NSAppleScript *)scriptWithContentsOfFile:(NSString *)path; ++ (NSAppleScript *)scriptWithContentsOfResource:(NSString *)path inBundle:(NSBundle *)bundle; +@end + + +@interface NSAppleEventDescriptor (CocoaConversion) ++ (NSAppleEventDescriptor *)descriptorWithObjectAPPLE:(id)object; +- (id)objectValueAPPLE; +@end + +@interface NSAppleScript (FilePeeking) ++ (NSArray *)validHandlersFromArray:(NSArray *)array inScriptFile:(NSString *)path; +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSApplication_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSApplication_BLTRExtensions.h new file mode 100644 index 0000000..f9b1442 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSApplication_BLTRExtensions.h @@ -0,0 +1,57 @@ +// +// NSApplication_Extensions.h +// Daedalus +// +// Created by Alcor on Thu May 01 2003. +// Copyright (c) 2003 Blacktree, Inc. All rights reserved. +// + +#import + +#define QSApplicationWillRelaunchNotification @"QSApplicationWillRelaunchNotification" +@interface NSApplication (Info) +- (BOOL)wasLaunchedAtLogin; +- (NSString *)versionString; +- (int)featureLevel; +- (NSDictionary *)processInformation; +- (NSDictionary *)parentProcessInformation; +@end + +@interface NSApplication (Focus) +- (BOOL) stealKeyFocus; +- (BOOL) releaseKeyFocus; +@end + + +@interface NSApplication (Relaunching) +-(IBAction)relaunch:(id)sender; +- (void)requestRelaunch:(id)sender; +-(void)relaunchFromPath:(NSString *)path; +-(void)relaunchAfterMovingFromPath:(NSString *)newPath; +-(void)relaunchAtPath:(NSString *)launchPath movedFromPath:(NSString *)newPath; +-(void)replaceWithUpdateFromPath:(NSString *)newPath; +@end + +@interface NSApplication (LSUIElementManipulation) +-(BOOL)shouldBeUIElement; +-(BOOL)setShouldBeUIElement:(BOOL)hidden; +@end + + +typedef enum { + QSApplicationNormalLaunch = 0, + QSApplicationUpgradedLaunch = 1, + QSApplicationDowngradedLaunch = -1, + QSApplicationFirstLaunch = 2 +} QSApplicationLaunchStatusFlags; + +#define kLastUsedVersion @"Last Used Version" +#define kLastUsedLocation @"Last Used Location" + +@interface NSApplication (LaunchStatus) +-(int)checkLaunchStatus; +-(void)updateLaunchStatusInfo; +@end + + + diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSArray_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSArray_BLTRExtensions.h new file mode 100644 index 0000000..66b754f --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSArray_BLTRExtensions.h @@ -0,0 +1,43 @@ +// +// NSArray_Extensions.h +// Quicksilver +// +// Created by Alcor on Fri Apr 04 2003. +// Copyright (c) 2003 Blacktree, Inc. All rights reserved. +// + +#import + +@interface NSArray (IndexSet) +- (NSArray *)objectsAtIndexes:(NSIndexSet *)indexes; +@end + +@interface NSObject (BLTRArrayPerform) ++ (NSMutableArray *)performSelector:(SEL)aSelector onObjectsInArray:(id)array returnValues:(BOOL)flag; +- (NSMutableArray *)performSelector:(SEL)aSelector onObjectsInArray:(id)array returnValues:(BOOL)flag; +- (NSMutableArray *)performSelector:(SEL)aSelector onObjectsInArray:(id)array; + +@end + +@interface NSArray (Transformation) + +- (NSString *)componentsJoinedByStrings:(NSArray *)strings; +- (id)head; +- (NSArray *)tail; + +- (NSArray *)arrayByPerformingSelector:(SEL)aSelector; +- (NSArray *)arrayByPerformingSelector:(SEL)aSelector withObject:(id)object; +- (id)objectWithValue:(id)value forKey:(NSString *)key; +@end + + +@interface NSMutableArray (Moving) +- (void)moveIndex:(int)fromIndex toIndex:(int)toIndex; +- (void)insertObjectsFromArray:(NSArray *)array atIndex:(unsigned)index; +@end + + +@interface NSMutableArray (Reverse) +- (void)reverse; +@end + diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSBezierPath_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSBezierPath_BLTRExtensions.h new file mode 100644 index 0000000..9830d2c --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSBezierPath_BLTRExtensions.h @@ -0,0 +1,14 @@ +// +// NSString_CompletionExtensions.h +// Quicksilver +// +// Created by Alcor on Mon Mar 03 2003. +// Copyright (c) 2003 Blacktree, Inc. All rights reserved. +// + +#import + +@interface NSBezierPath(RoundRect) +- (void) appendBezierPathWithRoundedRectangle:(NSRect)aRect withRadius:(float) radius; +- (void) appendBezierPathWithRoundedRectangle:(NSRect)aRect withRadius:(float) radius indent:(int)indent; +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSBundle_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSBundle_BLTRExtensions.h new file mode 100644 index 0000000..a35df7b --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSBundle_BLTRExtensions.h @@ -0,0 +1,17 @@ +// +// NSBundle_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on Sun Jun 13 2004. +// Copyright (c) 2004 Blacktree. All rights reserved. +// + +#import + +@interface NSBundle (BLTRExtensions) +- (id)imageNamed:(NSString *)name; + +- (NSString *)safeLocalizedStringForKey:(NSString *)key value:(NSString *)value table:(NSString *)tableName; +//Localized string lookup that falls back on English. + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSColor_QSModifications.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSColor_QSModifications.h new file mode 100644 index 0000000..7c25c4e --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSColor_QSModifications.h @@ -0,0 +1,23 @@ +// +// NSColor_QSModifications.h +// Quicksilver +// +// Created by Alcor on Fri Mar 19 2004. +// Copyright (c) 2004 Blacktree, Inc.. All rights reserved. +// + +#import + + +@interface NSDrawerFrame : NSView +@end + + +@interface NSColor (Contrast) +-(NSColor *)colorWithLighting:(float)light; +-(NSColor *)colorWithLighting:(float)light plasticity:(float)plastic; + -(NSColor *)readableTextColor; + ++ (NSColor *)accentColor; ++ (void)setAccentColor:(NSColor *)color; +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSCursor_InformExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSCursor_InformExtensions.h new file mode 100644 index 0000000..46339a1 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSCursor_InformExtensions.h @@ -0,0 +1,15 @@ +// +// NSCursor_InformExtensions.h +// Quicksilver +// +// Created by Alcor on Thu May 06 2004. +// Copyright (c) 2004 Blacktree. All rights reserved. +// + +#import + + +@interface NSCursor (InformExtensions) ++ informativeCursorWithString:(NSString *)string; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSData_RangeExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSData_RangeExtensions.h new file mode 100644 index 0000000..0fe9657 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSData_RangeExtensions.h @@ -0,0 +1,14 @@ +// +// NSData_RangeExtensions.h +// Quicksilver +// +// Created by Alcor on 7/30/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + + +@interface NSData (RangeExtensions) +- (unsigned)offsetOfData:(NSData *)data; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSEvent+BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSEvent+BLTRExtensions.h new file mode 100644 index 0000000..5b5e4da --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSEvent+BLTRExtensions.h @@ -0,0 +1,26 @@ +/* + * NSEvent+BLTRExtensions.h + * Quicksilver + * + * Created by Alcor on 9/3/04. + * Copyright 2004 Blacktree. All rights reserved. + * + */ + +#include + + +#define NSProcessNotificationEvent 21 + +#define NSFrontProcessSwitched 2 +#define NSProcessWillLaunchSubType 4 +#define NSProcessDidTerminateSubType 8 +#define NSProcessDidLaunchSubType 512 +#define NSProccessFocusedSubType -3838 +#define NSProccessBouncedSubType -3839 + + +@interface NSEvent (BLTRExtensions) ++ (NSTimeInterval)doubleClickTime; +- (int)standardModifierFlags; +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSException_TraceExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSException_TraceExtensions.h new file mode 100644 index 0000000..fc5d0cb --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSException_TraceExtensions.h @@ -0,0 +1,14 @@ +// +// NSException_TraceExtensions.h +// Quicksilver +// +// Created by Alcor on 7/20/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + + +@interface NSException (Tracing) +- (void)printStackTrace; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSFileManager_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSFileManager_BLTRExtensions.h new file mode 100644 index 0000000..e41f509 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSFileManager_BLTRExtensions.h @@ -0,0 +1,37 @@ +// +// NSFileManager_CarbonExtensions.h +// Quicksilver +// +// Created by Alcor on Thu Apr 03 2003. +// Copyright (c) 2003 Blacktree, Inc. All rights reserved. +// + +#import +NSString *QSUTIOfFile(NSString *path); +NSString *QSUTIWithLSInfoRec(NSString *path,LSItemInfoRecord *infoRec); + +@interface NSFileManager (Carbon) +- (bool) isVisible:(NSString *)chem; +- (BOOL)movePathToTrash:(NSString *)filepath; + +@end + +@interface NSFileManager (Scanning) +- (NSString *)resolveAliasAtPath:(NSString *)aliasFullPath; +- (NSString *)resolveAliasAtPathWithUI:(NSString *)aliasFullPath; +- (NSString *)typeOfFile:(NSString *)path; +- (NSArray *) itemsForPath:(NSString *)path depth:(int)depth types:(NSArray *)types; +- (NSDate *) modifiedDate:(NSString *)path depth:(int)depth; +- (NSDate *)pastOnlyModifiedDate:(NSString *)path; +- (NSDate *)path:(NSString *)path wasModifiedAfter:(NSDate *)date depth:(int)depth; +- (NSString *)fullyResolvedPathForPath:(NSString *)sourcePath; +- (NSString *)UTIOfFile:(NSString *)path; +@end + +@interface NSFileManager (BLTRExtensions) +- (int)defaultDragOperationForMovingPaths:(NSArray *)sources toDestination:(NSString *)destination; + +- (BOOL)createDirectoriesForPath:(NSString *)path; +- (BOOL)filesExistAtPaths:(NSArray *)paths; +- (NSDictionary *)conflictsForFiles:(NSArray *)files inDestination:(NSString *)destination; +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSGeometry_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSGeometry_BLTRExtensions.h new file mode 100644 index 0000000..6a05f8d --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSGeometry_BLTRExtensions.h @@ -0,0 +1,44 @@ +// +// NSGeometry_Extensions.h +// +// +// Created by Alcor on Thu Nov 28 2002. +// Copyright (c) 2002 Blacktree, Inc. All rights reserved. +// + +#import + + +typedef struct _BTFloatRange { + float value; + float location; + float length; +} BTFloatRange; + + +BTFloatRange BTMakeFloatRange(float value,float location,float length); +float BTFloatRangeMod(BTFloatRange range); +float BTFloatRangeUnit(BTFloatRange range); +NSPoint rectOffset(NSRect innerRect,NSRect outerRect,int quadrant); + + +NSRect rectZoom(NSRect rect,float zoom,int quadrant); + +NSRect sizeRectInRect(NSRect innerRect,NSRect outerRect,bool expand); +NSPoint offsetPoint(NSPoint fromPoint, NSPoint toPoint); +NSRect fitRectInRect(NSRect innerRect,NSRect outerRect,bool expand); +NSRect centerRectInRect(NSRect rect, NSRect mainRect); +NSRect rectFromSize(NSSize size); +NSRect rectWithProportion(NSRect innerRect,float proportion,bool expand); + +NSRect constrainRectToRect(NSRect innerRect, NSRect outerRect); +NSRect alignRectInRect(NSRect innerRect,NSRect outerRect,int quadrant); +NSRect expelRectFromRect(NSRect innerRect, NSRect outerRect,float peek); +NSRect expelRectFromRectOnEdge(NSRect innerRect, NSRect outerRect,NSRectEdge edge,float peek); + + NSRectEdge touchingEdgeForRectInRect(NSRect innerRect, NSRect outerRect); +int closestCorner(NSRect innerRect,NSRect outerRect); +int oppositeQuadrant(int quadrant); + +NSRect blendRects(NSRect start, NSRect end,float b); +void logRect(NSRect rect); \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSImage_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSImage_BLTRExtensions.h new file mode 100644 index 0000000..ebfdb1b --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSImage_BLTRExtensions.h @@ -0,0 +1,49 @@ +// +// NSImage_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on Thu Apr 24 2003. +// Copyright (c) 2003 Blacktree, Inc. All rights reserved. +// + +#import +@class CIImage; +@class CIFilter; + +#define QSSize16 NSMakeSize(16,16) +#define QSSize32 NSMakeSize(32,32) +#define QSSize48 NSMakeSize(48,48) +#define QSSize128 NSMakeSize(128,128) +#define QSSize256 NSMakeSize(256,256) + + +@interface NSImage (Dragging) + +- (NSImage *)imageWithAlphaComponent:(float)alpha; + +@end + +@interface NSImage (Scaling) + ++ (NSImage *)imageWithCIFilter:(CIFilter *)filter; ++ (NSImage *)imageWithCIImage:(CIImage *)ciimage; +- (NSImage *)imageByAdjustingHue:(float)hue; +- (NSImage *)imageByAdjustingHue:(float)hue saturation:(float)saturation; +- (NSImageRep *)representationOfSize:(NSSize)theSize; +- (NSImageRep *)bestRepresentationForSize:(NSSize)theSize; +- (BOOL)createRepresentationOfSize:(NSSize)newSize; +- (BOOL)shrinkToSize:(NSSize)newSize; +- (BOOL)createIconRepresentations; +- (void)removeRepresentationsLargerThanSize:(NSSize)size; +- (BOOL)shrinkToSize:(NSSize)newSize; +- (NSImage *)duplicateOfSize:(NSSize)newSize; +@end + +@interface NSImage (Trim) +-(NSRect)usedRect; +- (NSImage *)scaleImageToSize:(NSSize)newSize trim:(BOOL)trim expand:(BOOL)expand scaleUp:(BOOL)scaleUp; +@end + +@interface NSImage (Average) +-(NSColor *)averageColor; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSObject+ReaperExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSObject+ReaperExtensions.h new file mode 100644 index 0000000..1262312 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSObject+ReaperExtensions.h @@ -0,0 +1,15 @@ +// +// NSObject+ReaperExtensions.h +// Quicksilver +// +// Created by Alcor on 9/13/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + +#define QSDefaultReapInterval 600.0f + +@interface NSObject (QSDelayedPerforming) +- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay extend:(BOOL)extend; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSPasteboard_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSPasteboard_BLTRExtensions.h new file mode 100644 index 0000000..17ac1b0 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSPasteboard_BLTRExtensions.h @@ -0,0 +1,13 @@ +// +// NSPasteboard_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on Sun Nov 09 2003. +// Copyright (c) 2003 Blacktree, Inc.. All rights reserved. +// + +void QSForcePaste(); + +@interface NSPasteboard (Clippings) ++ (NSPasteboard *)pasteboardByFilteringClipping:(NSString *)pacg; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSScreen_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSScreen_BLTRExtensions.h new file mode 100644 index 0000000..c375e08 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSScreen_BLTRExtensions.h @@ -0,0 +1,16 @@ +// +// NSScreen_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on 12/19/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + +@interface NSScreen (BLTRExtensions) +-(int)screenNumber; +-(NSString *)deviceName; ++(NSScreen *)screenWithNumber:(int)number; +-(BOOL)usesOpenGLAcceleration; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSStatusItem_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSStatusItem_BLTRExtensions.h new file mode 100644 index 0000000..fddfa81 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSStatusItem_BLTRExtensions.h @@ -0,0 +1,27 @@ +// +// NSStatusItem_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on 12/11/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + +/* Window ordering mode. */ +enum { + NSLeftStatusItemPriority = 0, // Status item is to left of others + NSNormalStatusItemPriority = 1000, // Status item ordered normally + NSRightStatusItemPriority = 8001, // Status item is to right of others + NSFarRightStatusItemPriority = INT_MAX // Status item is to right of menu extras +}; + + + +@interface NSStatusBar (Priority) +- (id)_statusItemWithLength:(float)length withPriority:(int)priority; +@end + +@interface NSStatusItem (Priority) +- (int)priority; +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSString+NDCarbonUtilities.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSString+NDCarbonUtilities.h new file mode 100644 index 0000000..4c6ac22 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSString+NDCarbonUtilities.h @@ -0,0 +1,95 @@ +/*! + @header NSString+NDCarbonUtilities + @abstract Decalres the category NSString (NDCarbonUtilities) + @discussion Provides method for interacting with Carbon APIs. + + Created by Nathan Day on Sat Aug 03 2002. + Copyright © 2002 Nathan Day. All rights reserved. + */ + +#import +#import + +/*! + @category NSString(NDCarbonUtilitiesPaths) + @abstract Provides method for interacting with Carbon APIs. + @discussion Methods for dealing with FSRef’s and pascal string as well as making some other core foundation methods accessable in Objective-C syntax. + */ +@interface NSString (NDCarbonUtilitiesPaths) + +/*! + @method stringWithFSRef: + @abstract Alloc and initialize an NSString. + @discussion Creats a NSString containing a POSIX style path from a FSRef + @param fsRef a pointer to a FSRef. + @result A NSString containing a POSIX path. + */ ++ (NSString *)stringWithFSRef:(const FSRef *)fsRef; +/*! + @method getFSRef: + @abstract Get a FSRef for a path NSString. + @discussion Initializes an FSRef for a POSIX style path NSString. + @param fsRef a pointer to a FSRef. + @result Return YES if the method was successful, if the function returns NO then the FSRef pointed to by fsRef is garbage. + */ +- (BOOL)getFSRef:(FSRef *)fsRef; + +/*! + @method getFSSpec: + @abstract Get a FSSpec. + @discussion Obtain a FSSpec for a POSIX path. + @param fsSpec A pointer to a FSSpec struct, to be filled by the method. + @result Returns YES if successful, if the method returns NO then fsSpec contains garbage. + */ +- (BOOL)getFSSpec:(FSSpec *)fsSpec; + +/*! + @method fileSystemPathHFSStyle + @abstract Returns a HFS style path. + @discussion Returns a NSString containg a HFS style path (e.g. Macitosh HD:Users:) useful for display purposes. + @result A new NSString containing a HFS style path for the same file or directory as the receiver. + */ +- (NSString *)fileSystemPathHFSStyle; +/*! + @method pathFromFileSystemPathHFSStyle + @abstract Get a path from a HFS style path. + @discussion pathFromFileSystemPathHFSStyle returns a POSIX style path from a HFS style path. + @result A NSString containing a POSIX style path. + */ +- (NSString *)pathFromFileSystemPathHFSStyle; +/*! + @method resolveAliasFile + @abstract Resolve an alias file. + @discussion Returns an POSIX path NSString refered to by the receveive if the receveive refers to an alias file. If it does not refer to an alias file the a string identical to the receveive is returned. + @result An POSIX path NSString. + */ +- (NSString *)resolveAliasFile; + +/*! + @method stringWithPascalString: + @abstract Alloc and initialize an NSString. + @discussion Reurns a new NSString equivelent to the passed in pascal string. + @param pStr A pascal string of type ConstStr255Param. + @result A NSString. + */ ++ (NSString *)stringWithPascalString:(ConstStr255Param)pStr; + +/*! + @method pascalString:length: + @abstract Obtain a pascal string equivelent to the receveiver. + @discussion Fill the StringPtr with a pascal string equivelent to the receveiver. + @param buffer A StringPtr that contains the pascal string on completion. + @param length The maximum length the string can be. Pascal string can be no longer than 255 bytes long, 256 if you include the first length byte. + @result Returns YES if the method was successful, if NO is returns then buffer contains garbage. + */ +- (BOOL)pascalString:(StringPtr)buffer length:(short)length; + +/*! + @method trimWhitespace + @abstract Trims white space from a NSString. + @discussion Returns a new NSString equivelent to the receveiver but without any white space (return, new line, space, tab) at the begining or end of the string. + @result A new NSString. + */ +- (NSString *)trimWhitespace; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSString+NDUtilities.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSString+NDUtilities.h new file mode 100644 index 0000000..2a5df3e --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSString+NDUtilities.h @@ -0,0 +1,337 @@ +/*! + @header NSString+NDUtilities.h + @abstract Defines the category NSString+NDUtilities + @discussion Additonal useful methods for NSString, that can be used in general situations. + + Created by Nathan Day on Sun Dec 14 2003. + Copyright © 2003 Nathan Day. All rights reserved. + */ + +#import + +/*! + @category NSString(NDUtilities) + @abstract Addition methods for NSString + @discussion Additonal useful methods for NSString, that can be used in general situations. see also NSString(NDContainsCharacterExtension), NSString(NDPathExtensions) and NSString(CarbonUtilitiesPaths). + */ +@interface NSString (NDUtilities) + +/*! + @method stringWithNonLossyASCIIString: + @abstract Create a NSString. + @discussion Creates a NSString from NSNonLossyASCIIStringEncoding encoding, a 7-bit verbose ASCII to represent all Unicode characters + @param ASCIIString A 7 bit ASCII string in NSNonLossyASCIIStringEncoding encoding. + @result A new NSString + */ ++ (id)stringWithNonLossyASCIIString:(const char *)ASCIIString; + +/*! + @method stringWithFormat:arguments: + @abstract Create a NSString. + @discussion Creates a new string object, using format as a template into which the following argList values are substituted. Raises an NSInvalidArgumentException if format is nil. + @param format The template string. + @param argList The arguments to be inserted into format + @result A new NSString + */ ++ (id)stringWithFormat:(NSString *)format arguments:(va_list)argList; + +/*! + @method initWithNonLossyASCIIString: + @abstract Intialise a NSString. + @discussion Initialises a NSString from NSNonLossyASCIIStringEncoding encoding, a 7-bit verbose ASCII to represent all Unicode characters. + @param ASCIIString A 7 bit ASCII string in NSNonLossyASCIIStringEncoding encoding. + @result A initialised NSString. + */ +- (id)initWithNonLossyASCIIString:(const char *)ASCIIString; + +/*! + @method nonLossyASCIIString + @abstract Get a 7 bit ASCII representation of a NSString containing Unicode characters. + @discussion Returns a c string using NSNonLossyASCIIStringEncoding encoding, a 7-bit verbose ASCII to represent all Unicode characters. The returned C string will be automatically freed just as a returned object would be released; your code should copy the C string, if it needs to store the C string outside of the autorelease context in which the C string is created. + @result A c string with NSNonLossyASCIIStringEncoding encoding. + */ +- (const char *)nonLossyASCIIString; + +/*! + @method isCaseInsensitiveEqualToString: + @abstract Test if a string is case insensitive equivelent. + @discussion Returns YES if string is case insensitive equivalent to the receiver (if they have the same id or if they are NSOrderedSame in a litereral, case insensitive comparison), NO otherwise. . + @param string The string to compare with. + @result Returns YES string are equivelent NO. + */ +- (BOOL)isCaseInsensitiveEqualToString:(NSString *)string; + +/*! + @method hasCaseInsensitivePrefix: + @abstract Test prefix. + @discussion Returns YES if string case insensitive matches the beginning characters of the receiver, NO otherwise. Returns NO if string is the nil string or empty. This method is a convenience for comparing strings using the NSAnchoredSearch option. See "Strings" for more information. + @param string The string to check for. + @result Returns YES if has case insensitive prefix string. + */ +- (BOOL)hasCaseInsensitivePrefix:(NSString *)string; + +/*! + @method hasCaseInsensitiveSuffix: + @abstract Test suffix. + @discussion Returns YES if string case insensitive matches the ending characters of the receiver, NONOstring is the nil string or empty. This method is a convenience for comparing strings using the NSAnchoredSearch and NSBackwardsSearch options. See "Strings" for more information. + @param string The string to check for. + @result Returns YES if has case insensitive suffix string. + */ +- (BOOL)hasCaseInsensitiveSuffix:(NSString *)string; + +/*! + @method containsString: + @abstract Test if a string contains a substring. + @discussion Invokes containsString:options: with no options. Raises an NSInvalidArgumentException if string is nil. + @param subString The string to search for. + @result Returns YES if substring found otherwise NO. + */ +- (BOOL)containsString:(NSString *)subString; + +/*! + @method containsString:options: + @abstract Test if a string contains a substring. + @discussion Invokes containsString:options:range: with the options specified by mask and the entire extent of the receiver as the range. Raises an NSInvalidArgumentException if any of the arguments are nil. + @param subString The string to search for. + @param mask Mask values determining how to search. + @result Returns YES if substring found otherwise NO. + */ +- (BOOL)containsString:(NSString *)subString options:(unsigned)mask; + +/*! + @method containsString:options:range: + @abstract Test if a string contains a substring. + @discussion Returns YES if subString occurs within range in the receiver. If subString isn't found, returns a NO. The following options may be specified in mask by combining them with the C bitwise OR operator: +
+ + + + + +
Search OptionEffect
NSCaseInsensitiveSearchIgnores case distinctions among characters.
NSLiteralSearchPerforms a byte-for-byte comparison. Differing literal sequences (such as composed character sequences) that would otherwise be considered equivalent are considered not to match. Using this option can speed some operations dramatically.
NSBackwardsSearchPerforms searching from the end of the range toward the beginning.
NSAnchoredSearchPerforms searching only on characters at the beginning or end of the range. No match at the beginning or end means nothing is found, even if a matching sequence of characters occurs elsewhere in the string.
+ + Raises an NSRangeException if any part of range lies beyond the end of the string. + @param subString The string to search for. + @param mask Mask values determining how to search. + @param range The range within the string to search. + @result Returns YES if substring found otherwise NO. + */ + +- (BOOL)containsString:(NSString *)subString options:(unsigned)mask range:(NSRange)range; + +/*! + @method indexOfCharacter:range: + @abstract Get the index of a character. + @discussion Returns the index of the first occurance of the character character within the range range, if the receiver does not contain the character within the range then NSNotFound is return. + @param character The character to look for. + @param range The range to limit the search to. + @result Returns the index of the character or NSNotFound if not found. + */ +- (unsigned int)indexOfCharacter:(unichar)character range:(NSRange)range; + + +/*! + @method indexOfCharacter: + @abstract Get the index of a character. + @discussion Returns the index of the first occurance of the character character, if the receiver does not contain the character then NSNotFound is return. + @param character The character to look for. + @result Returns the index of the character or NSNotFound if not found. + */ +- (unsigned int)indexOfCharacter:(unichar)character; + +/*! + @method containsCharacter: + @abstract Test if a string contains a character. + @discussion Returns YES if the receiver contains the character character, otherwise returns NO. + @param character The character to look for. + @result Returns YES if the receiver contains the character. + */ +- (BOOL)containsCharacter:(unichar)character; + +/*! + @method containsCharacter:range: + @abstract Test if a string contains a character. + @discussion Returns YES if the receiver contains the character character within the range range, otherwise returns NO. + @param character The character to look for. + @param range The range to limit the search to. + @result Returns YES if the receiver contains the character. + */ +- (BOOL)containsCharacter:(unichar)character range:(NSRange)range; + +/*! + @method containsAnyCharacterFromSet: + @abstract Test if a string contains a character from a set. + @discussion Returns YES if the receiver contains any character within set, otherwise returns NO. + @param set The set of characters to look for. + @result Returns YES if the receiver contains any of the characters. + */ +- (BOOL)containsAnyCharacterFromSet:(NSCharacterSet *)set; + +/*! + @method containsAnyCharacterFromSet:options: + @abstract Test if a string contains a character from a set. + @discussion Returns YES if the receiver contains any character within set within the range range, otherwise returns NO. The following options may be specified in mask by combining them with the C bitwise OR operator: +
+ + + + + + + + + + + + + + + + +
Search OptionEffect
NSCaseInsensitiveSearchIgnores case distinctions among characters.
NSLiteralSearchPerforms a byte-for-byte comparison. Differing literal sequences (such as composed character sequences) that would otherwise be considered equivalent are considered not to match. Using this option can speed some operations dramatically.
NSBackwardsSearchPerforms searching from the end of the range toward the beginning.
+ See "Strings" for details on these options. Raises an NSInvalidArgumentException if any of the arguments are nil. + @param set The set of characters to look for. + @param mask Mask values determining how to search. + @result Returns YES if the receiver contains any of the characters. + */ +- (BOOL)containsAnyCharacterFromSet:(NSCharacterSet *)set options:(unsigned int)mask; + +/*! + @method containsAnyCharacterFromSet:options:range + @abstract Test if a string contains a character from a set. + @discussion Returns YES if the receiver contains any character within set within the range range, otherwise returns NO. The following options may be specified in mask by combining them with the C bitwise OR operator: +
+ + + + + + + + + + + + + + + + +
Search OptionEffect
NSCaseInsensitiveSearchIgnores case distinctions among characters.
NSLiteralSearchPerforms a byte-for-byte comparison. Differing literal sequences (such as composed character sequences) that would otherwise be considered equivalent are considered not to match. Using this option can speed some operations dramatically.
NSBackwardsSearchPerforms searching from the end of the range toward the beginning.
+ See "Strings" for details on these options. Raises an NSInvalidArgumentException if any of the arguments are nil. Raises an NSRangeException if any part of range lies beyond the end of the string. + @param set The set of characters to look for. + @param mask Mask values determining how to search. + @param range The range to limit the search to. + @result Returns YES if the receiver contains any of the characters. + */ +- (BOOL)containsAnyCharacterFromSet:(NSCharacterSet *)set options:(unsigned int)mask range:(NSRange)range; + +/*! + @method containsOnlyCharactersFromSet: + @abstract Test if a string contains only the characters from a set. + @discussion Returns YES if the receiver contains only characters in set within set, otherwise returns NO. + @param set The set of characters to look for. + @result Returns YES if the receiver contains only the characters. + */ +- (BOOL)containsOnlyCharactersFromSet:(NSCharacterSet *)set; + +/*! + @method containsOnlyCharactersFromSet:options: + @abstract Test if a string contains only the characters from a set. + @discussion Returns YES if the receiver contains only character from set, otherwise returns NO. The following options may be specified in mask by combining them with the C bitwise OR operator: +
+ + + + + + + + + + + + + + + + +
Search OptionEffect
NSCaseInsensitiveSearchIgnores case distinctions among characters.
NSLiteralSearchPerforms a byte-for-byte comparison. Differing literal sequences (such as composed character sequences) that would otherwise be considered equivalent are considered not to match. Using this option can speed some operations dramatically.
NSBackwardsSearchPerforms searching from the end of the range toward the beginning.
+ See "Strings" for details on these options. Raises an NSInvalidArgumentException if any of the arguments are nil. Raises an NSRangeException if any part of range lies beyond the end of the string. + @param set The set of characters to look for. + @param mask Mask values determining how to search. + @result Returns YES if the receiver contains only the characters. + */ +- (BOOL)containsOnlyCharactersFromSet:(NSCharacterSet *)set options:(unsigned int)mask; + +/*! + @method containsOnlyCharactersFromSet:options:range: + @abstract Test if a string contains only the characters from a set. + @discussion Returns YES if the receiver contains only character from set within the range range, otherwise returns NO. The following options may be specified in mask by combining them with the C bitwise OR operator: +
+ + + + + + + + + + + + + + + + +
Search OptionEffect
NSCaseInsensitiveSearchIgnores case distinctions among characters.
NSLiteralSearchPerforms a byte-for-byte comparison. Differing literal sequences (such as composed character sequences) that would otherwise be considered equivalent are considered not to match. Using this option can speed some operations dramatically.
NSBackwardsSearchPerforms searching from the end of the range toward the beginning.
+ See "Strings" for details on these options. Raises an NSInvalidArgumentException if any of the arguments are nil. Raises an NSRangeException if any part of range lies beyond the end of the string. + @param set The set of characters to look for. + @param mask Mask values determining how to search. + @param range The range to limit the search to. + @result Returns YES if the receiver contains only the characters. + */ +- (BOOL)containsOnlyCharactersFromSet:(NSCharacterSet *)set options:(unsigned int)mask range:(NSRange)range; + + +/*! + @method componentsSeparatedByString:withOpeningQuote:closingQuote:singleQuote: + @abstract Get an array of string componets. + @discussion Returns an NSArray containing substrings from the receiver that have been divided by separator. The substrings in the array appear in the order they did in the receiver. + @param separator The delimeter used to seperate the strings. + @param openingQuote The string used to begin a quoted component, a component where the delimiter is ignored. + @param closingQuote The string used to end a quoted component, a component where the delimiter is ignored. + @param singleQuote The string used to quote a single character. + @param flag Set to true if empty string are wanted. + @result A NSArray of components. + */ +- (NSArray *)componentsSeparatedByString:(NSString *)separator withOpeningQuote:(NSString *)openingQuote closingQuote:(NSString *)closingQuote singleQuote:(NSString *)singleQuote includeEmptyComponents:(BOOL)flag; + +@end + + +/*! + @category NSMutableString(NDUtilities) + @abstract Addition methods for NSString + @discussion Additonal useful methods for NSMutableString, that can be used in general situations. + */ +@interface NSMutableString (NDUtilities) + +/*! + @method prependString: + @abstract Prepend a string. + @discussion Adds the characters of string to the beginning of the receiver. string may not be nil. + @param string The string to append. + */ +- (void)prependString:(NSString *)string; + +/*! + @method prependFormat: + @abstract Prepend a string format. + @discussion Adds a constructed string to the beginning of the receiver. Creates the new string using NSString's stringWithFormat: method with the arguments listed. Raises an NSInvalidArgumentException if format is nil. + @param format The format string to append, followed by values to insert. + */ +- (void)prependFormat:(NSString *)format, ...; + +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSString_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSString_BLTRExtensions.h new file mode 100644 index 0000000..6388fa2 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSString_BLTRExtensions.h @@ -0,0 +1,76 @@ +// +// NSString_CompletionExtensions.h +// Quicksilver +// +// Created by Alcor on Mon Mar 03 2003. +// Copyright (c) 2003 Blacktree, Inc. All rights reserved. +// + +#import + +NSAttributedString * highlightString(NSString *string,NSString *keyString); + +NSComparisonResult prefixCompare(NSString *aString, NSString *bString); + +@interface NSString (Abbreviation) +- (float) scoreForString:(NSString *)string; + +- (NSArray *) hitsForString:(NSString *)testString; + +- (float) scoreForAbbreviation:(NSString *)abbreviation; +- (float) oldScoreForAbbreviation:(NSString *)abbreviation; +- (float) scoreForAbbreviation:(NSString *)abbreviation hitMask:(NSMutableIndexSet *)mask; +- (float) oldScoreForAbbreviation:(NSString *)abbreviation hitMask:(NSMutableIndexSet *)mask; +- (float) scoreForAbbreviation:(NSString *)abbreviation inRange:(NSRange)searchRange fromRange:(NSRange)abbreviationRange hitMask:(NSMutableIndexSet *)mask; + +@end + +@interface NSAttributedString (Sizing) +- (NSSize)sizeForWidth:(float)width; +@end + +@interface NSString (URLEncoding) +- (NSString *) URLEncoding; +- (NSString *) URLDecoding; +@end + +@interface NSString(uuid) ++ (NSString *)uniqueString; +@end + +@interface NSString (Truncation) + +-(NSString *) stringTruncatedToWidth:(float)width withAttributes:(NSDictionary *)attributes; +@end + + + +@interface NSString (Hex) +-(NSString *) decodedPasteboardType; +-(NSString *) decodedHexString; + +-(NSString *) encodedPasteboardType; +-(NSString *) encodedHexString; +-(unsigned) hexIntValue; +- (NSComparisonResult)versionCompare:(NSString *)other; +-(NSString *) encodedPasteboardType; +@end + + +@interface NSString (Replacement) +- (NSArray *)lines; +- (NSString *) stringByReplacing:(NSString *)search with:(NSString *)replacement; + +@end + +@interface NSString (Fit) +- (NSDictionary *) attributesToFitNumbersInRect:(NSRect)rect withAttributes:(NSDictionary *)attributes; +- (NSDictionary *) attributesToFitRect:(NSRect)rect withAttributes:(NSDictionary *)attributes; +@end + + +@interface NSString (Blacktree) +- (NSString *)stringByResolvingWildcardsInPath; +-(NSString *)firstUnusedFilePath; +- (NSArray *)componentsSeparatedByStrings:(NSArray *)strings; +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSTableView_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSTableView_BLTRExtensions.h new file mode 100644 index 0000000..d12de42 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSTableView_BLTRExtensions.h @@ -0,0 +1,16 @@ +// +// NSArray_Extensions.h +// Quicksilver +// +// Created by Alcor on Fri Apr 04 2003. +// Copyright (c) 2003 Blacktree, Inc. All rights reserved. +// + +#import + +@interface NSTableView (Fancification) +//-(void)set; + +//- (void)centerRowInView:(int)rowIndex; +- (void)highlightSelectionInClipRect:(NSRect)rect withGradientColor:(NSColor *)color; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSTask+BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSTask+BLTRExtensions.h new file mode 100644 index 0000000..561d365 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSTask+BLTRExtensions.h @@ -0,0 +1,15 @@ +// +// NSTask+BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on 2/7/05. +// Copyright 2005 Blacktree. All rights reserved. +// + +#import + + +@interface NSTask (BLTRExtensions) ++ (NSTask *)taskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments; +- (NSData *)launchAndReturnOutput; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSURL+NDCarbonUtilities.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSURL+NDCarbonUtilities.h new file mode 100644 index 0000000..0ec090a --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSURL+NDCarbonUtilities.h @@ -0,0 +1,174 @@ +/*! + @header NSURL+NDCarbonUtilities.h + @abstract Provides method for interacting with Carbon APIs. + @discussion The methods in NSURL(NDCarbonUtilities) are simply wrappers for functions that can bew found within the carbon API. + + Created by nathan on Wed Dec 05 2001. + Copyright © 2001 Nathan Day. All rights reserved. + */ + +#import +#import + +/*! + @category NSURL(NDCarbonUtilities) + @abstract Provides method for interacting with Carbon APIs. + @discussion Methods for dealing with FSRef’s, FSSpec and other useful carbon stuff. + */ +@interface NSURL (NDCarbonUtilities) + +/*! + @method URLWithFSRef: + @abstract Alloc and intialize a NSURL. + @discussion Returns a file url for the file refered to by a FSRef. + @param fsRef A pointer to a FSRef. + @result A NSURL containing a file url. + */ ++ (NSURL *)URLWithFSRef:(const FSRef *)fsRef; + + /*! +@method URLWithFileSystemPathHFSStyle: + @abstract Alloc and intialize a NSURL. + @discussion Returns a file url for the file refered to by a HFS style path. + @param hfsString A NSString containing a HFS style path. + @result A NSURL containing a file url. + */ ++ (NSURL *)URLWithFileSystemPathHFSStyle:(NSString *)hfsString; + /*! + @method getFSRef: + @abstract Get a FSRef. + @discussion Obtain a FSRef for a file url. + @param fsRef A pointer to a FSRef struct, to be filled by the method. + @result Returns YES if successful, if the method returns NO then fsRef contains garbage. + */ +- (BOOL)getFSRef:(FSRef *)fsRef; + +/*! + @method getFSSpec: + @abstract Get a FSSpec. + @discussion Obtain a FSSpec for a file url. + @param fsSpec A pointer to a FSSpec struct, to be filled by the method. + @result Returns YES if successful, if the method returns NO then fsSpec contains garbage. + */ +- (BOOL)getFSSpec:(FSSpec *)fsSpec; + +/*! + @method URLByDeletingLastPathComponent + @abstract Delete last component of a url. + @discussion Returns a new NSURL equivelent to the receiver with the last component removed. + @result A new NSURL + */ +- (NSURL *)URLByDeletingLastPathComponent; + +/*! + @method fileSystemPathHFSStyle + @abstract Returns a HFS style path. + @discussion Returns a NSString containg a HFS style path (e.g. Macitosh HD:Users:) useful for display purposes. + @result A new NSString containing a HFS style path for the same file or directory as the receiver. + */ +- (NSString *)fileSystemPathHFSStyle; + +/*! + @method resolveAliasFile + @abstract Resolve an alias file. + @discussion Returns an file url NSURL refered to by the receveive if the receveive refers to an alias file. If it does not refer to an alias file the a url identical to the receveive is returned. + @result An file url NSURL. + */ +- (NSURL *)resolveAliasFile; + +/*! + @method finderInfoFlags:type:creator: + @abstract Get finder info flags creator and type. + @discussion The bits of the finder info flag are +
+ + + + + + + + + + + + + +
NameDescription
kIsOnDeskFiles and folders (System 6)
kColorFiles and folders
kIsSharedFiles only (Applications only)
+ If clear, the application needs to write to its resource fork, and therefore cannot be shared on a server
kHasNoINITsFiles only (Extensions/Control Panels only)
+ This file contains no INIT resource
kHasBeenInitedFiles only
+ Clear if the file contains desktop database resources ('BNDL', 'FREF', 'open', 'kind'...) that have not been added yet. Set only by the Finder
kHasCustomIconFiles and folders
kIsStationeryFiles only
kNameLockedFiles and folders
kHasBundleFiles only
kIsInvisibleFiles and folders
kIsAliasFiles only.
+
+ @param flags Contains finder flags on return. + @param type Contains finder type on return. + @param creator Contains creator on return. + @result Return YES if successful, otherwise NO and the returned values are invalid. + */ +- (BOOL)finderInfoFlags:(UInt16*)flags type:(OSType*)type creator:(OSType*)creator; + +/*! + @method finderLocation + @abstract Return a finder items location. + @discussion Returns a finder items location within its parent window. + @result A NSPoint + */ +- (NSPoint)finderLocation; + +/*! + @method setFinderInfoFlags:mask:type:creator: + @abstract Set finder info flags, creator and type. + @discussion The bits of the finder info flag are +
+ + + + + + + + + + + + + +
NameDescription
kIsOnDeskFiles and folders (System 6)
kColorFiles and folders
kIsSharedFiles only (Applications only)
+ If clear, the application needs to write to its resource fork, and therefore cannot be shared on a server
kHasNoINITsFiles only (Extensions/Control Panels only)
+ This file contains no INIT resource
kHasBeenInitedFiles only
+ Clear if the file contains desktop database resources ('BNDL', 'FREF', 'open', 'kind'...) that have not been added yet. Set only by the Finder
kHasCustomIconFiles and folders
kIsStationeryFiles only
kNameLockedFiles and folders
kHasBundleFiles only
kIsInvisibleFiles and folders
kIsAliasFiles only.
+
+ @param flags Finder flags. + @param aMask Mask for Finder flags + @param type The Finder file type + @param creator The application creator code + @result Returns YES if successful. + */ +- (BOOL)setFinderInfoFlags:(UInt16)flags mask:(UInt16)aMask type:(OSType)type creator:(OSType)creator; + +/*! + @method setFinderLocation: + @abstract Sets the location a finder item. + @discussion Set the location of a finder item within in container. + @param location The location + @result Returns YES if successful. + */ +- (BOOL)setFinderLocation:(NSPoint)location; + + +@end + +/*! + @category NSURL(NDCarbonUtilitiesInfoFlags) + @abstract Adds methods to NSURL + @discussion Adds methods to simplify testing of the flags returned from finderInfoFlags:type:creator: + */ +@interface NSURL (NDCarbonUtilitiesInfoFlags) +/*! + @method hasCustomIcon + @abstract Test if a file has a custom icon. + @discussion Test to see if the file refered to by the receiver has a custom icon. The is equivelent to testing for the kHasCustomIcon flag + @result Returns YES if the file has a custom icon. + */ +- (BOOL)hasCustomIcon; + +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSURL_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSURL_BLTRExtensions.h new file mode 100644 index 0000000..239618a --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSURL_BLTRExtensions.h @@ -0,0 +1,16 @@ +// +// NSURL_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on 7/13/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + + +@interface NSURL (Keychain) + +- (NSString *)keychainPassword; +-(NSURL *)URLByInjectingPasswordFromKeychain; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSUserDefaults_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSUserDefaults_BLTRExtensions.h new file mode 100644 index 0000000..bbeb439 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSUserDefaults_BLTRExtensions.h @@ -0,0 +1,14 @@ +// +// NSUserDefaults_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on 8/17/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + + +@interface NSUserDefaults (BLTRExtensions) +- (NSColor *)colorForKey:(NSString *)key; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSView_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSView_BLTRExtensions.h new file mode 100644 index 0000000..989c661 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSView_BLTRExtensions.h @@ -0,0 +1,14 @@ +// +// NSView_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on Sun Dec 21 2003. +// Copyright (c) 2003 Blacktree, Inc.. All rights reserved. +// + +#import + +@interface NSView (Mirroring) +-(void)flipSubviewsOnAxis:(bool)vertical; +-(BOOL)containsEvent:(NSEvent *)event; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSWindow_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSWindow_BLTRExtensions.h new file mode 100755 index 0000000..b095730 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSWindow_BLTRExtensions.h @@ -0,0 +1,22 @@ + +#import + +@interface NSWindow (Fade) +-(void)setSticky:(BOOL)flag; +-(void)setAlphaValue:(float)fadeOut fadeTime:(float)seconds; +- (void)setFrame:(NSRect)frameRect alphaValue:(float)alpha display:(BOOL)displayFlag animate:(BOOL)animationFlag; +-(void)reallyCenter; ++(NSWindow *)windowWithImage:(NSImage *)image; +- (id)windowPropertyForKey:(NSString *)key; +@end + +@interface NSWindow (Physics) +-(void)animateVelocity:(float)velocity inDirection:(float)angle withFriction:(float)friction startTime:(NSTimeInterval)startTime; +@end + + +@interface NSWindow (Widgets) +- (void) addInternalWidgets; +- (void) addInternalWidgetsForStyleMask:(int)styleMask; +@end + diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/NSWorkspace_BLTRExtensions.h b/QSFoundation.framework/Versions/A/PrivateHeaders/NSWorkspace_BLTRExtensions.h new file mode 100644 index 0000000..f44b74a --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/NSWorkspace_BLTRExtensions.h @@ -0,0 +1,37 @@ +// +// NSWorkspace_BLTRExtensions.h +// Quicksilver +// +// Created by Alcor on Fri May 09 2003. +// Copyright (c) 2003 Blacktree, Inc. All rights reserved. +// + +#import + +#define QSAppIsRunning(x) [[NSWorkspace sharedWorkspace]applicationIsRunning:x] +@interface NSWorkspace (Misc) +- (NSArray *)allApplications; +- (int)pidForApplication:(NSDictionary *)theApp; +- (BOOL)applicationIsRunning:(NSString *)pathOrID; +- (NSDictionary *)dictForApplicationName:(NSString *)path; +- (void)killApplication:(NSString *)path; +- (BOOL)applicationIsHidden:(NSDictionary *)theApp; +- (BOOL)applicationIsFrontmost:(NSDictionary *)theApp; +- (BOOL)PSN:(ProcessSerialNumber *)psn forApplication:(NSDictionary *)theApp; +- (void)switchToApplication:(NSDictionary *)theApp frontWindowOnly:(BOOL)frontOnly; +- (void)activateFrontWindowOfApplication:(NSDictionary *)theApp; +- (void)hideApplication:(NSDictionary *)theApp; +- (void)hideOtherApplications:(NSArray *)theApps; +- (void)showApplication:(NSDictionary *)theApp; +- (void)activateApplication:(NSDictionary *)theApp; +- (void)reopenApplication:(NSDictionary *)theApp; +- (void)quitApplication:(NSDictionary *)theApp; +- (NSString *)nameForPID:(int)pid; +- (NSString *)pathForPID:(int)pid; +- (void)quitPSN:(ProcessSerialNumber)psn; +- (void)quitOtherApplications:(NSArray *)theApps; +- (NSDictionary *)dictForApplicationIdentifier:(NSString *)ident; +- (NSString *)commentForFile:(NSString *)path; +- (BOOL)setComment:(NSString*)comment forFile:(NSString *)path; +- (BOOL)openFileInBackground:(NSString *)fullPath; +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/QSFoundation.h b/QSFoundation.framework/Versions/A/PrivateHeaders/QSFoundation.h new file mode 100644 index 0000000..d32c2d2 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/QSFoundation.h @@ -0,0 +1,15 @@ +#import "NSApplication_BLTRExtensions.h" +#import "NSArray_BLTRExtensions.h" +#import "NSFileManager_BLTRExtensions.h" +#import "NSGeometry_BLTRExtensions.h" +#import "NSImage_BLTRExtensions.h" +#import "NSString_BLTRExtensions.h" +#import "NSTableView_BLTRExtensions.h" +#import "NSWindow_BLTRExtensions.h" +#import "NSWorkspace_BLTRExtensions.h" +#import "NSBezierPath_BLTRExtensions.h" +#import "NSAppleScript_BLTRExtensions.h" +#import "NSPasteboard_BLTRExtensions.h" +#import "NSView_BLTRExtensions.h" +#import "NSTask+BLTRExtensions.h" +#import "NSBundle_BLTRExtensions.h" \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/QSImageAndTextCell.h b/QSFoundation.framework/Versions/A/PrivateHeaders/QSImageAndTextCell.h new file mode 100644 index 0000000..dc58a83 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/QSImageAndTextCell.h @@ -0,0 +1,25 @@ +// +// QSImageAndTextCell.h +// +// Copyright (c) 2001 Apple. All rights reserved. +// + +#import + +@interface QSImageAndTextCell : NSTextFieldCell { + BOOL editing; + @private + NSImage *image; + NSSize imageSize; +} + +- (void)setImage:(NSImage *)anImage; +- (NSImage *)image; +- (float)imageWidthForFrame:(NSRect)frame; +- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView; +- (NSSize)cellSize; +- (NSRect)textRectForFrame:(NSRect)frame; +- (NSSize) imageSize; +- (void) setImageSize: (NSSize) newImageSize; + +@end \ No newline at end of file diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/QSImageView.h b/QSFoundation.framework/Versions/A/PrivateHeaders/QSImageView.h new file mode 100644 index 0000000..15bee23 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/QSImageView.h @@ -0,0 +1,18 @@ +// +// QSImageView.h +// Quicksilver +// +// Created by Alcor on 2/13/05. +// Copyright 2005 Blacktree. All rights reserved. +// + +#import + + +@interface QSImageView : NSImageView +@end + +@interface QSImageCell : NSImageCell{ + BOOL adjustResolution; +} +@end diff --git a/QSFoundation.framework/Versions/A/PrivateHeaders/QSKeyCodeTranslator.h b/QSFoundation.framework/Versions/A/PrivateHeaders/QSKeyCodeTranslator.h new file mode 100644 index 0000000..8f28517 --- /dev/null +++ b/QSFoundation.framework/Versions/A/PrivateHeaders/QSKeyCodeTranslator.h @@ -0,0 +1,31 @@ +// +// QSKeyCodeTranslator.h +// Quicksilver +// +// Created by Alcor on 8/12/04. +// Copyright 2004 Blacktree. All rights reserved. +// + +#import + + + +typedef struct { + short kchrID; + Str255 KCHRname; + short transtable[256]; +} Ascii2KeyCodeTable; +enum { + kTableCountOffset = 256+2, + kFirstTableOffset = 256+4, + kTableSize = 128 +}; + + +@interface QSKeyCodeTranslator : NSObject { + +} ++(OSStatus)InitAscii2KeyCodeTable; +-(short)AsciiToKeyCode:(short)asciiCode; +-(short)keyCodeForCharacter:(NSString *)character; +@end diff --git a/QSFoundation.framework/Versions/A/QSFoundation b/QSFoundation.framework/Versions/A/QSFoundation new file mode 100755 index 0000000..af36229 Binary files /dev/null and b/QSFoundation.framework/Versions/A/QSFoundation differ diff --git a/QSFoundation.framework/Versions/A/Resources/Info.plist b/QSFoundation.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..59c36ae --- /dev/null +++ b/QSFoundation.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + QSFoundation + CFBundleIdentifier + com.blacktree.QSFoundation + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleSignature + DAED + CFBundleVersion + 1.0 + + diff --git a/QSFoundation.framework/Versions/Current b/QSFoundation.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/QSFoundation.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file -- cgit