summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/foundation/NSAppleScript.inc
blob: b297fe274f7519846bf6fa6f914c1b61b6effed3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ Parsed from Foundation.framework NSAppleScript.h }


{$ifdef TYPES}
type
  NSAppleScriptPtr = ^NSAppleScript;
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
var
  NSAppleScriptErrorMessage: NSString { available in 10_2, NA }; cvar; external;
  NSAppleScriptErrorNumber: NSString { available in 10_2, NA }; cvar; external;
  NSAppleScriptErrorAppName: NSString { available in 10_2, NA }; cvar; external;
  NSAppleScriptErrorBriefMessage: NSString { available in 10_2, NA }; cvar; external;
  NSAppleScriptErrorRange: NSString { available in 10_2, NA }; cvar; external;
{$endif}

{$ifdef CLASSES}

type
  NSAppleScript = objcclass external (NSObject, NSCopyingProtocol)
  private
    _source: NSString;
    _compiledScriptID: cuint;
    _reserved1: pointer;
    _reserved2: pointer;
  public
    function initWithContentsOfURL_error (url: NSURL; errorInfo: NSDictionaryPtr): instancetype; message 'initWithContentsOfURL:error:'; { NS_DESIGNATED_INITIALIZER }
    function initWithSource (source: NSString): instancetype; message 'initWithSource:'; { NS_DESIGNATED_INITIALIZER }
    function source: NSString; message 'source';
    function isCompiled: ObjCBOOL; message 'isCompiled';
    function compileAndReturnError (errorInfo: NSDictionaryPtr): ObjCBOOL; message 'compileAndReturnError:';
    function executeAndReturnError (errorInfo: NSDictionaryPtr): NSAppleEventDescriptor; message 'executeAndReturnError:';
    function executeAppleEvent_error (event: NSAppleEventDescriptor; errorInfo: NSDictionaryPtr): NSAppleEventDescriptor; message 'executeAppleEvent:error:';

    { Adopted protocols }
    function copyWithZone (zone: NSZonePtr): id; message 'copyWithZone:';
  end;
{$endif}