[pygtk] specifying parent class in .override file : A general question

Gian Mario Tagliaretti gianmt at gnome.org
Fri Jun 22 20:07:47 WST 2007


2007/6/21, varun_shrivastava <shrivastavavarun a yahoo.co.in>:

> i looked through the pygoocanvas and goocanvas code there .override file
> contains entries as
>  %%
>  import gobject.GObject as PyGObject_Type
>  import gtk.Container as PyGtkContainer_Type
>  import gtk.Adjustment as PyGtkAdjustment_Type
>
> GooCanvasClass is derived from GtkContainerClass
> GooCanvasItemSimpleClass is derived from GOjectClass
> but i couldn't find class that is derived from GtkAdjustment

> But GtkAdjustment has been used in the code,

GtkAdjustments is used in the virtual method as you can see in the
defs file (and later on in the generated C code)

(define-virtual set_scroll_adjustments
  (of-object "GooCanvas")
  (return-type "none")
  (parameters
    '("GtkAdjustment*" "hadjustment")
    '("GtkAdjustment*" "vadjustment")
  )
)

The generated code will use the format string "O!O!" when parsing
arguments, that means something like &PyGtkAdjustment_Type,
&hadjustment, &PyGtkAdjustment_Type, &vadjustment.

cheers
-- 
Gian Mario Tagliaretti


More information about the pygtk mailing list