X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=demo-item.h;h=e53221dcdf86f9312f1b6c80a5afdbe7707ffefa;hb=98a8ac80d3f904b6502b39e093d473b8d4d4b246;hp=d7dc396dd3a0a12d9071808d81f5d2c9d6e58834;hpb=1478e50ab9b22ef50fb0a1be0d77a5f532eb7bd8;p=wordgame diff --git a/demo-item.h b/demo-item.h index d7dc396..e53221d 100644 --- a/demo-item.h +++ b/demo-item.h @@ -22,12 +22,15 @@ G_BEGIN_DECLS typedef struct _GooDemoItem GooDemoItem; typedef struct _GooDemoItemClass GooDemoItemClass; +typedef void (*GooDemoItemPaintFunc) (cairo_t *cr, void *, double width, double height); + struct _GooDemoItem { GooCanvasItemSimple parent_object; - - gdouble x, y, width, height; - char letter; + double width; + double height; + GooDemoItemPaintFunc paint; + void *closure; }; struct _GooDemoItemClass @@ -37,13 +40,15 @@ struct _GooDemoItemClass GType goo_demo_item_get_type (void) G_GNUC_CONST; -GooCanvasItem* goo_demo_item_new (GooCanvasItem *parent, - gdouble x, - gdouble y, - gdouble width, - gdouble height, - char letter, +GooCanvasItem* goo_demo_item_new (GooCanvasItem *parent, + gdouble x, + gdouble y, + gdouble width, + gdouble height, + GooDemoItemPaintFunc paint, + void *closure, ...); + G_END_DECLS #endif /* __GOO_DEMO_ITEM_H__ */