Changeset 407

Show
Ignore:
Timestamp:
09/21/07 13:55:31 (1 year ago)
Author:
bjourne
Message:

Add the stupid boilerplate that is needed to get the PixbufDrawCache
object to work.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pygtkimageview/src/gtkimageview.defs

    r405 r407  
    5757  (is-constructor-of "GdkPixbufDrawOpts") 
    5858  (return-type "GdkPixbufDrawOpts") 
     59  ) 
     60 
     61(define-function pixbuf_draw_cache_new 
     62  (c-name "gdk_pixbuf_draw_cache_new") 
     63  (is-constructor-of "GdkPixbufDrawCache") 
     64  (return-type "GdkPixbufDrawCache") 
    5965  ) 
    6066 
  • pygtkimageview/src/gtkimageview.override

    r405 r407  
    8383} 
    8484 
    85 /* We must also add more boilerplate to make instantiation work. */ 
    8685%% 
    8786module gtkimageview 
     
    127126%% 
    128127override gdk_pixbuf_draw_opts_new kwargs 
     128/* This boilerplate is needed to make instantiation of 
     129   GdkPixbufDrawOpts work. */ 
    129130static int 
    130131_wrap_gdk_pixbuf_draw_opts_new (PyGBoxed *self, 
     
    164165} 
    165166 
     167%% 
     168override gdk_pixbuf_draw_cache_new noargs 
     169/* This boilerplate is needed to make instantiation of 
     170   GdkPixbufDrawCache work. */ 
     171static int 
     172_wrap_gdk_pixbuf_draw_cache_new (PyGBoxed *self) 
     173{ 
     174    self->boxed = (gpointer) gdk_pixbuf_draw_cache_new (); 
     175    self->free_on_dealloc = TRUE; 
     176    self->gtype = GDK_TYPE_PIXBUF_DRAW_CACHE; 
    166177 
     178    return 0; 
     179} 
     180 
     181