diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-12-23 08:10:28 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-12-23 08:10:28 +0000 |
| commit | 3cc158ecff4f2420590ab102d7f3a84d7ca2a711 (patch) | |
| tree | 186a3a85cb4288c754504a737b502233e6b54875 /src/display/sp-canvas.h | |
| parent | German translation update (diff) | |
| download | inkscape-3cc158ecff4f2420590ab102d7f3a84d7ca2a711.tar.gz inkscape-3cc158ecff4f2420590ab102d7f3a84d7ca2a711.zip | |
Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
(bzr r9978.1.1)
Diffstat (limited to 'src/display/sp-canvas.h')
| -rw-r--r-- | src/display/sp-canvas.h | 60 |
1 files changed, 8 insertions, 52 deletions
diff --git a/src/display/sp-canvas.h b/src/display/sp-canvas.h index 5cd201618..9c8b19982 100644 --- a/src/display/sp-canvas.h +++ b/src/display/sp-canvas.h @@ -2,7 +2,7 @@ #define SEEN_SP_CANVAS_H /** \file - * SPCanvas, SPCanvasBuf, and SPCanvasItem. + * SPCanvas, SPCanvasBuf. * * Authors: * Federico Mena <federico@nuclecu.unam.mx> @@ -42,9 +42,15 @@ 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 SPCanvasItem; struct SPCanvasGroup; -typedef struct _SPCanvasItemClass SPCanvasItemClass; enum { SP_CANVAS_UPDATE_REQUESTED = 1 << 0, @@ -66,58 +72,8 @@ struct SPCanvasBuf{ 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 -#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); -bool sp_canvas_item_is_visible(SPCanvasItem *item); -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. |
