Re: AXApplication values wrong
Re: AXApplication values wrong
- Subject: Re: AXApplication values wrong
- From: Felipe Monteiro de Carvalho <email@hidden>
- Date: Sun, 18 Mar 2012 10:59:07 +0100
On Sun, Mar 18, 2012 at 7:24 AM, Chris Fleizach <email@hidden> wrote:
> If you're not using NSWindows, then your application will not know about your fake windows. I'd suggest using a subclass of NSWindow at the least.
My windows are not fake, and neither could they be as far as I know.
My Window class is a subclass of NSWindow created in Objective Pascal,
the Free Pascal dialect with direct Objective C integration:
TCocoaForm = objcclass(NSWindow, NSWindowDelegateProtocol)
protected
function windowShouldClose(sender : id): LongBool; message
'windowShouldClose:';
procedure windowWillClose(notification: NSNotification); message
'windowWillClose:';
procedure windowDidBecomeKey(notification: NSNotification);
message 'windowDidBecomeKey:';
procedure windowDidResignKey(notification: NSNotification);
message 'windowDidResignKey:';
procedure windowDidResize(notification: NSNotification); message
'windowDidResize:';
public
WindowHandle: TCocoaWindow;
function acceptsFirstResponder: Boolean; override;
// Mouse events
procedure mouseUp(event: NSEvent); override;
procedure mouseDown(event: NSEvent); override;
procedure mouseDragged(event: NSEvent); override;
procedure mouseEntered(event: NSEvent); override;
procedure mouseExited(event: NSEvent); override;
procedure mouseMoved(event: NSEvent); override;
// Keyboard events
procedure keyDown(theEvent: NSEvent); override;
procedure keyUp(theEvent: NSEvent); override;
function MacKeyCodeToLCLKey(AKeyEvent: NSEvent; var SendKeyUpDown,
SendChar: Boolean; var AUTF8Char: TUTF8Char): Word; message
'MacKeyCodeToLCLKey:sendkey:sendchar:AUTF8Char:';
//
function lclIsVisible: Boolean; message 'lclIsVisible';
procedure lclInvalidateRect(const r: TRect); message 'lclInvalidateRect:';
procedure lclInvalidate; message 'lclInvalidate';
procedure lclLocalToScreen(var X,Y: Integer); message 'lclLocalToScreen::';
function lclFrame: TRect; message 'lclFrame';
procedure lclSetFrame(const r: TRect); message 'lclSetFrame:';
function lclClientFrame: TRect; message 'lclClientFrame';
// callback routines
procedure CallbackActivate; message 'CallbackActivate';
procedure CallbackDeactivate; message 'CallbackDeactivate';
procedure CallbackCloseQuery(var CanClose: Boolean); message
'CallbackCloseQuery:';
procedure CallbackResize; message 'CallbackResize';
end;
It is a sub-class of NSWindow which implements also NSWindowDelegateProtocol
--
Felipe Monteiro de Carvalho
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden