X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-jobs.h;h=1f210ece96ab99aa7ee728f3f5780d449531a029;hb=b97df17e5b2d540896e14398a6291a79440e7e2a;hp=15768371412846dfae665365ad9e227cc705ee41;hpb=00efc5c16ed191f07f9a8a5d00acc41ddb064b46;p=evince.git diff --git a/shell/ev-jobs.h b/shell/ev-jobs.h index 15768371..1f210ece 100644 --- a/shell/ev-jobs.h +++ b/shell/ev-jobs.h @@ -22,6 +22,7 @@ #include #include "ev-document.h" +#include "ev-window.h" G_BEGIN_DECLS @@ -37,11 +38,14 @@ typedef struct _EvJobThumbnailClass EvJobThumbnailClass; typedef struct _EvJobLinks EvJobLinks; typedef struct _EvJobLinksClass EvJobLinksClass; +typedef struct _EvJobFonts EvJobFonts; +typedef struct _EvJobFontsClass EvJobFontsClass; + typedef struct _EvJobLoad EvJobLoad; typedef struct _EvJobLoadClass EvJobLoadClass; -typedef struct _EvJobFonts EvJobFonts; -typedef struct _EvJobFontsClass EvJobFontsClass; +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)) @@ -63,15 +67,20 @@ typedef struct _EvJobFontsClass EvJobFontsClass; #define EV_JOB_THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_THUMBNAIL, EvJobThumbnailClass)) #define EV_IS_JOB_THUMBNAIL(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_THUMBNAIL)) +#define EV_TYPE_JOB_FONTS (ev_job_fonts_get_type()) +#define EV_JOB_FONTS(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_FONTS, EvJobFonts)) +#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_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_FONTS (ev_job_fonts_get_type()) -#define EV_JOB_FONTS(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_FONTS, EvJobFonts)) -#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_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, @@ -116,16 +125,18 @@ struct _EvJobRender GList *link_mapping; GdkRegion *text_mapping; + GList *image_mapping; GdkPixbuf *selection; GdkRegion *selection_region; EvRectangle selection_points; - guint base; - guint text; + GdkColor base; + GdkColor text; gint include_links : 1; gint include_text : 1; gint include_selection : 1; + gint include_images : 1; }; struct _EvJobRenderClass @@ -137,9 +148,7 @@ struct _EvJobThumbnail { EvJob parent; - gint page; - gint rotation; - gint requested_width; + EvRenderContext *rc; GdkPixbuf *thumbnail; }; @@ -148,9 +157,23 @@ struct _EvJobThumbnailClass EvJobClass parent_class; }; +struct _EvJobFonts +{ + EvJob parent; + gboolean scan_completed; +}; + +struct _EvJobFontsClass +{ + EvJobClass parent_class; +}; + struct _EvJobLoad { EvJob parent; + + EvLinkDest *dest; + EvWindowRunMode mode; GError *error; gchar *uri; }; @@ -160,59 +183,86 @@ struct _EvJobLoadClass EvJobClass parent_class; }; -struct _EvJobFonts +struct _EvJobPrint { EvJob parent; - gboolean scan_completed; + + GError *error; + 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 _EvJobFontsClass +struct _EvJobPrintClass { - EvJobClass parent_class; + 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, gint height, EvRectangle *selection_points, - guint text, - guint base, + GdkColor *text, + GdkColor *base, 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); - -/* EvJobLoad */ -GType ev_job_load_get_type (void); -EvJob *ev_job_load_new (EvDocument *document, - const gchar *uri); -void ev_job_load_run (EvJobLoad *load); +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); +/* 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 #endif /* __EV_JOBS_H__ */