Question about put "GtkWidget" pointer as function's argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 !
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux