]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkprintoperation.h
/tmp/cvsX7MHVx
[~andy/gtk] / gtk / gtkprintoperation.h
index 01a7fa59b7fe64bec72f762529533c9fded03c7b..624a759cb9d49c1d85b473dde2f5a4106463b9ff 100644 (file)
@@ -29,6 +29,7 @@
 #include "gtkpagesetup.h"
 #include "gtkprintsettings.h"
 #include "gtkprintcontext.h"
+#include "gtkprintoperationpreview.h"
 
 G_BEGIN_DECLS
 
@@ -55,6 +56,21 @@ typedef enum {
   GTK_PRINT_STATUS_FINISHED_ABORTED
 } GtkPrintStatus;
 
+typedef enum {
+  GTK_PRINT_OPERATION_RESULT_ERROR,
+  GTK_PRINT_OPERATION_RESULT_APPLY,
+  GTK_PRINT_OPERATION_RESULT_CANCEL,
+  GTK_PRINT_OPERATION_RESULT_IN_PROGRESS
+} GtkPrintOperationResult;
+
+typedef enum {
+  GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+  GTK_PRINT_OPERATION_ACTION_PRINT,
+  GTK_PRINT_OPERATION_ACTION_PREVIEW,
+  GTK_PRINT_OPERATION_ACTION_EXPORT
+} GtkPrintOperationAction;
+
+
 struct _GtkPrintOperation
 {
   GObject parent_instance;
@@ -66,19 +82,33 @@ struct _GtkPrintOperationClass
 {
   GObjectClass parent_class;
   
-  void (*begin_print)        (GtkPrintOperation *operation, 
-                              GtkPrintContext   *context);
-  void (*request_page_setup) (GtkPrintOperation *operation,
-                             GtkPrintContext   *context,
-                             gint               page_nr,
-                             GtkPageSetup      *setup);
-  void (*draw_page)          (GtkPrintOperation *operation,
-                             GtkPrintContext   *context,
-                             gint               page_nr);
-  void (*end_print)          (GtkPrintOperation *operation,
-                             GtkPrintContext   *context);
-  void (*status_changed)     (GtkPrintOperation *operation);
+  void     (*done)               (GtkPrintOperation *operation,
+                                 GtkPrintOperationResult result);
+  void     (*begin_print)        (GtkPrintOperation *operation, 
+                                 GtkPrintContext   *context);
+  gboolean (*paginate)           (GtkPrintOperation *operation, 
+                                 GtkPrintContext   *context);
+  void     (*request_page_setup) (GtkPrintOperation *operation,
+                                 GtkPrintContext   *context,
+                                 gint               page_nr,
+                                 GtkPageSetup      *setup);
+  void     (*draw_page)          (GtkPrintOperation *operation,
+                                 GtkPrintContext   *context,
+                                 gint               page_nr);
+  void     (*end_print)          (GtkPrintOperation *operation,
+                                 GtkPrintContext   *context);
+  void     (*status_changed)     (GtkPrintOperation *operation);
+
+  GtkWidget *(*create_custom_widget) (GtkPrintOperation *operation);
+  void       (*custom_widget_apply)  (GtkPrintOperation *operation,
+                                     GtkWidget *widget);
+
   
+  gboolean (*preview)       (GtkPrintOperation        *operation,
+                             GtkPrintOperationPreview *preview, 
+                             GtkPrintContext          *context,
+                             GtkWindow                *parent);  
+
   /* Padding for future expansion */
   void (*_gtk_reserved1) (void);
   void (*_gtk_reserved2) (void);
@@ -89,12 +119,6 @@ struct _GtkPrintOperationClass
   void (*_gtk_reserved7) (void);
 };
 
-typedef enum {
-  GTK_PRINT_OPERATION_RESULT_ERROR,
-  GTK_PRINT_OPERATION_RESULT_APPLY,
-  GTK_PRINT_OPERATION_RESULT_CANCEL
-} GtkPrintOperationResult;
-
 #define GTK_PRINT_ERROR gtk_print_error_quark ()
 
 typedef enum
@@ -116,7 +140,7 @@ void                    gtk_print_operation_set_print_settings     (GtkPrintOper
 GtkPrintSettings *      gtk_print_operation_get_print_settings     (GtkPrintOperation  *op);
 void                    gtk_print_operation_set_job_name           (GtkPrintOperation  *op,
                                                                    const gchar        *job_name);
-void                    gtk_print_operation_set_nr_of_pages        (GtkPrintOperation  *op,
+void                    gtk_print_operation_set_n_pages            (GtkPrintOperation  *op,
                                                                    gint                n_pages);
 void                    gtk_print_operation_set_current_page       (GtkPrintOperation  *op,
                                                                    gint                current_page);
@@ -124,16 +148,26 @@ void                    gtk_print_operation_set_use_full_page      (GtkPrintOper
                                                                    gboolean            full_page);
 void                    gtk_print_operation_set_unit               (GtkPrintOperation  *op,
                                                                    GtkUnit             unit);
-void                    gtk_print_operation_set_show_dialog        (GtkPrintOperation  *op,
-                                                                   gboolean            show_dialog);
-void                    gtk_print_operation_set_pdf_target         (GtkPrintOperation  *op,
+void                    gtk_print_operation_set_export_filename    (GtkPrintOperation  *op,
                                                                    const gchar        *filename);
+void                    gtk_print_operation_set_track_print_status (GtkPrintOperation  *op,
+                                                                   gboolean            track_status);
+void                    gtk_print_operation_set_show_progress      (GtkPrintOperation  *op,
+                                                                   gboolean            show_progress);
+void                    gtk_print_operation_set_allow_async        (GtkPrintOperation  *op,
+                                                                   gboolean            allow_async);
+void                    gtk_print_operation_set_custom_tab_label   (GtkPrintOperation  *op,
+                                                                   const gchar        *label);
 GtkPrintOperationResult gtk_print_operation_run                    (GtkPrintOperation  *op,
+                                                                   GtkPrintOperationAction action,
                                                                    GtkWindow          *parent,
                                                                    GError            **error);
+void                    gtk_print_operation_get_error              (GtkPrintOperation  *op,
+                                                                   GError            **error);
 GtkPrintStatus          gtk_print_operation_get_status             (GtkPrintOperation  *op);
 G_CONST_RETURN gchar *  gtk_print_operation_get_status_string      (GtkPrintOperation  *op);
 gboolean                gtk_print_operation_is_finished            (GtkPrintOperation  *op);
+void                    gtk_print_operation_cancel                 (GtkPrintOperation  *op);
 
 GtkPageSetup           *gtk_print_run_page_setup_dialog            (GtkWindow          *parent,
                                                                    GtkPageSetup       *page_setup,
@@ -142,8 +176,6 @@ GtkPageSetup           *gtk_print_run_page_setup_dialog            (GtkWindow
 typedef void  (* GtkPageSetupDoneFunc) (GtkPageSetup *page_setup, 
                                        gpointer      data);
 
-void                    gtk_print_operation_run_async              (GtkPrintOperation    *op,
-                                                                   GtkWindow            *parent);
 void                    gtk_print_run_page_setup_dialog_async      (GtkWindow            *parent,
                                                                    GtkPageSetup         *page_setup,
                                                                    GtkPrintSettings     *settings,