]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkprintoperation.h
viewport: Update adjustment usage for sealing
[~andy/gtk] / gtk / gtkprintoperation.h
index 09ae769cb4b964f7d929627cfb7063bd3afa5080..bba15cc632887ee7dda49357f935d5f75747e22e 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
+#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <gtk/gtk.h> can be included directly."
+#endif
+
 #ifndef __GTK_PRINT_OPERATION_H__
 #define __GTK_PRINT_OPERATION_H__
 
-#include <glib-object.h>
+
 #include <cairo.h>
-#include "gtkmain.h"
-#include "gtkenums.h"
-#include "gtkwindow.h"
-#include "gtkpagesetup.h"
-#include "gtkprintsettings.h"
-#include "gtkprintcontext.h"
-#include "gtkprintoperationpreview.h"
+#include <gtk/gtkmain.h>
+#include <gtk/gtkwindow.h>
+#include <gtk/gtkpagesetup.h>
+#include <gtk/gtkprintsettings.h>
+#include <gtk/gtkprintcontext.h>
+#include <gtk/gtkprintoperationpreview.h>
+
 
 G_BEGIN_DECLS
 
@@ -56,20 +60,38 @@ 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;
-  
+
+  /*< private >*/
   GtkPrintOperationPrivate *priv;
 };
 
 struct _GtkPrintOperationClass
 {
   GObjectClass parent_class;
-  
-  void     (*begin_print)        (GtkPrintOperation *operation, 
+
+  void     (*done)               (GtkPrintOperation *operation,
+                                 GtkPrintOperationResult result);
+  void     (*begin_print)        (GtkPrintOperation *operation,
                                  GtkPrintContext   *context);
-  gboolean (*paginate)           (GtkPrintOperation *operation, 
+  gboolean (*paginate)           (GtkPrintOperation *operation,
                                  GtkPrintContext   *context);
   void     (*request_page_setup) (GtkPrintOperation *operation,
                                  GtkPrintContext   *context,
@@ -84,13 +106,17 @@ struct _GtkPrintOperationClass
 
   GtkWidget *(*create_custom_widget) (GtkPrintOperation *operation);
   void       (*custom_widget_apply)  (GtkPrintOperation *operation,
-                                     GtkWidget *widget);
+                                     GtkWidget         *widget);
 
-  
   gboolean (*preview)       (GtkPrintOperation        *operation,
-                             GtkPrintOperationPreview *preview, 
+                             GtkPrintOperationPreview *preview,
                              GtkPrintContext          *context,
-                             GtkWindow                *parent);  
+                             GtkWindow                *parent);
+
+  void     (*update_custom_widget) (GtkPrintOperation *operation,
+                                    GtkWidget         *widget,
+                                    GtkPageSetup      *setup,
+                                    GtkPrintSettings  *settings);
 
   /* Padding for future expansion */
   void (*_gtk_reserved1) (void);
@@ -100,22 +126,17 @@ struct _GtkPrintOperationClass
   void (*_gtk_reserved5) (void);
   void (*_gtk_reserved6) (void);
   void (*_gtk_reserved7) (void);
+  void (*_gtk_reserved8) (void);
 };
 
-typedef enum {
-  GTK_PRINT_OPERATION_RESULT_ERROR,
-  GTK_PRINT_OPERATION_RESULT_APPLY,
-  GTK_PRINT_OPERATION_RESULT_CANCEL,
-  GTK_PRINT_OPERATION_RESULT_PREVIEW
-} GtkPrintOperationResult;
-
 #define GTK_PRINT_ERROR gtk_print_error_quark ()
 
 typedef enum
 {
   GTK_PRINT_ERROR_GENERAL,
   GTK_PRINT_ERROR_INTERNAL_ERROR,
-  GTK_PRINT_ERROR_NOMEM
+  GTK_PRINT_ERROR_NOMEM,
+  GTK_PRINT_ERROR_INVALID_FILE
 } GtkPrintError;
 
 GQuark gtk_print_error_quark (void);
@@ -138,37 +159,46 @@ 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_show_preview       (GtkPrintOperation  *op,
-                                                                   gboolean            show_preview);
-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_run_preview            (GtkPrintOperation  *op,
-                                                                    GtkWindow          *parent);
+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);
+void                    gtk_print_operation_draw_page_finish       (GtkPrintOperation  *op);
+void                    gtk_print_operation_set_defer_drawing      (GtkPrintOperation  *op);
+void                    gtk_print_operation_set_support_selection  (GtkPrintOperation  *op,
+                                                                    gboolean            support_selection);
+gboolean                gtk_print_operation_get_support_selection  (GtkPrintOperation  *op);
+void                    gtk_print_operation_set_has_selection      (GtkPrintOperation  *op,
+                                                                    gboolean            has_selection);
+gboolean                gtk_print_operation_get_has_selection      (GtkPrintOperation  *op);
+void                    gtk_print_operation_set_embed_page_setup   (GtkPrintOperation  *op,
+                                                                   gboolean            embed);
+gboolean                gtk_print_operation_get_embed_page_setup   (GtkPrintOperation  *op);
+gint                    gtk_print_operation_get_n_pages_to_print   (GtkPrintOperation  *op);
 
 GtkPageSetup           *gtk_print_run_page_setup_dialog            (GtkWindow          *parent,
                                                                    GtkPageSetup       *page_setup,
                                                                    GtkPrintSettings   *settings);
 
-typedef void  (* GtkPageSetupDoneFunc) (GtkPageSetup *page_setup, 
+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,