| Line | |
|---|
| 1 | |
|---|
| 2 | #import "TargetTransparentWindow.h" |
|---|
| 3 | #import <AppKit/AppKit.h> |
|---|
| 4 | |
|---|
| 5 | @implementation TargetTransparentWindow |
|---|
| 6 | |
|---|
| 7 | - (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag |
|---|
| 8 | { |
|---|
| 9 | |
|---|
| 10 | NSWindow* fenetre = [super initWithContentRect: contentRect styleMask:NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: NO]; |
|---|
| 11 | [fenetre setBackgroundColor: [NSColor redColor]]; |
|---|
| 12 | [fenetre setLevel: NSStatusWindowLevel]; |
|---|
| 13 | [fenetre setAlphaValue:0.5]; |
|---|
| 14 | [fenetre setOpaque:YES]; |
|---|
| 15 | [fenetre setHasShadow: NO]; |
|---|
| 16 | [fenetre setMovableByWindowBackground: YES] ; |
|---|
| 17 | [fenetre setCanHide: NO]; |
|---|
| 18 | return fenetre; |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | @end |
|---|