[Webkit-unassigned] [Bug 16493] [GTK] Provide a public printing API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 11 13:40:21 PST 2008


------- Comment #2 from mbarnes at redhat.com  2008-02-11 13:40 PDT -------
I helped port GtkHTML from GnomePrint to GtkPrint.  Here's what I'd recommend
as an incremental improvement to webkit_web_frame_print(), similar to what we
did for GtkHTML (ignoring header and footer support):

   WEBKIT_API GtkPrintOperationResult
   webkit_web_frame_print (WebKitWebFrame *frame,
                           GtkPrintOperation *operation,
                           GtkPrintOperationAction action,
                           GError **error);

The most important thing here is to allow applications to create their own
GtkPrintOperation, configure it with their own print settings from GConf or
wherever, and then pass it on to WebKit.  All WebKit needs to do is connect to
GtkPrintOperation signals, call gtk_print_operation_run() and return the

Also, don't run an error dialog yourself.  Just return the print result and let
the application deal with GTK_PRINT_OPERATION_RESULT_ERROR.

GtkHTML's new printing API (ignoring the deprecated stuff) consists of a single
function similar to above and I think it's worked out quite nicely.

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list