]> git.sesse.net Git - vlc/commitdiff
macosx: ExecuteOnMainThread is not used, delete it.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 5 Jul 2008 10:18:07 +0000 (12:18 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 5 Jul 2008 10:20:12 +0000 (12:20 +0200)
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

index 7ec3957ea24ea6e312e9682709422ace5800a80b..bc17c797fab95a1b7ab5b4c81cd76c0215ade154 100644 (file)
@@ -46,7 +46,6 @@
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
-int ExecuteOnMainThread( id target, SEL sel, void * p_arg );
 unsigned int CocoaKeyToVLC( unichar i_key );
 
 #define VLCIntf [[VLCMain sharedInstance] getIntf]
index cac24fa4c8c93e7cef7e8c519c461ab5d73a5c69..7b8709d21472b71db76c4bc606e8247df71bf8b9 100644 (file)
@@ -184,70 +184,6 @@ static void * ManageThread( void *user_data )
     return NULL;
 }
 
-int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
-{
-    int i_ret = 0;
-
-    //NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
-
-    if( [target respondsToSelector: @selector(performSelectorOnMainThread:
-                                             withObject:waitUntilDone:)] )
-    {
-        [target performSelectorOnMainThread: sel
-                withObject: [NSValue valueWithPointer: p_arg]
-                waitUntilDone: NO];
-    }
-    else if( NSApp != nil && [[VLCMain sharedInstance] respondsToSelector: @selector(getIntf)] )
-    {
-        NSValue * o_v1;
-        NSValue * o_v2;
-        NSArray * o_array;
-        NSPort * o_recv_port;
-        NSInvocation * o_inv;
-        NSPortMessage * o_msg;
-        intf_thread_t * p_intf;
-        NSConditionLock * o_lock;
-        NSMethodSignature * o_sig;
-
-        id * val[] = { &o_lock, &o_v2 };
-
-        p_intf = (intf_thread_t *)VLCIntf;
-
-        o_recv_port = [[NSPort port] retain];
-        o_v1 = [NSValue valueWithPointer: val];
-        o_v2 = [NSValue valueWithPointer: p_arg];
-
-        o_sig = [target methodSignatureForSelector: sel];
-        o_inv = [NSInvocation invocationWithMethodSignature: o_sig];
-        [o_inv setArgument: &o_v1 atIndex: 2];
-        [o_inv setTarget: target];
-        [o_inv setSelector: sel];
-
-        o_array = [NSArray arrayWithObject:
-            [NSData dataWithBytes: &o_inv length: sizeof(o_inv)]];
-        o_msg = [[NSPortMessage alloc]
-            initWithSendPort: p_intf->p_sys->o_sendport
-            receivePort: o_recv_port components: o_array];
-
-        o_lock = [[NSConditionLock alloc] initWithCondition: 0];
-        [o_msg sendBeforeDate: [NSDate distantPast]];
-        [o_lock lockWhenCondition: 1];
-        [o_lock unlock];
-        [o_lock release];
-
-        [o_msg release];
-        [o_recv_port release];
-    }
-    else
-    {
-        i_ret = 1;
-    }
-
-    //[o_pool release];
-
-    return( i_ret );
-}
-
 /*****************************************************************************
  * playlistChanged: Callback triggered by the intf-change playlist
  * variable, to let the intf update the playlist.