1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
3 * Copyright (C) 2005 Marco Pesenti Gritti
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)
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.
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.
25 #include "ev-sidebar-page.h"
28 ev_sidebar_page_get_type (void)
30 static GType type = 0;
32 if (G_UNLIKELY (type == 0))
34 static const GTypeInfo sidebar_page_info =
36 sizeof (EvDocumentIface),
42 type = g_type_register_static (G_TYPE_INTERFACE,
44 &sidebar_page_info, (GTypeFlags)0);
52 ev_sidebar_page_support_document (EvSidebarPage *sidebar_page,
55 EvSidebarPageIface *iface;
57 g_return_val_if_fail (EV_IS_SIDEBAR_PAGE (sidebar_page), FALSE);
58 g_return_val_if_fail (EV_IS_DOCUMENT (document), FALSE);
60 iface = EV_SIDEBAR_PAGE_GET_IFACE (sidebar_page);
62 g_return_val_if_fail (iface->set_document, FALSE);
64 return iface->support_document (sidebar_page, document);
68 ev_sidebar_page_set_document (EvSidebarPage *sidebar_page,
71 EvSidebarPageIface *iface;
73 g_return_if_fail (EV_IS_SIDEBAR_PAGE (sidebar_page));
74 g_return_if_fail (EV_IS_DOCUMENT (document));
76 iface = EV_SIDEBAR_PAGE_GET_IFACE (sidebar_page);
78 g_return_if_fail (iface->set_document);
80 iface->set_document (sidebar_page, document);
86 ev_sidebar_page_get_label (EvSidebarPage *sidebar_page)
88 EvSidebarPageIface *iface;
90 g_return_val_if_fail (EV_IS_SIDEBAR_PAGE (sidebar_page), NULL);
92 iface = EV_SIDEBAR_PAGE_GET_IFACE (sidebar_page);
94 g_return_val_if_fail (iface->get_label, NULL);
96 return iface->get_label (sidebar_page);