#include <gtk/gtk.h>
#include "ev-document.h"
+#include "ev-window.h"
G_BEGIN_DECLS
typedef struct _EvJobFonts EvJobFonts;
typedef struct _EvJobFontsClass EvJobFontsClass;
-typedef struct _EvJobXfer EvJobXfer;
-typedef struct _EvJobXferClass EvJobXferClass;
+typedef struct _EvJobLoad EvJobLoad;
+typedef struct _EvJobLoadClass EvJobLoadClass;
+
+typedef struct _EvJobPrint EvJobPrint;
+typedef struct _EvJobPrintClass EvJobPrintClass;
#define EV_TYPE_JOB (ev_job_get_type())
#define EV_JOB(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB, EvJob))
#define EV_JOB_FONTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_FONTS, EvJobFontsClass))
#define EV_IS_JOB_FONTS(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_FONTS))
-#define EV_TYPE_JOB_XFER (ev_job_xfer_get_type())
-#define EV_JOB_XFER(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_XFER, EvJobXfer))
-#define EV_JOB_XFER_CLASS(klass) (G_TYPE_CHACK_CLASS_CAST((klass), EV_TYPE_JOB_XFER, EvJobXferClass))
-#define EV_IS_JOB_XFER(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_XFER))
+#define EV_TYPE_JOB_LOAD (ev_job_load_get_type())
+#define EV_JOB_LOAD(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_LOAD, EvJobLoad))
+#define EV_JOB_LOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_LOAD, EvJobLoadClass))
+#define EV_IS_JOB_LOAD(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_LOAD))
+
+#define EV_TYPE_JOB_PRINT (ev_job_print_get_type())
+#define EV_JOB_PRINT(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_PRINT, EvJobPrint))
+#define EV_JOB_PRINT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_PRINT, EvJobPrintClass))
+#define EV_IS_JOB_PRINT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_PRINT))
typedef enum {
EV_JOB_PRIORITY_LOW,
EvRenderContext *rc;
gint target_width;
gint target_height;
- GdkPixbuf *pixbuf;
+ cairo_surface_t *surface;
GList *link_mapping;
GdkRegion *text_mapping;
+ GList *image_mapping;
+ GList *form_field_mapping;
- GdkPixbuf *selection;
+ cairo_surface_t *selection;
GdkRegion *selection_region;
EvRectangle selection_points;
GdkColor base;
GdkColor text;
+ gint include_forms : 1;
gint include_links : 1;
gint include_text : 1;
gint include_selection : 1;
+ gint include_images : 1;
};
struct _EvJobRenderClass
{
EvJob parent;
- gint page;
- gint rotation;
- gint requested_width;
+ EvRenderContext *rc;
GdkPixbuf *thumbnail;
};
EvJobClass parent_class;
};
-struct _EvJobXfer
+struct _EvJobLoad
{
EvJob parent;
+
EvLinkDest *dest;
+ EvWindowRunMode mode;
+ GError *error;
+ gchar *uri;
+};
+
+struct _EvJobLoadClass
+{
+ EvJobClass parent_class;
+};
+
+struct _EvJobPrint
+{
+ EvJob parent;
+
GError *error;
- char *uri;
- char *local_uri;
+ const gchar *format;
+ gchar *temp_file;
+ EvPrintRange *ranges;
+ gint n_ranges;
+ EvPrintPageSet page_set;
+ gint copies;
+ gboolean collate;
+ gboolean reverse;
+ gdouble width;
+ gdouble height;
};
-struct _EvJobXferClass
+struct _EvJobPrintClass
{
EvJobClass parent_class;
};
/* Base job class */
-GType ev_job_get_type (void);
+GType ev_job_get_type (void) G_GNUC_CONST;
void ev_job_finished (EvJob *job);
/* EvJobLinks */
-GType ev_job_links_get_type (void);
+GType ev_job_links_get_type (void) G_GNUC_CONST;
EvJob *ev_job_links_new (EvDocument *document);
void ev_job_links_run (EvJobLinks *thumbnail);
/* EvJobRender */
-GType ev_job_render_get_type (void);
+GType ev_job_render_get_type (void) G_GNUC_CONST;
EvJob *ev_job_render_new (EvDocument *document,
EvRenderContext *rc,
gint width,
EvRectangle *selection_points,
GdkColor *text,
GdkColor *base,
+ gboolean include_forms,
gboolean include_links,
+ gboolean include_images,
gboolean include_text,
gboolean include_selection);
void ev_job_render_run (EvJobRender *thumbnail);
/* EvJobThumbnail */
-GType ev_job_thumbnail_get_type (void);
-EvJob *ev_job_thumbnail_new (EvDocument *document,
- gint page,
- int rotation,
- gint requested_width);
-void ev_job_thumbnail_run (EvJobThumbnail *thumbnail);
+GType ev_job_thumbnail_get_type (void) G_GNUC_CONST;
+EvJob *ev_job_thumbnail_new (EvDocument *document,
+ EvRenderContext *rc);
+void ev_job_thumbnail_run (EvJobThumbnail *thumbnail);
/* EvJobFonts */
-GType ev_job_fonts_get_type (void);
+GType ev_job_fonts_get_type (void) G_GNUC_CONST;
EvJob *ev_job_fonts_new (EvDocument *document);
void ev_job_fonts_run (EvJobFonts *fonts);
-/* EvJobXfer */
-GType ev_job_xfer_get_type (void);
-EvJob *ev_job_xfer_new (const gchar *uri, EvLinkDest *dest);
-void ev_job_xfer_run (EvJobXfer *xfer);
+/* EvJobLoad */
+GType ev_job_load_get_type (void) G_GNUC_CONST;
+EvJob *ev_job_load_new (const gchar *uri,
+ EvLinkDest *dest,
+ EvWindowRunMode mode);
+void ev_job_load_set_uri (EvJobLoad *load,
+ const gchar *uri);
+void ev_job_load_run (EvJobLoad *load);
+
+/* EvJobPrint */
+GType ev_job_print_get_type (void) G_GNUC_CONST;
+EvJob *ev_job_print_new (EvDocument *document,
+ const gchar *format,
+ gdouble width,
+ gdouble height,
+ EvPrintRange *ranges,
+ gint n_ranges,
+ EvPrintPageSet page_set,
+ gint copies,
+ gdouble collate,
+ gdouble reverse);
+void ev_job_print_run (EvJobPrint *print);
G_END_DECLS