/packages/cocoaint/src/Foundation.pas
Pascal | 81 lines | 29 code | 18 blank | 34 comment | 0 complexity | 19dea1be81cc3094f92187c8454d7dbd MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
1unit Foundation; 2 3{$mode objfpc} 4{$modeswitch objectivec1} 5{$define NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES} 6 7interface 8 9uses 10 ctypes, MacOSAll; 11 12{$linkframework Foundation} 13 14{$include UndefinedTypes.inc} 15 16{$define HEADER} 17{$include foundation/Foundation.inc} 18{$undef HEADER} 19 20{$define TYPES} 21{$include foundation/Foundation.inc} 22{$undef TYPES} 23 24{$define RECORDS} 25{$include foundation/Foundation.inc} 26{$undef RECORDS} 27 28type 29{$define FORWARD} 30{$include foundation/Foundation.inc} 31{$undef FORWARD} 32 33{$define CLASSES} 34{$include foundation/Foundation.inc} 35{$undef CLASSES} 36 37{$define PROTOCOLS} 38{$include foundation/Foundation.inc} 39{$undef PROTOCOLS} 40 41{$define FUNCTIONS} 42{$include foundation/Foundation.inc} 43{$undef FUNCTIONS} 44 45{$define EXTERNAL_SYMBOLS} 46{$include foundation/Foundation.inc} 47{$undef EXTERNAL_SYMBOLS} 48 49{$define USER_PATCHES} 50{$include foundation/Foundation.inc} 51{$undef USER_PATCHES} 52 53{ Inline functions } 54function NSSTR (inString: PChar): NSString; 55function NSMakeRange (loc: NSUInteger; len: NSUInteger): NSRange; 56function NSMaxRange (range: NSRange): NSUInteger; 57function NSLocationInRange (loc: NSUInteger; range: NSRange): boolean; 58function NSEqualRanges (range1, range2: NSRange): boolean; 59function NSMakePoint (x: CGFloat; y: CGFloat): NSPoint; 60function NSMakeSize(w: CGFloat; h: CGFloat): NSSize; 61function NSMakeRect(x, y: CGFloat; w, h: CGFloat): NSRect; 62function NSMaxX (aRect: NSRect): CGFloat; 63function NSMaxY (aRect: NSRect): CGFloat; 64function NSMidX (aRect: NSRect): CGFloat; 65function NSMidY (aRect: NSRect): CGFloat; 66function NSMinX (aRect: NSRect): CGFloat; 67function NSMinY (aRect: NSRect): CGFloat; 68function NSWidth (aRect: NSRect): CGFloat; 69function NSHeight (aRect: NSRect): CGFloat; 70function NSRectFromCGRect (aRect: CGRect): NSRect; 71function NSRectToCGRect (aRect: NSRect): CGRect; 72function NSPointFromCGPoint (aPoint: CGPoint): NSPoint; 73function NSPointToCGPoint (aPoint: NSPoint): CGPoint; 74function NSSizeFromCGSize(aSize: CGSize): NSSize; 75function NSSizeToCGSize(aSize: NSSize): CGSize; 76 77implementation 78 79{$include InlineFunctions.inc} 80 81end.