X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=demo-item.h;h=e53221dcdf86f9312f1b6c80a5afdbe7707ffefa;hb=a26e439b57a16e31a8fb67a079cbad659c21fd39;hp=180b599f98a857b2cdf1e0d2adc5e21870e4c7c1;hpb=169f626b0c71bc2cc5f7929ffa4b986e0acfee2a;p=wordgame diff --git a/demo-item.h b/demo-item.h index 180b599..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; - - double size; - char letter; + double width; + double height; + GooDemoItemPaintFunc paint; + void *closure; }; struct _GooDemoItemClass @@ -37,18 +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 size, - char letter, +GooCanvasItem* goo_demo_item_new (GooCanvasItem *parent, + gdouble x, + gdouble y, + gdouble width, + gdouble height, + GooDemoItemPaintFunc paint, + void *closure, ...); -void -goo_demo_item_move_to (GooCanvasItem *item, - gdouble x, - gdouble y); - G_END_DECLS #endif /* __GOO_DEMO_ITEM_H__ */