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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 #include "ev-sidebar-page.h"
29 G_DEFINE_INTERFACE (EvSidebarPage, ev_sidebar_page, 0)
32 ev_sidebar_page_support_document (EvSidebarPage *sidebar_page,
35 EvSidebarPageInterface *iface;
37 g_return_val_if_fail (EV_IS_SIDEBAR_PAGE (sidebar_page), FALSE);
38 g_return_val_if_fail (EV_IS_DOCUMENT (document), FALSE);
40 iface = EV_SIDEBAR_PAGE_GET_IFACE (sidebar_page);
42 g_return_val_if_fail (iface->support_document, FALSE);
44 return iface->support_document (sidebar_page, document);
48 ev_sidebar_page_set_model (EvSidebarPage *sidebar_page,
49 EvDocumentModel *model)
51 EvSidebarPageInterface *iface;
53 g_return_if_fail (EV_IS_SIDEBAR_PAGE (sidebar_page));
54 g_return_if_fail (EV_IS_DOCUMENT_MODEL (model));
56 iface = EV_SIDEBAR_PAGE_GET_IFACE (sidebar_page);
58 g_assert (iface->set_model);
60 iface->set_model (sidebar_page, model);
64 ev_sidebar_page_get_label (EvSidebarPage *sidebar_page)
66 EvSidebarPageInterface *iface;
68 g_return_val_if_fail (EV_IS_SIDEBAR_PAGE (sidebar_page), NULL);
70 iface = EV_SIDEBAR_PAGE_GET_IFACE (sidebar_page);
72 g_assert (iface->get_label);
74 return iface->get_label (sidebar_page);
79 ev_sidebar_page_default_init (EvSidebarPageInterface *iface)
81 static gboolean initialized = FALSE;
84 g_object_interface_install_property (iface,
85 g_param_spec_object ("main-widget",
87 "Main page widget, used to handle focus",