Changeset 7a01e29a3829dbcfe867508e30dba3c05e821d47

Show
Ignore:
Timestamp:
25/08/08 22:59:33 (3 months ago)
Author:
Derk-Jan Hartman <hartman@videolan.org>
git-committer:
Derk-Jan Hartman <hartman@videolan.org> 1219697973 +0200
git-parent:

[c86ee9a09e27bae6bc41536fef698e8426165695]

git-author:
Derk-Jan Hartman <hartman@videolan.org> 1219697579 +0200
Message:

macosx: use NSInvocation on this 10.5 method.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/macosx/embeddedwindow.m

    r4f10b8a r7a01e29  
    4545{ 
    4646    if(MACOS_VERSION < 10.5f) 
    47         return [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation]; 
    48  
    49     windowStyle ^= NSTexturedBackgroundWindowMask; 
    50     self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation]; 
    51     [self setContentBorderThickness:32.0 forEdge:NSMinYEdge]; 
    52  
     47    { 
     48        self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation]; 
     49    } else { 
     50        SEL theSelector; 
     51        NSMethodSignature *aSignature; 
     52        NSInvocation *anInvocation; 
     53        float f_value = 32.0f; 
     54        NSRectEdge ouredge = NSMinYEdge; 
     55 
     56        windowStyle ^= NSTexturedBackgroundWindowMask; 
     57        self = [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation]; 
     58 
     59        theSelector = @selector(setContentBorderThickness:forEdge:); 
     60        aSignature = [VLCEmbeddedWindow instanceMethodSignatureForSelector:theSelector]; 
     61        anInvocation = [NSInvocation invocationWithMethodSignature:aSignature]; 
     62        [anInvocation setSelector:theSelector]; 
     63        [anInvocation setTarget:self]; 
     64        [anInvocation setArgument:&f_value atIndex:2]; /* FIXME it's actually CGFLoat */ 
     65        [anInvocation setArgument:&ouredge atIndex:3]; 
     66    } 
    5367    return self; 
    5468}