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 );
This diff is collapsed.
/*****************************************************************************
* display.h: Gtk+ tools for main interface.
*****************************************************************************
* Copyright (C) 1999, 2000 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane 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.
*****************************************************************************/
/*****************************************************************************
* Prototypes
*****************************************************************************/
gint E_(GtkModeManage) ( intf_thread_t * p_intf );
void E_(GtkDisplayDate) ( GtkAdjustment *p_adj );
int E_(GtkHideTooltips) ( vlc_object_t *, const char *,
vlc_value_t, vlc_value_t, void * );
int GtkHideToolbarText ( vlc_object_t *, const char *,
vlc_value_t, vlc_value_t, void * );
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* This file is not used: everything is in gtk_callbacks.c
*****************************************************************************/
void
GtkDiscOpenCDDA (GtkToggleButton *togglebutton,
gpointer user_data)
{
}
/*****************************************************************************
* This file is not needed: everything is in gtk_callbacks.h
*****************************************************************************/
#include "gtk_callbacks.h"
void
GtkDiscOpenCDDA (GtkToggleButton *togglebutton,
gpointer user_data);
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_intf_window (void);
GtkWidget* create_intf_popup (void);
GtkWidget* create_intf_about (void);
GtkWidget* create_intf_open (void);
GtkWidget* create_intf_file (void);
GtkWidget* create_intf_modules (void);
GtkWidget* create_intf_playlist (void);
GtkWidget* create_intf_jump (void);
GtkWidget* create_intf_messages (void);
GtkWidget* create_intf_sout (void);
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <gnome.h>
#include "gnome_support.h"
/* This is an internally used function to create pixmaps. */
static GtkWidget* create_dummy_pixmap (GtkWidget *widget,
gboolean gnome_pixmap);
GtkWidget*
lookup_widget (GtkWidget *widget,
const gchar *widget_name)
{
GtkWidget *parent, *found_widget;
for (;;)
{
if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
else
parent = widget->parent;
if (parent == NULL)
break;
widget = parent;
}
found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget),
widget_name);
if (!found_widget)
g_warning ("Widget not found: %s", widget_name);
return found_widget;
}
/* This is a dummy pixmap we use when a pixmap can't be found. */
static char *dummy_pixmap_xpm[] = {
/* columns rows colors chars-per-pixel */
"1 1 1 1",
" c None",
/* pixels */
" ",
" "
};
/* This is an internally used function to create pixmaps. */
static GtkWidget*
create_dummy_pixmap (GtkWidget *widget,
gboolean gnome_pixmap)
{
GdkColormap *colormap;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
GtkWidget *pixmap;
if (gnome_pixmap)
{
return gnome_pixmap_new_from_xpm_d (dummy_pixmap_xpm);
}
colormap = gtk_widget_get_colormap (widget);
gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask,
NULL, dummy_pixmap_xpm);
if (gdkpixmap == NULL)
g_error ("Couldn't create replacement pixmap.");
pixmap = gtk_pixmap_new (gdkpixmap, mask);
gdk_pixmap_unref (gdkpixmap);
gdk_bitmap_unref (mask);
return pixmap;
}
/* This is an internally used function to create pixmaps. */
GtkWidget*
create_pixmap (GtkWidget *widget,
const gchar *filename,
gboolean gnome_pixmap)
{
GtkWidget *pixmap;
GdkColormap *colormap;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
gchar *pathname;
if (!filename || !filename[0])
return create_dummy_pixmap (widget, gnome_pixmap);
pathname = gnome_pixmap_file (filename);
if (!pathname)
{
g_warning (_("Couldn't find pixmap file: %s"), filename);
return create_dummy_pixmap (widget, gnome_pixmap);
}
if (gnome_pixmap)
{
pixmap = gnome_pixmap_new_from_file (pathname);
g_free (pathname);
return pixmap;
}
colormap = gtk_widget_get_colormap (widget);
gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask,
NULL, pathname);
if (gdkpixmap == NULL)
{
g_warning (_("Couldn't create pixmap from file: %s"), pathname);
g_free (pathname);
return create_dummy_pixmap (widget, gnome_pixmap);
}
g_free (pathname);
pixmap = gtk_pixmap_new (gdkpixmap, mask);
gdk_pixmap_unref (gdkpixmap);
gdk_bitmap_unref (mask);
return pixmap;
}
/* This is an internally used function to create imlib images. */
#if 0
GdkImlibImage*
create_image (const gchar *filename)
{
GdkImlibImage *image;
gchar *pathname;
pathname = gnome_pixmap_file (filename);
if (!pathname)
{
g_warning (_("Couldn't find pixmap file: %s"), filename);
return NULL;
}
image = gdk_imlib_load_image (pathname);
g_free (pathname);
return image;
}
#endif
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#include <gnome.h>
/*
* Public Functions.
*/
/*
* This function returns a widget in a component created by Glade.
* Call it with the toplevel widget in the component (i.e. a window/dialog),
* or alternatively any widget in the component, and the name of the widget
* you want returned.
*/
GtkWidget* lookup_widget (GtkWidget *widget,
const gchar *widget_name);
/* get_widget() is deprecated. Use lookup_widget instead. */
#define get_widget lookup_widget
/*
* Private Functions.
*/
/* This is used to create the pixmaps in the interface. */
GtkWidget* create_pixmap (GtkWidget *widget,
const gchar *filename,
gboolean gnome_pixmap);
//GdkImlibImage* create_image (const gchar *filename);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* gtk_callbacks.h : Callbacks for the gtk plugin.
*****************************************************************************
* 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 <gtk/gtk.h>
#include "config.h"
#include "control.h"
#include "menu.h"
#include "open.h"
#include "modules.h"
#include "playlist.h"
#include "preferences.h"
/* General glade callbacks */
/*****************************************************************************
* main window callbacks: specific prototypes are in headers listed before
*****************************************************************************/
#ifdef MODULE_NAME_IS_gtk
gboolean GtkExit ( GtkWidget *, gpointer );
#else
gboolean GnomeExit ( GtkWidget *, gpointer );
#endif
gboolean GtkWindowToggle ( GtkWidget *, gpointer );
gboolean GtkFullscreen ( GtkWidget *, gpointer );
gboolean GtkSliderRelease ( GtkWidget *, GdkEventButton *, gpointer );
gboolean GtkSliderPress ( GtkWidget *, GdkEventButton *, gpointer );
gboolean GtkWindowDelete ( GtkWidget * widget, GdkEvent *, gpointer );
gboolean GtkJumpShow ( GtkWidget *, gpointer );
gboolean GtkAboutShow ( GtkWidget *, gpointer );
gboolean GtkMessagesShow ( GtkWidget *, gpointer );
void GtkTitlePrev ( GtkButton * button, gpointer );
void GtkTitleNext ( GtkButton * button, gpointer );
void GtkChapterPrev ( GtkButton *, gpointer );
void GtkChapterNext ( GtkButton * button, gpointer );
void GtkAboutOk ( GtkButton *, gpointer );
void GtkWindowDrag ( GtkWidget *, GdkDragContext *,
gint, gint, GtkSelectionData *,
guint , guint, gpointer );
void GtkJumpOk ( GtkButton * button, gpointer );
void GtkJumpCancel ( GtkButton * button, gpointer user_data );
void GtkNetworkOpenChannel ( GtkToggleButton *, gpointer );
gboolean
GtkDiscEject (GtkWidget *widget,
gpointer user_data);
void
GtkMessagesOk (GtkButton *button,
gpointer user_data);
gboolean
GtkMessagesDelete (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
gboolean
GtkSatOpenShow (GtkWidget *widget,
gpointer user_data);
void
GtkSatOpenOk (GtkButton *button,
gpointer user_data);
void
GtkSatOpenCancel (GtkButton *button,
gpointer user_data);
void
GtkNetworkOpenUDP (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkNetworkOpenMulticast (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkNetworkOpenCS (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkNetworkOpenHTTP (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkNetworkOpenChannel (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkOpenOk (GtkButton *button,
gpointer user_data);
void
GtkOpenCancel (GtkButton *button,
gpointer user_data);
void
GtkOpenChanged (GtkWidget *button,
gpointer user_data);
void
GtkOpenNotebookChanged (GtkNotebook *notebook,
GtkNotebookPage *page,
gint page_num,
gpointer user_data);
void
GtkSatOpenToggle (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkFileShow (GtkButton *button,
gpointer user_data);
void
GtkFileOk (GtkButton *button,
gpointer user_data);
void
GtkFileCancel (GtkButton *button,
gpointer user_data);
void
GtkClose (GtkMenuItem *menuitem,
gpointer user_data);
void
GtkVolumeUp (GtkMenuItem *menuitem,
gpointer user_data);
void
GtkVolumeDown (GtkMenuItem *menuitem,
gpointer user_data);
void
GtkVolumeMute (GtkMenuItem *menuitem,
gpointer user_data);
void
GtkMenubarDeinterlace (GtkMenuItem *menuitem,
gpointer user_data);
void
GtkPopupDeinterlace (GtkRadioMenuItem *radiomenuitem,
gpointer user_data);
void
GtkOpenSubtitleShow (GtkButton *button,
gpointer user_data);
void
GtkSoutSettings (GtkButton *button,
gpointer user_data);
void
GtkSoutSettingsCancel (GtkButton *button,
gpointer user_data);
void
GtkSoutSettingsChanged (GtkWidget *button,
gpointer user_data);
void
GtkSoutSettingsOk (GtkButton *button,
gpointer user_data);
void
GtkSoutSettingsAccessFile (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkSoutSettingsAccessUdp (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkOpenSoutShow (GtkButton *button,
gpointer user_data);
This diff is collapsed.
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_intf_window (void);
GtkWidget* create_intf_popup (void);
GtkWidget* create_intf_about (void);
GtkWidget* create_intf_open (void);
GtkWidget* create_intf_file (void);
GtkWidget* create_intf_jump (void);
GtkWidget* create_intf_playlist (void);
GtkWidget* create_intf_messages (void);
GtkWidget* create_intf_sout (void);
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <gtk/gtk.h>
#include "gtk_support.h"
/* This is an internally used function to check if a pixmap file exists. */
static gchar* check_file_exists (const gchar *directory,
const gchar *filename);
/* This is an internally used function to create pixmaps. */
static GtkWidget* create_dummy_pixmap (GtkWidget *widget);
GtkWidget*
lookup_widget (GtkWidget *widget,
const gchar *widget_name)
{
GtkWidget *parent, *found_widget;
for (;;)
{
if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
else
parent = widget->parent;
if (parent == NULL)
break;
widget = parent;
}
found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget),
widget_name);
if (!found_widget)
g_warning ("Widget not found: %s", widget_name);
return found_widget;
}
/* This is a dummy pixmap we use when a pixmap can't be found. */
static char *dummy_pixmap_xpm[] = {
/* columns rows colors chars-per-pixel */
"1 1 1 1",
" c None",
/* pixels */
" "
};
/* This is an internally used function to create pixmaps. */
static GtkWidget*
create_dummy_pixmap (GtkWidget *widget)
{
GdkColormap *colormap;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
GtkWidget *pixmap;
colormap = gtk_widget_get_colormap (widget);
gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask,
NULL, dummy_pixmap_xpm);
if (gdkpixmap == NULL)
g_error ("Couldn't create replacement pixmap.");
pixmap = gtk_pixmap_new (gdkpixmap, mask);
gdk_pixmap_unref (gdkpixmap);
gdk_bitmap_unref (mask);
return pixmap;
}
static GList *pixmaps_directories = NULL;
/* Use this function to set the directory containing installed pixmaps. */
void
add_pixmap_directory (const gchar *directory)
{
pixmaps_directories = g_list_prepend (pixmaps_directories,
g_strdup (directory));
}
/* This is an internally used function to create pixmaps. */
GtkWidget*
create_pixmap (GtkWidget *widget,
const gchar *filename)
{
gchar *found_filename = NULL;
GdkColormap *colormap;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
GtkWidget *pixmap;
GList *elem;
if (!filename || !filename[0])
return create_dummy_pixmap (widget);
/* We first try any pixmaps directories set by the application. */
elem = pixmaps_directories;
while (elem)
{
found_filename = check_file_exists ((gchar*)elem->data, filename);
if (found_filename)
break;
elem = elem->next;
}
/* If we haven't found the pixmap, try the source directory. */
if (!found_filename)
{
found_filename = check_file_exists ("pixmaps", filename);
}
if (!found_filename)
{
g_warning (_("Couldn't find pixmap file: %s"), filename);
return create_dummy_pixmap (widget);
}
colormap = gtk_widget_get_colormap (widget);
gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask,
NULL, found_filename);
if (gdkpixmap == NULL)
{
g_warning (_("Error loading pixmap file: %s"), found_filename);
g_free (found_filename);
return create_dummy_pixmap (widget);
}
g_free (found_filename);
pixmap = gtk_pixmap_new (gdkpixmap, mask);
gdk_pixmap_unref (gdkpixmap);
gdk_bitmap_unref (mask);
return pixmap;
}
/* This is an internally used function to check if a pixmap file exists. */
static gchar*
check_file_exists (const gchar *directory,
const gchar *filename)
{
gchar *full_filename;
struct stat s;
gint status;
full_filename = (gchar*) g_malloc (strlen (directory) + 1
+ strlen (filename) + 1);
strcpy (full_filename, directory);
strcat (full_filename, G_DIR_SEPARATOR_S);
strcat (full_filename, filename);
status = stat (full_filename, &s);
if (status == 0 && S_ISREG (s.st_mode))
return full_filename;
g_free (full_filename);
return NULL;
}
/*
* Created by glade, fixed by bootstrap
*/
#ifdef HAVE_CONFIG_H
# include <vlc/vlc.h>
#endif
#include <gtk/gtk.h>
/*
* Standard gettext macros.
*/
#if 0 /* Disabled by bootstrap */
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
/* #else */
# define textdomain(String) (String)
# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String)
# define N_(String) (String)
#endif
/*
* Public Functions.
*/
/*
* This function returns a widget in a component created by Glade.
* Call it with the toplevel widget in the component (i.e. a window/dialog),
* or alternatively any widget in the component, and the name of the widget
* you want returned.
*/
GtkWidget* lookup_widget (GtkWidget *widget,
const gchar *widget_name);
/* get_widget() is deprecated. Use lookup_widget instead. */
#define get_widget lookup_widget
/* Use this function to set the directory containing installed pixmaps. */
void add_pixmap_directory (const gchar *directory);
/*
* Private Functions.
*/
/* This is used to create the pixmaps in the interface. */
GtkWidget* create_pixmap (GtkWidget *widget,
const gchar *filename);
This diff is collapsed.
/*****************************************************************************
* gtk_menu.h: prototypes for menu functions
*****************************************************************************
* Copyright (C) 1999, 2000 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane 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.
*****************************************************************************/
gint GtkSetupMenus( intf_thread_t * );
/*****************************************************************************
* String sizes
*****************************************************************************/
#define GTK_MENU_LABEL_SIZE 64
/*****************************************************************************
* Convert user_data structures to title and chapter information
*****************************************************************************/
#define DATA2TITLE( user_data ) ( (gint)((long)(user_data)) >> 16 )
#define DATA2CHAPTER( user_data ) ( (gint)((long)(user_data)) & 0xffff )
#define POS2DATA( title, chapter ) ( 0 + ( ((title) << 16) \
| ((chapter) & 0xffff)) )
/*****************************************************************************
* gtk_modules.c : functions to build modules configuration boxes.
*****************************************************************************
* 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"
gboolean GtkModulesShow( GtkWidget *widget,
gpointer user_data )
{
intf_thread_t *p_intf = GtkGetIntf( widget );
if( !GTK_IS_WIDGET( p_intf->p_sys->p_modules ) )
{
/* p_intf->p_sys->p_modules = create_intf_modules(); */
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_modules ),
"p_intf", p_intf );
}
gtk_widget_show( p_intf->p_sys->p_modules );
gdk_window_raise( p_intf->p_sys->p_modules->window );
return FALSE;
}
void GtkModulesCancel( GtkButton * button, gpointer user_data )
{
intf_thread_t *p_intf = GtkGetIntf( button );
gtk_widget_hide( p_intf->p_sys->p_modules );
}
/*****************************************************************************
* gtk_modules.h: prototypes for modules functions
*****************************************************************************
* Copyright (C) 1999, 2000 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane 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 GtkModulesShow ( GtkWidget *, gpointer );
void GtkModulesCancel ( GtkButton * button, gpointer );
This diff is collapsed.
/*****************************************************************************
* gtk_open.h: prototypes for open 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 GtkFileOpenShow ( GtkWidget *, gpointer );
void GtkFileOpenCancel ( GtkButton *, gpointer );
void GtkFileOpenOk ( GtkButton *, gpointer );
gboolean GtkDiscOpenShow ( GtkWidget *, gpointer );
void GtkDiscOpenDvd ( GtkToggleButton *, gpointer );
void GtkDiscOpenVcd ( GtkToggleButton *, gpointer );
void GtkDiscOpenCDDA ( GtkToggleButton *, gpointer );
void GtkDiscOpenOk ( GtkButton *, gpointer );
void GtkDiscOpenCancel ( GtkButton *, gpointer );
gboolean GtkNetworkOpenShow ( GtkWidget *, gpointer );
void GtkNetworkOpenOk ( GtkButton *, gpointer );
void GtkNetworkOpenCancel ( GtkButton *, gpointer );
void GtkNetworkOpenBroadcast( GtkToggleButton *, gpointer );
void GtkNetworkOpenChannel ( GtkToggleButton *, gpointer );
This diff is collapsed.
/*****************************************************************************
* gtk_playlist.h : Playlist functions for the Gtk plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 the VideoLAN team
* $Id$
*
* Authors: Pierre Baillet <oct@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.
*****************************************************************************/
void GtkPlaylistDeleteAll ( GtkMenuItem *, gpointer );
void GtkPlaylistDeleteSelected( GtkMenuItem *, gpointer );
void GtkPlaylistCrop ( GtkMenuItem *, gpointer );
void GtkPlaylistInvert ( GtkMenuItem *, gpointer );
void GtkPlaylistSelect ( GtkMenuItem *, gpointer );
void GtkPlaylistOk ( GtkButton *, gpointer );
void GtkPlaylistCancel ( GtkButton *, gpointer );
void GtkPlaylistAddUrl ( GtkMenuItem *, gpointer );
gint GtkCompareItems ( gconstpointer, gconstpointer );
int GtkHasValidExtension ( gchar * );
gboolean GtkPlaylistShow ( GtkWidget *, gpointer );
gboolean GtkPlaylistPrev ( GtkWidget *, gpointer );
gboolean GtkPlaylistNext ( GtkWidget *, gpointer );
gboolean GtkPlaylistDragMotion( GtkWidget *, GdkDragContext *,
gint, gint, guint, gpointer );
gboolean GtkPlaylistEvent ( GtkWidget *, GdkEvent *, gpointer );
void GtkPlaylistDragData ( GtkWidget *, GdkDragContext *,
gint, gint, GtkSelectionData *,
guint, guint, gpointer );
void GtkDeleteGListItem ( gpointer, gpointer );
void GtkDropDataReceived ( intf_thread_t *, GtkSelectionData *, guint, int );
int GtkAppendList ( playlist_t *, int, GList * );
void GtkRebuildCList ( GtkCList *, playlist_t * );
void GtkPlayListManage ( intf_thread_t * );
This diff is collapsed.
/*****************************************************************************
* gtk_control.h: prototypes for control functions
*****************************************************************************
* Copyright (C) 1999, 2000 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane 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.
*****************************************************************************/
void GtkPreferencesShow( GtkMenuItem *, gpointer );
This diff is collapsed.
COMMON_gtk2 = \
$(NULL)
SOURCES_gtk2 = \
gtk2.c \
gtk2_callbacks.c \
gtk2_callbacks.h \
gtk2_interface.c \
gtk2_interface.h \
gtk2_support.c \
gtk2_support.h \
$(COMMON_gtk2)
SOURCES_gnome2 = \
gnome2.c \
gnome2_callbacks.c \
gnome2_callbacks.h \
gnome2_interface.c \
gnome2_interface.h \
gnome2_support.c \
gnome2_support.h \
$(COMMON_gtk2)
EXTRA_DIST += \
gtk2.glade \
gnome2.glade \
$(NULL)
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
<glade-project>
<name>gnome2</name>
<program_name>gnome2</program_name>
<source_directory></source_directory>
<pixmaps_directory></pixmaps_directory>
<output_build_files>FALSE</output_build_files>
<main_source_file>gnome2_interface.c</main_source_file>
<main_header_file>gnome2_interface.h</main_header_file>
<handler_source_file>gnome2_callbacks.c</handler_source_file>
<handler_header_file>gnome2_callbacks.h</handler_header_file>
<support_source_file>gnome2_support.c</support_source_file>
<support_header_file>gnome2_support.h</support_header_file>
</glade-project>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gnome.h>
#include "gnome2_callbacks.h"
#include "gnome2_interface.h"
#include "gnome2_support.h"
void
on_new1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_open1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_save1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_save_as1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_quit1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_cut1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_copy1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_paste1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_clear1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_properties1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_preferences1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_about1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
This diff is collapsed.
This diff is collapsed.
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_window1 (void);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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