You've already forked lazarus-ccr
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:
@ -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>
|
||||
|
@ -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}
|
||||
|
||||
|
@ -9,7 +9,7 @@ unit foundation;
|
||||
|
||||
interface
|
||||
|
||||
uses SysUtils, ctypes, objc, FPCMacOSAll;
|
||||
uses SysUtils, ctypes, objc, MacOSAll;
|
||||
|
||||
{$define HEADER}
|
||||
{$include Foundation.inc}
|
||||
|
Reference in New Issue
Block a user