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

version» Context lines:

pike.git/src/post_modules/GTK2/source/gdkbitmap.pre:17:   void create(int|Image.Image xsize_or_image, int|void ysize, string|void bitmap)   //! Create a new GDK2.Bitmap object.   //! Argument is either an Image.image object, or {xsisze,ysize,xbitmapdata}.   {    INT_TYPE x, y;    struct pike_string *d;       pgtk2_verify_setup();    pgtk2_verify_not_inited();    if (args==3) { -  get_all_args("create",args,"%i%i%n",&x,&y,&d); +  get_all_args(NULL,args,"%i%i%n",&x,&y,&d);    if(d->len*8 < x*y)    Pike_error("Bitmap string is too short\n");    } else if (args==1) {    struct object *o;    struct image *img; -  get_all_args("create",args,"%o",&o); +  get_all_args(NULL,args,"%o",&o);    img=get_storage(o, image_program);    x = img->xsize;    y = img->ysize;       /* Now we have the image size.. Lets create the bitmap... */    apply(o,"tobitmap",0); -  get_all_args("internal",1,"%n",&d); +  get_all_args(NULL,1,"%n",&d);    args=2; /* evil me.. */    } else {    Pike_error("Wrong number of arguments to GDK2.Bitmap()\n");    }       THIS->obj=(void *)gdk_bitmap_create_from_data(0,d->str,x,y);    if (!THIS->obj)    Pike_error("Failed to create bitmap\n");    pgtk2_pop_n_elems(args);    pgtk2__init_this_object();