FROM : Andreas Mayer
DATE : Tue Dec 31 14:06:47 2002
Am Montag, 30.12.02 um 17:48 Uhr schrieb Joe Blowson:
> My goal is to have this window simply float over the desktop and under
> all other windows at all times. The user never needs to directly
> interact with this window.
Make it a borderless window, set its window level to
kCGDesktopWindowLevel and make it clickthrough.
NSWindow* window = [super initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered
defer:NO];
[window setBackgroundColor: [NSColor clearColor]]; // transparent
window
[window setAlphaValue:1.0]; // we want our drawings to be opaque
[window setOpaque:NO];
[window setLevel: kCGDesktopWindowLevel];
/* carbon */
void *ref = [window windowRef];
ChangeWindowAttributes(ref, kWindowIgnoreClicksAttribute,
kWindowNoAttributes);
// to reset: ChangeWindowAttributes(ref, kWindowNoAttributes,
kWindowIgnoreClicksAttribute);
/* cocoa */
[window setIgnoresMouseEvents:YES];
bye. Andreas.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Tue Dec 31 14:06:47 2002
Am Montag, 30.12.02 um 17:48 Uhr schrieb Joe Blowson:
> My goal is to have this window simply float over the desktop and under
> all other windows at all times. The user never needs to directly
> interact with this window.
Make it a borderless window, set its window level to
kCGDesktopWindowLevel and make it clickthrough.
NSWindow* window = [super initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered
defer:NO];
[window setBackgroundColor: [NSColor clearColor]]; // transparent
window
[window setAlphaValue:1.0]; // we want our drawings to be opaque
[window setOpaque:NO];
[window setLevel: kCGDesktopWindowLevel];
/* carbon */
void *ref = [window windowRef];
ChangeWindowAttributes(ref, kWindowIgnoreClicksAttribute,
kWindowNoAttributes);
// to reset: ChangeWindowAttributes(ref, kWindowNoAttributes,
kWindowIgnoreClicksAttribute);
/* cocoa */
[window setIgnoresMouseEvents:YES];
bye. Andreas.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Joe Blowson | Dec 30, 17:48 | |
| Michael Latta | Dec 30, 18:07 | |
| Andreas Mayer | Dec 31, 14:06 |






Cocoa mail archive

