Improves the PasCocoa bindings. Adds a script to parse appkit. NSWindow and NSButton are already taken from the parser.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@447 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat
2008-05-09 19:51:36 +00:00
parent 81763fac6a
commit bc7c85f132
21 changed files with 3184 additions and 887 deletions

View File

@ -106,15 +106,14 @@ const
//@class NSDate, NSDictionary, NSError, NSException, NSNotification;
//@class NSGraphicsContext, NSImage, NSPasteboard, NSWindow;
NSWindow = class;
// NSWindow = class;
{ The version of the AppKit framework }
//APPKIT_EXTERN const double NSAppKitVersionNumber;
NSApplication = class(NSResponder)
public
{ Extra binding functions }
function getClass: objc.id; override;
class function getClass: objc.id; override;
public
constructor sharedApplication;
@ -363,7 +362,7 @@ If not specified, obtain from CFBundleShortVersionString key in infoDictionary.
{$endif}
{$ifdef IMPLEMENTATION}
function NSApplication.getClass: objc.id;
class function NSApplication.getClass: objc.id;
begin
Result := objc_getClass(Str_NSApplication);
end;

View File

@ -1,129 +1,446 @@
{%mainunit appkit.pas}
{
(*
NSButton.h
Application Kit
Copyright (c) 1994-2005, Apple Computer, Inc.
All rights reserved.
}
*)
{$ifdef HEADER}
{$ifndef NSBUTTON_PAS_H}
{$define NSBUTTON_PAS_H}
const
Str_NSButton = 'NSButton';
Str_setTitle = 'setTitle:';
Str_setBezelStyle = 'setBezelStyle:';
{$include NSControl.inc}
{$include NSButtonCell.inc}
{$include NSImage.inc}
{$endif}
{$endif}
{$ifdef FORWARD}
{$ifndef NSBUTTON_PAS__FORWARD}
{$define NSBUTTON_PAS__FORWARD}
NSButton = class;
{$endif}
{$endif}
{$ifdef CLASSES}
{$ifndef NSBUTTON_PAS_C}
{$define NSBUTTON_PAS_C}
{$include NSControl.inc}
{$include NSButtonCell.inc}
{$include NSImage.inc}
//@class NSSound;
{ NSButton }
NSButton = class(NSControl)
public
{ Extra binding functions }
function getClass: objc.id; override;
public
//- (NSString *)title;
procedure setTitle(aString: CFStringRef);
{- (NSString *)alternateTitle;
- (void)setAlternateTitle:(NSString *)aString;
- (NSImage *)image;
- (void)setImage:(NSImage *)image;
- (NSImage *)alternateImage;
- (void)setAlternateImage:(NSImage *)image;
- (NSCellImagePosition)imagePosition;
- (void)setImagePosition:(NSCellImagePosition)aPosition;
- (void)setButtonType:(NSButtonType)aType;
- (int)state;
- (void)setState:(int)value;
- (BOOL)isBordered;
- (void)setBordered:(BOOL)flag;
- (BOOL)isTransparent;
- (void)setTransparent:(BOOL)flag;
- (void)setPeriodicDelay:(float)delay interval:(float)interval;
- (void)getPeriodicDelay:(float *)delay interval:(float *)interval;
- (NSString *)keyEquivalent;
- (void)setKeyEquivalent:(NSString *)charCode;
- (unsigned int)keyEquivalentModifierMask;
- (void)setKeyEquivalentModifierMask:(unsigned int)mask;
- (void)highlight:(BOOL)flag;
- (BOOL)performKeyEquivalent:(NSEvent *)key;
@end
@interface NSButton(NSKeyboardUI)
- (void)setTitleWithMnemonic:(NSString *)stringWithAmpersand;
@end
@interface NSButton(NSButtonAttributedStringMethods)
- (NSAttributedString *)attributedTitle;
- (void)setAttributedTitle:(NSAttributedString *)aString;
- (NSAttributedString *)attributedAlternateTitle;
- (void)setAttributedAlternateTitle:(NSAttributedString *)obj;
@end}
//@interface NSButton(NSButtonBezelStyles)
procedure setBezelStyle(bezelStyle: NSBezelStyle);
//- (NSBezelStyle)bezelStyle;
//@end
{@interface NSButton(NSButtonMixedState)
- (void)setAllowsMixedState:(BOOL)flag;
- (BOOL)allowsMixedState;
- (void)setNextState;
@end
@interface NSButton(NSButtonBorder)
- (void) setShowsBorderOnlyWhileMouseInside:(BOOL)show;
- (BOOL) showsBorderOnlyWhileMouseInside;
@end
@interface NSButton (NSButtonSoundExtensions)
- (void)setSound:(NSSound *)aSound;
- (NSSound *)sound;
@end}
class function getClass: objc.id; override;
function title: CFStringRef;
procedure setTitle(_aString: CFStringRef);
function alternateTitle: CFStringRef;
procedure setAlternateTitle(_aString: CFStringRef);
function image: NSImage;
procedure setImage(_image: NSImage);
function alternateImage: NSImage;
procedure setAlternateImage(_image: NSImage);
function imagePosition: NSCellImagePosition;
procedure setImagePosition(_aPosition: NSCellImagePosition);
procedure setButtonType(_aType: NSButtonType);
function state: Integer;
procedure setState(_value: Integer);
function isBordered: LongBool;
procedure setBordered(_flag: LongBool);
function isTransparent: LongBool;
procedure setTransparent(_flag: LongBool);
procedure setPeriodicDelay_interval(_delay: Single; _interval: Single);
procedure getPeriodicDelay_interval(_delay: Single; _interval: Single);
function keyEquivalent: CFStringRef;
procedure setKeyEquivalent(_charCode: CFStringRef);
function keyEquivalentModifierMask: LongWord;
procedure setKeyEquivalentModifierMask(_mask: LongWord);
procedure highlight(_flag: LongBool);
// function performKeyEquivalent(_key: NSEvent): LongBool;
procedure setTitleWithMnemonic(_stringWithAmpersand: CFStringRef);
function attributedTitle: objc.id;{NSAttributedString}
procedure setAttributedTitle(_aString: objc.id {NSAttributedString});
function attributedAlternateTitle: objc.id;{NSAttributedString}
procedure setAttributedAlternateTitle(_obj: objc.id {NSAttributedString});
procedure setBezelStyle(_bezelStyle: NSBezelStyle);
function bezelStyle: NSBezelStyle;
procedure setAllowsMixedState(_flag: LongBool);
function allowsMixedState: LongBool;
procedure setNextState;
procedure setShowsBorderOnlyWhileMouseInside(_show: LongBool);
function showsBorderOnlyWhileMouseInside: LongBool;
procedure setSound(_aSound: objc.id {NSSound});
function sound: objc.id;{NSSound}
end;
{$endif}
{$endif}
{$ifdef IMPLEMENTATION}
const
StrNSButton_NSButton = 'NSButton';
StrNSButton_title = 'title';
StrNSButton_setTitle = 'setTitle:';
StrNSButton_alternateTitle = 'alternateTitle';
StrNSButton_setAlternateTitle = 'setAlternateTitle:';
StrNSButton_image = 'image';
StrNSButton_setImage = 'setImage:';
StrNSButton_alternateImage = 'alternateImage';
StrNSButton_setAlternateImage = 'setAlternateImage:';
StrNSButton_imagePosition = 'imagePosition';
StrNSButton_setImagePosition = 'setImagePosition:';
StrNSButton_setButtonType = 'setButtonType:';
StrNSButton_state = 'state';
StrNSButton_setState = 'setState:';
StrNSButton_isBordered = 'isBordered';
StrNSButton_setBordered = 'setBordered:';
StrNSButton_isTransparent = 'isTransparent';
StrNSButton_setTransparent = 'setTransparent:';
StrNSButton_setPeriodicDelay_interval = 'setPeriodicDelay:interval:';
StrNSButton_getPeriodicDelay_interval = 'getPeriodicDelay:interval:';
StrNSButton_keyEquivalent = 'keyEquivalent';
StrNSButton_setKeyEquivalent = 'setKeyEquivalent:';
StrNSButton_keyEquivalentModifierMask = 'keyEquivalentModifierMask';
StrNSButton_setKeyEquivalentModifierMask = 'setKeyEquivalentModifierMask:';
StrNSButton_highlight = 'highlight:';
StrNSButton_performKeyEquivalent = 'performKeyEquivalent:';
function NSButton.getClass: objc.id;
StrNSButton_setTitleWithMnemonic = 'setTitleWithMnemonic:';
StrNSButton_attributedTitle = 'attributedTitle';
StrNSButton_setAttributedTitle = 'setAttributedTitle:';
StrNSButton_attributedAlternateTitle = 'attributedAlternateTitle';
StrNSButton_setAttributedAlternateTitle = 'setAttributedAlternateTitle:';
StrNSButton_setBezelStyle = 'setBezelStyle:';
StrNSButton_bezelStyle = 'bezelStyle';
StrNSButton_setAllowsMixedState = 'setAllowsMixedState:';
StrNSButton_allowsMixedState = 'allowsMixedState';
StrNSButton_setNextState = 'setNextState';
StrNSButton_setShowsBorderOnlyWhileMouseInside = 'setShowsBorderOnlyWhileMouseInside:';
StrNSButton_showsBorderOnlyWhileMouseInside = 'showsBorderOnlyWhileMouseInside';
StrNSButton_setSound = 'setSound:';
StrNSButton_sound = 'sound';
{ NSButton }
class function NSButton.getClass: objc.id;
begin
Result := objc_getClass(Str_NSButton);
Result := objc_getClass(StrNSButton_NSButton);
end;
procedure NSButton.setTitle(aString: CFStringRef);
type
setTitle_t = procedure (param1: objc.id; param2: SEL;
param3: CFStringRef); cdecl;
var
vmethod: setTitle_t;
function NSButton.title: CFStringRef;
begin
vmethod := setTitle_t(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(Str_setTitle)), aString);
Result := CFStringRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_title)), []));
end;
procedure NSButton.setBezelStyle(bezelStyle: NSBezelStyle);
procedure NSButton.setTitle(_aString: CFStringRef);
type
setBezelStyle_t = procedure (param1: objc.id; param2: SEL;
param3: NSBezelStyle); cdecl;
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aString: CFStringRef); cdecl;
var
vmethod: setBezelStyle_t;
vmethod: TmsgSendWrapper;
begin
vmethod := setBezelStyle_t(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(Str_setBezelStyle)), bezelStyle);
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setTitle)), _aString);
end;
function NSButton.alternateTitle: CFStringRef;
begin
Result := CFStringRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_alternateTitle)), []));
end;
procedure NSButton.setAlternateTitle(_aString: CFStringRef);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aString: CFStringRef); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setAlternateTitle)), _aString);
end;
function NSButton.image: NSImage;
begin
Result := NSImage(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_image)), []));
end;
procedure NSButton.setImage(_image: NSImage);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_image: NSImage); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setImage)), _image);
end;
function NSButton.alternateImage: NSImage;
begin
Result := NSImage(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_alternateImage)), []));
end;
procedure NSButton.setAlternateImage(_image: NSImage);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_image: NSImage); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setAlternateImage)), _image);
end;
function NSButton.imagePosition: NSCellImagePosition;
begin
Result := NSCellImagePosition(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_imagePosition)), []));
end;
procedure NSButton.setImagePosition(_aPosition: NSCellImagePosition);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aPosition: NSCellImagePosition); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setImagePosition)), _aPosition);
end;
procedure NSButton.setButtonType(_aType: NSButtonType);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aType: NSButtonType); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setButtonType)), _aType);
end;
function NSButton.state: Integer;
begin
Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_state)), []));
end;
procedure NSButton.setState(_value: Integer);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_value: Integer); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setState)), _value);
end;
function NSButton.isBordered: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_isBordered)), []));
end;
procedure NSButton.setBordered(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setBordered)), _flag);
end;
function NSButton.isTransparent: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_isTransparent)), []));
end;
procedure NSButton.setTransparent(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setTransparent)), _flag);
end;
procedure NSButton.setPeriodicDelay_interval(_delay: Single; _interval: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_delay: Single; _interval: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setPeriodicDelay_interval)), _delay, _interval);
end;
procedure NSButton.getPeriodicDelay_interval(_delay: Single; _interval: Single);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_delay: Single; _interval: Single); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_getPeriodicDelay_interval)), _delay, _interval);
end;
function NSButton.keyEquivalent: CFStringRef;
begin
Result := CFStringRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_keyEquivalent)), []));
end;
procedure NSButton.setKeyEquivalent(_charCode: CFStringRef);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_charCode: CFStringRef); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setKeyEquivalent)), _charCode);
end;
function NSButton.keyEquivalentModifierMask: LongWord;
begin
Result := LongWord(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_keyEquivalentModifierMask)), []));
end;
procedure NSButton.setKeyEquivalentModifierMask(_mask: LongWord);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_mask: LongWord); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setKeyEquivalentModifierMask)), _mask);
end;
procedure NSButton.highlight(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_highlight)), _flag);
end;
{function NSButton.performKeyEquivalent(_key: NSEvent): LongBool;
type
TmsgSendWrapper = function (param1: objc.id; param2: SEL;_key: NSEvent): LongBool; cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSButton_performKeyEquivalent)), _key));
end;}
procedure NSButton.setTitleWithMnemonic(_stringWithAmpersand: CFStringRef);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_stringWithAmpersand: CFStringRef); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setTitleWithMnemonic)), _stringWithAmpersand);
end;
function NSButton.attributedTitle: objc.id;
begin
Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_attributedTitle)), []));
end;
procedure NSButton.setAttributedTitle(_aString: objc.id {NSAttributedString});
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aString: objc.id {NSAttributedString}); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setAttributedTitle)), _aString);
end;
function NSButton.attributedAlternateTitle: objc.id;
begin
Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_attributedAlternateTitle)), []));
end;
procedure NSButton.setAttributedAlternateTitle(_obj: objc.id {NSAttributedString});
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_obj: objc.id {NSAttributedString}); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setAttributedAlternateTitle)), _obj);
end;
procedure NSButton.setBezelStyle(_bezelStyle: NSBezelStyle);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_bezelStyle: NSBezelStyle); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setBezelStyle)), _bezelStyle);
end;
function NSButton.bezelStyle: NSBezelStyle;
begin
Result := NSBezelStyle(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_bezelStyle)), []));
end;
procedure NSButton.setAllowsMixedState(_flag: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_flag: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setAllowsMixedState)), _flag);
end;
function NSButton.allowsMixedState: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_allowsMixedState)), []));
end;
procedure NSButton.setNextState;
begin
objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_setNextState)), []);
end;
procedure NSButton.setShowsBorderOnlyWhileMouseInside(_show: LongBool);
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_show: LongBool); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setShowsBorderOnlyWhileMouseInside)), _show);
end;
function NSButton.showsBorderOnlyWhileMouseInside: LongBool;
begin
Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_showsBorderOnlyWhileMouseInside)), []));
end;
procedure NSButton.setSound(_aSound: objc.id {NSSound});
type
TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aSound: objc.id {NSSound}); cdecl;
var
vmethod: TmsgSendWrapper;
begin
vmethod := TmsgSendWrapper(@objc_msgSend);
vmethod(Handle, sel_registerName(PChar(StrNSButton_setSound)), _aSound);
end;
function NSButton.sound: objc.id;
begin
Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSButton_sound)), []));
end;
{$endif}

View File

@ -1,194 +1,161 @@
{%mainunit appkit.pas}
{
(*
NSGraphics.h
Application Kit
Copyright (c) 1994-2005, Apple Computer, Inc.
All rights reserved.
}
*)
{$ifdef HEADER}
{$ifndef NSGRAPHICS_PAS_H}
{$define NSGRAPHICS_PAS_H}
//#import <Foundation/NSGeometry.h>
//#import <AppKit/AppKitDefines.h>
{.$include NSGeometry.inc}
{.$include AppKitDefines.inc}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3}
{.$endif}
type
NSCompositingOperation = (
NSCompositeClear = 0,
NSCompositeCopy = 1,
NSCompositeSourceOver = 2,
NSCompositeSourceIn = 3,
NSCompositeSourceOut = 4,
NSCompositeSourceAtop = 5,
NSCompositeDestinationOver = 6,
NSCompositeDestinationIn = 7,
NSCompositeDestinationOut = 8,
NSCompositeDestinationAtop = 9,
NSCompositeXOR = 10,
NSCompositePlusDarker = 11,
NSCompositeHighlight = 12,
NSCompositePlusLighter = 13
);
//@class NSColor, NSView;
{=== CONSTANTS ===}
{ operation types for composite operators }
{ Constants moved from dpsOpenStep.h }
(*typedef enum _NSCompositingOperation {
NSCompositeClear = 0,
NSCompositeCopy = 1,
NSCompositeSourceOver = 2,
NSCompositeSourceIn = 3,
NSCompositeSourceOut = 4,
NSCompositeSourceAtop = 5,
NSCompositeDestinationOver = 6,
NSCompositeDestinationIn = 7,
NSCompositeDestinationOut = 8,
NSCompositeDestinationAtop = 9,
NSCompositeXOR = 10,
NSCompositePlusDarker = 11,
NSCompositeHighlight = 12,
NSCompositePlusLighter = 13
} NSCompositingOperation;*)
{ types of window backing store }
type
NSBackingStoreType = (
NSBackingStoreRetained = 0,
NSBackingStoreNonretained = 1,
NSBackingStoreBuffered = 2);
NSBackingStoreRetained = 0,
NSBackingStoreNonretained = 1,
NSBackingStoreBuffered = 2
);
(*/* ways to order windows */
typedef enum _NSWindowOrderingMode {
NSWindowAbove = 1,
NSWindowBelow = -1,
NSWindowOut = 0
} NSWindowOrderingMode;
/* order in which to draw focus ring - above or below graphic or just draw ring */
typedef enum {
NSFocusRingOnly = 0,
NSFocusRingBelow = 1,
NSFocusRingAbove = 2
} NSFocusRingPlacement;
type
NSWindowOrderingMode = (
NSWindowAbove = 1,
NSWindowBelow = 1,
NSWindowOut = 0
);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
/* used by NSView and NSCell to configure if and how the control should draw its focus ring */
typedef enum _NSFocusRingType {
NSFocusRingTypeDefault = 0,
NSFocusRingTypeNone = 1,
type
NSFocusRingPlacement = (
NSFocusRingOnly = 0,
NSFocusRingBelow = 1,
NSFocusRingAbove = 2
);
type
NSFocusRingType = (
NSFocusRingTypeDefault = 0,
NSFocusRingTypeNone = 1,
NSFocusRingTypeExterior = 2
} NSFocusRingType;
#endif
/* Predefined colorspace names.
*/
APPKIT_EXTERN NSString *NSCalibratedWhiteColorSpace; /* 1.0 == white */
APPKIT_EXTERN NSString *NSCalibratedBlackColorSpace; /* 1.0 == black */
APPKIT_EXTERN NSString *NSCalibratedRGBColorSpace;
APPKIT_EXTERN NSString *NSDeviceWhiteColorSpace; /* 1.0 == white */
APPKIT_EXTERN NSString *NSDeviceBlackColorSpace; /* 1.0 == black */
APPKIT_EXTERN NSString *NSDeviceRGBColorSpace;
APPKIT_EXTERN NSString *NSDeviceCMYKColorSpace;
APPKIT_EXTERN NSString *NSNamedColorSpace; /* Used for "catalog" colors */
APPKIT_EXTERN NSString *NSPatternColorSpace;
APPKIT_EXTERN NSString *NSCustomColorSpace; /* Used to indicate a custom gstate in images */
);
/* NSWindowDepth defines the values used in setting window depth limits. "0" indicates default depth. Window depths should not be made persistent as they will not be the same across systems. Use the functions NSBPSFromDepth(), NSColorSpaceFromDepth(), NSBitsPerPixelFromDepth(), and NSPlanarFromDepth() to extract info from an NSWindowDepth. Use NSBestDepth() to compute window depths. NSBestDepth() will try to accomodate all the parameters (match or better); if there are multiple matches, it gives the closest, with matching colorSpace first, then bps, then planar, then bpp. bpp is "bits per pixel"; 0 indicates default (same as the number of bits per plane, either bps or bps * NSNumberOfColorComponents()); other values maybe used as hints to provide backing stores of different configuration; for instance, 8 bit color. exactMatch is optional and indicates whether all the parameters matched exactly.
*/
typedef int NSWindowDepth;
APPKIT_EXTERN NSWindowDepth NSBestDepth (NSString *colorSpace, int bps, int bpp, BOOL planar, BOOL *exactMatch);
APPKIT_EXTERN BOOL NSPlanarFromDepth (NSWindowDepth depth);
APPKIT_EXTERN NSString *NSColorSpaceFromDepth (NSWindowDepth depth);
APPKIT_EXTERN int NSBitsPerSampleFromDepth (NSWindowDepth depth);
APPKIT_EXTERN int NSBitsPerPixelFromDepth (NSWindowDepth depth);
APPKIT_EXTERN int NSNumberOfColorComponents (NSString *colorSpaceName);
APPKIT_EXTERN const NSWindowDepth *NSAvailableWindowDepths (void); /* 0 terminated */
//APPKIT_EXTERN NSString *NSCalibratedWhiteColorSpace; /* 1.0 == white */
//APPKIT_EXTERN NSString *NSCalibratedBlackColorSpace; /* 1.0 == black */
//APPKIT_EXTERN NSString *NSCalibratedRGBColorSpace;
//APPKIT_EXTERN NSString *NSDeviceWhiteColorSpace; /* 1.0 == white */
//APPKIT_EXTERN NSString *NSDeviceBlackColorSpace; /* 1.0 == black */
//APPKIT_EXTERN NSString *NSDeviceRGBColorSpace;
//APPKIT_EXTERN NSString *NSDeviceCMYKColorSpace;
//APPKIT_EXTERN NSString *NSNamedColorSpace; /* Used for "catalog" colors */
//APPKIT_EXTERN NSString *NSPatternColorSpace;
//APPKIT_EXTERN NSString *NSCustomColorSpace; /* Used to indicate a custom gstate in images */
type
NSWindowDepth = Integer;
//APPKIT_EXTERN NSWindowDepth NSBestDepth (NSString *colorSpace, int bps, int bpp, BOOL planar, BOOL *exactMatch);
//APPKIT_EXTERN BOOL NSPlanarFromDepth (NSWindowDepth depth);
//APPKIT_EXTERN NSString *NSColorSpaceFromDepth (NSWindowDepth depth);
//APPKIT_EXTERN int NSBitsPerSampleFromDepth (NSWindowDepth depth);
//APPKIT_EXTERN int NSBitsPerPixelFromDepth (NSWindowDepth depth);
//APPKIT_EXTERN int NSNumberOfColorComponents (NSString *colorSpaceName);
//APPKIT_EXTERN const NSWindowDepth *NSAvailableWindowDepths (void); /* 0 terminated */
//APPKIT_EXTERN const float NSWhite;
//APPKIT_EXTERN const float NSLightGray;
//APPKIT_EXTERN const float NSDarkGray;
//APPKIT_EXTERN const float NSBlack;
//APPKIT_EXTERN NSString *NSDeviceResolution; /* NSValue containing NSSize, basically dpi */
//APPKIT_EXTERN NSString *NSDeviceColorSpaceName; /* NSString */
//APPKIT_EXTERN NSString *NSDeviceBitsPerSample; /* NSValue containing int */
//APPKIT_EXTERN NSString *NSDeviceIsScreen; /* "YES" or not there */
//APPKIT_EXTERN NSString *NSDeviceIsPrinter; /* "YES" or not there */
//APPKIT_EXTERN NSString *NSDeviceSize; /* NSValue containing NSSize */
//APPKIT_EXTERN void NSRectFill(NSRect aRect);
//APPKIT_EXTERN void NSRectFillList(const NSRect *rects, int count);
//APPKIT_EXTERN void NSRectFillListWithGrays(const NSRect *rects, const float *grays, int num);
//APPKIT_EXTERN void NSRectFillListWithColors(const NSRect *rects, NSColor **colors, int num);
//APPKIT_EXTERN void NSRectFillUsingOperation(NSRect aRect, NSCompositingOperation op);
//APPKIT_EXTERN void NSRectFillListUsingOperation(const NSRect *rects, int count, NSCompositingOperation op);
//APPKIT_EXTERN void NSRectFillListWithColorsUsingOperation(const NSRect *rects, NSColor **colors, int num, NSCompositingOperation op);
//APPKIT_EXTERN void NSFrameRect(NSRect aRect);
//APPKIT_EXTERN void NSFrameRectWithWidth(NSRect aRect, float frameWidth);
//APPKIT_EXTERN void NSFrameRectWithWidthUsingOperation(NSRect aRect, float frameWidth, NSCompositingOperation op);
//APPKIT_EXTERN void NSRectClip(NSRect aRect);
//APPKIT_EXTERN void NSRectClipList(const NSRect *rects, int count);
//APPKIT_EXTERN NSRect NSDrawTiledRects(NSRect boundsRect, NSRect clipRect, const NSRectEdge *sides, const float *grays, int count);
//APPKIT_EXTERN void NSDrawGrayBezel(NSRect aRect, NSRect clipRect);
//APPKIT_EXTERN void NSDrawGroove(NSRect aRect, NSRect clipRect);
//APPKIT_EXTERN void NSDrawWhiteBezel(NSRect aRect, NSRect clipRect);
//APPKIT_EXTERN void NSDrawButton(NSRect aRect, NSRect clipRect);
//APPKIT_EXTERN void NSEraseRect(NSRect aRect);
//APPKIT_EXTERN NSColor *NSReadPixel(NSPoint passedPoint);
//APPKIT_EXTERN void NSDrawBitmap(NSRect rect, int width, int height, int bps, int spp, int bpp, int bpr, BOOL isPlanar, BOOL hasAlpha, NSString *colorSpaceName, const unsigned char *const data[5]);
//APPKIT_EXTERN void NSCopyBits(int srcGState, NSRect srcRect, NSPoint destPoint);
//APPKIT_EXTERN void NSHighlightRect(NSRect aRect);
//APPKIT_EXTERN void NSBeep(void);
//APPKIT_EXTERN void NSCountWindows(int *count);
//APPKIT_EXTERN void NSWindowList(int size, int list[]);
//APPKIT_EXTERN void NSCountWindowsForContext(int context, int *count);
//APPKIT_EXTERN void NSWindowListForContext(int context, int size, int list[]);
//APPKIT_EXTERN int NSGetWindowServerMemory(int context, int *virtualMemory, int *windowBackingMemory, NSString **windowDumpString);
//APPKIT_EXTERN NSRect NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect, const NSRectEdge *sides, NSColor **colors, int count);
//APPKIT_EXTERN void NSDrawDarkBezel(NSRect aRect, NSRect clipRect);
//APPKIT_EXTERN void NSDrawLightBezel(NSRect aRect, NSRect clipRect);
//APPKIT_EXTERN void NSDottedFrameRect(NSRect aRect);
//APPKIT_EXTERN void NSDrawWindowBackground(NSRect aRect);
//APPKIT_EXTERN void NSSetFocusRingStyle(NSFocusRingPlacement placement);
//APPKIT_EXTERN void NSDisableScreenUpdates(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
//APPKIT_EXTERN void NSEnableScreenUpdates(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
type
NSAnimationEffect = (
NSAnimationEffectDisappearingItemDefault = 0,
NSAnimationEffectPoof = 10
);
/* Standard gray values for the 2-bit deep grayscale colorspace.
*/
APPKIT_EXTERN const float NSWhite;
APPKIT_EXTERN const float NSLightGray;
APPKIT_EXTERN const float NSDarkGray;
APPKIT_EXTERN const float NSBlack;
/* Keys for deviceDescription dictionaries.
*/
APPKIT_EXTERN NSString *NSDeviceResolution; /* NSValue containing NSSize, basically dpi */
APPKIT_EXTERN NSString *NSDeviceColorSpaceName; /* NSString */
APPKIT_EXTERN NSString *NSDeviceBitsPerSample; /* NSValue containing int */
APPKIT_EXTERN NSString *NSDeviceIsScreen; /* "YES" or not there */
APPKIT_EXTERN NSString *NSDeviceIsPrinter; /* "YES" or not there */
APPKIT_EXTERN NSString *NSDeviceSize; /* NSValue containing NSSize */
/* Graphics functions
*/
APPKIT_EXTERN void NSRectFill(NSRect aRect);
APPKIT_EXTERN void NSRectFillList(const NSRect *rects, int count);
APPKIT_EXTERN void NSRectFillListWithGrays(const NSRect *rects, const float *grays, int num);
APPKIT_EXTERN void NSRectFillListWithColors(const NSRect *rects, NSColor **colors, int num);
APPKIT_EXTERN void NSRectFillUsingOperation(NSRect aRect, NSCompositingOperation op);
APPKIT_EXTERN void NSRectFillListUsingOperation(const NSRect *rects, int count, NSCompositingOperation op);
APPKIT_EXTERN void NSRectFillListWithColorsUsingOperation(const NSRect *rects, NSColor **colors, int num, NSCompositingOperation op);
APPKIT_EXTERN void NSFrameRect(NSRect aRect);
APPKIT_EXTERN void NSFrameRectWithWidth(NSRect aRect, float frameWidth);
APPKIT_EXTERN void NSFrameRectWithWidthUsingOperation(NSRect aRect, float frameWidth, NSCompositingOperation op);
APPKIT_EXTERN void NSRectClip(NSRect aRect);
APPKIT_EXTERN void NSRectClipList(const NSRect *rects, int count);
APPKIT_EXTERN NSRect NSDrawTiledRects(NSRect boundsRect, NSRect clipRect, const NSRectEdge *sides, const float *grays, int count);
APPKIT_EXTERN void NSDrawGrayBezel(NSRect aRect, NSRect clipRect);
APPKIT_EXTERN void NSDrawGroove(NSRect aRect, NSRect clipRect);
APPKIT_EXTERN void NSDrawWhiteBezel(NSRect aRect, NSRect clipRect);
APPKIT_EXTERN void NSDrawButton(NSRect aRect, NSRect clipRect);
APPKIT_EXTERN void NSEraseRect(NSRect aRect);
APPKIT_EXTERN NSColor *NSReadPixel(NSPoint passedPoint);
APPKIT_EXTERN void NSDrawBitmap(NSRect rect, int width, int height, int bps, int spp, int bpp, int bpr, BOOL isPlanar, BOOL hasAlpha, NSString *colorSpaceName, const unsigned char *const data[5]);
APPKIT_EXTERN void NSCopyBits(int srcGState, NSRect srcRect, NSPoint destPoint);
APPKIT_EXTERN void NSHighlightRect(NSRect aRect);
APPKIT_EXTERN void NSBeep(void);
APPKIT_EXTERN void NSCountWindows(int *count);
APPKIT_EXTERN void NSWindowList(int size, int list[]);
APPKIT_EXTERN void NSCountWindowsForContext(int context, int *count);
APPKIT_EXTERN void NSWindowListForContext(int context, int size, int list[]);
/* gets performance stats about window server memory usage */
APPKIT_EXTERN int NSGetWindowServerMemory(int context, int *virtualMemory, int *windowBackingMemory, NSString **windowDumpString);
APPKIT_EXTERN NSRect NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect, const NSRectEdge *sides, NSColor **colors, int count);
APPKIT_EXTERN void NSDrawDarkBezel(NSRect aRect, NSRect clipRect);
APPKIT_EXTERN void NSDrawLightBezel(NSRect aRect, NSRect clipRect);
APPKIT_EXTERN void NSDottedFrameRect(NSRect aRect);
APPKIT_EXTERN void NSDrawWindowBackground(NSRect aRect);
APPKIT_EXTERN void NSSetFocusRingStyle(NSFocusRingPlacement placement);
/* Disable and reenable screen updates.
** NSDisableScreenUpdates prevents drawing for all windows belonging to the calling
** process from being flushed to the screen. This function permits operations on
** multiple windows to appear atomic to the user, and is particularly useful for parent
** and child windows. Note that this function should be used with care for short
** operations only as the system will only allow updates to be disabled for a short
** time (currently one second) before automatically reenabling updates.
** NSEnableScreenUpdates reenables drawing that was previously disabled by
** NSDisableScreenUpdates. Multiple calls stack.
*/
APPKIT_EXTERN void NSDisableScreenUpdates(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
APPKIT_EXTERN void NSEnableScreenUpdates(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
/* Runs one of the standard system animation effects (display and sound).
** 'centerLocation' represents the center, in screen coordinates, to show the effect.
** 'size' specifies how big the effect should be. Use NSZeroSize to get the default size.
** 'animationDelegate' is optionally, an object that wants to know when the effect has completed.
** 'didEndSelector' will be invoked in the animationDelegate when the animation has completed.
**
** The didEndSelector should have the following signature:
** - (void)animationEffectDidEnd:(void * )contextInfo;
*/
typedef enum _NSAnimationEffect {
// The default effect used to indicate removal of an item from a collection,
// such as toolbar (indicates removal, without destroying the underlying data).
NSAnimationEffectDisappearingItemDefault = 0,
// An effect showing a puff of smoke.
NSAnimationEffectPoof = 10
} NSAnimationEffect;
APPKIT_EXTERN void NSShowAnimationEffect(NSAnimationEffect animationEffect, NSPoint centerLocation, NSSize size, id animationDelegate, SEL didEndSelector, void *contextInfo) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
#endif *)
//APPKIT_EXTERN void NSShowAnimationEffect(NSAnimationEffect animationEffect, NSPoint centerLocation, NSSize size, id animationDelegate, SEL didEndSelector, void *contextInfo) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
{$endif}
{$endif}
{$ifdef CLASSES}
{$ifndef NSGRAPHICS_PAS_C}
{$define NSGRAPHICS_PAS_C}
{.$include NSGeometry.inc}
{.$include AppKitDefines.inc}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3}
{.$endif}
{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3}
{.$endif}
{$endif}
{$endif}

View File

@ -53,7 +53,7 @@ const
NSImage = class(NSObject) // <NSCopying, NSCoding>
public
{ Extra binding functions }
function getClass: objc.id; override;
class function getClass: objc.id; override;
public
{
+ (id)imageNamed:(NSString *)name; /* If this finds & creates the image, only name is saved when archived */
@ -167,7 +167,7 @@ const
{$endif}
{$ifdef IMPLEMENTATION}
function NSImage.getClass: objc.id;
class function NSImage.getClass: objc.id;
begin
Result := objc_getClass(Str_NSImage);
end;

View File

@ -1,3 +1,4 @@
{%mainunit appkit.pas}
{
NSResponder.h
Application Kit

View File

@ -35,7 +35,7 @@ const
NSStatusBar = class(NSObject)
public
{ Extra binding functions }
function getClass: objc.id; override;
class function getClass: objc.id; override;
public
constructor systemStatusBar();
@ -51,7 +51,7 @@ const
{$endif}
{$ifdef IMPLEMENTATION}
function NSStatusBar.getClass: objc.id;
class function NSStatusBar.getClass: objc.id;
begin
Result := objc_getClass(Str_NSStatusBar);
end;

View File

@ -43,7 +43,7 @@ const
NSStatusItem = class(NSObject)
public
{ Extra binding functions }
function getClass: objc.id; override;
class function getClass: objc.id; override;
public
{- (NSStatusBar*) statusBar;
@ -112,7 +112,7 @@ const
{$endif}
{$ifdef IMPLEMENTATION}
function NSStatusItem.getClass: objc.id;
class function NSStatusItem.getClass: objc.id;
begin
Result := objc_getClass(Str_NSStatusItem);
end;

View File

@ -29,7 +29,7 @@ const
NSTextField = class(NSControl)
public
{ Extra binding functions }
function getClass: objc.id; override;
class function getClass: objc.id; override;
public
{- (void)setBackgroundColor:(NSColor *)color;
@ -79,7 +79,7 @@ const
{$endif}
{$ifdef IMPLEMENTATION}
function NSTextField.getClass: objc.id;
class function NSTextField.getClass: objc.id;
begin
Result := objc_getClass(Str_NSTextField);
end;

File diff suppressed because it is too large Load Diff

View File

@ -15,13 +15,17 @@ unit appkit;
interface
uses ctypes, FPCMacOSAll, objc, foundation;
uses ctypes, FPCMacOSAll, objc, foundation, coregraphics;
{$define HEADER}
{$include AppKit.inc}
{$undef HEADER}
type
{$define FORWARD}
{$include AppKit.inc}
{$undef FORWARD}
{$define CLASSES}
{$include AppKit.inc}
{$undef CLASSES}

View File

@ -0,0 +1,89 @@
{%MainUnit CoreGraphics.pas}
{
CGWindowLevel.h
CoreGraphics
Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
}
//#include <CoreGraphics/CGBase.h>
//#include <stdint.h>
//CG_EXTERN_C_BEGIN
{
* Windows may be assigned to a particular level. When assigned to a level,
* the window is ordered relative to all other windows in that level.
* Windows with a higher level are sorted in front of windows with a lower
* level.
*
* A common set of window levels is defined here for use within higher
* level frameworks. The levels are accessed via a key and function,
* so that levels may be changed or adjusted in future releases without
* breaking binary compatability.
}
type
CGWindowLevel = LongInt;
CGWindowLevelKey = LongInt;
CGCommonWindowLevelKey = (
kCGBaseWindowLevelKey = 0,
kCGMinimumWindowLevelKey,
kCGDesktopWindowLevelKey,
kCGBackstopMenuLevelKey,
kCGNormalWindowLevelKey,
kCGFloatingWindowLevelKey,
kCGTornOffMenuWindowLevelKey,
kCGDockWindowLevelKey,
kCGMainMenuWindowLevelKey,
kCGStatusWindowLevelKey,
kCGModalPanelWindowLevelKey,
kCGPopUpMenuWindowLevelKey,
kCGDraggingWindowLevelKey,
kCGScreenSaverWindowLevelKey,
kCGMaximumWindowLevelKey,
kCGOverlayWindowLevelKey,
kCGHelpWindowLevelKey,
kCGUtilityWindowLevelKey,
kCGDesktopIconWindowLevelKey,
kCGCursorWindowLevelKey,
kCGAssistiveTechHighWindowLevelKey,
kCGNumberOfWindowLevelKeys { Internal bookkeeping; must be last }
);
//CGWindowLevel CGWindowLevelForKey( CGWindowLevelKey key );
{ number of levels above kCGMaximumWindowLevel reserved for internal use }
const
kCGNumReservedWindowLevels = (16);
{ Definitions of older constant values as calls }
kCGBaseWindowLevel = Low(LongInt); { LONG_MIN }
kCGMinimumWindowLevel = kCGBaseWindowLevel + 1; //CGWindowLevelForKey(kCGMinimumWindowLevelKey) /* (kCGBaseWindowLevel + 1) */
kCGDesktopWindowLevel = kCGBaseWindowLevel; //CGWindowLevelForKey(kCGDesktopWindowLevelKey) /* kCGMinimumWindowLevel */
kCGDesktopIconWindowLevel = kCGBaseWindowLevel + 20; //CGWindowLevelForKey(kCGDesktopIconWindowLevelKey) /* kCGMinimumWindowLevel + 20 */
kCGBackstopMenuLevel = -20; //CGWindowLevelForKey(kCGBackstopMenuLevelKey) /* -20 */
kCGNormalWindowLevel = 0; //CGWindowLevelForKey(kCGNormalWindowLevelKey) /* 0 */
kCGFloatingWindowLevel = 3; //CGWindowLevelForKey(kCGFloatingWindowLevelKey) /* 3 */
kCGTornOffMenuWindowLevel = 3; //CGWindowLevelForKey(kCGTornOffMenuWindowLevelKey) /* 3 */
kCGDockWindowLevel = 20; //CGWindowLevelForKey(kCGDockWindowLevelKey) /* 20 */
kCGMainMenuWindowLevel = 24; //CGWindowLevelForKey(kCGMainMenuWindowLevelKey) /* 24 */
kCGStatusWindowLevel = 25; //CGWindowLevelForKey(kCGStatusWindowLevelKey) /* 25 */
kCGModalPanelWindowLevel = 8; //CGWindowLevelForKey(kCGModalPanelWindowLevelKey) /* 8 */
kCGPopUpMenuWindowLevel = 101; //CGWindowLevelForKey(kCGPopUpMenuWindowLevelKey) { 101 }
kCGDraggingWindowLevel = 500; //CGWindowLevelForKey(kCGDraggingWindowLevelKey) { 500 }
kCGScreenSaverWindowLevel = 1000; //CGWindowLevelForKey(kCGScreenSaverWindowLevelKey) { 1000 }
kCGCursorWindowLevel = 2000; //CGWindowLevelForKey(kCGCursorWindowLevelKey) { 2000 }
kCGOverlayWindowLevel = 102; //CGWindowLevelForKey(kCGOverlayWindowLevelKey) { 102 }
kCGHelpWindowLevel = 102; //CGWindowLevelForKey(kCGHelpWindowLevelKey) { 102 }
kCGUtilityWindowLevel = 19; //CGWindowLevelForKey(kCGUtilityWindowLevelKey) { 19 }
kCGAssistiveTechHighWindowLevel = 1500; //CGWindowLevelForKey(kCGAssistiveTechHighWindowLevelKey) { 1500 }
kCGMaximumWindowLevel = High(LongInt) -kCGNumReservedWindowLevels; { LONG_MAX - kCGNumReservedWindowLevels }
//CG_EXTERN_C_END

View File

@ -0,0 +1,59 @@
{
CoreGraphics - CoreGraphics.h
Copyright (c) 2000 Apple Computer, Inc.
All rights reserved.
Main CoreGraphics file. Includes all include files from CoreGraphics
CoreGraphics is located inside the ApplicationServices framework
}
unit CoreGraphics;
interface
{#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGAffineTransform.h>
#include <CoreGraphics/CGBitmapContext.h>
#include <CoreGraphics/CGColor.h>
#include <CoreGraphics/CGColorSpace.h>
#include <CoreGraphics/CGContext.h>
#include <CoreGraphics/CGDataConsumer.h>
#include <CoreGraphics/CGDataProvider.h>
#include <CoreGraphics/CGDirectDisplay.h>
#include <CoreGraphics/CGDirectPalette.h>
#include <CoreGraphics/CGDisplayConfiguration.h>
#include <CoreGraphics/CGDisplayFade.h>
#include <CoreGraphics/CGError.h>
#include <CoreGraphics/CGEvent.h>
#include <CoreGraphics/CGEventSource.h>
#include <CoreGraphics/CGEventTypes.h>
#include <CoreGraphics/CGFont.h>
#include <CoreGraphics/CGFunction.h>
#include <CoreGraphics/CGGLContext.h>
#include <CoreGraphics/CGGeometry.h>
#include <CoreGraphics/CGImage.h>
#include <CoreGraphics/CGLayer.h>
#include <CoreGraphics/CGPDFArray.h>
#include <CoreGraphics/CGPDFContentStream.h>
#include <CoreGraphics/CGPDFContext.h>
#include <CoreGraphics/CGPDFDictionary.h>
#include <CoreGraphics/CGPDFDocument.h>
#include <CoreGraphics/CGPDFObject.h>
#include <CoreGraphics/CGPDFOperatorTable.h>
#include <CoreGraphics/CGPDFPage.h>
#include <CoreGraphics/CGPDFScanner.h>
#include <CoreGraphics/CGPDFStream.h>
#include <CoreGraphics/CGPDFString.h>
#include <CoreGraphics/CGPSConverter.h>
#include <CoreGraphics/CGPath.h>
#include <CoreGraphics/CGPattern.h>
#include <CoreGraphics/CGRemoteOperation.h>
#include <CoreGraphics/CGSession.h>
#include <CoreGraphics/CGShading.h>}
{$include CGWindowLevel.inc}
implementation
end.

View File

@ -11,7 +11,7 @@
<IconPath Value="./"/>
<TargetFileExt Value=""/>
<Title Value="simplewindow"/>
<ActiveEditorIndexAtStart Value="0"/>
<ActiveEditorIndexAtStart Value="2"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@ -33,8 +33,8 @@
<Filename Value="simplewindow.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="simplewindow"/>
<CursorPos X="105" Y="56"/>
<TopLine Value="52"/>
<CursorPos X="13" Y="67"/>
<TopLine Value="45"/>
<EditorIndex Value="0"/>
<UsageCount Value="106"/>
<Loaded Value="True"/>
@ -43,7 +43,7 @@
<Filename Value="../../appkit/appkit.pas"/>
<UnitName Value="appkit"/>
<CursorPos X="102" Y="36"/>
<TopLine Value="19"/>
<TopLine Value="14"/>
<EditorIndex Value="1"/>
<UsageCount Value="42"/>
<Loaded Value="True"/>
@ -284,8 +284,8 @@
</Unit37>
<Unit38>
<Filename Value="../../appkit/NSStatusBar.inc"/>
<CursorPos X="1" Y="13"/>
<TopLine Value="4"/>
<CursorPos X="4" Y="10"/>
<TopLine Value="22"/>
<EditorIndex Value="2"/>
<UsageCount Value="50"/>
<Loaded Value="True"/>

View File

@ -22,11 +22,12 @@ type
public
{ Extra binding functions }
constructor Create; override;
function getClass: objc.id; override;
class function getClass: objc.id; override;
procedure AddMethods; override;
{ Objective-c Methods }
class procedure doShowStatusitem(_self: objc.id; _cmd: SEL; sender: objc.id); cdecl; static;
class procedure doHideStatusitem(_self: objc.id; _cmd: SEL; sender: objc.id); cdecl; static;
class procedure doClose(_self: objc.id; _cmd: SEL; sender: objc.id); cdecl; static;
class function applicationShouldTerminateAfterLastWindowClosed(_self: objc.id;
_cmd: SEL; theApplication: objc.id): cbool; cdecl; static;
{ Other helper functions }
@ -45,11 +46,20 @@ const
Str_doShowStatusitem = 'doShowStatusitem:';
Str_doHideStatusitem = 'doHideStatusitem:';
Str_doClose = 'doClose:';
Str_applicationShouldTerminateAfterLastWindowClosed = 'applicationShouldTerminateAfterLastWindowClosed:';
var
myController: TMyController;
{ classes }
pool: NSAutoreleasePool;
MainWindow: NSWindow;
MainWindowView: NSView;
{ strings and sizes}
CFTitle: CFStringRef;
MainWindowRect: NSRect;
implementation
{ TMyController }
@ -67,6 +77,7 @@ procedure TMyController.AddMethods;
begin
AddMethod(Str_doShowStatusItem, 'v@:@', Pointer(doShowStatusitem));
AddMethod(Str_doHideStatusitem, 'v@:@', Pointer(doHideStatusitem));
AddMethod(Str_doClose, 'v@:@', Pointer(doClose));
AddMethod(Str_applicationShouldTerminateAfterLastWindowClosed, 'b@:@',
Pointer(applicationShouldTerminateAfterLastWindowClosed));
end;
@ -88,7 +99,7 @@ begin
image := NSImage.initWithContentsOfFile(fileName);
end;
function TMyController.getClass: objc.id;
class function TMyController.getClass: objc.id;
begin
Result := objc_getClass(Str_TMyController);
end;
@ -112,6 +123,11 @@ begin
myController.item := nil;
end;
class procedure TMyController.doClose(_self: objc.id; _cmd: SEL; sender: objc.id); cdecl;
begin
MainWindow.close;
end;
class function TMyController.applicationShouldTerminateAfterLastWindowClosed(_self: objc.id;
_cmd: SEL; theApplication: objc.id): cbool; cdecl;
begin

View File

@ -26,15 +26,15 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<Units Count="49">
<Units Count="53">
<Unit0>
<Filename Value="statusitem.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="statusitem"/>
<CursorPos X="19" Y="57"/>
<TopLine Value="5"/>
<CursorPos X="84" Y="40"/>
<TopLine Value="27"/>
<EditorIndex Value="0"/>
<UsageCount Value="51"/>
<UsageCount Value="55"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
@ -46,37 +46,38 @@
</Unit1>
<Unit2>
<Filename Value="../../appkit/NSButton.inc"/>
<CursorPos X="32" Y="98"/>
<TopLine Value="92"/>
<UsageCount Value="21"/>
<CursorPos X="6" Y="339"/>
<TopLine Value="318"/>
<EditorIndex Value="7"/>
<UsageCount Value="22"/>
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="../../appkit/NSApplication.inc"/>
<CursorPos X="50" Y="133"/>
<TopLine Value="130"/>
<UsageCount Value="15"/>
<CursorPos X="3" Y="109"/>
<TopLine Value="96"/>
<EditorIndex Value="8"/>
<UsageCount Value="16"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="../../appkit/NSAlert.inc"/>
<CursorPos X="1" Y="12"/>
<TopLine Value="1"/>
<UsageCount Value="28"/>
<UsageCount Value="30"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="../../appkit/NSStatusItem.inc"/>
<CursorPos X="1" Y="129"/>
<TopLine Value="113"/>
<EditorIndex Value="5"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
<CursorPos X="25" Y="109"/>
<TopLine Value="105"/>
<UsageCount Value="22"/>
</Unit5>
<Unit6>
<Filename Value="../../appkit/AppKit.inc"/>
<CursorPos X="32" Y="27"/>
<TopLine Value="21"/>
<CursorPos X="17" Y="5"/>
<TopLine Value="1"/>
<UsageCount Value="19"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSActionCell.h"/>
@ -126,8 +127,8 @@
</Unit13>
<Unit14>
<Filename Value="../../appkit/NSControl.inc"/>
<CursorPos X="45" Y="142"/>
<TopLine Value="142"/>
<CursorPos X="43" Y="144"/>
<TopLine Value="138"/>
<UsageCount Value="24"/>
</Unit14>
<Unit15>
@ -139,8 +140,8 @@
</Unit15>
<Unit16>
<Filename Value="../../appkit/NSView.inc"/>
<CursorPos X="40" Y="101"/>
<TopLine Value="97"/>
<CursorPos X="38" Y="11"/>
<TopLine Value="2"/>
<UsageCount Value="20"/>
</Unit16>
<Unit17>
@ -152,23 +153,26 @@
</Unit17>
<Unit18>
<Filename Value="../../appkit/NSResponder.inc"/>
<CursorPos X="46" Y="3"/>
<CursorPos X="42" Y="8"/>
<TopLine Value="1"/>
<UsageCount Value="22"/>
</Unit18>
<Unit19>
<Filename Value="../../appkit/appkit.pas"/>
<UnitName Value="appkit"/>
<CursorPos X="32" Y="27"/>
<TopLine Value="21"/>
<UsageCount Value="27"/>
<CursorPos X="32" Y="22"/>
<TopLine Value="10"/>
<EditorIndex Value="3"/>
<UsageCount Value="29"/>
<Loaded Value="True"/>
</Unit19>
<Unit20>
<Filename Value="../../appkit/NSWindow.inc"/>
<CursorPos X="39" Y="95"/>
<TopLine Value="92"/>
<UsageCount Value="21"/>
<CursorPos X="58" Y="1977"/>
<TopLine Value="1971"/>
<EditorIndex Value="5"/>
<UsageCount Value="23"/>
<Loaded Value="True"/>
</Unit20>
<Unit21>
<Filename Value="/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindow.h"/>
@ -186,8 +190,8 @@
</Unit22>
<Unit23>
<Filename Value="../../appkit/NSTextField.inc"/>
<CursorPos X="47" Y="71"/>
<TopLine Value="69"/>
<CursorPos X="47" Y="73"/>
<TopLine Value="63"/>
<UsageCount Value="10"/>
</Unit23>
<Unit24>
@ -216,46 +220,44 @@
</Unit27>
<Unit28>
<Filename Value="../../foundation/NSObject.inc"/>
<CursorPos X="32" Y="202"/>
<TopLine Value="193"/>
<EditorIndex Value="3"/>
<UsageCount Value="14"/>
<Loaded Value="True"/>
<CursorPos X="54" Y="10"/>
<TopLine Value="1"/>
<UsageCount Value="15"/>
</Unit28>
<Unit29>
<Filename Value="../../appkit/NSStatusBar.inc"/>
<CursorPos X="58" Y="25"/>
<TopLine Value="21"/>
<CursorPos X="7" Y="55"/>
<TopLine Value="38"/>
<EditorIndex Value="6"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit29>
<Unit30>
<Filename Value="../../foundation/NSAutoreleasePool.inc"/>
<CursorPos X="26" Y="19"/>
<TopLine Value="13"/>
<CursorPos X="50" Y="9"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit30>
<Unit31>
<Filename Value="../../../objc/objc-class.inc"/>
<CursorPos X="11" Y="168"/>
<TopLine Value="159"/>
<EditorIndex Value="4"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
<CursorPos X="70" Y="54"/>
<TopLine Value="47"/>
<UsageCount Value="14"/>
</Unit31>
<Unit32>
<Filename Value="../../../objc/objc.inc"/>
<CursorPos X="65" Y="75"/>
<TopLine Value="73"/>
<CursorPos X="50" Y="53"/>
<TopLine Value="37"/>
<UsageCount Value="16"/>
</Unit32>
<Unit33>
<Filename Value="controller.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="controller"/>
<CursorPos X="26" Y="28"/>
<TopLine Value="19"/>
<CursorPos X="19" Y="128"/>
<TopLine Value="119"/>
<EditorIndex Value="1"/>
<UsageCount Value="35"/>
<UsageCount Value="39"/>
<Loaded Value="True"/>
</Unit33>
<Unit34>
@ -267,8 +269,8 @@
</Unit34>
<Unit35>
<Filename Value="../../appkit/NSImage.inc"/>
<CursorPos X="39" Y="172"/>
<TopLine Value="169"/>
<CursorPos X="60" Y="170"/>
<TopLine Value="160"/>
<UsageCount Value="28"/>
</Unit35>
<Unit36>
@ -305,9 +307,9 @@
<Filename Value="../../foundation/foundation.pas"/>
<UnitName Value="foundation"/>
<CursorPos X="16" Y="10"/>
<TopLine Value="9"/>
<EditorIndex Value="2"/>
<UsageCount Value="11"/>
<TopLine Value="3"/>
<EditorIndex Value="4"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit40>
<Unit41>
@ -364,35 +366,155 @@
<TopLine Value="71"/>
<UsageCount Value="10"/>
</Unit48>
<Unit49>
<Filename Value="../../applicationservices/coregraphics/CoreGraphics.pas"/>
<UnitName Value="CoreGraphics"/>
<CursorPos X="25" Y="4"/>
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit49>
<Unit50>
<Filename Value="../../applicationservices/coregraphics/CGWindowLevel.inc"/>
<CursorPos X="13" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="2"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit50>
<Unit51>
<Filename Value="../../applicationservices/CoreGraphics.pas"/>
<UnitName Value="CoreGraphics"/>
<CursorPos X="54" Y="37"/>
<TopLine Value="34"/>
<UsageCount Value="10"/>
</Unit51>
<Unit52>
<Filename Value="../../appkit/NSGraphics.inc"/>
<CursorPos X="24" Y="138"/>
<TopLine Value="136"/>
<UsageCount Value="10"/>
</Unit52>
</Units>
<JumpHistory Count="5" HistoryIndex="4">
<JumpHistory Count="28" HistoryIndex="27">
<Position1>
<Filename Value="../../foundation/NSObject.inc"/>
<Caret Line="262" Column="13" TopLine="246"/>
<Filename Value="../../appkit/NSApplication.inc"/>
<Caret Line="109" Column="1" TopLine="96"/>
</Position1>
<Position2>
<Filename Value="../../foundation/NSObject.inc"/>
<Caret Line="215" Column="31" TopLine="206"/>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="140" Column="15" TopLine="122"/>
</Position2>
<Position3>
<Filename Value="../../foundation/NSObject.inc"/>
<Caret Line="216" Column="55" TopLine="206"/>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="178" Column="3" TopLine="162"/>
</Position3>
<Position4>
<Filename Value="../../foundation/NSObject.inc"/>
<Caret Line="207" Column="8" TopLine="195"/>
<Filename Value="../../appkit/NSStatusBar.inc"/>
<Caret Line="25" Column="58" TopLine="21"/>
</Position4>
<Position5>
<Filename Value="../../foundation/NSObject.inc"/>
<Caret Line="204" Column="1" TopLine="194"/>
<Filename Value="../../appkit/NSButton.inc"/>
<Caret Line="35" Column="73" TopLine="28"/>
</Position5>
<Position6>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="347" Column="3" TopLine="334"/>
</Position6>
<Position7>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="911" Column="6" TopLine="890"/>
</Position7>
<Position8>
<Filename Value="controller.pas"/>
<Caret Line="128" Column="3" TopLine="112"/>
</Position8>
<Position9>
<Filename Value="statusitem.pas"/>
<Caret Line="19" Column="60" TopLine="19"/>
</Position9>
<Position10>
<Filename Value="statusitem.pas"/>
<Caret Line="40" Column="21" TopLine="27"/>
</Position10>
<Position11>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="135" Column="3" TopLine="122"/>
</Position11>
<Position12>
<Filename Value="statusitem.pas"/>
<Caret Line="40" Column="42" TopLine="29"/>
</Position12>
<Position13>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="147" Column="21" TopLine="134"/>
</Position13>
<Position14>
<Filename Value="statusitem.pas"/>
<Caret Line="42" Column="41" TopLine="29"/>
</Position14>
<Position15>
<Filename Value="controller.pas"/>
<Caret Line="61" Column="22" TopLine="47"/>
</Position15>
<Position16>
<Filename Value="statusitem.pas"/>
<Caret Line="40" Column="55" TopLine="27"/>
</Position16>
<Position17>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="147" Column="41" TopLine="134"/>
</Position17>
<Position18>
<Filename Value="statusitem.pas"/>
<Caret Line="40" Column="76" TopLine="27"/>
</Position18>
<Position19>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position19>
<Position20>
<Filename Value="../../appkit/NSButton.inc"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position20>
<Position21>
<Filename Value="../../appkit/NSButton.inc"/>
<Caret Line="35" Column="1" TopLine="14"/>
</Position21>
<Position22>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="16" Column="3" TopLine="1"/>
</Position22>
<Position23>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="125" Column="3" TopLine="108"/>
</Position23>
<Position24>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="175" Column="3" TopLine="162"/>
</Position24>
<Position25>
<Filename Value="../../appkit/NSButton.inc"/>
<Caret Line="65" Column="3" TopLine="52"/>
</Position25>
<Position26>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="347" Column="3" TopLine="334"/>
</Position26>
<Position27>
<Filename Value="../../appkit/NSWindow.inc"/>
<Caret Line="911" Column="6" TopLine="890"/>
</Position27>
<Position28>
<Filename Value="../../applicationservices/coregraphics/CGWindowLevel.inc"/>
<Caret Line="1" Column="13" TopLine="1"/>
</Position28>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<SearchPaths>
<OtherUnitFiles Value="../../appkit/;../../../objc/;../../foundation/"/>
<SrcPath Value="../../appkit/;../../../objc/;../../foundation/"/>
<OtherUnitFiles Value="../../appkit/;../../../objc/;../../foundation/;../../applicationservices/coregraphics/"/>
<SrcPath Value="../../appkit/;../../../objc/;../../foundation/;../../applicationservices/coregraphics/"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>

View File

@ -22,14 +22,7 @@ const
Str_Window_Title = 'StatusItem example project';
Str_Show_Button = 'Show StatusItem';
Str_Hide_Button = 'Hide StatusItem';
var
{ classes }
pool: NSAutoreleasePool;
MainWindow: NSWindow;
MainWindowView: NSView;
{ strings and sizes}
CFTitle: CFStringRef;
MainWindowRect: NSRect;
Str_Close_Button = 'Exit Program';
begin
{ Creates the AutoreleasePool }
pool := NSAutoreleasePool.Create;
@ -44,9 +37,9 @@ begin
MainWindowRect.size.width := 300.0;
MainWindowRect.size.height := 500.0;
MainWindow := NSWindow.initWithContentRect(MainWindowRect,
MainWindow := NSWindow.initWithContentRect_styleMask_backing_defer(MainWindowRect,
NSTitledWindowMask or NSClosableWindowMask or NSMiniaturizableWindowMask or NSResizableWindowMask,
NSBackingStoreBuffered, NO);
NSBackingStoreBuffered, LongBool(NO));
MainWindowView := NSView.CreateWithHandle(MainWindow.contentView);
CFTitle := CFStringCreateWithPascalString(nil, Str_Window_Title, kCFStringEncodingUTF8);
@ -66,6 +59,10 @@ begin
50.0, MainWindowRect.size.height - 100.0, 200.0, 25.0,
Str_doHideStatusItem, myController);
myController.CreateButton(MainWindowView, Str_Close_Button,
50.0, MainWindowRect.size.height - 150.0, 200.0, 25.0,
Str_doClose, myController);
{ Enters main message loop }
MainWindow.orderFrontRegardless;

View File

@ -1,3 +1,4 @@
{%MainUnit Foundation.pas}
{ NSAutoreleasePool.h
Copyright (c) 1994-2005, Apple, Inc. All rights reserved.
}
@ -22,7 +23,7 @@ const
NSAutoreleasePool = class(NSObject)
public
{ Extra binding functions }
function getClass: objc.id; override;
class function getClass: objc.id; override;
public
//+ (void)addObject:(id)anObject;
@ -39,7 +40,7 @@ const
{$endif}
{$ifdef IMPLEMENTATION}
function NSAutoreleasePool.getClass: objc.id;
class function NSAutoreleasePool.getClass: objc.id;
begin
Result := objc_getClass(Str_NSAutoreleasePool);
end;

View File

@ -1,3 +1,4 @@
{%MainUnit Foundation.pas}
{ NSObject.h
Copyright (c) 1994-2005, Apple, Inc. All rights reserved.
}
@ -58,7 +59,7 @@ FOUNDATION_EXPORT unsigned NSExtraRefCount(id object);}
constructor CreateWithHandle(aHandle: objc.id);
destructor Destroy; override;
{ Extra binding functions }
function getClass: objc.id; virtual;
class function getClass: objc.id; virtual;
procedure AddMethods; virtual;
{ Class creation methods }
procedure AddMethod(aName, aParameters: string; aPointer: Pointer);
@ -193,7 +194,7 @@ begin
if Handle <> nil then release;
end;
function NSObject.getClass: objc.id;
class function NSObject.getClass: objc.id;
begin
Result := objc_getClass(Str_NSObject);
end;

View File

@ -0,0 +1,3 @@
./objcparser -ini=default.ini /System/Library/Frameworks/AppKit.framework/Headers/NSButton.h > ../appkit/NSButton.inc
./objcparser -ini=default.ini /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h > ../appkit/NSWindow.inc
./objcparser -ini=default.ini /System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h > ../appkit/NSGraphics.inc

View File

@ -7,7 +7,6 @@ ignoreincludes4=ApplicationServices/../FrameWorks/CoreGraphics.framework/Headers
ignoreincludes5=AvailabilityMacros.h
[TypeReplace]
NSRect=CGRect
NSStringRef=CFStringRef
NSStringRef*=CFStringRef
NSArray=CFArrayRef
@ -40,11 +39,11 @@ NSMutableSet = CFMutableSetRef
NSMutableString = CFMutableStringRef
NSNumber = CFNumberRef
NSInputStream = CFReadStreamRef
NSTimer = CFRunLoopTimerRef
NSSet = CFSetRef
NSString = CFStringRef
NSTimeZone = CFTimeZoneRef
NSURL = CFURLRef
NSTimer= CFRunLoopTimerRef
NSSet= CFSetRef
NSString=CFStringRef
NSTimeZone= CFTimeZoneRef
NSURL= CFURLRef
NSOutputStream = CFWriteStreamRef
AEDesc*=AEDescPtr
NSMutableData*= CFMutableDataRef

View File

@ -61,52 +61,7 @@
<Loaded Value="True"/>
</Unit2>
</Units>
<JumpHistory Count="11" HistoryIndex="10">
<Position1>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="1772" Column="46" TopLine="1769"/>
</Position1>
<Position2>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="64" Column="85" TopLine="52"/>
</Position3>
<Position4>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="89" Column="42" TopLine="77"/>
</Position4>
<Position5>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="91" Column="39" TopLine="79"/>
</Position5>
<Position6>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="98" Column="39" TopLine="86"/>
</Position6>
<Position7>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="101" Column="32" TopLine="89"/>
</Position7>
<Position8>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="106" Column="49" TopLine="94"/>
</Position8>
<Position9>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position9>
<Position10>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="1365" Column="15" TopLine="1361"/>
</Position10>
<Position11>
<Filename Value="ObjCParserUtils.pas"/>
<Caret Line="1306" Column="3" TopLine="1295"/>
</Position11>
</JumpHistory>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>