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

version» Context lines:

pike.git/src/post_modules/GTK2/source/gtkimage.pre:30:    pgtk2_verify_not_inited();    pgtk2_verify_setup();    if (args==1) {    if (TYPEOF(Pike_sp[-args]) == PIKE_T_MAPPING) {    INIT_WITH_PROPS(GTK_TYPE_IMAGE);    } else {    GtkWidget *gi;       if (TYPEOF(Pike_sp[-args]) == PIKE_T_STRING) {    char *filename; -  get_all_args("create",args,"%s",&filename); +  get_all_args(NULL,args,"%s",&filename);    gi=gtk_image_new_from_file(filename);    } else {    struct object *o1;    GObject *go;    -  get_all_args("create",args,"%o",&o1); +  get_all_args(NULL,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 (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); +  get_all_args(NULL,args,"%t%d",&s1,&size);    if (s1->size_shift==0)    t=gtk_stock_lookup(CGSTR0(s1),&item);    if (t)    gi=gtk_image_new_from_stock(CGSTR0(s1),size);    else    gi=gtk_image_new();    THIS->obj=G_OBJECT(gi);    } else {    GdkImage *image;    GdkPixmap *pixmap;    GdkBitmap *bitmap;    GtkWidget *gi;    struct object *o1,*o2;    -  get_all_args("create",args,"%o%o",&o1,&o2); +  get_all_args(NULL,args,"%o%o",&o1,&o2);    image=GDK_IMAGE(get_gobject(o1));   /* bitmap=(GdkBitmap *)get_gdkobject(o2,bitmap); */    bitmap=GDK_PIXMAP(get_gobject(o2));    if (image) {    gi=gtk_image_new_from_image(image,bitmap);    } else {    pixmap=GDK_PIXMAP(get_gobject(o1));    gi=gtk_image_new_from_pixmap(pixmap,bitmap);    }    THIS->obj=G_OBJECT(gi);
pike.git/src/post_modules/GTK2/source/gtkimage.pre:216:      void set_from_icon_set(GTK2.IconSet icon_set, int size)   //! Set this image from an icon set.   {    pgtk2_verify_inited();    {    struct object *o1;    INT_TYPE size;    GtkIconSet *is;    -  get_all_args("set_from_icon_set",args,"%o%i",&o1,&size); +  get_all_args(NULL,args,"%o%i",&o1,&size);    is=(GtkIconSet *)get_gobject(o1);    if (!is)    SIMPLE_ARG_ERROR("set_from_icon_set",args,"Invalid GTK2.IconSet");    gtk_image_set_from_icon_set(GTK_IMAGE(THIS->obj),is,size);    }    RETURN_THIS();   }      void set_from_image(GDK2.Image gdk_image, ?GDK2.Bitmap mask)   //! Set this image from a GDK2.Image plus optional mask.   {    pgtk2_verify_inited();    {    struct object *o1,*o2=NULL; -  get_all_args("set_from_image",args,"%o.%o",&o1,&o2); +  get_all_args(NULL,args,"%o.%o",&o1,&o2);    gtk_image_set_from_image(GTK_IMAGE(THIS->obj),(GdkImage *)get_gobject(o1),    o2?(GdkBitmap *)get_gobject(o2):NULL);    }    RETURN_THIS();   }      void set_from_pixbuf(GDK2.Pixbuf pixbuf);   //! Set image from a pixbuf      void set_from_pixmap(GDK2.Pixmap pixmap, ?GDK2.Bitmap mask)   //! Set this image from a GDK2.Pixmap plus optional mask.   {    pgtk2_verify_inited();    {    struct object *o1,*o2=NULL; -  get_all_args("set_from_pixmap",args,"%o.%o",&o1,&o2); +  get_all_args(NULL,args,"%o.%o",&o1,&o2);    gtk_image_set_from_pixmap(GTK_IMAGE(THIS->obj),(GdkPixmap *)get_gobject(o1),    o2?(GdkBitmap *)get_gobject(o2):NULL);    }    RETURN_THIS();   }      void set_from_stock(string stock_id, int size);   //! Sets from a stock icon. Sample icon names are GTK2.STOCK_OPEN,   //! GTK2.STOCK_EXIT. Sample stock sizes are GTK2.ICON_SIZE_MENU,   //! GTK2.ICON_SIZE_SMALL_TOOLBAR. If the stock name isn't known, the image   //! will be empty.      void set_from_animation(GDK2.PixbufAnimation anim)   //! Causes the W(Image) to display the given animation.   {    pgtk2_verify_inited();    {    struct object *o1; -  get_all_args("set_from_animation",args,"%o",&o1); +  get_all_args(NULL,args,"%o",&o1);    gtk_image_set_from_animation(GTK_IMAGE(THIS->obj),    GDK_PIXBUF_ANIMATION(get_gobject(o1)));    }    RETURN_THIS();   }      require gtk26;   void set_from_icon_name(string icon_name, int size);   //! Sets from an icon name.