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

version» Context lines:

pike.git/src/post_modules/GTK2/source/gdkpixmap.pre:3:   inherit GDK2.Drawable;      //! This class creates a GDK2.Pixmap from either an GDK2.Image or   //! Image.image object (or a numeric ID, see your X-manual for XIDs).   //! <p> The GDK2.Pixmap object can be used in a lot   //! of different GTK widgets. The most notable is the W(Pixmap)   //! widget.</p>   //!   //! NOIMG   %{ - #ifdef __NT__ - #include <gdk/gdkwin32.h> - #else - #include <gdk/gdkx.h> - #endif -  +    GdkImage *pgtk2_pixmap_setup(struct object *o, int *free)   {    if (get_gdkobject(o,image))    return get_gdkobject(o,image);    else {    *free=1;    return gdkimage_from_pikeimage(o,GDK_IMAGE_FASTEST,0);    }   }   
pike.git/src/post_modules/GTK2/source/gdkpixmap.pre:43:   //! Argument is a GDK2.Image object or a Image.Image object   {    GdkImage *i;    int f=0;    struct object *o;    GdkPixmap *gp;    pgtk2_verify_setup();    pgtk2_verify_not_inited();       if (TYPEOF(Pike_sp[-args]) == PIKE_T_OBJECT) { -  get_all_args("create",args,"%o",&o); +  get_all_args(NULL,args,"%o",&o);    i=pgtk2_pixmap_setup(o,&f);       gp=gdk_pixmap_new(0,i->width,i->height,i->depth);    THIS->obj=G_OBJECT(gp);    if (!THIS->obj) {    if (f)    g_object_unref(i);    Pike_error("Failed to create pixmap.\n");    }    pgtk2__pixmap_draw(i);
pike.git/src/post_modules/GTK2/source/gdkpixmap.pre:76:   void set(GDK2.Image|Image.Image image)   //! Argument is a GDK2.Image object or an Image.image object.   //! It is much faster to use an gdkImage object, especially one   //! allocated in shared memory. This is only an issue if you are   //! going to change the contents of the pixmap often, toggling between   //! a small number of images.   {    struct object *o;    int f=0;    GdkImage *i; -  get_all_args("set", args, "%o", &o ); +  get_all_args(NULL, args, "%o", &o );    pgtk2__pixmap_draw(i=pgtk2_pixmap_setup(o,&f));    if (f)    g_object_unref(i);       RETURN_THIS();   }    - void destroy() + void _destruct()   {    /*    if (THIS->obj)    g_object_unref(THIS->obj);    THIS->obj=0;       Done by g.object    */       if (THIS->extra_data)