* gtk2_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: gtk2_run.cpp,v 1.16 2003/04/21 01:47:42 asmax Exp $
+ * $Id: gtk2_run.cpp,v 1.17 2003/04/21 02:50:49 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
// Check if vlc is closing
proc->IsClosing();
-#if 0
- // If Window is parent window
- if( hwnd == ( (GTK2Theme *)p_intf->p_sys->p_theme )->GetParentWindow() )
- {
- if( uMsg == WM_SYSCOMMAND )
- {
- if( (Event *)wParam != NULL )
- ( (Event *)wParam )->SendEvent();
- return 0;
- }
- else if( uMsg == WM_RBUTTONDOWN && wParam == 42 &&
- lParam == WM_RBUTTONDOWN )
- {
- int x, y;
- OSAPI_GetMousePos( x, y );
- TrackPopupMenu(
- ( (GTK2Theme *)p_intf->p_sys->p_theme )->GetSysMenu(),
- 0, x, y, 0, hwnd, NULL );
- }
- }
-
-
- // If closing parent window
- if( uMsg == WM_CLOSE )
- {
- OSAPI_PostMessage( NULL, VLC_HIDE, VLC_QUIT, 0 );
- return 0;
- }
-
- // If hwnd does not match any window or message not processed
- return DefWindowProc( hwnd, uMsg, wParam, lParam );
-#endif
gtk_main_do_event( event );
}
p_intf->p_sys->SoutDlg = new SoutDialog( p_intf, NULL );
p_intf->p_sys->PrefsDlg = new PrefsDialog( p_intf, NULL );
p_intf->p_sys->InfoDlg = new FileInfo( p_intf, NULL );
+
+ vlc_mutex_lock( &p_intf->p_sys->init_lock );
+ vlc_cond_signal( &p_intf->p_sys->init_cond );
+ vlc_mutex_unlock( &p_intf->p_sys->init_lock );
+
return TRUE;
}
wxTheApp = new Instance( p_intf, callbackobj );
+ vlc_mutex_lock( &p_intf->p_sys->init_lock );
+ vlc_cond_wait( &p_intf->p_sys->init_cond, &p_intf->p_sys->init_lock );
+ vlc_mutex_unlock( &p_intf->p_sys->init_lock );
+
// Add timer
g_timeout_add( 200, (GSourceFunc)RefreshTimer, (gpointer)p_intf );
* skin_common.h: Private Skin interface description
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: skin_common.h,v 1.3 2003/04/21 00:54:26 ipkiss Exp $
+ * $Id: skin_common.h,v 1.4 2003/04/21 02:50:49 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
SoutDialog *SoutDlg;
PrefsDialog *PrefsDlg;
FileInfo *InfoDlg;
+
+ // Wait wxwindows initialization
+ vlc_mutex_t init_lock;
+ vlc_cond_t init_cond;
};
#endif
* skin-main.cpp: skins plugin for VLC
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: skin_main.cpp,v 1.14 2003/04/21 02:12:06 ipkiss Exp $
+ * $Id: skin_main.cpp,v 1.15 2003/04/21 02:50:49 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
p_intf->p_sys->p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ // Initialize conditions
+ vlc_mutex_init( p_intf, &p_intf->p_sys->init_lock);
+ vlc_cond_init( p_intf, &p_intf->p_sys->init_cond);
+
p_intf->p_sys->p_theme = (Theme *)new OSTheme( p_intf );
return( 0 );
// Unsuscribe to messages bank
msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
+ // Destroy conditions
+ vlc_cond_destroy( &p_intf->p_sys->init_cond);
+ vlc_mutex_destroy( &p_intf->p_sys->init_lock);
+
// Destroy structure
free( p_intf->p_sys );
}
//---------------------------------------------------------------------------
static void Run( intf_thread_t *p_intf )
{
+
#if !defined WIN32
/* FIXME: should be elsewhere ? */
// Initialize GDK
* win32_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: win32_run.cpp,v 1.7 2003/04/21 00:54:26 ipkiss Exp $
+ * $Id: win32_run.cpp,v 1.8 2003/04/21 02:50:49 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
p_intf->p_sys->SoutDlg = new SoutDialog( p_intf, NULL );
p_intf->p_sys->PrefsDlg = new PrefsDialog( p_intf, NULL );
p_intf->p_sys->InfoDlg = new FileInfo( p_intf, NULL );
+
+ vlc_mutex_lock( &p_intf->p_sys->init_lock );
+ vlc_cond_signal( &p_intf->p_sys->init_cond );
+ vlc_mutex_unlock( &p_intf->p_sys->init_lock );
+
return TRUE;
}
HANDLE hThread;
hThread = CreateThread( NULL, 0, ThreadFunc, (LPVOID) p_intf, 0, 0 );
- // Create refresh timer
+ vlc_mutex_lock( &p_intf->p_sys->init_lock );
+ vlc_cond_wait( &p_intf->p_sys->init_cond, &p_intf->p_sys->init_lock );
+ vlc_mutex_unlock( &p_intf->p_sys->init_lock );
+
+ // Create refresh timer
SetTimer( ((OSTheme *)p_intf->p_sys->p_theme)->GetParentWindow(), 42, 200,
(TIMERPROC)RefreshTimer );