]> www.fi.muni.cz Git - evince.git/blob - backend/ev-selection.c
074bbbcd2ab9620da17c1c60686773e8d0813d91
[evince.git] / backend / ev-selection.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
2 /*
3  *  Copyright (C) 2005 Red Hat, Inc.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  *
19  */
20
21 #include "config.h"
22
23 #include "ev-selection.h"
24
25 static void ev_selection_base_init (gpointer g_class);
26
27 GType
28 ev_selection_get_type (void)
29 {
30         static GType type = 0;
31
32         if (G_UNLIKELY (type == 0))
33         {
34                 static const GTypeInfo our_info =
35                 {
36                         sizeof (EvSelectionIface),
37                         ev_selection_base_init,
38                         NULL,
39                 };
40
41                 type = g_type_register_static (G_TYPE_INTERFACE,
42                                                "EvSelection",
43                                                &our_info, (GTypeFlags)0);
44         }
45
46         return type;
47 }
48
49 static void
50 ev_selection_base_init (gpointer g_class)
51 {
52         static gboolean initialized = FALSE;
53
54         if (!initialized) {
55         }
56 }
57
58
59 void
60 ev_selection_render_selection (EvSelection      *selection,
61                                EvRenderContext  *rc,
62                                GdkPixbuf       **pixbuf,
63                                EvRectangle      *points,
64                                EvRectangle      *old_points)
65 {
66         EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection);
67
68         iface->render_selection (selection, rc,
69                                  pixbuf,
70                                  points, old_points);
71 }
72
73 GdkRegion *
74 ev_selection_get_selection_region (EvSelection     *selection,
75                                    EvRenderContext *rc,
76                                    EvRectangle     *points)
77 {
78         EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection);
79
80         return iface->get_selection_region (selection, rc, points);
81 }
82
83 GdkRegion *
84 ev_selection_get_selection_map (EvSelection     *selection,
85                                 EvRenderContext *rc)
86 {
87         EvSelectionIface *iface = EV_SELECTION_GET_IFACE (selection);
88
89         return iface->get_selection_map (selection, rc);
90 }