]> git.cworth.org Git - wordgame/blobdiff - demo-item.h
Increase the window size a bit
[wordgame] / demo-item.h
index d7dc396dd3a0a12d9071808d81f5d2c9d6e58834..e53221dcdf86f9312f1b6c80a5afdbe7707ffefa 100644 (file)
@@ -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__ */