From 8ff5d4ffc4dba1ab870660250e2542d7c1a2dd40 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 19 Dec 2008 16:42:05 +0000 Subject: Bug 339318 - Allow page rendering to (optionally) happen in a thread 2008-12-19 Marek Kasik Bug 339318 - Allow page rendering to (optionally) happen in a thread * gtk/gtk.symbols: API change * doc/reference/gtk/gtk-sections.txt: API change * gtk/gtkprintoperation-private.h * gtk/gtkprintoperation.h * gtk/gtkprintoperation.c: Adds 2 new functions gtk_print_operation_set_defer_drawing() - Sets up the GtkPrintOperation to wait for calling of gtk_print_operation_draw_page_finish() from application. It can be used for drawing page in another thread. This function must be called in the callback of "draw-page" signal. gtk_print_operation_draw_page_finish() - Signalize that drawing of particular page is complete. It is called after completion of page drawing (e.g. drawing in another thread). If gtk_print_operation_set_defer_drawing() was called before, then this function has to be called by application. In another case it is called by the library itself. svn path=/trunk/; revision=21913 --- gtk/gtkprintoperation-private.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gtk/gtkprintoperation-private.h') diff --git a/gtk/gtkprintoperation-private.h b/gtk/gtkprintoperation-private.h index 3595314b4d..0e5f606c80 100644 --- a/gtk/gtkprintoperation-private.h +++ b/gtk/gtkprintoperation-private.h @@ -25,6 +25,14 @@ G_BEGIN_DECLS +/* Page drawing states */ +typedef enum +{ + GTK_PAGE_DRAWING_STATE_READY, + GTK_PAGE_DRAWING_STATE_DRAWING, + GTK_PAGE_DRAWING_STATE_DEFERRED_DRAWING +} GtkPageDrawingState; + struct _GtkPrintOperationPrivate { GtkPrintOperationAction action; @@ -45,6 +53,8 @@ struct _GtkPrintOperationPrivate guint allow_async : 1; guint is_sync : 1; + GtkPageDrawingState page_drawing_state; + guint print_pages_idle_id; guint show_progress_timeout_id; -- cgit v1.2.1