summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/foundation/NSProcessInfo.inc
blob: dc4720d9ff57d90d324032db5d1c1cca4035cea5 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{ Parsed from Foundation.framework NSProcessInfo.h }

{$ifdef TYPES}
{$ifndef NSPROCESSINFO_PAS_T}
{$define NSPROCESSINFO_PAS_T}

{ Constants }

const
  NSWindowsNTOperatingSystem = 1;
  NSWindows95OperatingSystem = 2;
  NSSolarisOperatingSystem = 3;
  NSHPUXOperatingSystem = 4;
  NSMACHOperatingSystem = 5;
  NSSunOSOperatingSystem = 6;
  NSOSF1OperatingSystem = 7;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSPROCESSINFO_PAS_R}
{$define NSPROCESSINFO_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSPROCESSINFO_PAS_F}
{$define NSPROCESSINFO_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSPROCESSINFO_PAS_S}
{$define NSPROCESSINFO_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSProcessInfo = objcclass;
  NSProcessInfoPointer = ^NSProcessInfo;
  NSProcessInfoPtr = NSProcessInfoPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSPROCESSINFO_PAS_C}
{$define NSPROCESSINFO_PAS_C}

{ NSProcessInfo }
  NSProcessInfo = objcclass external (NSObject)
  private
    _environment: NSDictionary;
    _arguments: NSArray;
    _hostName: NSString;
    name: NSString;
    reserved: Pointer;
    
  public
    class function processInfo: NSProcessInfo; message 'processInfo';
    function environment: NSDictionary; message 'environment';
    function arguments: NSArray; message 'arguments';
    function hostName: NSString; message 'hostName';
    function processName: NSString; message 'processName';
    function processIdentifier: cint; message 'processIdentifier';
    procedure setProcessName(newName: NSString); message 'setProcessName:';
    function globallyUniqueString: NSString; message 'globallyUniqueString';
    function operatingSystem: NSUInteger; message 'operatingSystem';
    function operatingSystemName: NSString; message 'operatingSystemName';
    function operatingSystemVersionString: NSString; message 'operatingSystemVersionString';
    function processorCount: NSUInteger; message 'processorCount';
    function activeProcessorCount: NSUInteger; message 'activeProcessorCount';
    function physicalMemory: culonglong; message 'physicalMemory';
    function systemUptime: NSTimeInterval; message 'systemUptime';
    procedure disableSuddenTermination; message 'disableSuddenTermination';
    procedure enableSuddenTermination; message 'enableSuddenTermination';
  end;

{$endif}
{$endif}