BOOL initialise_windows ( int nCmdShow ) { if ( !create_application_window ( nCmdShow ) ) { return ( FALSE ); } return ( TRUE ); }
BOOL initialise_windows ( HINSTANCE hInstance, int nCmdShow ) { if ( !create_application_window ( hInstance, nCmdShow ) ) { return ( FALSE ); } return ( TRUE ); }
int main( int argc, char *argv[] ) { /* GtkWidget *display_window; */ GtkWidget *video_display; GtkWidget *device_selection; GtkWidget *widget; GTimer *fps_timer; g_thread_init(NULL); gdk_threads_init(); gtk_init (&argc, &argv); // // Create the main application window // display_window = create_application_window( ); video_display = g_object_get_data( G_OBJECT( display_window ), "ugtk_display" ); g_assert( video_display ); device_selection = g_object_get_data( G_OBJECT( video_display ), "device_selection" ); g_assert( device_selection ); fps_timer = g_timer_new(); unicapgtk_video_display_set_new_frame_callback( UNICAPGTK_VIDEO_DISPLAY( video_display ), UNICAPGTK_CALLBACK_FLAGS_BEFORE, (unicap_new_frame_callback_t)new_frame_cb, fps_timer ); // // Create a window containing the properties for the // video capture device and a device selection menu // widget = unicapgtk_property_dialog_new( ); gtk_widget_show_all( widget ); g_object_set_data( G_OBJECT( video_display ), "property_dialog", widget ); // // Rescan devices and select first device // if( unicapgtk_device_selection_rescan( UNICAPGTK_DEVICE_SELECTION( device_selection ) ) > 0 ) { gtk_combo_box_set_active (GTK_COMBO_BOX( device_selection ), 0); } gdk_threads_enter(); gtk_main (); gdk_threads_leave(); return 0; }