X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fxournal.h;h=8e2aff618342384bc35698e46f34a6ecf87d0379;hb=e648cece76b671b5b0e165acc6d14178e8de1000;hp=aadc1ea4a5c23c5d1f19d904f8538351ab504502;hpb=dcbb0ab8521a5e166f257d86884407eb98ef63f0;p=xournal.git diff --git a/src/xournal.h b/src/xournal.h index aadc1ea..8e2aff6 100644 --- a/src/xournal.h +++ b/src/xournal.h @@ -1,7 +1,8 @@ #include #include +#include -/* #define INPUT_DEBUG */ +// #define INPUT_DEBUG /* uncomment this line if you experience event-processing problems and want to list the input events received by xournal. Caution, lots of output (redirect to a file). */ @@ -27,6 +28,7 @@ #define DISPLAY_DPI_DEFAULT 96.0 #define MIN_ZOOM 0.2 #define RESIZE_MARGIN 6.0 +#define MAX_SAFE_RENDER_DPI 720 // max dpi at which PDF bg's get rendered #define VBOX_MAIN_NITEMS 5 // number of interface items in vboxMain @@ -53,9 +55,9 @@ typedef struct Background { Refstring *filename; int file_domain; int file_page_seq; - int pixbuf_dpi; // for PDF only - the *current* dpi value double pixbuf_scale; // for PIXMAP, this is the *current* zoom value // for PDF, this is the *requested* zoom value + int pixel_height, pixel_width; // PDF only: pixel size of current pixbuf } Background; #define BG_SOLID 0 @@ -132,7 +134,7 @@ struct UndoErasureData; typedef struct Item { int type; struct Brush brush; // the brush to use, if ITEM_STROKE - // 'brush" also contains color info for text items + // 'brush' also contains color info for text items GnomeCanvasPoints *path; gdouble *widths; GnomeCanvasItem *canvas_item; // the corresponding canvas item, or NULL @@ -310,35 +312,32 @@ typedef struct UndoItem { typedef struct BgPdfRequest { int pageno; - int dpi; - gboolean initial_request; // if so, loop over page numbers - gboolean is_printing; // this is for printing, not for display + double dpi; } BgPdfRequest; typedef struct BgPdfPage { - int dpi; + double dpi; GdkPixbuf *pixbuf; + int pixel_height, pixel_width; // pixel size of pixbuf } BgPdfPage; typedef struct BgPdf { int status; // the rest only makes sense if this is not STATUS_NOT_INIT - int pid; // PID of the converter process + guint pid; // the identifier of the idle callback Refstring *filename; int file_domain; - gchar *tmpfile_copy; // the temporary work copy of the file (in tmpdir) + gchar *file_contents; // buffer containing a copy of file data + gsize file_length; // size of above buffer int npages; GList *pages; // a list of BgPdfPage structures GList *requests; // a list of BgPdfRequest structures - gchar *tmpdir; // where to look for pages coming from pdf converter - gboolean create_pages; // create journal pages as we find stuff in PDF gboolean has_failed; // has failed in the past... + PopplerDocument *document; // the poppler document } BgPdf; #define STATUS_NOT_INIT 0 -#define STATUS_IDLE 1 -#define STATUS_RUNNING 2 // currently running child process on head(requests) -#define STATUS_ABORTED 3 // child process running, but head(requests) aborted -#define STATUS_SHUTDOWN 4 // waiting for child process to shut down +#define STATUS_READY 1 // things are initialized and can work +// there used to be more possible values, things got streamlined... // UTILITY MACROS