]> www.fi.muni.cz Git - evince.git/blob - libdocument/ev-document-forms.c
Update FSF address everywhere.
[evince.git] / libdocument / ev-document-forms.c
1 /* ev-document-forms.c
2  *  this file is part of evince, a gnome document viewer
3  * 
4  * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
5  *
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.
10  *
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.
15  *
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.
19  */
20
21 #include <config.h>
22 #include "ev-document-forms.h"
23
24 EV_DEFINE_INTERFACE (EvDocumentForms, ev_document_forms, 0)
25
26 static void
27 ev_document_forms_class_init (EvDocumentFormsIface *klass)
28 {
29 }
30
31 GList *
32 ev_document_forms_get_form_fields (EvDocumentForms *document_forms,
33                                    EvPage          *page)
34 {
35         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
36
37         return iface->get_form_fields (document_forms, page);
38 }
39
40 gchar *
41 ev_document_forms_form_field_text_get_text (EvDocumentForms *document_forms, 
42                                             EvFormField     *field)
43 {
44         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
45
46         return iface->form_field_text_get_text (document_forms, field);
47 }
48
49 void
50 ev_document_forms_form_field_text_set_text (EvDocumentForms *document_forms, 
51                                             EvFormField     *field, 
52                                             const gchar     *text)
53 {
54         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
55
56         iface->form_field_text_set_text (document_forms, field, text);
57 }
58
59 gboolean
60 ev_document_forms_form_field_button_get_state (EvDocumentForms   *document_forms,
61                                                EvFormField       *field)
62 {
63         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
64
65         return iface->form_field_button_get_state (document_forms, field);
66 }
67
68 void
69 ev_document_forms_form_field_button_set_state (EvDocumentForms   *document_forms, 
70                                                EvFormField       *field, 
71                                                gboolean           state)
72 {
73         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
74
75         iface->form_field_button_set_state (document_forms, field, state);
76 }
77
78 gchar *
79 ev_document_forms_form_field_choice_get_item (EvDocumentForms   *document_forms, 
80                                               EvFormField       *field, 
81                                               gint               index)
82 {
83         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
84
85         return iface->form_field_choice_get_item (document_forms, field, index);
86 }
87
88 gint
89 ev_document_forms_form_field_choice_get_n_items (EvDocumentForms   *document_forms, 
90                                                  EvFormField       *field)
91 {
92         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
93
94         return iface->form_field_choice_get_n_items (document_forms, field);
95 }
96
97 gboolean
98 ev_document_forms_form_field_choice_is_item_selected (EvDocumentForms   *document_forms, 
99                                                       EvFormField       *field, 
100                                                       gint               index)
101 {
102         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
103
104         return iface->form_field_choice_is_item_selected (document_forms, field, index);
105 }
106
107 void
108 ev_document_forms_form_field_choice_select_item (EvDocumentForms   *document_forms, 
109                                                  EvFormField       *field, 
110                                                  gint               index)
111 {
112         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
113
114         iface->form_field_choice_select_item (document_forms, field, index);
115 }
116
117 void
118 ev_document_forms_form_field_choice_toggle_item (EvDocumentForms   *document_forms, 
119                                                  EvFormField       *field, 
120                                                  gint               index)
121 {
122         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
123
124         iface->form_field_choice_toggle_item (document_forms, field, index);
125 }
126
127 void
128 ev_document_forms_form_field_choice_unselect_all (EvDocumentForms   *document_forms, 
129                                                   EvFormField       *field)
130 {
131         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
132
133         iface->form_field_choice_unselect_all (document_forms, field);
134 }
135
136 void
137 ev_document_forms_form_field_choice_set_text (EvDocumentForms   *document_forms,
138                                               EvFormField       *field,
139                                               const gchar       *text)
140 {
141         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
142
143         iface->form_field_choice_set_text (document_forms, field, text);
144 }
145
146 gchar *
147 ev_document_forms_form_field_choice_get_text (EvDocumentForms   *document_forms,
148                                               EvFormField       *field)
149 {
150         EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms);
151
152         return iface->form_field_choice_get_text (document_forms, field);
153 }