2 * this file is part of evince, a gnome document viewer
4 * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
6 * Evince is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * Evince is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #include "ev-document-forms.h"
24 G_DEFINE_INTERFACE (EvDocumentForms, ev_document_forms, 0)
27 ev_document_forms_default_init (EvDocumentFormsInterface *klass)
32 ev_document_forms_get_form_fields (EvDocumentForms *document_forms,
35 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
37 return iface->get_form_fields (document_forms, page);
41 ev_document_forms_document_is_modified (EvDocumentForms *document_forms)
43 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
45 return (iface->document_is_modified) ? iface->document_is_modified (document_forms) : FALSE;
49 ev_document_forms_form_field_text_get_text (EvDocumentForms *document_forms,
52 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
54 return iface->form_field_text_get_text (document_forms, field);
58 ev_document_forms_form_field_text_set_text (EvDocumentForms *document_forms,
62 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
64 iface->form_field_text_set_text (document_forms, field, text);
68 ev_document_forms_form_field_button_get_state (EvDocumentForms *document_forms,
71 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
73 return iface->form_field_button_get_state (document_forms, field);
77 ev_document_forms_form_field_button_set_state (EvDocumentForms *document_forms,
81 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
83 iface->form_field_button_set_state (document_forms, field, state);
87 ev_document_forms_form_field_choice_get_item (EvDocumentForms *document_forms,
91 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
93 return iface->form_field_choice_get_item (document_forms, field, index);
97 ev_document_forms_form_field_choice_get_n_items (EvDocumentForms *document_forms,
100 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
102 return iface->form_field_choice_get_n_items (document_forms, field);
106 ev_document_forms_form_field_choice_is_item_selected (EvDocumentForms *document_forms,
110 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
112 return iface->form_field_choice_is_item_selected (document_forms, field, index);
116 ev_document_forms_form_field_choice_select_item (EvDocumentForms *document_forms,
120 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
122 iface->form_field_choice_select_item (document_forms, field, index);
126 ev_document_forms_form_field_choice_toggle_item (EvDocumentForms *document_forms,
130 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
132 iface->form_field_choice_toggle_item (document_forms, field, index);
136 ev_document_forms_form_field_choice_unselect_all (EvDocumentForms *document_forms,
139 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
141 iface->form_field_choice_unselect_all (document_forms, field);
145 ev_document_forms_form_field_choice_set_text (EvDocumentForms *document_forms,
149 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
151 iface->form_field_choice_set_text (document_forms, field, text);
155 ev_document_forms_form_field_choice_get_text (EvDocumentForms *document_forms,
158 EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
160 return iface->form_field_choice_get_text (document_forms, field);