aboutsummaryrefslogtreecommitdiff
path: root/src/tool_image.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-11-05 22:02:54 +0100
committerThomas White <taw@bitwiz.org.uk>2011-11-05 22:02:54 +0100
commit6f29edb7b7ea789bc4bde1ee3237cca96c271202 (patch)
tree6ed2b9e0c20d1392c3c3ce0224818def5568f198 /src/tool_image.c
parentdbff61bb3053e4fe30397b48a32ec415119bcf66 (diff)
Loading mostly works
Diffstat (limited to 'src/tool_image.c')
-rw-r--r--src/tool_image.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/tool_image.c b/src/tool_image.c
index 2baf7c3..8e09c27 100644
--- a/src/tool_image.c
+++ b/src/tool_image.c
@@ -133,7 +133,7 @@ struct object *add_image_object(struct slide *s, double x, double y,
new->base.x = x; new->base.y = y;
new->base.bb_width = bb_width;
new->base.bb_height = bb_height;
- new->base.type = IMAGE;
+ new->base.type = OBJ_IMAGE;
new->base.empty = 0;
new->base.parent = NULL;
new->base.style = sty;
@@ -171,7 +171,7 @@ static void click_select(struct presentation *p, struct toolinfo *tip,
struct image_toolinfo *ti = (struct image_toolinfo *)tip;
struct image_object *o = (struct image_object *)p->editing_object;
- assert(o->base.type == IMAGE);
+ assert(o->base.type == OBJ_IMAGE);
xo = x - o->base.x; yo = y - o->base.y;
@@ -308,11 +308,18 @@ static void im_commit(struct object *o, gchar *str, struct toolinfo *tip)
static int valid_object(struct object *o)
{
- if ( o->type == IMAGE ) return 1;
+ if ( o->type == OBJ_IMAGE ) return 1;
return 0;
}
+static struct object *deserialize(struct presentation *p, struct ds_node *root,
+ struct toolinfo *tip)
+{
+ return NULL;
+}
+
+
struct toolinfo *initialise_image_tool()
{
struct image_toolinfo *ti;
@@ -330,6 +337,7 @@ struct toolinfo *initialise_image_tool()
ti->base.key_pressed = key_pressed;
ti->base.im_commit = im_commit;
ti->base.valid_object = valid_object;
+ ti->base.deserialize = deserialize;
return (struct toolinfo *)ti;
}