GnomeAnimator error
- From: "Ben K" <kynneb hotmail com>
- To: gtk-list redhat com
- Subject: GnomeAnimator error
- Date: Wed, 23 Feb 2000 20:27:05 PST
when i run my program, i get the following error:
Gdk-CRITICAL **: file gdkwindow.c: line 946 (gdk_window_clear_area):
assertion 'window != NULL' failed.
i think my code is correct, but it must be screwy somewhere. thanks in
advance for your help.
----------------------------------------
#include <gnome.h>
//for the destroy_event
static gint delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
{
gtk_main_quit();
return FALSE;
}
int main(int argc, char *argv[])
{
//the widgets
GtkWidget *app;
GtkWidget *animator;
//init gnome
gnome_init ("gnomeanim", "0.1", argc, argv);
//make the GnomeApp
app = gnome_app_new("gnomeanim", "GnomeAnimator?");
gtk_widget_set_usize(app, 500, 100);
//and connect the destroy handler
gtk_signal_connect (GTK_OBJECT (app), "delete_event",
GTK_SIGNAL_FUNC (delete_event),
NULL);
//create the GnomeAnimator
animator = gnome_animator_new_with_size(468,60);
gnome_animator_set_loop_type(GNOME_ANIMATOR(animator),
GNOME_ANIMATOR_LOOP_RESTART);
gnome_animator_set_playback_speed(GNOME_ANIMATOR(animator), 10.0);
gnome_animator_set_playback_direction(GNOME_ANIMATOR(animator), 1);
gnome_animator_append_frames_from_file_at_size(GNOME_ANIMATOR(animator),
"onion.gif",
0,
0,
1000,
468,
468,
60);
//put the GnomeAnimator into the app window
gnome_app_set_contents(GNOME_APP(app), animator);
//start the GnomeAnimator
gnome_animator_start(GNOME_ANIMATOR(animator));
//show it
gtk_widget_show(animator);
gtk_widget_show(app);
gtk_main ();
return 0;
}
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]