I believe the built-in stuff (menus, sheets, etc.) uses the private
functions mentioned earlier. Honestly, if you really need this
function to work exactly the same, AFAIK the private stuff is the only
real way to do it. Simulating it via a custom NSView just seems really
hackish and error-prone to me, all "it's private so don't rely on
it" (which is a good guideline) advice aside.
Think about if potential future breakage is worth it, and of course,
pushing for a public API is probably the best way to do it—if you can
wait that long.
/grainofsalt
On Aug 25, 2008, at 3:33 PM, Ricky Sharp wrote:
On Aug 25, 2008, at 12:57 PM, David Duncan wrote:
On 25/08/2008, at 2:45 AM, Tim Andersson wrote:
Is there any way of creating a NSWindow that has a semi-
transparent, blurred background? With "blurred background" I mean
that whatever you see through the window/background is distorted
(blurred).
There isn't a particularly fast way to do this, although I have
experimented with it a bit in the past. You can use the CGWindow
API to read the contents under your window and apply a blur to them
using Core Image directly or indirectly via Core Animation, but in
either case you'll see the Window Server spending considerably more
CPU time as it has to re-render the contents under your window. You
could fake it by updating the image rarely but there isn't a
particularly good way to completely mitigate the CPU usage.
Hmm... it's very hard to tell, but I believe there must be a fast
way that already exists.
I just played a QT movie (Apple's 20th anniv '1984') and then pulled
down a menu (File) over the top of it. For users of Leopard, the
menu background 'blurs' what's behind it. In the case of a QT
movie, the menu's contents are definitely upgraded for each new frame.
It was very difficult to tell if each frame was truly blurred. But
for the portion of the movie that rolls the "On January 24th.."
text, the text definitely appeared to be blurred.
___________________________________________________________
Ricky A. Sharp mailto:[EMAIL PROTECTED]
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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]