• 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
Re: Semi-transparent, blurred NSWindow background?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Semi-transparent, blurred NSWindow background?


  • Subject: Re: Semi-transparent, blurred NSWindow background?
  • From: Tim Andersson <email@hidden>
  • Date: Mon, 25 Aug 2008 19:17:59 +0200

25 aug 2008 kl. 06.13 skrev Rob Keniger:

>In 10.5 you can add any core image filter to a window using the
>private function 'CGSAddWindowFilter'.
>
>typedef void * CGSConnectionID;
>
>extern OSStatus CGSNewConnection(const void **attr, CGSConnectionID
>*id);
>
>- (void)enableBlurForWindow:(NSWindow *)window
>{
>
>CGSConnectionID _myConnection;
>uint32_t __compositingFilter;
>
>int __compositingType = 1; // Apply filter to contents underneath the
>window, then draw window normally on top
>
>/* Make a new connection to CoreGraphics, alternatively you could use
>the main connection*/
>
>CGSNewConnection(NULL , &_myConnection);
>
>/* The following creates a new CoreImage filter, then sets its options
>with a dictionary of values*/
>
>CGSNewCIFilterByName (_myConnection, (CFStringRef)@"CIGaussianBlur",
>&__compositingFilter);
>NSDictionary *optionsDict = [NSDictionary dictionaryWithObject:
>[NSNumber numberWithFloat:3.0] forKey:@"inputRadius"];
>CGSSetCIFilterValuesFromDictionary(_myConnection, __compositingFilter,
>(CFDictionaryRef)optionsDict);
>
>/* Now just switch on the filter for the window */
>
>CGSAddWindowFilter(_myConnection, [window windowNumber],
>__compositingFilter, __compositingType );
>}
>
>Insert standard disclaimer about using private Apple APIs here.
>
>--
>Rob Keniger

Thanks for your help, but I'd like to stay away from the private APIs. :)

//Tim Andersson

PS. If this reply doesn't end up in my "thread", it's because your mail didn't end up in my inbox, so I had to create this email from scratch DS.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Re: monitoring file system
  • Next by Date: Re: Tabbed preference panels
  • Previous by thread: Re: Semi-transparent, blurred NSWindow background?
  • Next by thread: DO disconnect when main thread blocked
  • Index(es):
    • Date
    • Thread