[vlc-devel] commit: macosx: use NSInvocation on this 10.5 method. (Derk-Jan Hartman )
git version control
git at videolan.org
Mon Aug 25 22:56:26 CEST 2008
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Mon Aug 25 22:52:59 2008 +0200| [7a01e29a3829dbcfe867508e30dba3c05e821d47] | committer: Derk-Jan Hartman
macosx: use NSInvocation on this 10.5 method.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a01e29a3829dbcfe867508e30dba3c05e821d47
---
modules/gui/macosx/embeddedwindow.m | 26 ++++++++++++++++++++------
1 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m
index c249bea..318f684 100644
--- a/modules/gui/macosx/embeddedwindow.m
+++ b/modules/gui/macosx/embeddedwindow.m
@@ -44,12 +44,26 @@
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
{
if(MACOS_VERSION < 10.5f)
- return [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
-
- windowStyle ^= NSTexturedBackgroundWindowMask;
- self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
- [self setContentBorderThickness:32.0 forEdge:NSMinYEdge];
-
+ {
+ self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
+ } else {
+ SEL theSelector;
+ NSMethodSignature *aSignature;
+ NSInvocation *anInvocation;
+ float f_value = 32.0f;
+ NSRectEdge ouredge = NSMinYEdge;
+
+ windowStyle ^= NSTexturedBackgroundWindowMask;
+ self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
+
+ theSelector = @selector(setContentBorderThickness:forEdge:);
+ aSignature = [VLCEmbeddedWindow instanceMethodSignatureForSelector:theSelector];
+ anInvocation = [NSInvocation invocationWithMethodSignature:aSignature];
+ [anInvocation setSelector:theSelector];
+ [anInvocation setTarget:self];
+ [anInvocation setArgument:&f_value atIndex:2]; /* FIXME it's actually CGFLoat */
+ [anInvocation setArgument:&ouredge atIndex:3];
+ }
return self;
}
More information about the vlc-devel
mailing list