index a17e2e086ffc4854cfcfd2d12c83baecc2569ac6..9c8b199823db70799ded17afa50920ea4b94bc56 100644 (file)
--- a/src/display/sp-canvas.h
+++ b/src/display/sp-canvas.h
#define SEEN_SP_CANVAS_H
/** \file
#define SEEN_SP_CANVAS_H
/** \file
- * SPCanvas, SPCanvasBuf, and SPCanvasItem.
+ * SPCanvas, SPCanvasBuf.
*
* Authors:
* Federico Mena <federico@nuclecu.unam.mx>
*
* Authors:
* Federico Mena <federico@nuclecu.unam.mx>
G_BEGIN_DECLS
G_BEGIN_DECLS
+#define SP_TYPE_CANVAS sp_canvas_get_type()
+#define SP_CANVAS(obj) (GTK_CHECK_CAST((obj), SP_TYPE_CANVAS, SPCanvas))
+#define SP_IS_CANVAS(obj) (GTK_CHECK_TYPE((obj), SP_TYPE_CANVAS))
+
+GType sp_canvas_get_type();
+
struct SPCanvas;
struct SPCanvas;
+struct SPCanvasItem;
struct SPCanvasGroup;
struct SPCanvasGroup;
-typedef struct _SPCanvasItemClass SPCanvasItemClass;
enum {
SP_CANVAS_UPDATE_REQUESTED = 1 << 0,
enum {
SP_CANVAS_UPDATE_REQUESTED = 1 << 0,
cairo_t *ct;
};
cairo_t *ct;
};
-/**
- * An SPCanvasItem refers to a SPCanvas and to its parent item; it has
- * four coordinates, a bounding rectangle, and a transformation matrix.
- */
-struct SPCanvasItem : public GtkObject {
- SPCanvas *canvas;
- SPCanvasItem *parent;
-
- double x1, y1, x2, y2;
- Geom::Rect bounds;
- Geom::Matrix xform;
-};
-
-/**
- * The vtable of an SPCanvasItem.
- */
-struct _SPCanvasItemClass : public GtkObjectClass {
- void (* update) (SPCanvasItem *item, Geom::Matrix const &affine, unsigned int flags);
-
- void (* render) (SPCanvasItem *item, SPCanvasBuf *buf);
- double (* point) (SPCanvasItem *item, Geom::Point p, SPCanvasItem **actual_item);
-
- int (* event) (SPCanvasItem *item, GdkEvent *event);
-};
-
-SPCanvasItem *sp_canvas_item_new(SPCanvasGroup *parent, GtkType type, const gchar *first_arg_name, ...);
-
G_END_DECLS
G_END_DECLS
-#define sp_canvas_item_set gtk_object_set
-
-void sp_canvas_item_affine_absolute(SPCanvasItem *item, Geom::Matrix const &aff);
-
-void sp_canvas_item_raise(SPCanvasItem *item, int positions);
-void sp_canvas_item_lower(SPCanvasItem *item, int positions);
-void sp_canvas_item_show(SPCanvasItem *item);
-void sp_canvas_item_hide(SPCanvasItem *item);
-int sp_canvas_item_grab(SPCanvasItem *item, unsigned int event_mask, GdkCursor *cursor, guint32 etime);
-void sp_canvas_item_ungrab(SPCanvasItem *item, guint32 etime);
-
-Geom::Matrix sp_canvas_item_i2w_affine(SPCanvasItem const *item);
-
-void sp_canvas_item_grab_focus(SPCanvasItem *item);
-
-void sp_canvas_item_request_update(SPCanvasItem *item);
-
-/* get item z-order in parent group */
-
-gint sp_canvas_item_order(SPCanvasItem * item);
-
-
// SPCanvas -------------------------------------------------
/**
* Port of GnomeCanvas for inkscape needs.
// SPCanvas -------------------------------------------------
/**
* Port of GnomeCanvas for inkscape needs.