Re: define-struct



At 09:57 AM 12/13/01 +0800, James Henstridge wrote:
Could you give some examples of the structs you want to use (define-struct ...) for? I have found that most of the structs that are not registered with the gtype system often map nicely to native types in python (such as GdkPoint to a 2-tuple).

One other definition we probably need to add is a (define-pointer ...) one. Sonething like:
 (define-pointer CTreeNode
   (in-module "Gtk")
   (c-name "GtkCTreeNode")
   (gtype-id "GTK_TYPE_CTREE_NODE")
 )

This is to cover types that are derived from G_TYPE_POINTER. These types don't have any copy/free functions, so are not handled quite the same as G_TYPE_BOXED types.

What about GdkPixbuf struct, for example? It's not derived from GtkObject/GObject, but has _ref and _unref functions.

-Andrei




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]