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

Working on functionality.

parent 368b29b1
......@@ -2,7 +2,7 @@
* familiar.c : familiar plugin for vlc
*****************************************************************************
* 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>
*
......@@ -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),
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 */
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
"p_intf", p_intf );
......
......@@ -10,6 +10,9 @@
<language>C</language>
<gnome_support>False</gnome_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_header_file>familiar_interface.h</main_header_file>
<handler_source_file>familiar_callbacks.c</handler_source_file>
......@@ -37,9 +40,9 @@
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>False</allow_grow>
<auto_shrink>False</auto_shrink>
<allow_shrink>True</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>True</auto_shrink>
<widget>
<class>GtkVBox</class>
......@@ -68,6 +71,12 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_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>
<icon>familiar-openb16x16.xpm</icon>
</widget>
......@@ -76,6 +85,12 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_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>
<icon>familiar-preferencesb16x16.xpm</icon>
</widget>
......@@ -84,6 +99,12 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_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>
<icon>familiar-rewindb16x16.xpm</icon>
<child>
......@@ -95,6 +116,12 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_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>
<icon>familiar-pauseb16x16.xpm</icon>
</widget>
......@@ -103,6 +130,12 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_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>
<icon>familiar-playb16x16.xpm</icon>
</widget>
......@@ -111,6 +144,12 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_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>
<icon>familiar-stopb16x16.xpm</icon>
</widget>
......@@ -119,6 +158,12 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_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>
<icon>familiar-forwardb16x16.xpm</icon>
</widget>
......@@ -127,6 +172,12 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_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>
<icon>vlc16x16.xpm</icon>
<child>
......@@ -351,30 +402,28 @@ udp://localhost:1234/
<widget>
<class>GtkRadioButton</class>
<name>rbIPv6</name>
<x>112</x>
<name>rbIPv4</name>
<x>8</x>
<y>8</y>
<width>104</width>
<height>26</height>
<can_focus>True</can_focus>
<label>IPv6</label>
<active>False</active>
<label>IPv4</label>
<active>True</active>
<draw_indicator>True</draw_indicator>
<group>IPversion</group>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>rbIPv4</name>
<x>8</x>
<name>rbIPv6</name>
<x>112</x>
<y>8</y>
<width>104</width>
<height>26</height>
<can_focus>True</can_focus>
<label>IPv4</label>
<active>True</active>
<label>IPv6</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>IPversion</group>
</widget>
</widget>
</widget>
......
......@@ -2,7 +2,7 @@
* familiar.h: private Gtk+ interface description
*****************************************************************************
* 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>
*
......@@ -30,6 +30,10 @@ struct intf_sys_t
{
/* windows and widgets */
GtkWidget * p_window; /* main window */
GtkNotebook * p_notebook;
// GtkWidget * p_notebook_about;
// GtkWidget * p_notebook_open;
// GtkWidget * p_notebook_preferences;
/* The input thread */
input_thread_t * p_input;
......
......@@ -2,7 +2,7 @@
* familiar_callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
*****************************************************************************
* 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>
*
......@@ -98,81 +98,138 @@ gboolean GtkExit( GtkWidget *widget,
}
gboolean
on_xpm_open_button_press_event (GtkWidget *widget,
GdkEventButton *event,
on_familiar_destroy_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
return FALSE;
GtkExit( GTK_WIDGET( widget ), user_data );
return TRUE;
}
gboolean
on_xpm_preferences_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_open_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) );
}
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
on_xpm_rewind_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_rewind_clicked (GtkButton *button,
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
on_xpm_pause_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_pause_clicked (GtkButton *button,
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
on_xpm_play_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_play_clicked (GtkButton *button,
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
on_xpm_stop_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_stop_clicked (GtkButton *button,
gpointer user_data)
{
return FALSE;
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 )
{
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
}
}
gboolean
on_xpm_forward_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_forward_clicked (GtkButton *button,
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
on_familiar_destroy_event (GtkWidget *widget,
GdkEvent *event,
void
on_toolbar_about_clicked (GtkButton *button,
gpointer user_data)
{
GtkExit( GTK_WIDGET( widget ), user_data );
return TRUE;
intf_thread_t *p_intf = GtkGetIntf( button );
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 @@
* familiar_callbacks.h : familiar plugin for vlc
*****************************************************************************
* 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>
*
......@@ -26,41 +26,38 @@
gboolean GtkExit ( GtkWidget *, gpointer );
gboolean
on_xpm_open_button_press_event (GtkWidget *widget,
GdkEventButton *event,
on_familiar_destroy_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
gboolean
on_xpm_preferences_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_open_clicked (GtkButton *button,
gpointer user_data);
gboolean
on_xpm_rewind_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_preferences_clicked (GtkButton *button,
gpointer user_data);
gboolean
on_xpm_pause_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_rewind_clicked (GtkButton *button,
gpointer user_data);
gboolean
on_xpm_play_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_pause_clicked (GtkButton *button,
gpointer user_data);
gboolean
on_xpm_stop_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_play_clicked (GtkButton *button,
gpointer user_data);
gboolean
on_xpm_forward_button_press_event (GtkWidget *widget,
GdkEventButton *event,
void
on_toolbar_stop_clicked (GtkButton *button,
gpointer user_data);
gboolean
on_familiar_destroy_event (GtkWidget *widget,
GdkEvent *event,
void
on_toolbar_forward_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_about_clicked (GtkButton *button,
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