• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
FindWindow equivalent?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FindWindow equivalent?


  • Subject: FindWindow equivalent?
  • From: Jonathan Wight <email@hidden>
  • Date: Fri, 06 Sep 2002 17:26:55 -0500

I need to find which of my application's window's content is directly under
a certain pixel. Under Carbon I'd just use the venerable FindWindow()
function.

Under Cocoa I've tried quite a few methods. I've iterated through the array
returned by -[NSApplication windows] and checking the pixel location against
the frame of each window but if my pixel is obscured by another
application's window I still mistakenly my window contains the pixel.

So I've also used some CoreGraphics hackery to find the frames of all
visible windows of every application. But then if the window title obscures
my pixel I'm in the same position.

I've even tried using FindWindow itself thinking I might be able to go from
a WindowRef to an NSWindow but no luck.

So anyone know how to do FindWindow in Cocoa?

Jon.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Get parent process (Carbon question)
  • Next by Date: Interface Builder Question
  • Previous by thread: Re: Dealing with Very Slow NSViews
  • Next by thread: Interface Builder Question
  • Index(es):
    • Date
    • Thread