]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkprintoperation.h
/tmp/cvsX7MHVx
[~andy/gtk] / gtk / gtkprintoperation.h
index 58baf745612c15c6e9b3807893d85c137bd17952..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,6 +82,8 @@ struct _GtkPrintOperationClass
 {
   GObjectClass parent_class;
   
+  void     (*done)               (GtkPrintOperation *operation,
+                                 GtkPrintOperationResult result);
   void     (*begin_print)        (GtkPrintOperation *operation, 
                                  GtkPrintContext   *context);
   gboolean (*paginate)           (GtkPrintOperation *operation, 
@@ -84,7 +102,13 @@ struct _GtkPrintOperationClass
   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);
@@ -95,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
@@ -130,15 +148,22 @@ 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);
@@ -151,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,