Commit 68126455 authored by Clément Stenac's avatar Clément Stenac

Remove gtk, gtk2, qt and kde plugins

If you want them, take them back from the svn attic, fix them and reintroduce them. I didn't remove the configure.ac snippets, they are still in but commented
parent 063cb8b6
......@@ -4568,12 +4568,8 @@ AC_CONFIG_FILES([
modules/gui/Makefile
modules/gui/beos/Makefile
modules/gui/pda/Makefile
modules/gui/gtk/Makefile
modules/gui/gtk2/Makefile
modules/gui/kde/Makefile
modules/gui/macosx/Makefile
modules/gui/qnx/Makefile
modules/gui/qt/Makefile
modules/gui/skins2/Makefile
modules/gui/wxwidgets/Makefile
modules/gui/wince/Makefile
......
COMMON_gtk = \
display.c \
open.c \
sout.c \
control.c \
menu.c \
playlist.c \
modules.c \
preferences.c \
gtk_callbacks.c \
$(NULL)
SOURCES_gtk = \
gtk.c \
gtk_interface.c \
gtk_support.c \
$(COMMON_gtk)
SOURCES_gnome = \
gnome.c \
gnome_interface.c \
gnome_support.c \
$(COMMON_gtk)
noinst_HEADERS += \
common.h \
control.h \
gnome_callbacks.h \
gnome_interface.h \
gnome_support.h \
gtk_callbacks.h \
display.h \
menu.h \
modules.h \
open.h \
gtk_interface.h \
playlist.h \
preferences.h \
gtk_support.h \
$(NULL)
EXTRA_DIST += \
gtk.glade \
gnome.glade \
gnome_callbacks.c \
$(NULL)
/*****************************************************************************
* gtk_common.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Drag'n'drop stuff
*****************************************************************************/
#define DROP_ACCEPT_TEXT_URI_LIST 0
#define DROP_ACCEPT_TEXT_PLAIN 1
#define DROP_ACCEPT_STRING 2
#define DROP_ACCEPT_END 3
/*****************************************************************************
* intf_sys_t: description and status of Gtk+ interface
*****************************************************************************/
struct intf_sys_t
{
/* the gtk_main module */
module_t * p_gtk_main;
/* special actions */
vlc_bool_t b_playing;
vlc_bool_t b_popup_changed; /* display menu ? */
vlc_bool_t b_window_changed; /* window display toggled ? */
vlc_bool_t b_playlist_changed; /* playlist display toggled ? */
vlc_bool_t b_slider_free; /* slider status */
vlc_bool_t b_deinterlace_update;
/* menus handlers */
vlc_bool_t b_aout_update;
vlc_bool_t b_vout_update;
vlc_bool_t b_program_update; /* do we need to update programs
menu */
vlc_bool_t b_title_update; /* do we need to update title menus */
vlc_bool_t b_chapter_update; /* do we need to update
chapter menus */
vlc_bool_t b_audio_update; /* do we need to update audio menus */
vlc_bool_t b_spu_update; /* do we need to update spu menus */
/* windows and widgets */
GtkWidget * p_window; /* main window */
GtkWidget * p_popup; /* popup menu */
GtkWidget * p_playwin; /* playlist */
GtkWidget * p_modules; /* module manager */
GtkWidget * p_about; /* about window */
GtkWidget * p_open; /* multiopen window */
GtkWidget * p_jump; /* jump window */
GtkWidget * p_sout; /* stream output */
GtkTooltips * p_tooltips; /* tooltips */
/* The input thread */
input_thread_t * p_input;
/* The slider */
GtkFrame * p_slider_frame;
GtkAdjustment * p_adj; /* slider adjustment object */
float f_adj_oldvalue; /* previous value */
/* The messages window */
GtkWidget * p_messages; /* messages window */
GtkText * p_messages_text; /* messages frame */
msg_subscription_t* p_sub; /* message bank subscription */
/* Playlist management */
int i_playing; /* playlist selected item */
/* The window labels for DVD mode */
GtkLabel * p_label_title;
GtkLabel * p_label_chapter;
guint i_part; /* current chapter */
/* audio part */
vlc_bool_t b_mute;
};
/*****************************************************************************
* Prototypes
*****************************************************************************/
gint E_(GtkModeManage) ( intf_thread_t * p_intf );
void E_(GtkDisplayDate) ( GtkAdjustment *p_adj );
/*****************************************************************************
* Useful macro
****************************************************************************/
#define GtkGetIntf( widget ) E_(__GtkGetIntf)( GTK_WIDGET( widget ) )
void * E_(__GtkGetIntf)( GtkWidget * );
/*****************************************************************************
* control.c : functions to handle stream control buttons.
*****************************************************************************
* Copyright (C) 2000, 2001 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <sys/types.h> /* off_t */
#include <stdlib.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#ifdef MODULE_NAME_IS_gnome
# include <gnome.h>
#else
# include <gtk/gtk.h>
#endif
#include <string.h>
#include "gtk_callbacks.h"
#include "gtk_interface.h"
#include "gtk_support.h"
#include "playlist.h"
#include "common.h"
/****************************************************************************
* Control functions: this is where the functions are defined
****************************************************************************
* These functions are button-items callbacks, and are used
* by other callbacks
****************************************************************************/
gboolean GtkControlBack( GtkWidget *widget,
gpointer user_data )
{
return FALSE;
}
gboolean GtkControlStop( GtkWidget *widget,
gpointer user_data )
{
intf_thread_t * p_intf = GtkGetIntf( widget );
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return FALSE;
}
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
return TRUE;
}
gboolean GtkControlPlay( GtkWidget *widget,
gpointer user_data )
{
intf_thread_t * p_intf = GtkGetIntf( widget );
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
GtkFileOpenShow( widget, user_data );
return TRUE;
}
/* 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 );
GtkFileOpenShow( widget, user_data );
}
return TRUE;
}
gboolean GtkControlPause( GtkWidget *widget,
gpointer user_data )
{
intf_thread_t * p_intf = GtkGetIntf( widget );
if( p_intf->p_sys->p_input == NULL )
{
return FALSE;
}
var_SetInteger( p_intf->p_sys->p_input, "state", PAUSE_S );
return TRUE;
}
gboolean GtkControlSlow( GtkWidget *widget,
gpointer user_data )
{
intf_thread_t * p_intf = GtkGetIntf( widget );
if( p_intf->p_sys->p_input == NULL )
{
return FALSE;
}
var_SetVoid( p_intf->p_sys->p_input, "rate-slower" );
return TRUE;
}
gboolean GtkControlFast( GtkWidget *widget,
gpointer user_data )
{
intf_thread_t * p_intf = GtkGetIntf( widget );
if( p_intf->p_sys->p_input == NULL )
{
return FALSE;
}
var_SetVoid( p_intf->p_sys->p_input, "rate-faster" );
return TRUE;
}
/*****************************************************************************
* gtk_control.h: prototypes for control functions
*****************************************************************************
* Copyright (C) 1999, 2000 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
gboolean GtkControlBack ( GtkWidget *, gpointer );
gboolean GtkControlStop ( GtkWidget *, gpointer );
gboolean GtkControlPlay ( GtkWidget *, gpointer );
gboolean GtkControlPause( GtkWidget *, gpointer );
gboolean GtkControlSlow ( GtkWidget *, gpointer );
gboolean GtkControlFast ( GtkWidget *, gpointer );
/*****************************************************************************
* display.c: Gtk+ tools for main interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2003 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <errno.h> /* ENOMEM */
#include <stdlib.h> /* free() */
#include <string.h> /* strerror() */
#include <stdio.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#ifdef MODULE_NAME_IS_gnome
# include <gnome.h>
#else
# include <gtk/gtk.h>
#endif
#include "gtk_callbacks.h"
#include "gtk_interface.h"
#include "gtk_support.h"
#include "menu.h"
#include "display.h"
#include "common.h"
/*****************************************************************************
* GtkDisplayDate: display stream date
*****************************************************************************
* This function displays the current date related to the position in
* the stream. It is called whenever the slider changes its value.
* The lock has to be taken before you call the function.
*****************************************************************************/
void E_(GtkDisplayDate)( GtkAdjustment *p_adj )
{
intf_thread_t *p_intf;
p_intf = gtk_object_get_data( GTK_OBJECT( p_adj ), "p_intf" );
if( p_intf->p_sys->p_input )
{
char psz_time[ MSTRTIME_MAX_SIZE ];
int64_t i_seconds;
i_seconds = var_GetTime( p_intf->p_sys->p_input, "time" ) / I64C(1000000 );
secstotimestr( psz_time, i_seconds );
gtk_frame_set_label( GTK_FRAME( p_intf->p_sys->p_slider_frame ),
psz_time );
}
}
/*****************************************************************************
* GtkModeManage: actualize the aspect of the interface whenever the input
* changes.
*****************************************************************************
* The lock has to be taken before you call the function.
*****************************************************************************/
gint E_(GtkModeManage)( intf_thread_t * p_intf )
{
GtkWidget * p_dvd_box;
GtkWidget * p_file_box;
GtkWidget * p_network_box;
GtkWidget * p_slider;
GtkWidget * p_label;
vlc_bool_t b_control;
#define GETWIDGET( ptr, name ) GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( \
p_intf->p_sys->ptr ) , ( name ) ) )
/* hide all boxes except default file box */
p_file_box = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ), "file_box" ) );
gtk_widget_hide( GTK_WIDGET( p_file_box ) );
p_network_box = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ), "network_box" ) );
gtk_widget_hide( GTK_WIDGET( p_network_box ) );
p_dvd_box = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ), "dvd_box" ) );
gtk_widget_hide( GTK_WIDGET( p_dvd_box ) );
/* hide slider */
p_slider = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ), "slider_frame" ) );
gtk_widget_hide( GTK_WIDGET( p_slider ) );
/* controls unavailable */
b_control = 0;
/* show the box related to current input mode */
if( p_intf->p_sys->p_input )
{
switch( p_intf->p_sys->p_input->stream.i_method & 0xf0 )
{
case INPUT_METHOD_FILE:
gtk_widget_show( GTK_WIDGET( p_file_box ) );
p_label = gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ),
"label_status" );
gtk_label_set_text( GTK_LABEL( p_label ),
p_intf->p_sys->p_input->psz_source );
break;
case INPUT_METHOD_DISC:
gtk_widget_show( GTK_WIDGET( p_dvd_box ) );
break;
case INPUT_METHOD_NETWORK:
gtk_widget_show( GTK_WIDGET( p_network_box ) );
p_label = gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ),
"network_address_label" );
gtk_label_set_text( GTK_LABEL( p_label ),
p_intf->p_sys->p_input->psz_source );
break;
default:
msg_Warn( p_intf, "cannot determine input method" );
gtk_widget_show( GTK_WIDGET( p_file_box ) );
p_label = gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ),
"label_status" );
gtk_label_set_text( GTK_LABEL( p_label ),
p_intf->p_sys->p_input->psz_source );
break;
}
/* initialize and show slider for seekable streams */
if( p_intf->p_sys->p_input->stream.b_seekable )
{
p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue = 0;
gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
"value_changed" );
gtk_widget_show( GTK_WIDGET( p_slider ) );
}
/* control buttons for free pace streams */
b_control = p_intf->p_sys->p_input->stream.b_pace_control;
/* get ready for menu regeneration */
p_intf->p_sys->b_program_update = 1;
p_intf->p_sys->b_title_update = 1;
p_intf->p_sys->b_chapter_update = 1;
p_intf->p_sys->b_audio_update = 1;
p_intf->p_sys->b_spu_update = 1;
p_intf->p_sys->i_part = 0;
#if 0
p_intf->p_sys->b_aout_update = 1;
p_intf->p_sys->b_vout_update = 1;
#endif
p_intf->p_sys->p_input->stream.b_changed = 0;
msg_Dbg( p_intf, "stream has changed, refreshing interface" );
}
else
{
/* default mode */
p_label = gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "label_status" );
gtk_label_set_text( GTK_LABEL( p_label ), "" );
gtk_widget_show( GTK_WIDGET( p_file_box ) );
/* unsensitize menus */
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_program"),
FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_title"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_chapter"),
FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_audio"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window,"menubar_subpictures"),
FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"),
FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_language"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_subpictures"),
FALSE );
}
/* set control items */
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_back"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_eject"), !b_control);
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_pause"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_slow"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_fast"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_back"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_pause"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_slow"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_popup, "popup_fast"), b_control );
#undef GETWIDGET
return TRUE;
}
/*****************************************************************************
* GtkHideTooltips: show or hide the tooltips depending on the configuration
* option gnome-tooltips
*****************************************************************************/
int E_(GtkHideTooltips)( vlc_object_t *p_this, const char *psz_name,
vlc_value_t oldval, vlc_value_t val, void *p_data )
{
intf_thread_t *p_intf;
int i_index;
vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
FIND_ANYWHERE );
vlc_bool_t b_enable = config_GetInt( p_this, "gnome-tooltips" );
for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
p_intf = (intf_thread_t *)p_list->p_values[i_index].p_object ;
if( strcmp( MODULE_STRING, p_intf->p_module->psz_object_name ) )
{
continue;
}