Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ev-document-misc.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
2 /*
3  * Copyright (C) 2000-2003 Marco Pesenti Gritti
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2, or (at your option)
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  * $Id$
20  */
21 
22 #if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
23 #error "Only <evince-document.h> can be included directly."
24 #endif
25 
26 #ifndef EV_DOCUMENT_MISC_H
27 #define EV_DOCUMENT_MISC_H
28 
29 #include <cairo.h>
30 
31 #include <gdk-pixbuf/gdk-pixbuf.h>
32 #include <gtk/gtk.h>
33 #include "ev-macros.h"
34 
35 G_BEGIN_DECLS
36 
38 GdkPixbuf *ev_document_misc_get_thumbnail_frame (int width,
39  int height,
40  GdkPixbuf *source_pixbuf);
42 GdkPixbuf *ev_document_misc_get_loading_thumbnail (int width,
43  int height,
44  gboolean inverted_colors);
45 
46 GdkPixbuf *ev_document_misc_render_loading_thumbnail (GtkWidget *widget,
47  int width,
48  int height,
49  gboolean inverted_colors);
50 GdkPixbuf *ev_document_misc_render_thumbnail_with_frame (GtkWidget *widget,
51  GdkPixbuf *source_pixbuf);
52 
53 cairo_surface_t *ev_document_misc_render_loading_thumbnail_surface (GtkWidget *widget,
54  int width,
55  int height,
56  gboolean inverted_colors);
57 cairo_surface_t *ev_document_misc_render_thumbnail_surface_with_frame (GtkWidget *widget,
58  cairo_surface_t *source_surface,
59  int width,
60  int height);
61 
63 void ev_document_misc_get_page_border_size (gint page_width,
64  gint page_height,
65  GtkBorder *border);
67 void ev_document_misc_paint_one_page (cairo_t *cr,
68  GtkWidget *widget,
69  GdkRectangle *area,
70  GtkBorder *border,
71  gboolean highlight,
72  gboolean inverted_colors);
73 
74 cairo_surface_t *ev_document_misc_surface_from_pixbuf (GdkPixbuf *pixbuf);
75 GdkPixbuf *ev_document_misc_pixbuf_from_surface (cairo_surface_t *surface);
76 cairo_surface_t *ev_document_misc_surface_rotate_and_scale (cairo_surface_t *surface,
77  gint dest_width,
78  gint dest_height,
79  gint dest_rotation);
80 void ev_document_misc_invert_surface (cairo_surface_t *surface);
81 void ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf);
82 
83 gdouble ev_document_misc_get_screen_dpi (GdkScreen *screen);
84 
85 gchar *ev_document_misc_format_date (GTime utime);
86 
87 void ev_document_misc_get_pointer_position (GtkWidget *widget,
88  gint *x,
89  gint *y);
90 
91 G_END_DECLS
92 
93 #endif /* EV_DOCUMENT_MISC_H */