[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
api[osx,Foundation] methods
NSObject buildAccessors: #(
scriptingProperties
)!
NSObject buildGetters: #(
classForArchiver
classForPortCoder
classCode
className
)!
NSObject buildFunctions: #(
#(#replacementObjectForArchiver: #(#(archiver handle)) #NSObject)
#(#replacementObjectForPortCoder: #(#(aCoder handle)) #NSObject)
#(#copyScriptingValue:forKey:withProperties: #(value key #(properties json)) #NSObject)
#(#newScriptingObjectOfClass:forValueForKey:withContentsValue:withProperties: #(cls key #(contentsValue handle) #(properties json)) #NSObject)
#(#scriptingValueForSpecifier: #(#(objectSpecifier handle)) #NSObject)
)!
NativeObject
subclass: #NSAffineTransformStruct
category: 'osx/Foundation'!
NSAffineTransformStruct buildNumberAccessors: #(
m11 m12 m21 m22 tx ty
)!
! NSAffineTransformStruct class methodsFor: #instantiation !
m11: m11 m12: m12 m21: m21 m22: m22 tx: tx ty: ty
| handle |
handle := {'new NSAffineTransformStruct(m11,m12,m21,m22,tx,ty);'}.
^self @ handle! !
NSObject
subclass: #NSAffineTransform
category: 'osx/Foundation'!
NSAffineTransform buildTypedAccessors: #(
#(transformStruct #NSAffineTransformStruct)
)!
NSAffineTransform buildFunctions: #(
#(#rotateByDegrees: #(angle))
#(#rotateByRadians: #(angle))
#(#scaleBy: #(scale))
#(#scaleXBy:yBy: #(scaleX scaleY))
#(#translateXBy:yBy: #(x y))
#(#appendTransform: #(#(aTransform handle)))
#(#prependTransform: #(#(aTransform handle)))
invert set concat
#(#transformPoint: #( #(aNSPoint handle) ) #NSPoint)
#(#transformSize: #( #(aNSSize handle) ) #NSSize)
#(#transformBezierPath: #( #(aNSBezierPath handle) ) #NSBezierPath)
)!
! NSAffineTransform class methodsFor: #instantiation !
transform
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #transform)! !
! NSAffineTransform class methodsFor: #instantiation !
identity
" Return an instance of the receiver initialized to the identity matrix. "
^self @ (self nativeClass basicAt: #transform)! !
! NSAffineTransform class methodsFor: #instantiation !
withTransform: aTransform
" Return an instance of the receiver initialized from aTransform. "
^self @ (self nativeClass instanceWithTransform: aTransform handle)! !
NSObject
subclass: #NSAppleEventDescriptor
category: 'osx/Foundation'!
NSAppleEventDescriptor buildNumberGetters: #(
aeDesc numberOfItems
int32Value typeCodeValue
returnID transactionID
)!
NSAppleEventDescriptor buildBooleanGetters: #(
booleanValue
)!
NSAppleEventDescriptor buildGetters: #(
descriptorType enumCodeValue
stringValue eventClass
eventID
)!
NSAppleEventDescriptor buildTypedGetters: #(
#(data #NSData)
)!
NSAppleEventDescriptor buildFunctions: #(
#(#coerceToDescriptorType: #(descriptorType) #NSAppleEventDescriptor )
#(#descriptorAtIndex: #(index) #NSAppleEventDescriptor )
#(#insertDescriptor:atIndex: #(#(descriptor handle) index) )
#(#removeDescriptorAtIndex: #(index) )
#(#descriptorForKeyword: #(keyword) #NSAppleEventDescriptor )
#(#keywordForDescriptorAtIndex: #(index) )
#(#removeDescriptorWithKeyword: #(keyword) )
#(#setDescriptor:forKeyword: #(#(descriptor handle) keyword) )
#(#attributeDescriptorForKeyword: #(keyword) #NSAppleEventDescriptor )
#(#paramDescriptorForKeyword: #(keyword) #NSAppleEventDescriptor )
#(#removeParamDescriptorWithKeyword: #(keyword) )
#(#setAttributeDescriptor:forKeyword: #(#(descriptor handle) keyword) )
#(#setParamDescriptor:forKeyword: #(#(descriptor handle) keyword) )
)!
! NSAppleEventDescriptor class methodsFor: #instantiation !
withEventClass: eventClass
eventID: eventID targetDescriptor: addressDescriptor
returnID: returnID transactionID: transactionID
" Return an instance of the receiver. "
^self @ (self nativeClass
appleEventWithEventClass: eventClass
eventID: eventID targetDescriptor: addressDescriptor
returnID: returnID transactionID: transactionID)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
withBoolean: aBoolean
" Return an instance of the receiver. "
^self @ (self nativeClass descriptorWithBoolean: aBoolean)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
withDescriptorType: descriptorType bytes: bytes length: byteCount
" Return an instance of the receiver. "
^self @ (self nativeClass
descriptorWithDescriptorType: descriptorType
bytes: bytes length: byteCount)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
withDescriptorType: descriptorType data: aNSData
" Return an instance of the receiver. "
^self @ (self nativeClass
descriptorWithDescriptorType: descriptorType
data: aNSData handle)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
withEnumCode: code
" Return an instance of the receiver. "
^self @ (self nativeClass descriptorWithEnumCode: code)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
withString: aString
" Return an instance of the receiver. "
^self @ (self nativeClass descriptorWithString: aString)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
withTypeCode: code
" Return an instance of the receiver. "
^self @ (self nativeClass descriptorWithTypeCode: code)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
listDescriptor
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #listDescriptor)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
nullDescriptor
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #nullDescriptor)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
recordDescriptor
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #recordDescriptor)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
empty
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #listDescriptor)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
list
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #listDescriptor)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
null
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #nullDescriptor)! !
! NSAppleEventDescriptor class methodsFor: #instantiation !
record
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #recordDescriptor)! !
NSObject
subclass: #NSAppleEventManager
category: 'osx/Foundation'!
NSAppleEventManager buildTypedGetters: #(
#(currentAppleEvent #NSAppleEventDescriptor)
#(currentReplyAppleEvent #NSAppleEventDescriptor)
)!
NSAppleEventManager buildFunctions: #(
#(#removeEventHandlerForEventClass:andEventID: #(eventClass eventID) )
#(#setEventHandler:andSelector:forEventClass:andEventID: #(#(handler handle) selector eventClass eventID) )
#(#dispatchRawAppleEvent:withRawReply:handlerRefCon: #(#(theAppleEvent handle) #(theReply handle) handlerRefCon) )
#(#appleEventForSuspensionID: #(#(suspensionID handle)) #NSAppleEventDescriptor )
#(#replyAppleEventForSuspensionID: #(#(suspensionID handle)) #NSAppleEventDescriptor )
#(#resumeWithSuspensionID: #(#(suspensionID handle)) )
#(#setCurrentAppleEventAndReplyEventWithSuspensionID: #(#(suspensionID handle)) )
#(#suspendCurrentAppleEvent #() #NSObject)
)!
! NSAppleEventManager class methodsFor: #instantiation !
sharedAppleEventManager
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #sharedAppleEventManager)! !
! NSAppleEventManager class methodsFor: #instantiation !
current
" Return an instance of the receiver. "
^self @ (self nativeClass basicAt: #sharedAppleEventManager)! !
NSObject
subclass: #NSAppleScript
category: 'osx/Foundation'!
NSAppleScript buildBooleanAccessors: #(
isCompiled
)!
NSAppleScript buildGetters: #(
source
)!
NSAppleScript buildFunctions: #(
#(#compileAndReturnError: #(errorInfoPtr))
#(#executeAndReturnError: #(errorInfoPtr))
#(#executeAppleEvent:error: #(#(event handle) errorInfoPtr) #NSAppleEventDescriptor)
)!
! NSAppleScript methodsFor: #compiling !
compileOnError: aBlock
" Compiles the receiver, if it is not already compiled. "
| errorInfo result |
errorInfo := self outArgument.
result := self compileAndReturnError: errorInfo.
result ifFalse: [ ^aBlock evaluateWith: "NSError @" errorInfo ].
^true! !
! NSAppleScript methodsFor: #executing !
executeOnError: aBlock
" Compiles the receiver, if it is not already compiled. "
| errorInfo result |
errorInfo := self outArgument.
result := self executeAndReturnError: errorInfo.
result ifFalse: [ ^aBlock evaluateWith: "NSError @" errorInfo ].
^true! !
! NSAppleScript class methodsFor: #instantiation !
withSource: source
" Return an instance of the receiver. "
^self @ (self nativeClass instanceWithSource: source)! !
! NSAppleScript class methodsFor: #instantiation !
withContentsOfURL: aNSURL error: errorInfoPtr
" Return an instance of the receiver. "
^self @ (self nativeClass
instanceWithContentsOfURL: aNSURL handle
error: errorInfoPtr)! !
! NSAppleScript class methodsFor: #instantiation !
withContentsOfURL: aNSURL onError: aBlock
" Return an instance of the receiver. "
| errorInfo result |
errorInfo := self outArgument.
result := self nativeClass
instanceWithContentsOfURL: aNSURL handle
error: errorInfo.
^result notNil "(errorInfo basicAt: #code) isNil"
ifTrue: [ self @ result ]
ifFalse: [ aBlock evaluateWith: "NSError @" errorInfo ]! !