pike.git / src / post_modules / GTK2 / source / gtkimage.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gtkimage.pre:23:   //! string stock   //! int storage-type CONST(GTK_IMAGE_)      void create(string|GDK2.Pixbuf|GDK2.PixbufAnimation|GDK2.Image|GDK2.Pixmap|mapping(string:mixed)|void file_or_props,    GDK2.Bitmap|int|void mask_or_size)   //! Create a new W(Image) from either a file or a GDK2.Pixbuf.   {    pgtk2_verify_not_inited();    pgtk2_verify_setup();    if (args==1) { -  if (Pike_sp[-args].type==PIKE_T_MAPPING) { +  if (TYPEOF(Pike_sp[-args]) == PIKE_T_MAPPING) {    INIT_WITH_PROPS(GTK_TYPE_IMAGE);    } else {    GtkWidget *gi;    -  if (Pike_sp[-args].type==PIKE_T_STRING) { +  if (TYPEOF(Pike_sp[-args]) == PIKE_T_STRING) {    char *filename;    get_all_args("create",args,"%s",&filename);    gi=gtk_image_new_from_file(filename);    } else {    struct object *o1;    GObject *go;       get_all_args("create",args,"%o",&o1);    go=get_gobject(o1);    if (GDK_TYPE_IMAGE==G_TYPE_FROM_INSTANCE(go)) {    gi=gtk_image_new_from_image(GDK_IMAGE(go),NULL);    } else if (GDK_TYPE_PIXBUF==G_TYPE_FROM_INSTANCE(go)) {    gi=gtk_image_new_from_pixbuf(GDK_PIXBUF(go));    } else {    gi=gtk_image_new_from_animation(GDK_PIXBUF_ANIMATION(go));    }    }    THIS->obj=G_OBJECT(gi);    }    } else if (args==2) { -  if (Pike_sp[1-args].type==PIKE_T_INT) { +  if (TYPEOF(Pike_sp[1-args]) == PIKE_T_INT) {    struct pike_string *s1;    GtkWidget *gi;    GtkStockItem item;    int size;    int t=0;       get_all_args("create",args,"%t%d",&s1,&size);    if (s1->size_shift==0)    t=gtk_stock_lookup(CGSTR0(s1),&item);    if (t)