summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/CocoaAll.pas
blob: e9e7487a363e9d089a77de0406dd9682306e64a9 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
unit CocoaAll;

{$mode delphi}
{$modeswitch objectivec1}
{$modeswitch cvar} { for "external" after the semi-colon with external vars }
{$packrecords c}

interface

uses 
  ctypes,
  AEDataModel,IconsCore,
  CFBase, CFArray, CFBag , CFCharacterSet, CFData, CFDate, CFDictionary, CFNumber ,CFPropertyList, CFSet, CFString, CFStringEncodingExt, CFTimeZone, CFTree, CFURL, CFXMLNode, CFXMLParser, CFMachPort, CFMessagePort, CFRunLoop, CFSocket, CFBinaryHeap, CFBitVector, CFBundle, CFByteOrders, CFPlugIn, CFPreferences, CFURLAccess, CFUUID, CFLocale, CFStream, CFDateFormatter, CFNumberFormatter, CFCalendar, CFUserNotification, CFNotificationCenter, CFAttributedString, CFNetworkErrorss,
  CGBase, CGAffineTransforms, CGBitmapContext, CGColor, CGColorSpace, CGContext, CGDataConsumer, CGDataProvider, CGDirectDisplay, CGDirectPalette, CGDisplayConfiguration, CGDisplayFades, CGErrors, CGEvent, CGEventSource, CGEventTypes, CGFont, CGFunction, CGGLContext, CGGeometry, CGImage, CGLayer, CGPDFArray, CGPDFContentStream, CGPDFContext, CGPDFDictionary, CGPDFDocument, CGPDFObject, CGPDFOperatorTable, CGPDFPage, CGPDFScanner, CGPDFStream, CGPDFString, CGPSConverter, CGPath, CGPattern, CGRemoteOperation, CGSession, CGShading, CGWindowLevels,
  CVBase,CVImageBuffer,
  IOSurfaceAPI,
  SecBase, SecTrust,
  MacTypes, MacOSXPosix,
  macgl, CGLTypes,
  AnonClassDefinitionsQuartzcore;
  
{$linkframework Cocoa}
{$define INTERFACE}

{$include UndefinedTypes.inc}
// also includes the ones for foundation and appkit
{$include quartzcore/AnonIncludeClassDefinitionsQuartzcore.inc}

{$define HEADER}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef HEADER}

{$define TYPES}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef TYPES}

{$define RECORDS}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef RECORDS}

type
{$define FORWARD}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef FORWARD}

{$define PROTOCOLS}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef PROTOCOLS}

{$define CLASSES}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef CLASSES}
 
{$define FUNCTIONS}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef FUNCTIONS}

{$define EXTERNAL_SYMBOLS}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef EXTERNAL_SYMBOLS}

{$define USER_PATCHES}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef USER_PATCHES}

{ Inline functions }
function NSSTR (inString: PChar): NSString;
function NSMakeRange (loc: NSUInteger; len: NSUInteger): NSRange;
function NSMaxRange (range: NSRange): NSUInteger;
function NSLocationInRange (loc: NSUInteger; range: NSRange): boolean;
function NSEqualRanges (range1, range2: NSRange): boolean;
function NSMakePoint (x: CGFloat; y: CGFloat): NSPoint;
function NSMakeSize(w: CGFloat; h: CGFloat): NSSize;
function NSMakeRect(x, y: CGFloat; w, h: CGFloat): NSRect;
function NSMaxX (aRect: NSRect): CGFloat;
function NSMaxY (aRect: NSRect): CGFloat;
function NSMidX (aRect: NSRect): CGFloat;
function NSMidY (aRect: NSRect): CGFloat;
function NSMinX (aRect: NSRect): CGFloat;
function NSMinY (aRect: NSRect): CGFloat;
function NSWidth (aRect: NSRect): CGFloat;
function NSHeight (aRect: NSRect): CGFloat;
function NSRectFromCGRect (aRect: CGRect): NSRect;
function NSRectToCGRect (aRect: NSRect): CGRect;
function NSPointFromCGPoint (aPoint: CGPoint): NSPoint;
function NSPointToCGPoint (aPoint: NSPoint): CGPoint;
function NSSizeFromCGSize(aSize: CGSize): NSSize;
function NSSizeToCGSize(aSize: NSSize): CGSize;

{$undef INTERFACE}

implementation
{$define IMPLEMENTATION}

{$include InlineFunctions.inc}

{$define USER_PATCHES}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef USER_PATCHES}

{$undef IMPLEMENTATION}
end.