Commit 30b91066 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Working on functionality.

parent 368b29b1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* familiar.c : familiar plugin for vlc * familiar.c : familiar plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: familiar.c,v 1.5 2002/07/23 18:39:29 jpsaman Exp $ * $Id: familiar.c,v 1.6 2002/07/24 20:46:08 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -199,6 +199,11 @@ static void intf_Run( intf_thread_t *p_intf ) ...@@ -199,6 +199,11 @@ static void intf_Run( intf_thread_t *p_intf )
gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window), gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
VOUT_TITLE " (Familiar Linux interface)"); VOUT_TITLE " (Familiar Linux interface)");
/* Get the slider object */
p_intf->p_sys->p_notebook = GTK_NOTEBOOK( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "notebook" ) );
// gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_notebook) );
/* Store p_intf to keep an eye on it */ /* Store p_intf to keep an eye on it */
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window), gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
"p_intf", p_intf ); "p_intf", p_intf );
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
<language>C</language> <language>C</language>
<gnome_support>False</gnome_support> <gnome_support>False</gnome_support>
<gettext_support>True</gettext_support> <gettext_support>True</gettext_support>
<use_widget_names>True</use_widget_names>
<output_main_file>False</output_main_file>
<output_build_files>False</output_build_files>
<main_source_file>familiar_interface.c</main_source_file> <main_source_file>familiar_interface.c</main_source_file>
<main_header_file>familiar_interface.h</main_header_file> <main_header_file>familiar_interface.h</main_header_file>
<handler_source_file>familiar_callbacks.c</handler_source_file> <handler_source_file>familiar_callbacks.c</handler_source_file>
...@@ -37,9 +40,9 @@ ...@@ -37,9 +40,9 @@
<type>GTK_WINDOW_TOPLEVEL</type> <type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position> <position>GTK_WIN_POS_NONE</position>
<modal>False</modal> <modal>False</modal>
<allow_shrink>False</allow_shrink> <allow_shrink>True</allow_shrink>
<allow_grow>False</allow_grow> <allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink> <auto_shrink>True</auto_shrink>
<widget> <widget>
<class>GtkVBox</class> <class>GtkVBox</class>
...@@ -68,6 +71,12 @@ ...@@ -68,6 +71,12 @@
<class>GtkButton</class> <class>GtkButton</class>
<child_name>Toolbar:button</child_name> <child_name>Toolbar:button</child_name>
<name>toolbar_open</name> <name>toolbar_open</name>
<tooltip>Open file</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_open_clicked</handler>
<last_modification_time>Wed, 24 Jul 2002 18:28:31 GMT</last_modification_time>
</signal>
<label>Open</label> <label>Open</label>
<icon>familiar-openb16x16.xpm</icon> <icon>familiar-openb16x16.xpm</icon>
</widget> </widget>
...@@ -76,6 +85,12 @@ ...@@ -76,6 +85,12 @@
<class>GtkButton</class> <class>GtkButton</class>
<child_name>Toolbar:button</child_name> <child_name>Toolbar:button</child_name>
<name>toolbar_preferences</name> <name>toolbar_preferences</name>
<tooltip>Preferences</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_preferences_clicked</handler>
<last_modification_time>Wed, 24 Jul 2002 18:29:05 GMT</last_modification_time>
</signal>
<label>Preferences</label> <label>Preferences</label>
<icon>familiar-preferencesb16x16.xpm</icon> <icon>familiar-preferencesb16x16.xpm</icon>
</widget> </widget>
...@@ -84,6 +99,12 @@ ...@@ -84,6 +99,12 @@
<class>GtkButton</class> <class>GtkButton</class>
<child_name>Toolbar:button</child_name> <child_name>Toolbar:button</child_name>
<name>toolbar_rewind</name> <name>toolbar_rewind</name>
<tooltip>Rewind stream</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_rewind_clicked</handler>
<last_modification_time>Wed, 24 Jul 2002 18:28:45 GMT</last_modification_time>
</signal>
<label>Rewind</label> <label>Rewind</label>
<icon>familiar-rewindb16x16.xpm</icon> <icon>familiar-rewindb16x16.xpm</icon>
<child> <child>
...@@ -95,6 +116,12 @@ ...@@ -95,6 +116,12 @@
<class>GtkButton</class> <class>GtkButton</class>
<child_name>Toolbar:button</child_name> <child_name>Toolbar:button</child_name>
<name>toolbar_pause</name> <name>toolbar_pause</name>
<tooltip>Pause stream</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_pause_clicked</handler>
<last_modification_time>Wed, 24 Jul 2002 18:28:58 GMT</last_modification_time>
</signal>
<label>Pause</label> <label>Pause</label>
<icon>familiar-pauseb16x16.xpm</icon> <icon>familiar-pauseb16x16.xpm</icon>
</widget> </widget>
...@@ -103,6 +130,12 @@ ...@@ -103,6 +130,12 @@
<class>GtkButton</class> <class>GtkButton</class>
<child_name>Toolbar:button</child_name> <child_name>Toolbar:button</child_name>
<name>toolbar_play</name> <name>toolbar_play</name>
<tooltip>Play stream</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_play_clicked</handler>
<last_modification_time>Wed, 24 Jul 2002 18:29:12 GMT</last_modification_time>
</signal>
<label>Play</label> <label>Play</label>
<icon>familiar-playb16x16.xpm</icon> <icon>familiar-playb16x16.xpm</icon>
</widget> </widget>
...@@ -111,6 +144,12 @@ ...@@ -111,6 +144,12 @@
<class>GtkButton</class> <class>GtkButton</class>
<child_name>Toolbar:button</child_name> <child_name>Toolbar:button</child_name>
<name>toolbar_stop</name> <name>toolbar_stop</name>
<tooltip>Stop stream</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_stop_clicked</handler>
<last_modification_time>Wed, 24 Jul 2002 18:29:18 GMT</last_modification_time>
</signal>
<label>Stop</label> <label>Stop</label>
<icon>familiar-stopb16x16.xpm</icon> <icon>familiar-stopb16x16.xpm</icon>
</widget> </widget>
...@@ -119,6 +158,12 @@ ...@@ -119,6 +158,12 @@
<class>GtkButton</class> <class>GtkButton</class>
<child_name>Toolbar:button</child_name> <child_name>Toolbar:button</child_name>
<name>toolbar_forward</name> <name>toolbar_forward</name>
<tooltip>Forward stream</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_forward_clicked</handler>
<last_modification_time>Wed, 24 Jul 2002 18:29:25 GMT</last_modification_time>
</signal>
<label>Forward</label> <label>Forward</label>
<icon>familiar-forwardb16x16.xpm</icon> <icon>familiar-forwardb16x16.xpm</icon>
</widget> </widget>
...@@ -127,6 +172,12 @@ ...@@ -127,6 +172,12 @@
<class>GtkButton</class> <class>GtkButton</class>
<child_name>Toolbar:button</child_name> <child_name>Toolbar:button</child_name>
<name>toolbar_about</name> <name>toolbar_about</name>
<tooltip>About</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_about_clicked</handler>
<last_modification_time>Wed, 24 Jul 2002 18:29:31 GMT</last_modification_time>
</signal>
<label>About</label> <label>About</label>
<icon>vlc16x16.xpm</icon> <icon>vlc16x16.xpm</icon>
<child> <child>
...@@ -351,30 +402,28 @@ udp://localhost:1234/ ...@@ -351,30 +402,28 @@ udp://localhost:1234/
<widget> <widget>
<class>GtkRadioButton</class> <class>GtkRadioButton</class>
<name>rbIPv6</name> <name>rbIPv4</name>
<x>112</x> <x>8</x>
<y>8</y> <y>8</y>
<width>104</width> <width>104</width>
<height>26</height> <height>26</height>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<label>IPv6</label> <label>IPv4</label>
<active>False</active> <active>True</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<group>IPversion</group>
</widget> </widget>
<widget> <widget>
<class>GtkRadioButton</class> <class>GtkRadioButton</class>
<name>rbIPv4</name> <name>rbIPv6</name>
<x>8</x> <x>112</x>
<y>8</y> <y>8</y>
<width>104</width> <width>104</width>
<height>26</height> <height>26</height>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<label>IPv4</label> <label>IPv6</label>
<active>True</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<group>IPversion</group>
</widget> </widget>
</widget> </widget>
</widget> </widget>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* familiar.h: private Gtk+ interface description * familiar.h: private Gtk+ interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: familiar.h,v 1.4 2002/07/23 18:39:29 jpsaman Exp $ * $Id: familiar.h,v 1.5 2002/07/24 20:46:08 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -30,6 +30,10 @@ struct intf_sys_t ...@@ -30,6 +30,10 @@ struct intf_sys_t
{ {
/* windows and widgets */ /* windows and widgets */
GtkWidget * p_window; /* main window */ GtkWidget * p_window; /* main window */
GtkNotebook * p_notebook;
// GtkWidget * p_notebook_about;
// GtkWidget * p_notebook_open;
// GtkWidget * p_notebook_preferences;
/* The input thread */ /* The input thread */
input_thread_t * p_input; input_thread_t * p_input;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* familiar_callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin. * familiar_callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: familiar_callbacks.c,v 1.3 2002/07/23 18:39:29 jpsaman Exp $ * $Id: familiar_callbacks.c,v 1.4 2002/07/24 20:46:08 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -98,81 +98,138 @@ gboolean GtkExit( GtkWidget *widget, ...@@ -98,81 +98,138 @@ gboolean GtkExit( GtkWidget *widget,
} }
gboolean gboolean
on_xpm_open_button_press_event (GtkWidget *widget, on_familiar_destroy_event (GtkWidget *widget,
GdkEventButton *event, GdkEvent *event,
gpointer user_data) gpointer user_data)
{ {
GtkExit( GTK_WIDGET( widget ), user_data );
return FALSE; return TRUE;
} }
gboolean void
on_xpm_preferences_button_press_event (GtkWidget *widget, on_toolbar_open_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf = GtkGetIntf( button );
if (p_intf)
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
}
return FALSE; void
on_toolbar_preferences_clicked (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( button );
if (p_intf)
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
} }
gboolean void
on_xpm_rewind_button_press_event (GtkWidget *widget, on_toolbar_rewind_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t * p_intf = GtkGetIntf( button );
return FALSE; if( p_intf )
{
if( p_intf->p_sys->p_input )
{
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
}
}
} }
gboolean void
on_xpm_pause_button_press_event (GtkWidget *widget, on_toolbar_pause_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t * p_intf = GtkGetIntf( button );
return FALSE; if( p_intf )
{
if( p_intf->p_sys->p_input )
{
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
}
}
} }
gboolean void
on_xpm_play_button_press_event (GtkWidget *widget, on_toolbar_play_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t * p_intf = GtkGetIntf( button );
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
// Display open page
}
return FALSE; /* If the playlist is empty, open a file requester instead */
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->i_size )
{
vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Play( p_playlist );
vlc_object_release( p_playlist );
}
else
{
vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist );
// Display open page
}
} }
gboolean void
on_xpm_stop_button_press_event (GtkWidget *widget, on_toolbar_stop_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t * p_intf = GtkGetIntf( button );
return FALSE; playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
}
} }
gboolean void
on_xpm_forward_button_press_event (GtkWidget *widget, on_toolbar_forward_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t * p_intf = GtkGetIntf( button );
return FALSE; if( p_intf )
{
if( p_intf->p_sys->p_input )
{
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
}
}
} }
gboolean void
on_familiar_destroy_event (GtkWidget *widget, on_toolbar_about_clicked (GtkButton *button,
GdkEvent *event,
gpointer user_data) gpointer user_data)
{ {
GtkExit( GTK_WIDGET( widget ), user_data ); intf_thread_t *p_intf = GtkGetIntf( button );
return TRUE; if (p_intf)
{ // Toggle notebook
// if ( gtk_get_data( GTK_WIDGET(p_intf->p_sys->p_notebook), "visible" ) )
// gtk_widget_hide( GTK_WIDGET(p_intf->p_sys->p_notebook) );
// else
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
}
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* familiar_callbacks.h : familiar plugin for vlc * familiar_callbacks.h : familiar plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: familiar_callbacks.h,v 1.4 2002/07/24 15:59:02 jpsaman Exp $ * $Id: familiar_callbacks.h,v 1.5 2002/07/24 20:46:08 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -26,41 +26,38 @@ ...@@ -26,41 +26,38 @@
gboolean GtkExit ( GtkWidget *, gpointer ); gboolean GtkExit ( GtkWidget *, gpointer );
gboolean gboolean
on_xpm_open_button_press_event (GtkWidget *widget, on_familiar_destroy_event (GtkWidget *widget,
GdkEventButton *event, GdkEvent *event,
gpointer user_data); gpointer user_data);
gboolean void
on_xpm_preferences_button_press_event (GtkWidget *widget, on_toolbar_open_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data); gpointer user_data);
gboolean void
on_xpm_rewind_button_press_event (GtkWidget *widget, on_toolbar_preferences_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data); gpointer user_data);
gboolean void
on_xpm_pause_button_press_event (GtkWidget *widget, on_toolbar_rewind_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data); gpointer user_data);
gboolean void
on_xpm_play_button_press_event (GtkWidget *widget, on_toolbar_pause_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data); gpointer user_data);
gboolean void
on_xpm_stop_button_press_event (GtkWidget *widget, on_toolbar_play_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data); gpointer user_data);
gboolean void
on_xpm_forward_button_press_event (GtkWidget *widget, on_toolbar_stop_clicked (GtkButton *button,
GdkEventButton *event,
gpointer user_data); gpointer user_data);
gboolean void
on_familiar_destroy_event (GtkWidget *widget, on_toolbar_forward_clicked (GtkButton *button,
GdkEvent *event, gpointer user_data);
void
on_toolbar_about_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment