* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
memset( p_intf->p_sys, 0, sizeof( *p_intf->p_sys ) );
- p_intf->p_sys->o_pool = [[NSAutoreleasePool alloc] init];
-
- p_intf->b_play = VLC_TRUE;
p_intf->pf_run = Run;
- return( 0 );
+ return VLC_SUCCESS;
}
/*****************************************************************************
free( p_intf->p_sys );
}
+/* Dock Connection */
+typedef struct CPSProcessSerNum
+{
+ UInt32 lo;
+ UInt32 hi;
+} CPSProcessSerNum;
+
+extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
+extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
+extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
+
/*****************************************************************************
* Run: main loop
*****************************************************************************/
sigemptyset( &set );
sigaddset( &set, SIGTERM );
pthread_sigmask( SIG_UNBLOCK, &set, NULL );
-
+ CPSProcessSerNum PSN;
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [NSApplication sharedApplication];
+ if (!CPSGetCurrentProcess(&PSN))
+ if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
+ if (!CPSSetFrontProcess(&PSN))
+ [NSApplication sharedApplication];
[NSApp run];
+ [pool release];
}