GnomeAnimator Question
- From: Loban Amaan Rahman <loban enigma caltech edu>
- To: gnome-list gnome org
- Subject: GnomeAnimator Question
- Date: Sat, 4 Dec 1999 18:32:49 -0800
Hello all!
I'm using GnomeAnimator in a UI I'm writing, and ran into some problems.
Apparently GnomeAnimator is refusing to emit any event signals. Here
are the code snippets.
The animation starts up and looks great.
But, No matter what I do, I can never get the on_logo_button_press_event
callback to be called. What did I do wrong?
gboolean
on_logo_button_press_event(GtkWidget * widget,
GdkEventButton * event, gpointer user_data)
{
GnomeAnimator *logo = NULL;
g_warning("Logo Event");
logo = GNOME_ANIMATOR(widget);
if (gnome_animator_get_status(logo) == GNOME_ANIMATOR_STATUS_RUNNING)
gnome_animator_stop(logo);
else
gnome_animator_start(logo);
}
void draw_logo(GtkWidget * widget)
{
GtkContainer *logo_container = NULL;
GnomeAnimator *logo = NULL;
logo = GNOME_ANIMATOR(gnome_animator_new_with_size(64, 64));
gnome_animator_set_loop_type(logo, GNOME_ANIMATOR_LOOP_RESTART);
gnome_animator_set_playback_speed(logo, 1.0/LOGO_ANIMATION_SPEED);
gnome_animator_set_playback_direction(logo, -1);
if (!gnome_animator_append_frames_from_file
(logo, "pixmaps/logo-animation.png", 0, 0, 1, 64))
g_warning("Couldn't find pixmap file: %s",
"logo-animation.png");
gnome_animator_start(logo);
gtk_widget_show(GTK_WIDGET(logo));
logo_container =
GTK_CONTAINER(lookup_widget(widget, "logo_container"));
gtk_container_add(logo_container, GTK_WIDGET(logo));
gtk_signal_connect(GTK_OBJECT(logo), "button_press_event",
GTK_SIGNAL_FUNC(on_logo_button_press_event),
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]