Improves Cocoa bindings

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@574 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat
2008-09-29 00:47:50 +00:00
parent 6f801dd3f8
commit fa69e42d57
33 changed files with 2722 additions and 240 deletions

View File

@ -11,9 +11,9 @@
{$include NSObjCRuntime.inc}
{#import <Foundation/NSAffineTransform.h>
#import <Foundation/NSArchiver.h>
#import <Foundation/NSArray.h>
#import <Foundation/NSAttributedString.h> }
#import <Foundation/NSArchiver.h>}
{.$include NSArray.inc} // Use CFArrayRef
{#import <Foundation/NSAttributedString.h> }
{$include NSAutoreleasePool.inc}
{#import <Foundation/NSBundle.h>
#import <Foundation/NSByteOrder.h>

View File

@ -23,6 +23,7 @@ const
Str_retain = 'retain';
Str_release = 'release';
Str_autorelease = 'autorelease';
{*********** Object Allocation / Deallocation *******}
@ -139,8 +140,8 @@ FOUNDATION_EXPORT unsigned NSExtraRefCount(id object);}
function retain: objc.id;
procedure release;
{- (id)autorelease;
- (unsigned)retainCount;
function autorelease: objc.id;
{- (unsigned)retainCount;
- (NSString *)description;
@ -302,5 +303,10 @@ begin
objc_msgSend(Handle, sel_registerName(PChar(Str_release)), []);
end;
function NSObject.autorelease: objc.id;
begin
Result := objc_msgSend(Handle, sel_registerName(PChar(Str_autorelease)), []);
end;
{$endif}

View File

@ -9,7 +9,7 @@ unit foundation;
interface
uses SysUtils, ctypes, objc, FPCMacOSAll;
uses SysUtils, ctypes, objc, MacOSAll;
{$define HEADER}
{$include Foundation.inc}