summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'fitz')
-rw-r--r--fitz/doc_document.c24
-rw-r--r--fitz/fitz-internal.h12
-rw-r--r--fitz/fitz.h4
3 files changed, 38 insertions, 2 deletions
diff --git a/fitz/doc_document.c b/fitz/doc_document.c
index 22229892..18b9d557 100644
--- a/fitz/doc_document.c
+++ b/fitz/doc_document.c
@@ -129,3 +129,27 @@ fz_meta(fz_document *doc, int key, void *ptr, int size)
return doc->meta(doc, key, ptr, size);
return FZ_META_UNKNOWN_KEY;
}
+
+int
+fz_pass_event(fz_document *doc, fz_page *page, fz_ui_event *ui_event)
+{
+ if (doc && doc->pass_event)
+ return doc->pass_event(doc, page, ui_event);
+ return 0;
+}
+
+fz_rect *
+fz_get_screen_update(fz_document *doc)
+{
+ if (doc && doc->get_screen_update, doc)
+ return doc->get_screen_update(doc);
+ return NULL;
+}
+
+fz_widget *
+fz_get_focussed_widget(fz_document *doc)
+{
+ if (doc && doc->get_focussed_widget)
+ return doc->get_focussed_widget(doc);
+ return NULL;
+}
diff --git a/fitz/fitz-internal.h b/fitz/fitz-internal.h
index 97bbfa5c..92896da0 100644
--- a/fitz/fitz-internal.h
+++ b/fitz/fitz-internal.h
@@ -830,6 +830,15 @@ fz_pixmap *fz_render_stroked_glyph(fz_context *ctx, fz_font*, int, fz_matrix, fz
void fz_render_t3_glyph_direct(fz_context *ctx, fz_device *dev, fz_font *font, int gid, fz_matrix trm, void *gstate);
/*
+ * Forms
+ */
+struct fz_widget
+{
+ int type;
+ fz_bbox bbox;
+};
+
+/*
* Text buffer.
*
* The trm field contains the a, b, c and d coefficients.
@@ -1085,6 +1094,9 @@ struct fz_document_s
void (*run_page)(fz_document *doc, fz_page *page, fz_device *dev, fz_matrix transform, fz_cookie *cookie);
void (*free_page)(fz_document *doc, fz_page *page);
int (*meta)(fz_document *doc, int key, void *ptr, int size);
+ int (*pass_event)(fz_document *doc, fz_page *page, fz_ui_event *ui_event);
+ fz_rect *(*get_screen_update)(fz_document *doc);
+ fz_widget *(*get_focussed_widget)(fz_document *doc);
};
#endif
diff --git a/fitz/fitz.h b/fitz/fitz.h
index 5ab7b7f1..b68090cb 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -2269,7 +2269,7 @@ typedef struct fz_ui_event_s
struct
{
int ptype;
- float x, y;
+ fz_point pt;
} pointer;
} event;
} fz_ui_event;
@@ -2282,7 +2282,7 @@ typedef struct fz_widget_s fz_widget;
/*
Specific types of widget
*/
-typedef struct fz_widget_text_s fz_widget_test;
+typedef struct fz_widget_text_s fz_widget_text;
/*
fz_pass_event: Pass a UI event to an interactive