Commit fa5ba0bb authored by Stéphane Borel's avatar Stéphane Borel

-Unification of gnome/gtk intefaces: now all the file are in plugin/gtk.

Specific files are glade generated files and intf_* files. All the
remainders are common to gtk and gnome and contain all the callbacks for
both interfaces.
parent 5ae87b7e
......@@ -12,7 +12,7 @@
# All possible plugin directories, needed for make clean
#
PLUGINS_DIR := alsa beos darwin dsp dummy \
dvd esd fb ggi glide gnome gtk \
dvd esd fb ggi glide gtk \
downmix idct imdct \
macosx mga \
motion \
......@@ -23,7 +23,7 @@ PLUGINS_DIR := alsa beos darwin dsp dummy \
# All possible plugin objects
#
PLUGINS_TARGETS := alsa/alsa beos/beos darwin/darwin dsp/dsp dummy/dummy \
dvd/dvd esd/esd fb/fb ggi/ggi glide/glide gnome/gnome gtk/gtk \
dvd/dvd esd/esd fb/fb ggi/ggi glide/glide gtk/gnome gtk/gtk \
downmix/downmix downmix/downmixsse downmix/downmix3dn \
idct/idct idct/idctclassic idct/idctmmx idct/idctmmxext \
imdct/imdct imdct/imdct3dn imdct/imdctsse \
......@@ -76,8 +76,7 @@ AC3_DECODER = src/ac3_decoder/ac3_decoder_thread.o \
AC3_SPDIF = src/ac3_spdif/ac3_spdif.o \
src/ac3_spdif/ac3_iec958.o
LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o \
src/lpcm_decoder/lpcm_decoder.o
LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o
AUDIO_DECODER = src/audio_decoder/audio_decoder.o \
src/audio_decoder/adec_generic.o \
......
###############################################################################
# vlc (VideoLAN Client) gnome module Makefile
# (c)2001 VideoLAN
###############################################################################
#
# Objects
#
PLUGIN_GNOME = gnome.o intf_gnome.o gnome_callbacks.o gnome_interface.o gnome_support.o gnome_playlist.o
BUILTIN_GNOME = $(PLUGIN_GNOME:%.o=BUILTIN_%.o)
ALL_OBJ = $(PLUGIN_GNOME) $(BUILTIN_GNOME)
#
# Virtual targets
#
include ../../Makefile.modules
$(PLUGIN_GNOME): %.o: .dep/%.d
$(PLUGIN_GNOME): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gtk gnomeui` -c -o $@ $<
$(BUILTIN_GNOME): BUILTIN_%.o: .dep/%.d
$(BUILTIN_GNOME): BUILTIN_%.o: %.c
$(CC) $(CFLAGS) -DBUILTIN `gnome-config --cflags gtk gnomeui` -c -o $@ $<
#
# Real targets
#
../../lib/gnome.so: $(PLUGIN_GNOME)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GNOME)
../../lib/gnome.a: $(BUILTIN_GNOME)
ar r $@ $^
$(RANLIB) $@
This diff is collapsed.
/*****************************************************************************
* gnome_callbacks.h : Callbacks for the Gnome plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gnome_callbacks.h,v 1.17 2001/05/15 01:01:44 stef Exp $
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "config.h"
#include <gnome.h>
/*****************************************************************************
* Callback prototypes
*****************************************************************************/
void
on_menubar_open_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_exit_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_playlist_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_plugins_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_preferences_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_about_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_toolbar_open_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_back_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_stop_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_play_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_pause_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_playlist_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_prev_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_next_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_play_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_pause_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_exit_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_intf_window_destroy (GtkObject *object,
gpointer user_data);
void
on_fileopen_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_fileopen_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_intf_fileopen_destroy (GtkObject *object,
gpointer user_data);
void
on_popup_open_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_about_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_slow_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_fast_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_toolbar_slow_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_fast_clicked (GtkButton *button,
gpointer user_data);
void
on_intf_modules_destroy (GtkObject *object,
gpointer user_data);
void
on_modules_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_modules_apply_clicked (GtkButton *button,
gpointer user_data);
void
on_modules_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_menubar_modules_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_intf_window_drag_data_received (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time,
gpointer user_data);
void
on_menubar_audio_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_disc_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_toolbar_disc_clicked (GtkButton *button,
gpointer user_data);
void
on_disc_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_disc_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_disc_dvd_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_disc_vcd_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_popup_disc_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_audio_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_menubar_subtitle_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_popup_audio_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_popup_subtitle_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_popup_navigation_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_menubar_title_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_menubar_network_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_toolbar_network_clicked (GtkButton *button,
gpointer user_data);
void
on_network_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_network_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_network_activate (GtkMenuItem *menuitem,
gpointer user_data);
gboolean
on_slider_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
gboolean
on_slider_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
on_menubar_chapter_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_button_chapter_prev_clicked (GtkButton *button,
gpointer user_data);
void
on_button_chapter_next_clicked (GtkButton *button,
gpointer user_data);
void
on_button_title_prev_clicked (GtkButton *button,
gpointer user_data);
void
on_button_title_next_clicked (GtkButton *button,
gpointer user_data);
void
on_menubar_angle_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_popup_angle_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_popup_stop_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_jump_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_preferences_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_broadcast_check_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_jump_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_jump_apply_clicked (GtkButton *button,
gpointer user_data);
void
on_jump_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_playlist_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_preferences_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_preferences_apply_clicked (GtkButton *button,
gpointer user_data);
void
on_preferences_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_menubar_fullscreen_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_fullscreen_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_close_clicked (GtkButton *button,
gpointer user_data);
void
on_intf_playlist_destroy (GtkObject *object,
gpointer user_data);
void
on_intf_playlist_destroy (GtkObject *object,
gpointer user_data);
void
on_playlist_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_playlist_disc_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_file_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_network_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_url_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_crop_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_invert_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_select_activate (GtkMenuItem *menuitem,
gpointer user_data);
gboolean
on_playlist_clist_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
on_playlist_clist_drag_data_received (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time,
gpointer user_data);
gboolean
on_playlist_clist_drag_motion (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
guint time,
gpointer user_data);
void
on_playlist_delete_all_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_delete_item_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_playlist_apply_clicked (GtkButton *button,
gpointer user_data);
void
on_playlist_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_back_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_destroy (GtkObject *object,
gpointer user_data);
/*****************************************************************************
* gnome_playlist.c : Interface for the playlist dialog
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: gnome_playlist.c,v 1.3 2001/05/15 01:01:44 stef Exp $
*
* Authors: Pierre Baillet <oct@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.
*****************************************************************************/
#define MODULE_NAME gnome
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h>
#include <gtk/gtk.h>
#include <string.h>
#include <sys/types.h> /* for readdir and stat stuff */
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "stream_control.h"
#include "input_ext-intf.h"
#include "interface.h"
#include "intf_playlist.h"
#include "intf_msg.h"
#include "intf_urldecode.h"
#include "gnome_callbacks.h"
#include "gnome_interface.h"
#include "gnome_support.h"
#include "gnome_playlist.h"
#include "intf_gnome.h"
#include "main.h"
/*****************************************************************************
* Playlist callbacks
*****************************************************************************
* The following callbacks are related to the playlist.
*****************************************************************************/
void
on_playlist_destroy (GtkObject *object,
gpointer user_data)
{
gtk_widget_hide( GTK_WIDGET(object));
}
void
on_playlist_ok_clicked (GtkButton *button,
gpointer user_data)
{
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
void
on_playlist_apply_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_playlist_cancel_clicked (GtkButton *button,
gpointer user_data)
{
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
void
on_playlist_close_clicked (GtkButton *button,
gpointer user_data)
{
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
void
on_playlist_disc_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_playlist" );
/* If we have never used the file selector, open it */
if( !GTK_IS_WIDGET( p_intf->p_sys->p_disc ) )