Re: AXPosition and AXSize during window drags
Re: AXPosition and AXSize during window drags
- Subject: Re: AXPosition and AXSize during window drags
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 27 Nov 2007 09:31:13 -0500
- Thread-topic: AXPosition and AXSize during window drags
on 2007-11-26 12:13 PM, Bill Cheeseman at email@hidden wrote:
> When turning on my overlay window (a borderless semitransparent highlighting
> window), I locate the target window in the global window list by matching
> the pid of the application that owns the target window and the window
> bounds. Then I save its CGWindowID for later use.
>
> - (CGWindowID)getHighlightedWindowNumber {
> CGWindowID windowNumber = kCGNullWindowID;
> NSArray *windowList = (NSArray
> *)CGWindowListCopyWindowInfo(kCGWindowListOptionAll |
> kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements,
> kCGNullWindowID);
> if (windowList) {
> PFUIElement *element = ([[self highlightedElement]
> isRole:NSAccessibilityWindowRole]) ? [self highlightedElement] : [[self
> highlightedElement] AXWindow];
Sorry, another correction. In the last line in the above excerpt from my
code, change AXWindow to AXTopLevelUIElement. I had forgotten that some UI
elements in some applications, such as the Finder, do not implement an
AXWindow attributute, but they do implement an AXTopLevelUIElement attribute
that returns the window. I haven't yet checked how this works when working
with a drawer or a sheet -- I'll leave that as an exercise for the
reader....
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
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