Changeset 547cfbf40f3c9c7ca342cad75c4a8c01e70f88af

Show
Ignore:
Timestamp:
07/05/08 12:20:12 (2 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1215253212 +0200
git-parent:

[669f25d7debaa52d21d7b1588410f4a7e99e011b]

git-author:
Pierre d'Herbemont <pdherbemont@videolan.org> 1215253087 +0200
Message:

macosx: ExecuteOnMainThread? is not used, delete it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/macosx/intf.h

    ra409380 r547cfbf  
    4747 * Local prototypes. 
    4848 *****************************************************************************/ 
    49 int ExecuteOnMainThread( id target, SEL sel, void * p_arg ); 
    5049unsigned int CocoaKeyToVLC( unichar i_key ); 
    5150 
  • modules/gui/macosx/intf.m

    rd4d9a56 r547cfbf  
    183183 
    184184    return NULL; 
    185 } 
    186  
    187 int ExecuteOnMainThread( id target, SEL sel, void * p_arg ) 
    188 { 
    189     int i_ret = 0; 
    190  
    191     //NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init]; 
    192  
    193     if( [target respondsToSelector: @selector(performSelectorOnMainThread: 
    194                                              withObject:waitUntilDone:)] ) 
    195     { 
    196         [target performSelectorOnMainThread: sel 
    197                 withObject: [NSValue valueWithPointer: p_arg] 
    198                 waitUntilDone: NO]; 
    199     } 
    200     else if( NSApp != nil && [[VLCMain sharedInstance] respondsToSelector: @selector(getIntf)] ) 
    201     { 
    202         NSValue * o_v1; 
    203         NSValue * o_v2; 
    204         NSArray * o_array; 
    205         NSPort * o_recv_port; 
    206         NSInvocation * o_inv; 
    207         NSPortMessage * o_msg; 
    208         intf_thread_t * p_intf; 
    209         NSConditionLock * o_lock; 
    210         NSMethodSignature * o_sig; 
    211  
    212         id * val[] = { &o_lock, &o_v2 }; 
    213  
    214         p_intf = (intf_thread_t *)VLCIntf; 
    215  
    216         o_recv_port = [[NSPort port] retain]; 
    217         o_v1 = [NSValue valueWithPointer: val]; 
    218         o_v2 = [NSValue valueWithPointer: p_arg]; 
    219  
    220         o_sig = [target methodSignatureForSelector: sel]; 
    221         o_inv = [NSInvocation invocationWithMethodSignature: o_sig]; 
    222         [o_inv setArgument: &o_v1 atIndex: 2]; 
    223         [o_inv setTarget: target]; 
    224         [o_inv setSelector: sel]; 
    225  
    226         o_array = [NSArray arrayWithObject: 
    227             [NSData dataWithBytes: &o_inv length: sizeof(o_inv)]]; 
    228         o_msg = [[NSPortMessage alloc] 
    229             initWithSendPort: p_intf->p_sys->o_sendport 
    230             receivePort: o_recv_port components: o_array]; 
    231  
    232         o_lock = [[NSConditionLock alloc] initWithCondition: 0]; 
    233         [o_msg sendBeforeDate: [NSDate distantPast]]; 
    234         [o_lock lockWhenCondition: 1]; 
    235         [o_lock unlock]; 
    236         [o_lock release]; 
    237  
    238         [o_msg release]; 
    239         [o_recv_port release]; 
    240     } 
    241     else 
    242     { 
    243         i_ret = 1; 
    244     } 
    245  
    246     //[o_pool release]; 
    247  
    248     return( i_ret ); 
    249185} 
    250186