X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=demo-item.h;h=79188589297dec37b0a1f757d9e893aeb54eb7eb;hb=bcb2db8e93ce94b662e7118b92230c6eb749ee22;hp=8cc4712b512e20c100e6b8218bd98556b9e28a2f;hpb=ec58ce1cd1f8effe49f12485f65c345d75767dd5;p=wordgame diff --git a/demo-item.h b/demo-item.h index 8cc4712..7918858 100644 --- a/demo-item.h +++ b/demo-item.h @@ -22,12 +22,14 @@ G_BEGIN_DECLS typedef struct _GooDemoItem GooDemoItem; typedef struct _GooDemoItemClass GooDemoItemClass; +typedef void (*GooDemoItemPaintFunc) (cairo_t *cr, void *); + struct _GooDemoItem { GooCanvasItemSimple parent_object; - double size; - char letter; + GooDemoItemPaintFunc paint; + void *closure; }; struct _GooDemoItemClass @@ -37,23 +39,12 @@ 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 size, + 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__ */