gstreamer/gstplay/interface.c
Wim Taymans 60b626e820 glade based gstplay version.
Original commit message from CVS:
glade based gstplay version.
better avi/mpeg support.
nice about dialog :-)
Drag and drop should work.
2000-08-14 10:16:23 +00:00

86 lines
2.7 KiB
C

/*
* 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 "callbacks.h"
#include "interface.h"
extern GtkWidget *play_button;
extern GtkWidget *pause_button;
extern GtkWidget *stop_button;
extern guchar statusline[];
extern guchar *statustext;
void update_buttons(int active)
{
gtk_signal_handler_block_by_func(GTK_OBJECT(play_button),
GTK_SIGNAL_FUNC (on_toggle_play_toggled),
NULL);
gtk_signal_handler_block_by_func(GTK_OBJECT(pause_button),
GTK_SIGNAL_FUNC (on_toggle_pause_toggled),
NULL);
gtk_signal_handler_block_by_func(GTK_OBJECT(stop_button),
GTK_SIGNAL_FUNC (on_toggle_stop_toggled),
NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(play_button), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pause_button), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(stop_button), FALSE);
if (active == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(play_button), TRUE);
}
else if (active == 1) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pause_button), TRUE);
}
else if (active == 2) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(stop_button), TRUE);
}
gtk_signal_handler_unblock_by_func(GTK_OBJECT(play_button),
GTK_SIGNAL_FUNC (on_toggle_play_toggled),
NULL);
gtk_signal_handler_unblock_by_func(GTK_OBJECT(pause_button),
GTK_SIGNAL_FUNC (on_toggle_pause_toggled),
NULL);
gtk_signal_handler_unblock_by_func(GTK_OBJECT(stop_button),
GTK_SIGNAL_FUNC (on_toggle_stop_toggled),
NULL);
}
void update_slider(GtkAdjustment *adjustment, gfloat value)
{
gtk_signal_handler_block_by_func(GTK_OBJECT(adjustment),
GTK_SIGNAL_FUNC (on_hscale1_value_changed),
NULL);
gtk_adjustment_set_value(adjustment, value);
gtk_signal_handler_unblock_by_func(GTK_OBJECT(adjustment),
GTK_SIGNAL_FUNC (on_hscale1_value_changed),
NULL);
}
void update_status_area(GtkWidget *widget)
{
gdk_draw_rectangle(widget->window,
widget->style->black_gc,
TRUE, 0,
0,
widget->allocation.width,
widget->allocation.height);
gdk_draw_string(widget->window,widget->style->font,widget->style->white_gc, 8, 15, statustext);
gdk_draw_string(widget->window,widget->style->font,widget->style->white_gc, widget->allocation.width-100, 15, statusline);
}