NSRunningApplication.inc 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. { Parsed from AppKit.framework NSRunningApplication.h }
  2. {$ifdef TYPES}
  3. type
  4. NSRunningApplicationPtr = ^NSRunningApplication;
  5. {$endif}
  6. {$ifdef TYPES}
  7. type
  8. NSApplicationActivationOptions = NSUInteger;
  9. NSApplicationActivationOptionsPtr = ^NSApplicationActivationOptions;
  10. const
  11. NSApplicationActivateAllWindows = 1 shl 0;
  12. NSApplicationActivateIgnoringOtherApps = 1 shl 1;
  13. type
  14. NSApplicationActivationPolicy = NSInteger;
  15. NSApplicationActivationPolicyPtr = ^NSApplicationActivationPolicy;
  16. const
  17. NSApplicationActivationPolicyRegular = 0;
  18. NSApplicationActivationPolicyAccessory = 1;
  19. NSApplicationActivationPolicyProhibited = 2;
  20. {$endif}
  21. {$ifdef CLASSES}
  22. type
  23. NSRunningApplication = objcclass external (NSObject)
  24. private
  25. _superReserved: id;
  26. _asn: pointer;
  27. _helpers: pointer;
  28. _obsInfo: id;
  29. _lock: NSLock;
  30. _bundleID: NSString;
  31. _localizedName: NSString;
  32. _bundleURL: NSURL;
  33. _executableURL: NSURL;
  34. _launchDate: NSDate;
  35. _icon: NSImage;
  36. _pid: cint;
  37. _lastSeed: cuint;
  38. _activeSeed: cuint;
  39. _staleSeed: cuint;
  40. _obsMask: culonglong;
  41. _aflags: bitpacked record
  42. case byte of
  43. 0: (_anonBitField__aflags0: cuint);
  44. 1: (
  45. fetchedDynamic: 0..1;
  46. deadToUs: 0..1;
  47. terminated: 0..1;
  48. finishedLaunching: 0..1;
  49. hidden: 0..1;
  50. active: 0..1;
  51. ownsMenuBar: 0..1;
  52. arch: 0..((1 shl 3)-1);
  53. activationPolicy: 0..((1 shl 3)-1);
  54. reserved1: 0..((1 shl 19)-1);
  55. );
  56. end;
  57. _appReserved: id;
  58. public
  59. function isTerminated: ObjCBOOL; message 'isTerminated';
  60. function isFinishedLaunching: ObjCBOOL; message 'isFinishedLaunching';
  61. function isHidden: ObjCBOOL; message 'isHidden';
  62. function isActive: ObjCBOOL; message 'isActive';
  63. function ownsMenuBar: ObjCBOOL; message 'ownsMenuBar';
  64. function activationPolicy: NSApplicationActivationPolicy; message 'activationPolicy';
  65. function localizedName: NSString; message 'localizedName';
  66. function bundleIdentifier: NSString; message 'bundleIdentifier';
  67. function bundleURL: NSURL; message 'bundleURL';
  68. function executableURL: NSURL; message 'executableURL';
  69. function processIdentifier: pid_t; message 'processIdentifier';
  70. function launchDate: NSDate; message 'launchDate';
  71. function icon: NSImage; message 'icon';
  72. function executableArchitecture: NSInteger; message 'executableArchitecture';
  73. function hide: ObjCBOOL; message 'hide';
  74. function unhide: ObjCBOOL; message 'unhide';
  75. function activateWithOptions (options: NSApplicationActivationOptions): ObjCBOOL; message 'activateWithOptions:';
  76. function terminate: ObjCBOOL; message 'terminate';
  77. function forceTerminate: ObjCBOOL; message 'forceTerminate';
  78. class function runningApplicationsWithBundleIdentifier (bundleIdentifier_: NSString): NSArray; message 'runningApplicationsWithBundleIdentifier:';
  79. class function runningApplicationWithProcessIdentifier (pid: pid_t): instancetype; message 'runningApplicationWithProcessIdentifier:';
  80. class function currentApplication: instancetype; message 'currentApplication';
  81. class procedure terminateAutomaticallyTerminableApplications; message 'terminateAutomaticallyTerminableApplications';
  82. end;
  83. type
  84. NSWorkspaceRunningApplications = objccategory external (NSWorkspace)
  85. function runningApplications: NSArray; message 'runningApplications';
  86. end;
  87. {$endif}