]> www.fi.muni.cz Git - evince.git/blob - libdocument/ev-document-misc.h
[dualscreen] fix crash on ctrl+w and fix control window closing
[evince.git] / libdocument / ev-document-misc.h
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
34 G_BEGIN_DECLS
35
36 GdkPixbuf *ev_document_misc_get_thumbnail_frame  (int           width,
37                                                   int           height,
38                                                   GdkPixbuf    *source_pixbuf);
39 GdkPixbuf *ev_document_misc_get_loading_thumbnail (int      width,
40                                                    int      height,
41                                                    gboolean inverted_colors);
42 void       ev_document_misc_get_page_border_size (gint          page_width,
43                                                   gint          page_height,
44                                                   GtkBorder    *border);
45 void       ev_document_misc_paint_one_page       (cairo_t      *cr,
46                                                   GtkWidget    *widget,
47                                                   GdkRectangle *area,
48                                                   GtkBorder    *border,
49                                                   gboolean      highlight,
50                                                   gboolean      inverted_colors);
51
52 cairo_surface_t *ev_document_misc_surface_from_pixbuf (GdkPixbuf *pixbuf);
53 GdkPixbuf       *ev_document_misc_pixbuf_from_surface (cairo_surface_t *surface);
54 cairo_surface_t *ev_document_misc_surface_rotate_and_scale (cairo_surface_t *surface,
55                                                             gint             dest_width,
56                                                             gint             dest_height,
57                                                             gint             dest_rotation);
58 void             ev_document_misc_invert_surface (cairo_surface_t *surface);
59 void             ev_document_misc_invert_pixbuf  (GdkPixbuf       *pixbuf);
60
61 gdouble          ev_document_misc_get_screen_dpi (GdkScreen *screen);
62
63 gchar           *ev_document_misc_format_date (GTime utime);
64
65 G_END_DECLS
66
67 #endif /* EV_DOCUMENT_MISC_H */