Commit bec589af authored by Sam Hocevar's avatar Sam Hocevar

  (note: empty CVS mails mean that a new directory has been created,
   don't forget to use the -p option if you cvs update)

  * Added a plain Gtk+ port of the Gnome interface, for the gnome-impaired
    people. Gtk+ is now compiled by default, while Gnome isn't (you will
    have to add --enable-gnome when running configure)
  * Replaced -lcurses with -lncurses in configure.in.
parent 910f40f9
...@@ -32,7 +32,7 @@ Here's a shortcut to copy-paste to do a clean build : ...@@ -32,7 +32,7 @@ Here's a shortcut to copy-paste to do a clean build :
make distclean 2>/dev/null ; ./configure --prefix=/usr --enable-gnome \ make distclean 2>/dev/null ; ./configure --prefix=/usr --enable-gnome \
--enable-fb --with-glide --with-ggi --with-sdl --enable-esd \ --enable-fb --with-glide --with-ggi --with-sdl --enable-esd \
--enable-alsa --enable-mga && make --enable-alsa --enable-mga --enable-gtk && make
Installing and running VideoLAN Installing and running VideoLAN
......
...@@ -317,6 +317,12 @@ PLUGIN_GGI = plugins/ggi/ggi.o \ ...@@ -317,6 +317,12 @@ PLUGIN_GGI = plugins/ggi/ggi.o \
PLUGIN_GLIDE = plugins/glide/glide.o \ PLUGIN_GLIDE = plugins/glide/glide.o \
plugins/glide/vout_glide.o plugins/glide/vout_glide.o
PLUGIN_GTK = plugins/gtk/gtk.o \
plugins/gtk/intf_gtk.o \
plugins/gtk/gtk_callbacks.o \
plugins/gtk/gtk_interface.o \
plugins/gtk/gtk_support.o
PLUGIN_GNOME = plugins/gnome/gnome.o \ PLUGIN_GNOME = plugins/gnome/gnome.o \
plugins/gnome/intf_gnome.o \ plugins/gnome/intf_gnome.o \
plugins/gnome/gnome_callbacks.o \ plugins/gnome/gnome_callbacks.o \
...@@ -415,6 +421,7 @@ STD_PLUGIN_OBJ := $(filter-out $(STD_PLUGIN_COMMON), \ ...@@ -415,6 +421,7 @@ STD_PLUGIN_OBJ := $(filter-out $(STD_PLUGIN_COMMON), \
NONSTD_PLUGIN_OBJ = \ NONSTD_PLUGIN_OBJ = \
$(PLUGIN_GLIDE) \ $(PLUGIN_GLIDE) \
$(PLUGIN_GTK) \
$(PLUGIN_GNOME) $(PLUGIN_GNOME)
NONSTD_CPP_PLUGIN_OBJ = \ NONSTD_CPP_PLUGIN_OBJ = \
...@@ -542,10 +549,10 @@ plugins: $(PLUGINS:%=lib/%.so) ...@@ -542,10 +549,10 @@ plugins: $(PLUGINS:%=lib/%.so)
FORCE: FORCE:
# #
# Gnome and Framebuffer aliases - don't add new aliases which could bloat # GTK/Gnome and Framebuffer aliases - don't add new aliases which could bloat
# the namespace # the namespace
# #
gvlc fbvlc: vlc gvlc kvlc: vlc
rm -f $@ && ln -s vlc $@ rm -f $@ && ln -s vlc $@
...@@ -577,6 +584,11 @@ $(STD_PLUGIN_OBJ): %.o: .dep/%.d ...@@ -577,6 +584,11 @@ $(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c $(STD_PLUGIN_OBJ): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $< $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
$(PLUGIN_GTK): %.o: Makefile.dep
$(PLUGIN_GTK): %.o: .dep/%.d
$(PLUGIN_GTK): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) `gtk-config --cflags gtk` -c -o $@ $<
$(PLUGIN_GNOME): %.o: Makefile.dep $(PLUGIN_GNOME): %.o: Makefile.dep
$(PLUGIN_GNOME): %.o: .dep/%.d $(PLUGIN_GNOME): %.o: .dep/%.d
$(PLUGIN_GNOME): %.o: %.c $(PLUGIN_GNOME): %.o: %.c
...@@ -642,6 +654,9 @@ lib/x11.so: $(PLUGIN_X11) ...@@ -642,6 +654,9 @@ lib/x11.so: $(PLUGIN_X11)
lib/mga.so: $(PLUGIN_MGA) lib/mga.so: $(PLUGIN_MGA)
$(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
lib/gtk.so: $(PLUGIN_GTK)
$(CC) $(PCFLAGS) -shared -o $@ $^ `gtk-config --libs gtk | sed 's,-rdynamic,,'`
lib/gnome.so: $(PLUGIN_GNOME) lib/gnome.so: $(PLUGIN_GNOME)
$(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'` $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
...@@ -655,7 +670,7 @@ lib/sdl.so: $(PLUGIN_SDL) ...@@ -655,7 +670,7 @@ lib/sdl.so: $(PLUGIN_SDL)
$(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL) $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
lib/ncurses.so: $(PLUGIN_NCURSES) lib/ncurses.so: $(PLUGIN_NCURSES)
$(CC) $(PCFLAGS) -shared -o $@ $^ -lcurses $(CC) $(PCFLAGS) -shared -o $@ $^ -lncurses
ifeq ($(SYS),beos) ifeq ($(SYS),beos)
lib/null.so: $(PLUGIN_NULL) lib/null.so: $(PLUGIN_NULL)
......
This diff is collapsed.
...@@ -143,6 +143,9 @@ if test x$host_os = xbeos; then ...@@ -143,6 +143,9 @@ if test x$host_os = xbeos; then
dnl default case dnl default case
else else
GVLC=0
KVLC=0
AC_ARG_ENABLE(dummy, AC_ARG_ENABLE(dummy,
[ --disable-dummy dummy module (default enabled)]) [ --disable-dummy dummy module (default enabled)])
if test x$enable_dummy != xno; then PLUGINS=${PLUGINS}"dummy "; fi if test x$enable_dummy != xno; then PLUGINS=${PLUGINS}"dummy "; fi
...@@ -195,10 +198,13 @@ AC_ARG_ENABLE(ncurses, ...@@ -195,10 +198,13 @@ AC_ARG_ENABLE(ncurses,
[if test x$enable_ncurses = xyes; then PLUGINS=${PLUGINS}"ncurses "; fi]) [if test x$enable_ncurses = xyes; then PLUGINS=${PLUGINS}"ncurses "; fi])
AC_ARG_ENABLE(kde, AC_ARG_ENABLE(kde,
[ --enable-kde KDE interface support (default disabled)], [ --enable-kde KDE interface support (default disabled)],
[if test x$enable_kde = xyes; then PLUGINS=${PLUGINS}"kde "; ALIASE=${ALIASES}"kvlc"; fi]) [if test x$enable_kde = xyes; then PLUGINS=${PLUGINS}"kde "; KVLC=1; fi])
AC_ARG_ENABLE(gnome, AC_ARG_ENABLE(gnome,
[ --disable-gnome Gnome support (default enabled)]) [ --enable-gnome Gnome interface support (default disabled)],
if test x$enable_gnome != xno; then PLUGINS=${PLUGINS}"gnome "; ALIASES=${ALIASES}"gvlc "; fi [if test x$enable_gnome = xyes; then PLUGINS=${PLUGINS}"gnome "; GVLC=1; fi])
AC_ARG_ENABLE(gtk,
[ --disable-gtk Gtk+ support (default enabled)])
if test x$enable_gtk != xno; then PLUGINS=${PLUGINS}"gtk "; GVLC=1; fi
AC_ARG_ENABLE(x11, AC_ARG_ENABLE(x11,
[ --disable-x11 X11 support (default enabled)]) [ --disable-x11 X11 support (default enabled)])
if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
...@@ -206,6 +212,10 @@ if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi ...@@ -206,6 +212,10 @@ if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
AC_ARG_ENABLE(alsa, AC_ARG_ENABLE(alsa,
[ --enable-alsa Alsa sound drivers support (Only for linux) (default disabled)], [ --enable-alsa Alsa sound drivers support (Only for linux) (default disabled)],
[if test x$enable_alsa = xyes; then AC_CHECK_HEADER(sys/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false") if test $have_alsa = true; then PLUGINS=${PLUGINS}"alsa "; fi; fi]) [if test x$enable_alsa = xyes; then AC_CHECK_HEADER(sys/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false") if test $have_alsa = true; then PLUGINS=${PLUGINS}"alsa "; fi; fi])
if test x$GVLC = x1 ; then ALIASES=${ALIASES}"gvlc "; fi
if test x$KVLC = x1 ; then ALIASES=${ALIASES}"kvlc "; fi
fi fi
AC_SUBST(SYS) AC_SUBST(SYS)
......
...@@ -28,14 +28,14 @@ static GnomeUIInfo menubar_file_menu_uiinfo[] = ...@@ -28,14 +28,14 @@ static GnomeUIInfo menubar_file_menu_uiinfo[] =
static GnomeUIInfo menubar_view_menu_uiinfo[] = static GnomeUIInfo menubar_view_menu_uiinfo[] =
{ {
{ {
GNOME_APP_UI_ITEM, N_("P_laylist"), GNOME_APP_UI_ITEM, N_("_Playlist..."),
N_("Open the playlist window"), N_("Open the playlist window"),
(gpointer) on_menubar_playlist_activate, NULL, NULL, (gpointer) on_menubar_playlist_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_INDEX, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_INDEX,
0, (GdkModifierType) 0, NULL 0, (GdkModifierType) 0, NULL
}, },
{ {
GNOME_APP_UI_ITEM, N_("_Modules"), GNOME_APP_UI_ITEM, N_("_Modules..."),
N_("Open the plugin manager"), N_("Open the plugin manager"),
(gpointer) on_menubar_modules_activate, NULL, NULL, (gpointer) on_menubar_modules_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_ATTACH, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_ATTACH,
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<handler>on_menubar_playlist_activate</handler> <handler>on_menubar_playlist_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:55:04 GMT</last_modification_time> <last_modification_time>Sun, 11 Feb 2001 16:55:04 GMT</last_modification_time>
</signal> </signal>
<label>P_laylist</label> <label>_Playlist...</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_INDEX</stock_icon> <stock_icon>GNOME_STOCK_MENU_INDEX</stock_icon>
</widget> </widget>
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<handler>on_menubar_modules_activate</handler> <handler>on_menubar_modules_activate</handler>
<last_modification_time>Tue, 13 Feb 2001 17:19:41 GMT</last_modification_time> <last_modification_time>Tue, 13 Feb 2001 17:19:41 GMT</last_modification_time>
</signal> </signal>
<label>_Modules</label> <label>_Modules...</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_ATTACH</stock_icon> <stock_icon>GNOME_STOCK_MENU_ATTACH</stock_icon>
</widget> </widget>
...@@ -596,6 +596,7 @@ Andres Krapf &lt;dae@via.ecp.fr&gt; ...@@ -596,6 +596,7 @@ Andres Krapf &lt;dae@via.ecp.fr&gt;
Christophe Massiot &lt;massiot@via.ecp.fr&gt; Christophe Massiot &lt;massiot@via.ecp.fr&gt;
Vincent Seguin &lt;seguin@via.ecp.fr&gt; Vincent Seguin &lt;seguin@via.ecp.fr&gt;
Benoit Steiner &lt;benny@via.ecp.fr&gt; Benoit Steiner &lt;benny@via.ecp.fr&gt;
Arnaud de Bossoreille de Ribou &lt;bozo@via.ecp.fr&gt;
Jean-Marc Dressler &lt;polux@via.ecp.fr&gt; Jean-Marc Dressler &lt;polux@via.ecp.fr&gt;
Gal Hendryckx &lt;jimmy@via.ecp.fr&gt; Gal Hendryckx &lt;jimmy@via.ecp.fr&gt;
Samuel Hocevar &lt;sam@zoy.org&gt; Samuel Hocevar &lt;sam@zoy.org&gt;
......
/*****************************************************************************
* gtk.c : Gtk+ plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
*
* 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.
*****************************************************************************/
#define MODULE_NAME gtk
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <stdlib.h> /* malloc(), free() */
#include "config.h"
#include "common.h" /* boolean_t, byte_t */
#include "threads.h"
#include "mtime.h"
#include "modules.h"
/*****************************************************************************
* Building configuration tree
*****************************************************************************/
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for Gtk+ module" )
ADD_COMMENT( "For now, the Gtk+ module cannot be configured" )
MODULE_CONFIG_END
/*****************************************************************************
* Capabilities defined in the other files.
******************************************************************************/
void _M( intf_getfunctions )( function_list_t * p_function_list );
/*****************************************************************************
* InitModule: get the module structure and configuration.
*****************************************************************************
* We have to fill psz_name, psz_longname and psz_version. These variables
* will be strdup()ed later by the main application because the module can
* be unloaded later to save memory, and we want to be able to access this
* data even after the module has been unloaded.
*****************************************************************************/
MODULE_INIT
{
p_module->psz_name = MODULE_STRING;
p_module->psz_longname = "Gtk+ interface module";
p_module->psz_version = VERSION;
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_INTF;
return( 0 );
}
/*****************************************************************************
* ActivateModule: set the module to an usable state.
*****************************************************************************
* This function fills the capability functions and the configuration
* structure. Once ActivateModule() has been called, the i_usage can
* be set to 0 and calls to NeedModule() be made to increment it. To unload
* the module, one has to wait until i_usage == 0 and call DeactivateModule().
*****************************************************************************/
MODULE_ACTIVATE
{
p_module->p_functions = malloc( sizeof( module_functions_t ) );
if( p_module->p_functions == NULL )
{
return( -1 );
}
_M( intf_getfunctions )( &p_module->p_functions->intf );
p_module->p_config = p_config;
return( 0 );
}
/*****************************************************************************
* DeactivateModule: make sure the module can be unloaded.
*****************************************************************************
* This function must only be called when i_usage == 0. If it successfully
* returns, i_usage can be set to -1 and the module unloaded. Be careful to
* lock usage_lock during the whole process.
*****************************************************************************/
MODULE_DEACTIVATE
{
free( p_module->p_functions );
return( 0 );
}
This diff is collapsed.
#include <gtk/gtk.h>
void
on_intf_window_destroy (GtkObject *object,
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_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_slow_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_fast_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);
gboolean
on_hscale_button_release_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
gboolean
on_hscale_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
on_intf_fileopen_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_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_intf_playlist_destroy (GtkObject *object,
gpointer user_data);
void
on_playlist_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_fast_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_open_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_exit_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_play_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_exit_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_playlist_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_modules_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_popup_pause_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_slow_activate (GtkMenuItem *menuitem,
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_about_ok_clicked (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_fileopen (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. */
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;
}
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
/*
* Standard gettext macros.
*/
#ifdef ENABLE_NLS
# 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);
/*****************************************************************************
* gtk_sys.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_sys.h,v 1.1 2001/02/21 11:49:18 sam 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.
*****************************************************************************/
/*****************************************************************************
* drag'n'drop stuff
*****************************************************************************/
#define DROP_ACCEPT_TEXT_URI_LIST 0
#define DROP_ACCEPT_TEXT_PLAIN 1
/*****************************************************************************
* intf_sys_t: description and status of Gtk+ interface
*****************************************************************************/
typedef struct intf_sys_s
{
/* special actions */
vlc_mutex_t change_lock; /* the change lock */
boolean_t b_popup_changed; /* display menu ? */
boolean_t b_window_changed; /* window display toggled ? */
boolean_t b_playlist_changed; /* playlist display toggled ? */
boolean_t b_scale_isfree; /* user isn't dragging scale ? */
/* intf_Manage callback timeout */
int i_timeout;
/* windows and widgets */
GtkWidget * p_window; /* main window */
GtkWidget * p_popup; /* popup menu */
GtkWidget * p_playlist; /* playlist */
GtkWidget * p_modules; /* module manager */
GtkWidget * p_about; /* about window */
GtkWidget * p_fileopen; /* file open window */
/* XXX: ugly kludge */
void ( *pf_gtk_callback ) ( void );
void ( *pf_gdk_callback ) ( void );
} intf_sys_t;
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