Question about put "GtkWidget" pointer as function's argument
- From: "chao yeaj" <yeajchao gmail com>
- To: gtk-list gnome org, gtk-app-devel-list gnome org
- Subject: Question about put "GtkWidget" pointer as function's argument
- Date: Mon, 17 Jul 2006 14:44:43 +0800
Hello everyone
My code like this:
int
create_image_from_file(GtkWidget *splash)
{
GtkWidget image = NULL;
GtkWidget frame = NULL;
image = gtk_image_new_from_file("~/splash.png");
frame = gtk_frame_new("image");
gtk_container_add(GTK_CONTAINER(frame),image);
splash = frame; /* Here, the splash is not NULL*/
return 0;;
}
int
other_function()
{
GtkWidget *splash = NULL;
create_image_from_file(splash);
/* Here, the splash is still NULL, Why ?*/
/* Here, the splash is still NULL, Why ?*/
}
I do not know why the splash pointer in the "other_function"
is still NULL,i need your help ?
Any comments would be much appreciated,and thanks in advance !
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]