X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=shell%2Fev-jobs.h;h=a0ef3f4a97fe9468fdcd0ab57f45e513fc5d6ca5;hb=205c689a78e992d1ad3cf9223f7c95bf424dda94;hp=11a3f09df771feeca6e3c56ded248bb91f821859;hpb=bca369672136e5ff831ece9832afd42085808fba;p=evince.git diff --git a/shell/ev-jobs.h b/shell/ev-jobs.h index 11a3f09d..a0ef3f4a 100644 --- a/shell/ev-jobs.h +++ b/shell/ev-jobs.h @@ -40,31 +40,39 @@ typedef struct _EvJobLinksClass EvJobLinksClass; typedef struct _EvJobLoad EvJobLoad; typedef struct _EvJobLoadClass EvJobLoadClass; +typedef struct _EvJobFonts EvJobFonts; +typedef struct _EvJobFontsClass EvJobFontsClass; + #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_CLASS(klass) (G_TYPE_CHACK_CLASS_CAST((klass), EV_TYPE_JOB, EvJobClass)) +#define EV_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB, EvJobClass)) #define EV_IS_JOB(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB)) #define EV_TYPE_JOB_LINKS (ev_job_links_get_type()) #define EV_JOB_LINKS(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_LINKS, EvJobLinks)) -#define EV_JOB_LINKS_CLASS(klass) (G_TYPE_CHACK_CLASS_CAST((klass), EV_TYPE_JOB_LINKS, EvJobLinksClass)) +#define EV_JOB_LINKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_LINKS, EvJobLinksClass)) #define EV_IS_JOB_LINKS(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_LINKS)) #define EV_TYPE_JOB_RENDER (ev_job_render_get_type()) #define EV_JOB_RENDER(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_RENDER, EvJobRender)) -#define EV_JOB_RENDER_CLASS(klass) (G_TYPE_CHACK_CLASS_CAST((klass), EV_TYPE_JOB_RENDER, EvJobRenderClass)) +#define EV_JOB_RENDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_JOB_RENDER, EvJobRenderClass)) #define EV_IS_JOB_RENDER(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_JOB_RENDER)) #define EV_TYPE_JOB_THUMBNAIL (ev_job_thumbnail_get_type()) #define EV_JOB_THUMBNAIL(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_JOB_THUMBNAIL, EvJobThumbnail)) -#define EV_JOB_THUMBNAIL_CLASS(klass) (G_TYPE_CHACK_CLASS_CAST((klass), EV_TYPE_JOB_THUMBNAIL, EvJobThumbnailClass)) +#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_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_CHACK_CLASS_CAST((klass), EV_TYPE_JOB_LOAD, EvJobLoadClass)) +#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)) + typedef enum { EV_JOB_PRIORITY_LOW, EV_JOB_PRIORITY_HIGH, @@ -101,13 +109,23 @@ struct _EvJobRender { EvJob parent; - gint page; - double scale; + EvRenderContext *rc; gint target_width; gint target_height; GdkPixbuf *pixbuf; + GList *link_mapping; - gboolean include_links; + GdkRegion *text_mapping; + + GdkPixbuf *selection; + GdkRegion *selection_region; + EvRectangle selection_points; + GdkColor base; + GdkColor text; + + gint include_links : 1; + gint include_text : 1; + gint include_selection : 1; }; struct _EvJobRenderClass @@ -120,6 +138,7 @@ struct _EvJobThumbnail EvJob parent; gint page; + gint rotation; gint requested_width; GdkPixbuf *thumbnail; }; @@ -141,6 +160,17 @@ struct _EvJobLoadClass EvJobClass parent_class; }; +struct _EvJobFonts +{ + EvJob parent; + gboolean scan_completed; +}; + +struct _EvJobFontsClass +{ + EvJobClass parent_class; +}; + /* Base job class */ GType ev_job_get_type (void); void ev_job_finished (EvJob *job); @@ -152,18 +182,23 @@ void ev_job_links_run (EvJobLinks *thumbnail); /* EvJobRender */ GType ev_job_render_get_type (void); -EvJob *ev_job_render_new (EvDocument *document, - gint page, - double scale, - gint width, - gint height, - gboolean include_links); -void ev_job_render_run (EvJobRender *thumbnail); +EvJob *ev_job_render_new (EvDocument *document, + EvRenderContext *rc, + gint width, + gint height, + EvRectangle *selection_points, + GdkColor *text, + GdkColor *base, + gboolean include_links, + 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); @@ -173,6 +208,11 @@ EvJob *ev_job_load_new (EvDocument *document, const gchar *uri); void ev_job_load_run (EvJobLoad *load); +/* EvJobFonts */ +GType ev_job_fonts_get_type (void); +EvJob *ev_job_fonts_new (EvDocument *document); +void ev_job_fonts_run (EvJobFonts *fonts); + G_END_DECLS #endif /* __EV_JOBS_H__ */