Hi Amin,
Unless I am misunderstanding, this would tell me if it was onscreen,
but not if the window was exposed (not hidden by other windows).
Jason
On Aug 15, 2008, at 5:03 PM, [EMAIL PROTECTED] wrote:
Hey folks,
I'd like to fade my window out if any portion of it is visible to the
user, otherwise I simply want to close it for speed. Is there an easy
way to determine if some portion of the window is visible?
I do not know, whether this is a "dirty" hack (are there clean
hacks?), but you can read the frames of the screens
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSScreen_Class/Reference/Reference.html#/
/apple_ref/occ/clm/NSScreen/screens
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSScreen_Class/Reference/Reference.html#/
/apple_ref/occ/instm/NSScreen/frame
and clip it with you window frame.
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#/
/apple_ref/occ/instm/NSWindow/frame
That probably works.
Cheers,
Amin
Thanks!
Jason
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/negm-awad%40cocoading.de
This email sent to [EMAIL PROTECTED]
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]