From 9799c6d1c007d923fae595b721f165e423b1d694 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Tue, 24 Jun 2008 02:22:07 +0000 Subject: [PATCH] Improves Cocoa bindings git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@489 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- bindings/pascocoa/appkit/NSView.inc | 2023 ++++++++++++++++++++---- bindings/pascocoa/build/buildappkit.sh | 7 +- 2 files changed, 1691 insertions(+), 339 deletions(-) diff --git a/bindings/pascocoa/appkit/NSView.inc b/bindings/pascocoa/appkit/NSView.inc index a8558c655..7fc5403d2 100644 --- a/bindings/pascocoa/appkit/NSView.inc +++ b/bindings/pascocoa/appkit/NSView.inc @@ -1,378 +1,1729 @@ {%mainunit appkit.pas} -{ +(* NSView.h Application Kit Copyright (c) 1994-2005, Apple Computer, Inc. All rights reserved. -} +*) {$ifdef HEADER} {$ifndef NSVIEW_PAS_H} {$define NSVIEW_PAS_H} {$include NSResponder.inc} -//#import -//#import - -//@class NSBitmapImageRep, NSCursor, NSGraphicsContext, NSImage, NSPasteboard, NSScrollView, NSWindow, NSAttributedString; +{$include AppKitDefines.inc} +{$include NSGraphics.inc} const - NSViewNotSizable = 0; - NSViewMinXMargin = 1; - NSViewWidthSizable = 2; - NSViewMaxXMargin = 4; - NSViewMinYMargin = 8; - NSViewHeightSizable = 16; - NSViewMaxYMargin = 32; + NSViewNotSizable = 0; + NSViewMinXMargin = 1; + NSViewWidthSizable = 2; + NSViewMaxXMargin = 4; + NSViewMinYMargin = 8; + NSViewHeightSizable = 16; + NSViewMaxYMargin = 32; type NSBorderType = ( - NSNoBorder = 0, - NSLineBorder = 1, - NSBezelBorder = 2, - NSGrooveBorder = 3 + NSNoBorder = 0, + NSLineBorder = 1, + NSBezelBorder = 2, + NSGrooveBorder = 3 ); - _VFlags = record -{#ifdef __BIG_ENDIAN__ - unsigned int rotatedFromBase:1; - unsigned int rotatedOrScaledFromBase:1; - unsigned int autosizing:6; - unsigned int autoresizeSubviews:1; - unsigned int wantsGState:1; - unsigned int needsDisplay:1; - unsigned int validGState:1; - unsigned int newGState:1; - unsigned int noVerticalAutosizing:1; - unsigned int frameChangeNotesSuspended:1; - unsigned int needsFrameChangeNote:1; - unsigned int focusChangeNotesSuspended:1; - unsigned int boundsChangeNotesSuspended:1; - unsigned int needsBoundsChangeNote:1; - unsigned int removingWithoutInvalidation:1; - unsigned int interfaceStyle0:1; - unsigned int needsDisplayForBounds:1; - unsigned int specialArchiving:1; - unsigned int interfaceStyle1:1; - unsigned int retainCount:6; - unsigned int retainCountOverMax:1; - unsigned int aboutToResize:1; -#else - unsigned int aboutToResize:1; - unsigned int retainCountOverMax:1; - unsigned int retainCount:6; - unsigned int interfaceStyle1:1; - unsigned int specialArchiving:1; - unsigned int needsDisplayForBounds:1; - unsigned int interfaceStyle0:1; - unsigned int removingWithoutInvalidation:1; - unsigned int needsBoundsChangeNote:1; - unsigned int boundsChangeNotesSuspended:1; - unsigned int focusChangeNotesSuspended:1; - unsigned int needsFrameChangeNote:1; - unsigned int frameChangeNotesSuspended:1; - unsigned int noVerticalAutosizing:1; - unsigned int newGState:1; - unsigned int validGState:1; - unsigned int needsDisplay:1; - unsigned int wantsGState:1; - unsigned int autoresizeSubviews:1; - unsigned int autosizing:6; - unsigned int rotatedOrScaledFromBase:1; - unsigned int rotatedFromBase:1; -#endif} + +type + __VFlags = packed record + _bitflags1 : LongWord; + _bitflags2 : LongWord; end; + _VFlags = __VFlags; - NSTrackingRectTag = cint; - NSToolTipTag = cint; +type + NSTrackingRectTag = Integer; -{/* Notifications */ +type + NSToolTipTag = Integer; -APPKIT_EXTERN NSString *NSViewFrameDidChangeNotification; -APPKIT_EXTERN NSString *NSViewFocusDidChangeNotification; -APPKIT_EXTERN NSString *NSViewBoundsDidChangeNotification; - // This notification is sent whenever the views bounds change and the frame does not. That is, it is sent whenever the view's bounds are translated, scaled or rotated, but NOT when the bounds change as a result of, for example, setFrameSize:. -APPKIT_EXTERN NSString *NSViewGlobalFrameDidChangeNotification; - // This notification is sent whenever an NSView that has an attached NSSurface changes size or changes screens (thus potentially changing graphics hardware drivers.) -} - -{ Class and method name strings } -const - Str_addSubview = 'addSubview:'; - +//APPKIT_EXTERN NSString *NSViewFrameDidChangeNotification; +//APPKIT_EXTERN NSString *NSViewFocusDidChangeNotification; +//APPKIT_EXTERN NSString *NSViewBoundsDidChangeNotification; +//APPKIT_EXTERN NSString *NSViewGlobalFrameDidChangeNotification; {$endif} {$endif} + +{$ifdef FORWARD} + NSView = class; + +{$endif} + {$ifdef CLASSES} {$ifndef NSVIEW_PAS_C} {$define NSVIEW_PAS_C} + TProcNSViewcompare0 = function (_param1: objc.id; _param2: objc.id; _param3: Pointer): Integer; cdecl; + {$include NSResponder.inc} -//#import -//#import +{$include AppKitDefines.inc} +{$include NSGraphics.inc} -//@class NSBitmapImageRep, NSCursor, NSGraphicsContext, NSImage, NSPasteboard, NSScrollView, NSWindow, NSAttributedString; - -//@class _NSViewAuxiliary; + { NSView } NSView = class(NSResponder) public -{- (id)initWithFrame:(NSRect)frameRect; - -- (NSWindow *)window; -- (NSView *)superview; -- (NSArray *)subviews; -- (BOOL)isDescendantOf:(NSView *)aView; -- (NSView *)ancestorSharedWithView:(NSView *)aView; -- (NSView *)opaqueAncestor; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 -- (void)setHidden:(BOOL)flag; -- (BOOL)isHidden; -- (BOOL)isHiddenOrHasHiddenAncestor; - -- (void)getRectsBeingDrawn:(const NSRect **)rects count:(int *)count; -- (BOOL)needsToDrawRect:(NSRect)aRect; -- (BOOL)wantsDefaultClipping; -#endif} - procedure addSubview(aView: NSView); -{- (void)addSubview:(NSView *)aView positioned:(NSWindowOrderingMode)place relativeTo:(NSView *)otherView; -- (void)sortSubviewsUsingFunction:(int (*)(id, id, void *))compare context:(void *)context; -- (void)viewWillMoveToWindow:(NSWindow *)newWindow; -- (void)viewDidMoveToWindow; -- (void)viewWillMoveToSuperview:(NSView *)newSuperview; -- (void)viewDidMoveToSuperview; -- (void)didAddSubview:(NSView *)subview; -- (void)willRemoveSubview:(NSView *)subview; -- (void)removeFromSuperview; -- (void)replaceSubview:(NSView *)oldView with:(NSView *)newView; -- (void)removeFromSuperviewWithoutNeedingDisplay; - -- (void)setPostsFrameChangedNotifications:(BOOL)flag; -- (BOOL)postsFrameChangedNotifications; -- (void)resizeSubviewsWithOldSize:(NSSize)oldSize; -- (void)resizeWithOldSuperviewSize:(NSSize)oldSize; -- (void)setAutoresizesSubviews:(BOOL)flag; -- (BOOL)autoresizesSubviews; -- (void)setAutoresizingMask:(unsigned int)mask; -- (unsigned int)autoresizingMask; - -- (void)setFrameOrigin:(NSPoint)newOrigin; -- (void)setFrameSize:(NSSize)newSize; -- (void)setFrame:(NSRect)frameRect; -- (NSRect)frame; -- (void)setFrameRotation:(float)angle; -- (float)frameRotation; - -- (void)setBoundsOrigin:(NSPoint)newOrigin; -- (void)setBoundsSize:(NSSize)newSize; -- (void)setBoundsRotation:(float)angle; -- (float)boundsRotation; -- (void)translateOriginToPoint:(NSPoint)translation; -- (void)scaleUnitSquareToSize:(NSSize)newUnitSize; -- (void)rotateByAngle:(float)angle; -- (void)setBounds:(NSRect)aRect; -- (NSRect)bounds; - -- (BOOL)isFlipped; -- (BOOL)isRotatedFromBase; -- (BOOL)isRotatedOrScaledFromBase; -- (BOOL)isOpaque; - -- (NSPoint)convertPoint:(NSPoint)aPoint fromView:(NSView *)aView; -- (NSPoint)convertPoint:(NSPoint)aPoint toView:(NSView *)aView; -- (NSSize)convertSize:(NSSize)aSize fromView:(NSView *)aView; -- (NSSize)convertSize:(NSSize)aSize toView:(NSView *)aView; -- (NSRect)convertRect:(NSRect)aRect fromView:(NSView *)aView; -- (NSRect)convertRect:(NSRect)aRect toView:(NSView *)aView; -- (NSRect)centerScanRect:(NSRect)aRect; - -- (BOOL)canDraw; -- (void)setNeedsDisplay:(BOOL)flag; -- (void)setNeedsDisplayInRect:(NSRect)invalidRect; -- (BOOL)needsDisplay; -- (void)lockFocus; -- (void)unlockFocus; -- (BOOL)lockFocusIfCanDraw; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 -- (BOOL)lockFocusIfCanDrawInContext:(NSGraphicsContext *)context; -#endif -+ (NSView *)focusView; -- (NSRect)visibleRect; - -- (void)display; -- (void)displayIfNeeded; -- (void)displayIfNeededIgnoringOpacity; -- (void)displayRect:(NSRect)rect; -- (void)displayIfNeededInRect:(NSRect)rect; -- (void)displayRectIgnoringOpacity:(NSRect)rect; -- (void)displayIfNeededInRectIgnoringOpacity:(NSRect)rect; -- (void)drawRect:(NSRect)rect; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 -- (void)displayRectIgnoringOpacity:(NSRect)aRect inContext:(NSGraphicsContext *)context; - -- (NSBitmapImageRep *)bitmapImageRepForCachingDisplayInRect:(NSRect)rect; -- (void)cacheDisplayInRect:(NSRect)rect toBitmapImageRep:(NSBitmapImageRep *)bitmapImageRep; -#endif - -- (int)gState; -- (void)allocateGState; -- (void)releaseGState; -- (void)setUpGState; -- (void)renewGState; - -- (void)scrollPoint:(NSPoint)aPoint; -- (BOOL)scrollRectToVisible:(NSRect)aRect; -- (BOOL)autoscroll:(NSEvent *)theEvent; -- (NSRect)adjustScroll:(NSRect)newVisible; -- (void)scrollRect:(NSRect)aRect by:(NSSize)delta; - -- (NSView *)hitTest:(NSPoint)aPoint; -- (BOOL)mouse:(NSPoint)aPoint inRect:(NSRect)aRect; -- (id)viewWithTag:(int)aTag; -- (int)tag; -- (BOOL)performKeyEquivalent:(NSEvent *)theEvent; -- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent; -- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent; -- (BOOL)needsPanelToBecomeKey; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 -- (BOOL)mouseDownCanMoveWindow; -#endif - -- (void)addCursorRect:(NSRect)aRect cursor:(NSCursor *)anObj; -- (void)removeCursorRect:(NSRect)aRect cursor:(NSCursor *)anObj; -- (void)discardCursorRects; -- (void)resetCursorRects; - -- (NSTrackingRectTag)addTrackingRect:(NSRect)aRect owner:(id)anObject userData:(void *)data assumeInside:(BOOL)flag; -- (void)removeTrackingRect:(NSTrackingRectTag)tag; - -- (BOOL)shouldDrawColor; - -- (void)setPostsBoundsChangedNotifications:(BOOL)flag; -- (BOOL)postsBoundsChangedNotifications; - -- (NSScrollView *)enclosingScrollView; - -- (NSMenu *)menuForEvent:(NSEvent *)event; -+ (NSMenu *)defaultMenu; - -- (void)setToolTip:(NSString *)string; -- (NSString *)toolTip; -- (NSToolTipTag)addToolTipRect:(NSRect)aRect owner:(id)anObject userData:(void *)data; -- (void)removeToolTip:(NSToolTipTag)tag; -- (void)removeAllToolTips; - -/* Live resize support */ -// a view receives viewWillStartLiveResize before the frame is first changed for a live resize -- (void)viewWillStartLiveResize; -// a view receives viewWillEndLiveResize after the frame is last changed for a live resize -- (void)viewDidEndLiveResize; -// inLiveResize can be called from drawRect: to decide between cheap and full drawing -- (BOOL)inLiveResize; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 -/* A view that returns YES for -preservesContentDuringLiveResize is responsible for invalidating its own dirty rects during live resize */ -- (BOOL)preservesContentDuringLiveResize; -/* -rectPreservedDuringLiveResize indicates the rect the view previously occupied, in the current coordinate system of the view */ -- (NSRect)rectPreservedDuringLiveResize; -/* On return from -getRectsExposedDuringLiveResize, exposedRects indicates the parts of the view that are newly exposed (at most 4 rects). *count indicates how many rects are in the exposedRects list */ -- (void)getRectsExposedDuringLiveResize:(NSRect[4])exposedRects count:(int *)count; -#endif -@end - -@interface NSObject(NSToolTipOwner) -- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data; -@end - -@interface NSView(NSKeyboardUI) -- (BOOL)performMnemonic:(NSString *)theString; -- (void)setNextKeyView:(NSView *)next; -- (NSView *)nextKeyView; -- (NSView *)previousKeyView; -- (NSView *)nextValidKeyView; -- (NSView *)previousValidKeyView; - -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 -- (BOOL)canBecomeKeyView; -#endif - -- (void)setKeyboardFocusRingNeedsDisplayInRect:(NSRect)rect; - -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 -- (void)setFocusRingType:(NSFocusRingType)focusRingType; -- (NSFocusRingType)focusRingType; -+ (NSFocusRingType)defaultFocusRingType; -#endif -@end - -@interface NSView(NSPrinting) - -/* EPS/PDF generation */ -- (void)writeEPSInsideRect:(NSRect)rect toPasteboard:(NSPasteboard *)pasteboard; -- (NSData *)dataWithEPSInsideRect:(NSRect)rect; -- (void)writePDFInsideRect:(NSRect)rect toPasteboard:(NSPasteboard *)pasteboard; -- (NSData *)dataWithPDFInsideRect:(NSRect)rect; - -/* Printing action method (Note fax: is obsolete) */ -- (void)print:(id)sender; - -/* Pagination */ -- (BOOL)knowsPageRange:(NSRangePointer)range; -- (float)heightAdjustLimit; -- (float)widthAdjustLimit; -- (void)adjustPageWidthNew:(float *)newRight left:(float)oldLeft right:(float)oldRight limit:(float)rightLimit; -- (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit; -- (NSRect)rectForPage:(int)page; -- (NSPoint)locationOfPrintRect:(NSRect)aRect; -- (void)drawPageBorderWithSize:(NSSize)borderSize; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 -- (NSAttributedString *)pageHeader; -- (NSAttributedString *)pageFooter; -#endif - -/*** This method is obsolete. It will never be invoked from within AppKit, and NSView's implementation of it does nothing. ***/ -- (void)drawSheetBorderWithSize:(NSSize)borderSize; - -/* Printing */ -/* Returns print job title. Default implementation first tries its window's NSDocument (displayName), then window's title */ -- (NSString *)printJobTitle; -- (void)beginDocument; -- (void)endDocument; - -- (void)beginPageInRect:(NSRect)aRect atPlacement:(NSPoint)location; -- (void)endPage; -@end - - -@interface NSView(NSDrag) -- (void)dragImage:(NSImage *)anImage at:(NSPoint)viewLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag; - -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 -- (NSArray *)registeredDraggedTypes; -#endif -- (void)registerForDraggedTypes:(NSArray *)newTypes; -- (void)unregisterDraggedTypes; - -- (BOOL)dragFile:(NSString *)filename fromRect:(NSRect)rect slideBack:(BOOL)aFlag event:(NSEvent *)event; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 -- (BOOL)dragPromisedFilesOfTypes:(NSArray *)typeArray fromRect:(NSRect)rect source:(id)sourceObject slideBack:(BOOL)aFlag event:(NSEvent *)event; -#endif -@end} - + class function getClass: objc.id; override; + // All instance variables are private + constructor initWithFrame(_frameRect: NSRect); + function window: objc.id;{NSWindow} + function superview: objc.id;{NSView} + function subviews: CFArrayRef; + function isDescendantOf(_aView: objc.id {NSView}): LongBool; + function ancestorSharedWithView(_aView: objc.id {NSView}): objc.id;{NSView} + function opaqueAncestor: objc.id;{NSView} + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3} + procedure setHidden(_flag: LongBool); + function isHidden: LongBool; + function isHiddenOrHasHiddenAncestor: LongBool; + procedure getRectsBeingDrawn_count(_rects: NSRect; _count: Integer); + function needsToDrawRect(_aRect: NSRect): LongBool; + function wantsDefaultClipping: LongBool; + {.$endif} + procedure addSubview(_aView: objc.id {NSView}); + procedure addSubview_positioned_relativeTo(_aView: objc.id {NSView}; _place: NSWindowOrderingMode; _otherView: objc.id {NSView}); + procedure sortSubviewsUsingFunction_context(_compare: TProcNSViewcompare0; _context: Pointer); + procedure viewWillMoveToWindow(_newWindow: objc.id {NSWindow}); + procedure viewDidMoveToWindow; + procedure viewWillMoveToSuperview(_newSuperview: objc.id {NSView}); + procedure viewDidMoveToSuperview; + procedure didAddSubview(_subview: objc.id {NSView}); + procedure willRemoveSubview(_subview: objc.id {NSView}); + procedure removeFromSuperview; + procedure replaceSubview_with(_oldView: objc.id {NSView}; _newView: objc.id {NSView}); + procedure removeFromSuperviewWithoutNeedingDisplay; + procedure setPostsFrameChangedNotifications(_flag: LongBool); + function postsFrameChangedNotifications: LongBool; + procedure resizeSubviewsWithOldSize(_oldSize: NSSize); + procedure resizeWithOldSuperviewSize(_oldSize: NSSize); + procedure setAutoresizesSubviews(_flag: LongBool); + function autoresizesSubviews: LongBool; + procedure setAutoresizingMask(_mask: LongWord); + function autoresizingMask: LongWord; + procedure setFrameOrigin(_newOrigin: NSPoint); + procedure setFrameSize(_newSize: NSSize); + procedure setFrame(_frameRect: NSRect); + function frame: NSRect; + procedure setFrameRotation(_angle: Single); + function frameRotation: Single; + procedure setBoundsOrigin(_newOrigin: NSPoint); + procedure setBoundsSize(_newSize: NSSize); + procedure setBoundsRotation(_angle: Single); + function boundsRotation: Single; + procedure translateOriginToPoint(_translation: NSPoint); + procedure scaleUnitSquareToSize(_newUnitSize: NSSize); + procedure rotateByAngle(_angle: Single); + procedure setBounds(_aRect: NSRect); + function bounds: NSRect; + function isFlipped: LongBool; + function isRotatedFromBase: LongBool; + function isRotatedOrScaledFromBase: LongBool; + function isOpaque: LongBool; + function convertPoint_fromView(_aPoint: NSPoint; _aView: objc.id {NSView}): NSPoint; + function convertPoint_toView(_aPoint: NSPoint; _aView: objc.id {NSView}): NSPoint; + function convertSize_fromView(_aSize: NSSize; _aView: objc.id {NSView}): NSSize; + function convertSize_toView(_aSize: NSSize; _aView: objc.id {NSView}): NSSize; + function convertRect_fromView(_aRect: NSRect; _aView: objc.id {NSView}): NSRect; + function convertRect_toView(_aRect: NSRect; _aView: objc.id {NSView}): NSRect; + function centerScanRect(_aRect: NSRect): NSRect; + function canDraw: LongBool; + procedure setNeedsDisplay(_flag: LongBool); + procedure setNeedsDisplayInRect(_invalidRect: NSRect); + function needsDisplay: LongBool; + procedure lockFocus; + procedure unlockFocus; + function lockFocusIfCanDraw: LongBool; + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} + function lockFocusIfCanDrawInContext(_context: objc.id {NSGraphicsContext}): LongBool; + {.$endif} + constructor focusView; + function visibleRect: NSRect; + procedure display; + procedure displayIfNeeded; + procedure displayIfNeededIgnoringOpacity; + procedure displayRect(_rect: NSRect); + procedure displayIfNeededInRect(_rect: NSRect); + procedure displayRectIgnoringOpacity(_rect: NSRect); + procedure displayIfNeededInRectIgnoringOpacity(_rect: NSRect); + procedure drawRect(_rect: NSRect); + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} + procedure displayRectIgnoringOpacity_inContext(_aRect: NSRect; _context: objc.id {NSGraphicsContext}); + function bitmapImageRepForCachingDisplayInRect(_rect: NSRect): objc.id;{NSBitmapImageRep} + procedure cacheDisplayInRect_toBitmapImageRep(_rect: NSRect; _bitmapImageRep: objc.id {NSBitmapImageRep}); + {.$endif} + function gState: Integer; + procedure allocateGState; + procedure releaseGState; + procedure setUpGState; + procedure renewGState; + procedure scrollPoint(_aPoint: NSPoint); + function scrollRectToVisible(_aRect: NSRect): LongBool; + function autoscroll(_theEvent: objc.id {NSEvent}): LongBool; + function adjustScroll(_newVisible: NSRect): NSRect; + procedure scrollRect_by(_aRect: NSRect; _delta: NSSize); + function hitTest(_aPoint: NSPoint): objc.id;{NSView} + function mouse_inRect(_aPoint: NSPoint; _aRect: NSRect): LongBool; + function viewWithTag(_aTag: Integer): objc.id; + function tag: Integer; + function performKeyEquivalent(_theEvent: objc.id {NSEvent}): LongBool; + function acceptsFirstMouse(_theEvent: objc.id {NSEvent}): LongBool; + function shouldDelayWindowOrderingForEvent(_theEvent: objc.id {NSEvent}): LongBool; + function needsPanelToBecomeKey: LongBool; + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2} + function mouseDownCanMoveWindow: LongBool; + {.$endif} + procedure addCursorRect_cursor(_aRect: NSRect; _anObj: objc.id {NSCursor}); + procedure removeCursorRect_cursor(_aRect: NSRect; _anObj: objc.id {NSCursor}); + procedure discardCursorRects; + procedure resetCursorRects; + function addTrackingRect_owner_userData_assumeInside(_aRect: NSRect; _anObject: objc.id; _data: Pointer; _flag: LongBool): NSTrackingRectTag; + procedure removeTrackingRect(_tag: NSTrackingRectTag); + function shouldDrawColor: LongBool; + procedure setPostsBoundsChangedNotifications(_flag: LongBool); + function postsBoundsChangedNotifications: LongBool; + function enclosingScrollView: objc.id;{NSScrollView} + function menuForEvent(_event: objc.id {NSEvent}): objc.id;{NSMenu} + class function defaultMenu: objc.id;{NSMenu} + procedure setToolTip(__string: CFStringRef); + function toolTip: CFStringRef; + function addToolTipRect_owner_userData(_aRect: NSRect; _anObject: objc.id; _data: Pointer): NSToolTipTag; + procedure removeToolTip(_tag: NSToolTipTag); + procedure removeAllToolTips; + // Live resize support + // a view receives viewWillStartLiveResize before the frame is first changed for a + // live resize + procedure viewWillStartLiveResize; + // a view receives viewWillEndLiveResize after the frame is last changed for a live + // resize + procedure viewDidEndLiveResize; + // inLiveResize can be called from drawRect: to decide between cheap and full drawing + function inLiveResize: LongBool; + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} + // A view that returns YES for -preservesContentDuringLiveResize is responsible for + // invalidating its own dirty rects during live resize + function preservesContentDuringLiveResize: LongBool; + // -rectPreservedDuringLiveResize indicates the rect the view previously occupied, + // in the current coordinate system of the view + function rectPreservedDuringLiveResize: NSRect; + // On return from -getRectsExposedDuringLiveResize, exposedRects indicates the parts + // of the view that are newly exposed (at most 4 rects). *count indicates how many + // rects are in the exposedRects list + procedure getRectsExposedDuringLiveResize; + {.$endif} + function performMnemonic(_theString: CFStringRef): LongBool; + procedure setNextKeyView(_next: objc.id {NSView}); + function nextKeyView: objc.id;{NSView} + function previousKeyView: objc.id;{NSView} + function nextValidKeyView: objc.id;{NSView} + function previousValidKeyView: objc.id;{NSView} + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3} + function canBecomeKeyView: LongBool; + {.$endif} + procedure setKeyboardFocusRingNeedsDisplayInRect(_rect: NSRect); + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3} + procedure setFocusRingType(_focusRingType: NSFocusRingType); + function focusRingType: NSFocusRingType; + class function defaultFocusRingType: NSFocusRingType; + {.$endif} + // EPS/PDF generation + procedure writeEPSInsideRect_toPasteboard(_rect: NSRect; _pasteboard: objc.id {NSPasteboard}); + function dataWithEPSInsideRect(_rect: NSRect): CFDataRef; + procedure writePDFInsideRect_toPasteboard(_rect: NSRect; _pasteboard: objc.id {NSPasteboard}); + function dataWithPDFInsideRect(_rect: NSRect): CFDataRef; + // Printing action method (Note fax: is obsolete) + procedure print(_sender: objc.id); + // Pagination + function knowsPageRange(_range: NSRangePointer): LongBool; + function heightAdjustLimit: Single; + function widthAdjustLimit: Single; + procedure adjustPageWidthNew_left_right_limit(_newRight: Single; _oldLeft: Single; _oldRight: Single; _rightLimit: Single); + procedure adjustPageHeightNew_top_bottom_limit(_newBottom: Single; _oldTop: Single; _oldBottom: Single; _bottomLimit: Single); + function rectForPage(_page: Integer): NSRect; + function locationOfPrintRect(_aRect: NSRect): NSPoint; + procedure drawPageBorderWithSize(_borderSize: NSSize); + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} + function pageHeader: objc.id;{NSAttributedString} + function pageFooter: objc.id;{NSAttributedString} + {.$endif} + // ** This method is obsolete. It will never be invoked from within AppKit, and NSView's + // implementation of it does nothing. ** + procedure drawSheetBorderWithSize(_borderSize: NSSize); + // Printing + // Returns print job title. Default implementation first tries its window's NSDocument + // (displayName), then window's title + function printJobTitle: CFStringRef; + procedure beginDocument; + procedure endDocument; + procedure beginPageInRect_atPlacement(_aRect: NSRect; _location: NSPoint); + procedure endPage; + procedure dragImage_at_offset_event_pasteboard_source_slideBack(_anImage: objc.id {NSImage}; _viewLocation: NSPoint; _initialOffset: NSSize; _event: objc.id {NSEvent}; _pboard: objc.id {NSPasteboard}; _sourceObj: objc.id; _slideFlag: LongBool); + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} + function registeredDraggedTypes: CFArrayRef; + {.$endif} + procedure registerForDraggedTypes(_newTypes: CFArrayRef); + procedure unregisterDraggedTypes; + function dragFile_fromRect_slideBack_event(_filename: CFStringRef; _rect: NSRect; _aFlag: LongBool; _event: objc.id {NSEvent}): LongBool; + {.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2} + function dragPromisedFilesOfTypes_fromRect_source_slideBack_event(_typeArray: CFArrayRef; _rect: NSRect; _sourceObject: objc.id; _aFlag: LongBool; _event: objc.id {NSEvent}): LongBool; + {.$endif} end; {$endif} {$endif} -{$ifdef IMPLEMENTATION} -procedure NSView.addSubview(aView: NSView); -type - addSubview_t = procedure (param1: objc.id; param2: SEL; - param3: objc.id); cdecl; -var - vmethod: addSubview_t; +{$ifdef IMPLEMENTATION} +const + StrNSView_NSView = 'NSView'; + StrNSView_initWithFrame = 'initWithFrame:'; + StrNSView_window = 'window'; + StrNSView_superview = 'superview'; + StrNSView_subviews = 'subviews'; + StrNSView_isDescendantOf = 'isDescendantOf:'; + StrNSView_ancestorSharedWithView = 'ancestorSharedWithView:'; + StrNSView_opaqueAncestor = 'opaqueAncestor'; + StrNSView_setHidden = 'setHidden:'; + StrNSView_isHidden = 'isHidden'; + StrNSView_isHiddenOrHasHiddenAncestor = 'isHiddenOrHasHiddenAncestor'; + StrNSView_getRectsBeingDrawn_count = 'getRectsBeingDrawn:count:'; + StrNSView_needsToDrawRect = 'needsToDrawRect:'; + StrNSView_wantsDefaultClipping = 'wantsDefaultClipping'; + StrNSView_addSubview = 'addSubview:'; + StrNSView_addSubview_positioned_relativeTo = 'addSubview:positioned:relativeTo:'; + StrNSView_sortSubviewsUsingFunction_context = 'sortSubviewsUsingFunction:context:'; + StrNSView_viewWillMoveToWindow = 'viewWillMoveToWindow:'; + StrNSView_viewDidMoveToWindow = 'viewDidMoveToWindow'; + StrNSView_viewWillMoveToSuperview = 'viewWillMoveToSuperview:'; + StrNSView_viewDidMoveToSuperview = 'viewDidMoveToSuperview'; + StrNSView_didAddSubview = 'didAddSubview:'; + StrNSView_willRemoveSubview = 'willRemoveSubview:'; + StrNSView_removeFromSuperview = 'removeFromSuperview'; + StrNSView_replaceSubview_with = 'replaceSubview:with:'; + StrNSView_removeFromSuperviewWithoutNeedingDisplay = 'removeFromSuperviewWithoutNeedingDisplay'; + StrNSView_setPostsFrameChangedNotifications = 'setPostsFrameChangedNotifications:'; + StrNSView_postsFrameChangedNotifications = 'postsFrameChangedNotifications'; + StrNSView_resizeSubviewsWithOldSize = 'resizeSubviewsWithOldSize:'; + StrNSView_resizeWithOldSuperviewSize = 'resizeWithOldSuperviewSize:'; + StrNSView_setAutoresizesSubviews = 'setAutoresizesSubviews:'; + StrNSView_autoresizesSubviews = 'autoresizesSubviews'; + StrNSView_setAutoresizingMask = 'setAutoresizingMask:'; + StrNSView_autoresizingMask = 'autoresizingMask'; + StrNSView_setFrameOrigin = 'setFrameOrigin:'; + StrNSView_setFrameSize = 'setFrameSize:'; + StrNSView_setFrame = 'setFrame:'; + StrNSView_frame = 'frame'; + StrNSView_setFrameRotation = 'setFrameRotation:'; + StrNSView_frameRotation = 'frameRotation'; + StrNSView_setBoundsOrigin = 'setBoundsOrigin:'; + StrNSView_setBoundsSize = 'setBoundsSize:'; + StrNSView_setBoundsRotation = 'setBoundsRotation:'; + StrNSView_boundsRotation = 'boundsRotation'; + StrNSView_translateOriginToPoint = 'translateOriginToPoint:'; + StrNSView_scaleUnitSquareToSize = 'scaleUnitSquareToSize:'; + StrNSView_rotateByAngle = 'rotateByAngle:'; + StrNSView_setBounds = 'setBounds:'; + StrNSView_bounds = 'bounds'; + StrNSView_isFlipped = 'isFlipped'; + StrNSView_isRotatedFromBase = 'isRotatedFromBase'; + StrNSView_isRotatedOrScaledFromBase = 'isRotatedOrScaledFromBase'; + StrNSView_isOpaque = 'isOpaque'; + StrNSView_convertPoint_fromView = 'convertPoint:fromView:'; + StrNSView_convertPoint_toView = 'convertPoint:toView:'; + StrNSView_convertSize_fromView = 'convertSize:fromView:'; + StrNSView_convertSize_toView = 'convertSize:toView:'; + StrNSView_convertRect_fromView = 'convertRect:fromView:'; + StrNSView_convertRect_toView = 'convertRect:toView:'; + StrNSView_centerScanRect = 'centerScanRect:'; + StrNSView_canDraw = 'canDraw'; + StrNSView_setNeedsDisplay = 'setNeedsDisplay:'; + StrNSView_setNeedsDisplayInRect = 'setNeedsDisplayInRect:'; + StrNSView_needsDisplay = 'needsDisplay'; + StrNSView_lockFocus = 'lockFocus'; + StrNSView_unlockFocus = 'unlockFocus'; + StrNSView_lockFocusIfCanDraw = 'lockFocusIfCanDraw'; + StrNSView_lockFocusIfCanDrawInContext = 'lockFocusIfCanDrawInContext:'; + StrNSView_focusView = 'focusView'; + StrNSView_visibleRect = 'visibleRect'; + StrNSView_display = 'display'; + StrNSView_displayIfNeeded = 'displayIfNeeded'; + StrNSView_displayIfNeededIgnoringOpacity = 'displayIfNeededIgnoringOpacity'; + StrNSView_displayRect = 'displayRect:'; + StrNSView_displayIfNeededInRect = 'displayIfNeededInRect:'; + StrNSView_displayRectIgnoringOpacity = 'displayRectIgnoringOpacity:'; + StrNSView_displayIfNeededInRectIgnoringOpacity = 'displayIfNeededInRectIgnoringOpacity:'; + StrNSView_drawRect = 'drawRect:'; + StrNSView_displayRectIgnoringOpacity_inContext = 'displayRectIgnoringOpacity:inContext:'; + StrNSView_bitmapImageRepForCachingDisplayInRect = 'bitmapImageRepForCachingDisplayInRect:'; + StrNSView_cacheDisplayInRect_toBitmapImageRep = 'cacheDisplayInRect:toBitmapImageRep:'; + StrNSView_gState = 'gState'; + StrNSView_allocateGState = 'allocateGState'; + StrNSView_releaseGState = 'releaseGState'; + StrNSView_setUpGState = 'setUpGState'; + StrNSView_renewGState = 'renewGState'; + StrNSView_scrollPoint = 'scrollPoint:'; + StrNSView_scrollRectToVisible = 'scrollRectToVisible:'; + StrNSView_autoscroll = 'autoscroll:'; + StrNSView_adjustScroll = 'adjustScroll:'; + StrNSView_scrollRect_by = 'scrollRect:by:'; + StrNSView_hitTest = 'hitTest:'; + StrNSView_mouse_inRect = 'mouse:inRect:'; + StrNSView_viewWithTag = 'viewWithTag:'; + StrNSView_tag = 'tag'; + StrNSView_performKeyEquivalent = 'performKeyEquivalent:'; + StrNSView_acceptsFirstMouse = 'acceptsFirstMouse:'; + StrNSView_shouldDelayWindowOrderingForEvent = 'shouldDelayWindowOrderingForEvent:'; + StrNSView_needsPanelToBecomeKey = 'needsPanelToBecomeKey'; + StrNSView_mouseDownCanMoveWindow = 'mouseDownCanMoveWindow'; + StrNSView_addCursorRect_cursor = 'addCursorRect:cursor:'; + StrNSView_removeCursorRect_cursor = 'removeCursorRect:cursor:'; + StrNSView_discardCursorRects = 'discardCursorRects'; + StrNSView_resetCursorRects = 'resetCursorRects'; + StrNSView_addTrackingRect_owner_userData_assumeInside = 'addTrackingRect:owner:userData:assumeInside:'; + StrNSView_removeTrackingRect = 'removeTrackingRect:'; + StrNSView_shouldDrawColor = 'shouldDrawColor'; + StrNSView_setPostsBoundsChangedNotifications = 'setPostsBoundsChangedNotifications:'; + StrNSView_postsBoundsChangedNotifications = 'postsBoundsChangedNotifications'; + StrNSView_enclosingScrollView = 'enclosingScrollView'; + StrNSView_menuForEvent = 'menuForEvent:'; + StrNSView_defaultMenu = 'defaultMenu'; + StrNSView_setToolTip = 'setToolTip:'; + StrNSView_toolTip = 'toolTip'; + StrNSView_addToolTipRect_owner_userData = 'addToolTipRect:owner:userData:'; + StrNSView_removeToolTip = 'removeToolTip:'; + StrNSView_removeAllToolTips = 'removeAllToolTips'; + StrNSView_viewWillStartLiveResize = 'viewWillStartLiveResize'; + StrNSView_viewDidEndLiveResize = 'viewDidEndLiveResize'; + StrNSView_inLiveResize = 'inLiveResize'; + StrNSView_preservesContentDuringLiveResize = 'preservesContentDuringLiveResize'; + StrNSView_rectPreservedDuringLiveResize = 'rectPreservedDuringLiveResize'; + StrNSView_getRectsExposedDuringLiveResize = 'getRectsExposedDuringLiveResize'; + + StrNSView_performMnemonic = 'performMnemonic:'; + StrNSView_setNextKeyView = 'setNextKeyView:'; + StrNSView_nextKeyView = 'nextKeyView'; + StrNSView_previousKeyView = 'previousKeyView'; + StrNSView_nextValidKeyView = 'nextValidKeyView'; + StrNSView_previousValidKeyView = 'previousValidKeyView'; + StrNSView_canBecomeKeyView = 'canBecomeKeyView'; + StrNSView_setKeyboardFocusRingNeedsDisplayInRect = 'setKeyboardFocusRingNeedsDisplayInRect:'; + StrNSView_setFocusRingType = 'setFocusRingType:'; + StrNSView_focusRingType = 'focusRingType'; + StrNSView_defaultFocusRingType = 'defaultFocusRingType'; + + StrNSView_writeEPSInsideRect_toPasteboard = 'writeEPSInsideRect:toPasteboard:'; + StrNSView_dataWithEPSInsideRect = 'dataWithEPSInsideRect:'; + StrNSView_writePDFInsideRect_toPasteboard = 'writePDFInsideRect:toPasteboard:'; + StrNSView_dataWithPDFInsideRect = 'dataWithPDFInsideRect:'; + StrNSView_print = 'print:'; + StrNSView_knowsPageRange = 'knowsPageRange:'; + StrNSView_heightAdjustLimit = 'heightAdjustLimit'; + StrNSView_widthAdjustLimit = 'widthAdjustLimit'; + StrNSView_adjustPageWidthNew_left_right_limit = 'adjustPageWidthNew:left:right:limit:'; + StrNSView_adjustPageHeightNew_top_bottom_limit = 'adjustPageHeightNew:top:bottom:limit:'; + StrNSView_rectForPage = 'rectForPage:'; + StrNSView_locationOfPrintRect = 'locationOfPrintRect:'; + StrNSView_drawPageBorderWithSize = 'drawPageBorderWithSize:'; + StrNSView_pageHeader = 'pageHeader'; + StrNSView_pageFooter = 'pageFooter'; + StrNSView_drawSheetBorderWithSize = 'drawSheetBorderWithSize:'; + StrNSView_printJobTitle = 'printJobTitle'; + StrNSView_beginDocument = 'beginDocument'; + StrNSView_endDocument = 'endDocument'; + StrNSView_beginPageInRect_atPlacement = 'beginPageInRect:atPlacement:'; + StrNSView_endPage = 'endPage'; + + StrNSView_dragImage_at_offset_event_pasteboard_source_slideBack = 'dragImage:at:offset:event:pasteboard:source:slideBack:'; + StrNSView_registeredDraggedTypes = 'registeredDraggedTypes'; + StrNSView_registerForDraggedTypes = 'registerForDraggedTypes:'; + StrNSView_unregisterDraggedTypes = 'unregisterDraggedTypes'; + StrNSView_dragFile_fromRect_slideBack_event = 'dragFile:fromRect:slideBack:event:'; + StrNSView_dragPromisedFilesOfTypes_fromRect_source_slideBack_event = 'dragPromisedFilesOfTypes:fromRect:source:slideBack:event:'; + +{ NSView } + +class function NSView.getClass: objc.id; begin - vmethod := addSubview_t(@objc_msgSend); - vmethod(Handle, sel_registerName(PChar(Str_addSubview)), aView.Handle); + Result := objc_getClass(StrNSView_NSView); end; -{$endif} +constructor NSView.initWithFrame(_frameRect: NSRect); +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_frameRect: NSRect): objc.id; cdecl; +var + vmethod: TmsgSendWrapper; +begin + ClassID := getClass(); + allocbuf := objc_msgSend(ClassID, sel_registerName(PChar(Str_alloc)), []); + vmethod := TmsgSendWrapper(@objc_msgSend); + Handle := vmethod(allocbuf, sel_registerName(PChar(StrNSView_initWithFrame)), _frameRect); +end; +function NSView.window: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_window)), [])); +end; + +function NSView.superview: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_superview)), [])); +end; + +function NSView.subviews: CFArrayRef; +begin + Result := CFArrayRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_subviews)), [])); +end; + +function NSView.isDescendantOf(_aView: objc.id {NSView}): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aView: objc.id {NSView}): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_isDescendantOf)), _aView)); +end; + +function NSView.ancestorSharedWithView(_aView: objc.id {NSView}): objc.id; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aView: objc.id {NSView}): objc.id; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := objc.id(vmethod(Handle, sel_registerName(PChar(StrNSView_ancestorSharedWithView)), _aView)); +end; + +function NSView.opaqueAncestor: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_opaqueAncestor)), [])); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3} +procedure NSView.setHidden(_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(StrNSView_setHidden)), _flag); +end; + +function NSView.isHidden: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_isHidden)), [])); +end; + +function NSView.isHiddenOrHasHiddenAncestor: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_isHiddenOrHasHiddenAncestor)), [])); +end; + +procedure NSView.getRectsBeingDrawn_count(_rects: NSRect; _count: Integer); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rects: NSRect; _count: Integer); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_getRectsBeingDrawn_count)), _rects, _count); +end; + +function NSView.needsToDrawRect(_aRect: NSRect): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aRect: NSRect): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_needsToDrawRect)), _aRect)); +end; + +function NSView.wantsDefaultClipping: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_wantsDefaultClipping)), [])); +end; + +{.$endif} +procedure NSView.addSubview(_aView: objc.id {NSView}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aView: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_addSubview)), _aView); +end; + +procedure NSView.addSubview_positioned_relativeTo(_aView: objc.id {NSView}; _place: NSWindowOrderingMode; _otherView: objc.id {NSView}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aView: objc.id {NSView}; _place: NSWindowOrderingMode; _otherView: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_addSubview_positioned_relativeTo)), _aView, _place, _otherView); +end; + +procedure NSView.sortSubviewsUsingFunction_context(_compare: TProcNSViewcompare0; _context: Pointer); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_compare: TProcNSViewcompare0; _context: Pointer); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_sortSubviewsUsingFunction_context)), _compare, _context); +end; + +procedure NSView.viewWillMoveToWindow(_newWindow: objc.id {NSWindow}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newWindow: objc.id {NSWindow}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_viewWillMoveToWindow)), _newWindow); +end; + +procedure NSView.viewDidMoveToWindow; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_viewDidMoveToWindow)), []); +end; + +procedure NSView.viewWillMoveToSuperview(_newSuperview: objc.id {NSView}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newSuperview: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_viewWillMoveToSuperview)), _newSuperview); +end; + +procedure NSView.viewDidMoveToSuperview; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_viewDidMoveToSuperview)), []); +end; + +procedure NSView.didAddSubview(_subview: objc.id {NSView}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_subview: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_didAddSubview)), _subview); +end; + +procedure NSView.willRemoveSubview(_subview: objc.id {NSView}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_subview: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_willRemoveSubview)), _subview); +end; + +procedure NSView.removeFromSuperview; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_removeFromSuperview)), []); +end; + +procedure NSView.replaceSubview_with(_oldView: objc.id {NSView}; _newView: objc.id {NSView}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_oldView: objc.id {NSView}; _newView: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_replaceSubview_with)), _oldView, _newView); +end; + +procedure NSView.removeFromSuperviewWithoutNeedingDisplay; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_removeFromSuperviewWithoutNeedingDisplay)), []); +end; + +procedure NSView.setPostsFrameChangedNotifications(_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(StrNSView_setPostsFrameChangedNotifications)), _flag); +end; + +function NSView.postsFrameChangedNotifications: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_postsFrameChangedNotifications)), [])); +end; + +procedure NSView.resizeSubviewsWithOldSize(_oldSize: NSSize); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_oldSize: NSSize); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_resizeSubviewsWithOldSize)), _oldSize); +end; + +procedure NSView.resizeWithOldSuperviewSize(_oldSize: NSSize); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_oldSize: NSSize); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_resizeWithOldSuperviewSize)), _oldSize); +end; + +procedure NSView.setAutoresizesSubviews(_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(StrNSView_setAutoresizesSubviews)), _flag); +end; + +function NSView.autoresizesSubviews: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_autoresizesSubviews)), [])); +end; + +procedure NSView.setAutoresizingMask(_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(StrNSView_setAutoresizingMask)), _mask); +end; + +function NSView.autoresizingMask: LongWord; +begin + Result := LongWord(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_autoresizingMask)), [])); +end; + +procedure NSView.setFrameOrigin(_newOrigin: NSPoint); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newOrigin: NSPoint); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setFrameOrigin)), _newOrigin); +end; + +procedure NSView.setFrameSize(_newSize: NSSize); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newSize: NSSize); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setFrameSize)), _newSize); +end; + +procedure NSView.setFrame(_frameRect: NSRect); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_frameRect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setFrame)), _frameRect); +end; + +function NSView.frame: NSRect; +begin + objc_msgSend_stret(@Result, Handle, sel_registerName(PChar(StrNSView_frame)), []); +end; + +procedure NSView.setFrameRotation(_angle: Single); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_angle: Single); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setFrameRotation)), _angle); +end; + +function NSView.frameRotation: Single; +begin + Result := Single(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_frameRotation)), [])); +end; + +procedure NSView.setBoundsOrigin(_newOrigin: NSPoint); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newOrigin: NSPoint); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setBoundsOrigin)), _newOrigin); +end; + +procedure NSView.setBoundsSize(_newSize: NSSize); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newSize: NSSize); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setBoundsSize)), _newSize); +end; + +procedure NSView.setBoundsRotation(_angle: Single); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_angle: Single); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setBoundsRotation)), _angle); +end; + +function NSView.boundsRotation: Single; +begin + Result := Single(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_boundsRotation)), [])); +end; + +procedure NSView.translateOriginToPoint(_translation: NSPoint); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_translation: NSPoint); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_translateOriginToPoint)), _translation); +end; + +procedure NSView.scaleUnitSquareToSize(_newUnitSize: NSSize); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newUnitSize: NSSize); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_scaleUnitSquareToSize)), _newUnitSize); +end; + +procedure NSView.rotateByAngle(_angle: Single); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_angle: Single); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_rotateByAngle)), _angle); +end; + +procedure NSView.setBounds(_aRect: NSRect); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aRect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setBounds)), _aRect); +end; + +function NSView.bounds: NSRect; +begin + objc_msgSend_stret(@Result, Handle, sel_registerName(PChar(StrNSView_bounds)), []); +end; + +function NSView.isFlipped: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_isFlipped)), [])); +end; + +function NSView.isRotatedFromBase: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_isRotatedFromBase)), [])); +end; + +function NSView.isRotatedOrScaledFromBase: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_isRotatedOrScaledFromBase)), [])); +end; + +function NSView.isOpaque: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_isOpaque)), [])); +end; + +function NSView.convertPoint_fromView(_aPoint: NSPoint; _aView: objc.id {NSView}): NSPoint; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_aPoint: NSPoint; _aView: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_convertPoint_fromView)), _aPoint, _aView); +end; + +function NSView.convertPoint_toView(_aPoint: NSPoint; _aView: objc.id {NSView}): NSPoint; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_aPoint: NSPoint; _aView: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_convertPoint_toView)), _aPoint, _aView); +end; + +function NSView.convertSize_fromView(_aSize: NSSize; _aView: objc.id {NSView}): NSSize; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_aSize: NSSize; _aView: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_convertSize_fromView)), _aSize, _aView); +end; + +function NSView.convertSize_toView(_aSize: NSSize; _aView: objc.id {NSView}): NSSize; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_aSize: NSSize; _aView: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_convertSize_toView)), _aSize, _aView); +end; + +function NSView.convertRect_fromView(_aRect: NSRect; _aView: objc.id {NSView}): NSRect; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_aRect: NSRect; _aView: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_convertRect_fromView)), _aRect, _aView); +end; + +function NSView.convertRect_toView(_aRect: NSRect; _aView: objc.id {NSView}): NSRect; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_aRect: NSRect; _aView: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_convertRect_toView)), _aRect, _aView); +end; + +function NSView.centerScanRect(_aRect: NSRect): NSRect; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_aRect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_centerScanRect)), _aRect); +end; + +function NSView.canDraw: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_canDraw)), [])); +end; + +procedure NSView.setNeedsDisplay(_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(StrNSView_setNeedsDisplay)), _flag); +end; + +procedure NSView.setNeedsDisplayInRect(_invalidRect: NSRect); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_invalidRect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setNeedsDisplayInRect)), _invalidRect); +end; + +function NSView.needsDisplay: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_needsDisplay)), [])); +end; + +procedure NSView.lockFocus; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_lockFocus)), []); +end; + +procedure NSView.unlockFocus; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_unlockFocus)), []); +end; + +function NSView.lockFocusIfCanDraw: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_lockFocusIfCanDraw)), [])); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} +function NSView.lockFocusIfCanDrawInContext(_context: objc.id {NSGraphicsContext}): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_context: objc.id {NSGraphicsContext}): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_lockFocusIfCanDrawInContext)), _context)); +end; + +{.$endif} +constructor NSView.focusView; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL): objc.id; cdecl; +var + vmethod: TmsgSendWrapper; +begin + ClassID := getClass(); + vmethod := TmsgSendWrapper(@objc_msgSend); + Handle := vmethod(ClassID, sel_registerName(PChar(StrNSView_focusView))); +end; + +function NSView.visibleRect: NSRect; +begin + objc_msgSend_stret(@Result, Handle, sel_registerName(PChar(StrNSView_visibleRect)), []); +end; + +procedure NSView.display; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_display)), []); +end; + +procedure NSView.displayIfNeeded; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_displayIfNeeded)), []); +end; + +procedure NSView.displayIfNeededIgnoringOpacity; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_displayIfNeededIgnoringOpacity)), []); +end; + +procedure NSView.displayRect(_rect: NSRect); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_displayRect)), _rect); +end; + +procedure NSView.displayIfNeededInRect(_rect: NSRect); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_displayIfNeededInRect)), _rect); +end; + +procedure NSView.displayRectIgnoringOpacity(_rect: NSRect); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_displayRectIgnoringOpacity)), _rect); +end; + +procedure NSView.displayIfNeededInRectIgnoringOpacity(_rect: NSRect); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_displayIfNeededInRectIgnoringOpacity)), _rect); +end; + +procedure NSView.drawRect(_rect: NSRect); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_drawRect)), _rect); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} +procedure NSView.displayRectIgnoringOpacity_inContext(_aRect: NSRect; _context: objc.id {NSGraphicsContext}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aRect: NSRect; _context: objc.id {NSGraphicsContext}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_displayRectIgnoringOpacity_inContext)), _aRect, _context); +end; + +function NSView.bitmapImageRepForCachingDisplayInRect(_rect: NSRect): objc.id; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_rect: NSRect): objc.id; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := objc.id(vmethod(Handle, sel_registerName(PChar(StrNSView_bitmapImageRepForCachingDisplayInRect)), _rect)); +end; + +procedure NSView.cacheDisplayInRect_toBitmapImageRep(_rect: NSRect; _bitmapImageRep: objc.id {NSBitmapImageRep}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect; _bitmapImageRep: objc.id {NSBitmapImageRep}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_cacheDisplayInRect_toBitmapImageRep)), _rect, _bitmapImageRep); +end; + +{.$endif} +function NSView.gState: Integer; +begin + Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_gState)), [])); +end; + +procedure NSView.allocateGState; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_allocateGState)), []); +end; + +procedure NSView.releaseGState; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_releaseGState)), []); +end; + +procedure NSView.setUpGState; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_setUpGState)), []); +end; + +procedure NSView.renewGState; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_renewGState)), []); +end; + +procedure NSView.scrollPoint(_aPoint: NSPoint); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aPoint: NSPoint); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_scrollPoint)), _aPoint); +end; + +function NSView.scrollRectToVisible(_aRect: NSRect): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aRect: NSRect): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_scrollRectToVisible)), _aRect)); +end; + +function NSView.autoscroll(_theEvent: objc.id {NSEvent}): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_theEvent: objc.id {NSEvent}): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_autoscroll)), _theEvent)); +end; + +function NSView.adjustScroll(_newVisible: NSRect): NSRect; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_newVisible: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_adjustScroll)), _newVisible); +end; + +procedure NSView.scrollRect_by(_aRect: NSRect; _delta: NSSize); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aRect: NSRect; _delta: NSSize); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_scrollRect_by)), _aRect, _delta); +end; + +function NSView.hitTest(_aPoint: NSPoint): objc.id; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aPoint: NSPoint): objc.id; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := objc.id(vmethod(Handle, sel_registerName(PChar(StrNSView_hitTest)), _aPoint)); +end; + +function NSView.mouse_inRect(_aPoint: NSPoint; _aRect: NSRect): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aPoint: NSPoint; _aRect: NSRect): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_mouse_inRect)), _aPoint, _aRect)); +end; + +function NSView.viewWithTag(_aTag: Integer): objc.id; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aTag: Integer): objc.id; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := objc.id(vmethod(Handle, sel_registerName(PChar(StrNSView_viewWithTag)), _aTag)); +end; + +function NSView.tag: Integer; +begin + Result := Integer(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_tag)), [])); +end; + +function NSView.performKeyEquivalent(_theEvent: objc.id {NSEvent}): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_theEvent: objc.id {NSEvent}): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_performKeyEquivalent)), _theEvent)); +end; + +function NSView.acceptsFirstMouse(_theEvent: objc.id {NSEvent}): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_theEvent: objc.id {NSEvent}): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_acceptsFirstMouse)), _theEvent)); +end; + +function NSView.shouldDelayWindowOrderingForEvent(_theEvent: objc.id {NSEvent}): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_theEvent: objc.id {NSEvent}): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_shouldDelayWindowOrderingForEvent)), _theEvent)); +end; + +function NSView.needsPanelToBecomeKey: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_needsPanelToBecomeKey)), [])); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2} +function NSView.mouseDownCanMoveWindow: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_mouseDownCanMoveWindow)), [])); +end; + +{.$endif} +procedure NSView.addCursorRect_cursor(_aRect: NSRect; _anObj: objc.id {NSCursor}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aRect: NSRect; _anObj: objc.id {NSCursor}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_addCursorRect_cursor)), _aRect, _anObj); +end; + +procedure NSView.removeCursorRect_cursor(_aRect: NSRect; _anObj: objc.id {NSCursor}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aRect: NSRect; _anObj: objc.id {NSCursor}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_removeCursorRect_cursor)), _aRect, _anObj); +end; + +procedure NSView.discardCursorRects; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_discardCursorRects)), []); +end; + +procedure NSView.resetCursorRects; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_resetCursorRects)), []); +end; + +function NSView.addTrackingRect_owner_userData_assumeInside(_aRect: NSRect; _anObject: objc.id; _data: Pointer; _flag: LongBool): NSTrackingRectTag; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aRect: NSRect; _anObject: objc.id; _data: Pointer; _flag: LongBool): NSTrackingRectTag; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := NSTrackingRectTag(vmethod(Handle, sel_registerName(PChar(StrNSView_addTrackingRect_owner_userData_assumeInside)), _aRect, _anObject, _data, _flag)); +end; + +procedure NSView.removeTrackingRect(_tag: NSTrackingRectTag); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_tag: NSTrackingRectTag); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_removeTrackingRect)), _tag); +end; + +function NSView.shouldDrawColor: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_shouldDrawColor)), [])); +end; + +procedure NSView.setPostsBoundsChangedNotifications(_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(StrNSView_setPostsBoundsChangedNotifications)), _flag); +end; + +function NSView.postsBoundsChangedNotifications: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_postsBoundsChangedNotifications)), [])); +end; + +function NSView.enclosingScrollView: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_enclosingScrollView)), [])); +end; + +function NSView.menuForEvent(_event: objc.id {NSEvent}): objc.id; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_event: objc.id {NSEvent}): objc.id; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := objc.id(vmethod(Handle, sel_registerName(PChar(StrNSView_menuForEvent)), _event)); +end; + +class function NSView.defaultMenu: objc.id; +begin + Result := objc.id(objc_msgSend(getClass, sel_registerName(PChar(StrNSView_defaultMenu)), [])); +end; + +procedure NSView.setToolTip(__string: CFStringRef); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;__string: CFStringRef); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setToolTip)), __string); +end; + +function NSView.toolTip: CFStringRef; +begin + Result := CFStringRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_toolTip)), [])); +end; + +function NSView.addToolTipRect_owner_userData(_aRect: NSRect; _anObject: objc.id; _data: Pointer): NSToolTipTag; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_aRect: NSRect; _anObject: objc.id; _data: Pointer): NSToolTipTag; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := NSToolTipTag(vmethod(Handle, sel_registerName(PChar(StrNSView_addToolTipRect_owner_userData)), _aRect, _anObject, _data)); +end; + +procedure NSView.removeToolTip(_tag: NSToolTipTag); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_tag: NSToolTipTag); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_removeToolTip)), _tag); +end; + +procedure NSView.removeAllToolTips; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_removeAllToolTips)), []); +end; + +procedure NSView.viewWillStartLiveResize; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_viewWillStartLiveResize)), []); +end; + +procedure NSView.viewDidEndLiveResize; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_viewDidEndLiveResize)), []); +end; + +function NSView.inLiveResize: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_inLiveResize)), [])); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} +function NSView.preservesContentDuringLiveResize: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_preservesContentDuringLiveResize)), [])); +end; + +function NSView.rectPreservedDuringLiveResize: NSRect; +begin + objc_msgSend_stret(@Result, Handle, sel_registerName(PChar(StrNSView_rectPreservedDuringLiveResize)), []); +end; + +procedure NSView.getRectsExposedDuringLiveResize; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_getRectsExposedDuringLiveResize)), []); +end; + +{.$endif} +function NSView.performMnemonic(_theString: CFStringRef): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_theString: CFStringRef): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_performMnemonic)), _theString)); +end; + +procedure NSView.setNextKeyView(_next: objc.id {NSView}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_next: objc.id {NSView}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setNextKeyView)), _next); +end; + +function NSView.nextKeyView: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_nextKeyView)), [])); +end; + +function NSView.previousKeyView: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_previousKeyView)), [])); +end; + +function NSView.nextValidKeyView: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_nextValidKeyView)), [])); +end; + +function NSView.previousValidKeyView: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_previousValidKeyView)), [])); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3} +function NSView.canBecomeKeyView: LongBool; +begin + Result := LongBool(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_canBecomeKeyView)), [])); +end; + +{.$endif} +procedure NSView.setKeyboardFocusRingNeedsDisplayInRect(_rect: NSRect); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setKeyboardFocusRingNeedsDisplayInRect)), _rect); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3} +procedure NSView.setFocusRingType(_focusRingType: NSFocusRingType); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_focusRingType: NSFocusRingType); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_setFocusRingType)), _focusRingType); +end; + +function NSView.focusRingType: NSFocusRingType; +begin + Result := NSFocusRingType(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_focusRingType)), [])); +end; + +class function NSView.defaultFocusRingType: NSFocusRingType; +begin + Result := NSFocusRingType(objc_msgSend(getClass, sel_registerName(PChar(StrNSView_defaultFocusRingType)), [])); +end; + +{.$endif} +procedure NSView.writeEPSInsideRect_toPasteboard(_rect: NSRect; _pasteboard: objc.id {NSPasteboard}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect; _pasteboard: objc.id {NSPasteboard}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_writeEPSInsideRect_toPasteboard)), _rect, _pasteboard); +end; + +function NSView.dataWithEPSInsideRect(_rect: NSRect): CFDataRef; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_rect: NSRect): CFDataRef; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := CFDataRef(vmethod(Handle, sel_registerName(PChar(StrNSView_dataWithEPSInsideRect)), _rect)); +end; + +procedure NSView.writePDFInsideRect_toPasteboard(_rect: NSRect; _pasteboard: objc.id {NSPasteboard}); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_rect: NSRect; _pasteboard: objc.id {NSPasteboard}); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_writePDFInsideRect_toPasteboard)), _rect, _pasteboard); +end; + +function NSView.dataWithPDFInsideRect(_rect: NSRect): CFDataRef; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_rect: NSRect): CFDataRef; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := CFDataRef(vmethod(Handle, sel_registerName(PChar(StrNSView_dataWithPDFInsideRect)), _rect)); +end; + +procedure NSView.print(_sender: objc.id); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_sender: objc.id); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_print)), _sender); +end; + +function NSView.knowsPageRange(_range: NSRangePointer): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_range: NSRangePointer): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_knowsPageRange)), _range)); +end; + +function NSView.heightAdjustLimit: Single; +begin + Result := Single(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_heightAdjustLimit)), [])); +end; + +function NSView.widthAdjustLimit: Single; +begin + Result := Single(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_widthAdjustLimit)), [])); +end; + +procedure NSView.adjustPageWidthNew_left_right_limit(_newRight: Single; _oldLeft: Single; _oldRight: Single; _rightLimit: Single); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newRight: Single; _oldLeft: Single; _oldRight: Single; _rightLimit: Single); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_adjustPageWidthNew_left_right_limit)), _newRight, _oldLeft, _oldRight, _rightLimit); +end; + +procedure NSView.adjustPageHeightNew_top_bottom_limit(_newBottom: Single; _oldTop: Single; _oldBottom: Single; _bottomLimit: Single); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newBottom: Single; _oldTop: Single; _oldBottom: Single; _bottomLimit: Single); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_adjustPageHeightNew_top_bottom_limit)), _newBottom, _oldTop, _oldBottom, _bottomLimit); +end; + +function NSView.rectForPage(_page: Integer): NSRect; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_page: Integer); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_rectForPage)), _page); +end; + +function NSView.locationOfPrintRect(_aRect: NSRect): NSPoint; +type + TmsgSendWrapper = procedure (result_param: Pointer; param1: objc.id; param2: SEL;_aRect: NSRect); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend_fpret); + vmethod(@Result, Handle, sel_registerName(PChar(StrNSView_locationOfPrintRect)), _aRect); +end; + +procedure NSView.drawPageBorderWithSize(_borderSize: NSSize); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_borderSize: NSSize); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_drawPageBorderWithSize)), _borderSize); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} +function NSView.pageHeader: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_pageHeader)), [])); +end; + +function NSView.pageFooter: objc.id; +begin + Result := objc.id(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_pageFooter)), [])); +end; + +{.$endif} +procedure NSView.drawSheetBorderWithSize(_borderSize: NSSize); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_borderSize: NSSize); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_drawSheetBorderWithSize)), _borderSize); +end; + +function NSView.printJobTitle: CFStringRef; +begin + Result := CFStringRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_printJobTitle)), [])); +end; + +procedure NSView.beginDocument; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_beginDocument)), []); +end; + +procedure NSView.endDocument; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_endDocument)), []); +end; + +procedure NSView.beginPageInRect_atPlacement(_aRect: NSRect; _location: NSPoint); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_aRect: NSRect; _location: NSPoint); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_beginPageInRect_atPlacement)), _aRect, _location); +end; + +procedure NSView.endPage; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_endPage)), []); +end; + +procedure NSView.dragImage_at_offset_event_pasteboard_source_slideBack(_anImage: objc.id {NSImage}; _viewLocation: NSPoint; _initialOffset: NSSize; _event: objc.id {NSEvent}; _pboard: objc.id {NSPasteboard}; _sourceObj: objc.id; _slideFlag: LongBool); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_anImage: objc.id {NSImage}; _viewLocation: NSPoint; _initialOffset: NSSize; _event: objc.id {NSEvent}; _pboard: objc.id {NSPasteboard}; _sourceObj: objc.id; _slideFlag: LongBool); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_dragImage_at_offset_event_pasteboard_source_slideBack)), _anImage, _viewLocation, _initialOffset, _event, _pboard, _sourceObj, _slideFlag); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4} +function NSView.registeredDraggedTypes: CFArrayRef; +begin + Result := CFArrayRef(objc_msgSend(Handle, sel_registerName(PChar(StrNSView_registeredDraggedTypes)), [])); +end; + +{.$endif} +procedure NSView.registerForDraggedTypes(_newTypes: CFArrayRef); +type + TmsgSendWrapper = procedure (param1: objc.id; param2: SEL;_newTypes: CFArrayRef); cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + vmethod(Handle, sel_registerName(PChar(StrNSView_registerForDraggedTypes)), _newTypes); +end; + +procedure NSView.unregisterDraggedTypes; +begin + objc_msgSend(Handle, sel_registerName(PChar(StrNSView_unregisterDraggedTypes)), []); +end; + +function NSView.dragFile_fromRect_slideBack_event(_filename: CFStringRef; _rect: NSRect; _aFlag: LongBool; _event: objc.id {NSEvent}): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_filename: CFStringRef; _rect: NSRect; _aFlag: LongBool; _event: objc.id {NSEvent}): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_dragFile_fromRect_slideBack_event)), _filename, _rect, _aFlag, _event)); +end; + +{.$ifdef MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2} +function NSView.dragPromisedFilesOfTypes_fromRect_source_slideBack_event(_typeArray: CFArrayRef; _rect: NSRect; _sourceObject: objc.id; _aFlag: LongBool; _event: objc.id {NSEvent}): LongBool; +type + TmsgSendWrapper = function (param1: objc.id; param2: SEL;_typeArray: CFArrayRef; _rect: NSRect; _sourceObject: objc.id; _aFlag: LongBool; _event: objc.id {NSEvent}): LongBool; cdecl; +var + vmethod: TmsgSendWrapper; +begin + vmethod := TmsgSendWrapper(@objc_msgSend); + Result := LongBool(vmethod(Handle, sel_registerName(PChar(StrNSView_dragPromisedFilesOfTypes_fromRect_source_slideBack_event)), _typeArray, _rect, _sourceObject, _aFlag, _event)); +end; + +{.$endif} +{$endif} diff --git a/bindings/pascocoa/build/buildappkit.sh b/bindings/pascocoa/build/buildappkit.sh index e66128d8b..27148963f 100755 --- a/bindings/pascocoa/build/buildappkit.sh +++ b/bindings/pascocoa/build/buildappkit.sh @@ -6,16 +6,17 @@ FRAMEWORK="/System/Library/Frameworks/AppKit.framework/Headers" #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSApplication.h > ../appkit/NSApplication.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSBitmapImageRep.h > ../appkit/NSBitmapImageRep.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSButton.h > ../appkit/NSButton.inc -./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSControl.h > ../appkit/NSControl.inc +#./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSControl.h > ../appkit/NSControl.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSGraphics.h > ../appkit/NSGraphics.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSGraphicsContext.h > ../appkit/NSGraphicsContext.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSImage.h > ../appkit/NSImage.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSImageRep.h > ../appkit/NSImageRep.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSMenu.h > ../appkit/NSMenu.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSMenuItem.h > ../appkit/NSMenuItem.inc -./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSSpellProtocol.h > ../appkit/NSSpellProtocol.inc +#./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSSpellProtocol.h > ../appkit/NSSpellProtocol.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSStatusBar.h > ../appkit/NSStatusBar.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSStatusItem.h > ../appkit/NSStatusItem.inc -./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSText.h > ../appkit/NSText.inc +#./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSText.h > ../appkit/NSText.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSUserInterfaceValidation.h > ../appkit/NSUserInterfaceValidation.inc +./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSView.h > ../appkit/NSView.inc #./objcparser -ini=$DEFAULT_INI -ini=$APPKIT_INI $FRAMEWORK/NSWindow.h > ../appkit/NSWindow.inc