X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=libview%2Fev-view-private.h;h=0387642827cb325f95fdc3a9252741d519b79683;hb=f7eb83a4ad43b1b30af202eb8f33f3057c2a51c5;hp=542607d1cb0f25b899d589e1099bbd6dd681bda8;hpb=4912987303aefef0d02a45726b75e5fdae043982;p=evince.git diff --git a/libview/ev-view-private.h b/libview/ev-view-private.h index 542607d1..03876428 100644 --- a/libview/ev-view-private.h +++ b/libview/ev-view-private.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if !defined (EVINCE_COMPILATION) @@ -26,13 +26,14 @@ #define __EV_VIEW_PRIVATE_H__ #include "ev-view.h" +#include "ev-document-model.h" #include "ev-pixbuf-cache.h" #include "ev-page-cache.h" #include "ev-jobs.h" #include "ev-image.h" #include "ev-form-field.h" #include "ev-selection.h" -#include "ev-transition-animation.h" +#include "ev-view-cursor.h" #define DRAG_HISTORY 10 @@ -72,6 +73,27 @@ typedef struct { EvImage *image; } ImageDNDInfo; +/* Annotation popup windows */ +typedef struct { + GtkWidget *window; + guint page; + + /* Current position */ + gint x; + gint y; + + /* EvView root position */ + gint parent_x; + gint parent_y; + + /* Document coords */ + gdouble orig_x; + gdouble orig_y; + + gboolean visible; + gboolean moved; +} EvViewWindowChild; + typedef enum { SCROLL_TO_KEEP_POSITION, SCROLL_TO_PAGE_POSITION, @@ -79,22 +101,11 @@ typedef enum { SCROLL_TO_FIND_LOCATION, } PendingScroll; -typedef enum { - EV_VIEW_CURSOR_NORMAL, - EV_VIEW_CURSOR_IBEAM, - EV_VIEW_CURSOR_LINK, - EV_VIEW_CURSOR_WAIT, - EV_VIEW_CURSOR_HIDDEN, - EV_VIEW_CURSOR_DRAG, - EV_VIEW_CURSOR_AUTOSCROLL, -} EvViewCursor; - -typedef enum { - EV_PRESENTATION_NORMAL, - EV_PRESENTATION_BLACK, - EV_PRESENTATION_WHITE, - EV_PRESENTATION_END -} EvPresentationState; +typedef struct _EvHeightToPageCache { + gint rotation; + gdouble *height_to_page; + gdouble *dual_height_to_page; +} EvHeightToPageCache; struct _EvView { GtkLayout layout; @@ -106,15 +117,25 @@ struct _EvView { gint find_result; gboolean jump_to_find_result; gboolean highlight_find_results; - - EvPageCache *page_cache; + + EvDocumentModel *model; EvPixbufCache *pixbuf_cache; + gsize pixbuf_cache_size; + EvPageCache *page_cache; + EvHeightToPageCache *height_to_page_cache; EvViewCursor cursor; EvJobRender *current_job; + GtkRequisition requisition; + gboolean internal_size_request; + /* Scrolling */ GtkAdjustment *hadjustment; GtkAdjustment *vadjustment; + /* GtkScrollablePolicy needs to be checked when + * driving the scrollable adjustment values */ + guint hscroll_policy : 1; + guint vscroll_policy : 1; gint scroll_x; gint scroll_y; @@ -132,23 +153,14 @@ struct _EvView { gint rotation; gdouble scale; gint spacing; - gdouble dpi; - gdouble max_scale; - gdouble min_scale; gboolean loading; gboolean continuous; gboolean dual_page; gboolean fullscreen; - gboolean presentation; EvSizingMode sizing_mode; - cairo_surface_t *loading_text; - - /* Presentation */ - EvPresentationState presentation_state; - EvSizingMode sizing_mode_saved; - double scale_saved; - guint trans_timeout_id; + GtkWidget *loading_window; + guint loading_timeout; /* Common for button press handling */ int pressed_button; @@ -173,11 +185,18 @@ struct _EvView { /* Image DND */ ImageDNDInfo image_dnd_info; - /* Goto Popup */ - GtkWidget *goto_window; - GtkWidget *goto_entry; + /* Annotations */ + GList *window_children; + EvViewWindowChild *window_child_focus; + EvMapping *focus_annotation; + gboolean adding_annot; + EvAnnotationType adding_annot_type; + + /* Synctex */ + EvMapping *synctex_result; - EvTransitionAnimation *animation; + /* Accessibility */ + gboolean a11y_enabled; }; struct _EvViewClass { @@ -186,14 +205,26 @@ struct _EvViewClass { void (*binding_activated) (EvView *view, GtkScrollType scroll, gboolean horizontal); - void (*zoom_invalid) (EvView *view); void (*handle_link) (EvView *view, EvLink *link); void (*external_link) (EvView *view, EvLinkAction *action); void (*popup_menu) (EvView *view, - EvLink *link); + GList *items); + void (*selection_changed) (EvView *view); + void (*sync_source) (EvView *view, + EvSourceLink *link); + void (*annot_added) (EvView *view, + EvAnnotation *annot); + void (*layers_changed) (EvView *view); }; +void _get_page_size_for_scale_and_rotation (EvDocument *document, + gint page, + gdouble scale, + gint rotation, + gint *page_width, + gint *page_height); + #endif /* __EV_VIEW_PRIVATE_H__ */