aboutsummaryrefslogtreecommitdiff
path: root/src/objects.h
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-09-25 19:29:11 +0200
committerThomas White <taw@bitwiz.org.uk>2011-09-25 19:29:11 +0200
commit1dbcef5a7428a7132b746653af671b3a15fc7951 (patch)
tree4b902092d0c011739017f26989779d2538c37d57 /src/objects.h
parente26dcd2049ae065f5a821f087abd736ba553dcad (diff)
First part of new concept for styles and layout elements
Diffstat (limited to 'src/objects.h')
-rw-r--r--src/objects.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/objects.h b/src/objects.h
index ddbd2a8..d7eb706 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -31,6 +31,7 @@
enum objtype
{
TEXT,
+ IMAGE,
};
@@ -38,7 +39,7 @@ struct object
{
enum objtype type;
struct slide *parent;
- struct layout_element *le;
+ struct style *style;
/* Position of corner of object */
double x;
@@ -56,23 +57,17 @@ struct object
int insertion_point;
PangoLayout *layout;
PangoFontDescription *fontdesc;
- struct text_style *style;
};
+extern struct object *new_object(enum objtype t, struct style *sty);
+extern void free_object(struct object *o);
+extern struct object *add_image_object(struct slide *s, double x, double y,
+ const char *filename,
+ double width, double height);
-extern struct object *add_text_object(struct slide *s, double x, double y,
- struct layout_element *el,
- struct text_style *ts);
-extern void insert_text(struct object *o, char *t);
-extern void set_text_style(struct object *o, struct text_style *ts);
-extern void notify_style_update(struct presentation *p, struct text_style *ts);
-extern void handle_text_backspace(struct object *o);
-extern void move_cursor_left(struct object *o);
-extern void move_cursor_right(struct object *o);
-extern void position_caret(struct object *o, double x, double y);
-extern void notify_layout_update(struct presentation *p,
- struct layout_element *ts);
+extern void notify_style_update(struct presentation *p,
+ struct style *sty);
extern void delete_object(struct object *o);