X-Git-Url: https://git.cworth.org/git?p=wordgame;a=blobdiff_plain;f=demo-item.h;h=e53221dcdf86f9312f1b6c80a5afdbe7707ffefa;hp=8cc4712b512e20c100e6b8218bd98556b9e28a2f;hb=HEAD;hpb=48281e874ef936437b581a444cbd1134cec20edb diff --git a/demo-item.h b/demo-item.h index 8cc4712..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,23 +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); - -void -goo_demo_item_glide_to (GooCanvasItem *item, - gdouble x, - gdouble y); - G_END_DECLS #endif /* __GOO_DEMO_ITEM_H__ */