From 65b14544b89afc3a7d3a7de57e6ef15ca8165bd0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 26 Apr 2014 16:49:15 +0000 Subject: Clean up Ganv API. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5367 a436a847-0d15-0410-975c-d299462d15a1 --- ganv/item.h | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'ganv/item.h') diff --git a/ganv/item.h b/ganv/item.h index 83b5f3c..3e57662 100644 --- a/ganv/item.h +++ b/ganv/item.h @@ -28,7 +28,10 @@ G_BEGIN_DECLS +struct _GanvCanvas; + typedef struct _GanvItem GanvItem; +typedef struct _GanvItemImpl GanvItemImpl; typedef struct _GanvItemClass GanvItemClass; /* Object flags for items */ @@ -49,25 +52,8 @@ enum { #define GANV_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GANV_TYPE_ITEM, GanvItemClass)) struct _GanvItem { - GtkObject object; - - /* Parent canvas for this item */ - struct _GanvCanvas* canvas; - - /* Parent for this item */ - GanvItem* parent; - - /* Layer (z order), higher values are on top */ - guint layer; - - /* Position in parent-relative coordinates. */ - double x, y; - - /* Bounding box for this item (in world coordinates) */ - double x1, y1, x2, y2; - - /* True if parent manages this item (don't call add/remove) */ - gboolean managed; + GtkObject object; + GanvItemImpl* impl; }; struct _GanvItemClass { @@ -136,7 +122,7 @@ struct _GanvItemClass { gboolean (*event)(GanvItem* item, GdkEvent* event); /* Reserved for future expansion */ - gpointer spare_vmethods [4]; + gpointer spare_vmethods[4]; }; GType ganv_item_get_type(void) G_GNUC_CONST; @@ -152,6 +138,10 @@ void ganv_item_set(GanvItem* item, const gchar* first_arg_name, ...); void ganv_item_set_valist(GanvItem* item, const gchar* first_arg_name, va_list args); +struct _GanvCanvas* ganv_item_get_canvas(GanvItem* item); + +GanvItem* ganv_item_get_parent(GanvItem* item); + void ganv_item_raise(GanvItem* item); void ganv_item_lower(GanvItem* item); -- cgit v1.2.1