Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
ev-form-field.h
Go to the documentation of this file.
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
2
/* this file is part of evince, a gnome document viewer
3
*
4
* Copyright (C) 2006 Julien Rebetez
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
#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
22
#error "Only <evince-document.h> can be included directly."
23
#endif
24
25
#ifndef EV_FORM_FIELD_H
26
#define EV_FORM_FIELD_H
27
28
#include <glib-object.h>
29
30
#include "
ev-document.h
"
31
#include "
ev-link.h
"
32
33
G_BEGIN_DECLS
34
35
#define EV_TYPE_FORM_FIELD (ev_form_field_get_type())
36
#define EV_FORM_FIELD(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD, EvFormField))
37
#define EV_FORM_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD, EvFormFieldClass))
38
#define EV_IS_FORM_FIELD(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD))
39
#define EV_IS_FORM_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD))
40
#define EV_FORM_FIELD_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD, EvFormFieldClass))
41
42
#define EV_TYPE_FORM_FIELD_TEXT (ev_form_field_text_get_type())
43
#define EV_FORM_FIELD_TEXT(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD_TEXT, EvFormFieldText))
44
#define EV_FORM_FIELD_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD_TEXT, EvFormFieldTextClass))
45
#define EV_IS_FORM_FIELD_TEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD_TEXT))
46
#define EV_IS_FORM_FIELD_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD_TEXT))
47
#define EV_FORM_FIELD_TEXT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD_TEXT, EvFormFieldTextClass))
48
49
#define EV_TYPE_FORM_FIELD_BUTTON (ev_form_field_button_get_type())
50
#define EV_FORM_FIELD_BUTTON(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD_BUTTON, EvFormFieldButton))
51
#define EV_FORM_FIELD_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD_BUTTON, EvFormFieldButtonClass))
52
#define EV_IS_FORM_FIELD_BUTTON(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD_BUTTON))
53
#define EV_IS_FORM_FIELD_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD_BUTTON))
54
#define EV_FORM_FIELD_BUTTON_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD_BUTTON, EvFormFieldButtonClass))
55
56
#define EV_TYPE_FORM_FIELD_CHOICE (ev_form_field_choice_get_type())
57
#define EV_FORM_FIELD_CHOICE(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD_CHOICE, EvFormFieldChoice))
58
#define EV_FORM_FIELD_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD_CHOICE, EvFormFieldChoiceClass))
59
#define EV_IS_FORM_FIELD_CHOICE(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD_CHOICE))
60
#define EV_IS_FORM_FIELD_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD_CHOICE))
61
#define EV_FORM_FIELD_CHOICE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD_CHOICE, EvFormFieldChoiceClass))
62
63
#define EV_TYPE_FORM_FIELD_SIGNATURE (ev_form_field_signature_get_type())
64
#define EV_FORM_FIELD_SIGNATURE(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD_SIGNATURE, EvFormFieldSignature))
65
#define EV_FORM_FIELD_SIGNATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD_SIGNATURE, EvFormFieldSignatureClass))
66
#define EV_IS_FORM_FIELD_SIGNATURE(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD_SIGNATURE))
67
#define EV_IS_FORM_FIELD_SIGNATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD_SIGNATURE))
68
#define EV_FORM_FIELD_SIGNATURE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD_SIGNATURE, EvFormFieldSignatureClass))
69
70
typedef
struct
_EvFormField
EvFormField
;
71
typedef
struct
_EvFormFieldClass
EvFormFieldClass
;
72
73
typedef
struct
_EvFormFieldText
EvFormFieldText
;
74
typedef
struct
_EvFormFieldTextClass
EvFormFieldTextClass
;
75
76
typedef
struct
_EvFormFieldButton
EvFormFieldButton
;
77
typedef
struct
_EvFormFieldButtonClass
EvFormFieldButtonClass
;
78
79
typedef
struct
_EvFormFieldChoice
EvFormFieldChoice
;
80
typedef
struct
_EvFormFieldChoiceClass
EvFormFieldChoiceClass
;
81
82
typedef
struct
_EvFormFieldSignature
EvFormFieldSignature
;
83
typedef
struct
_EvFormFieldSignatureClass
EvFormFieldSignatureClass
;
84
85
typedef
enum
86
{
87
EV_FORM_FIELD_TEXT_NORMAL
,
88
EV_FORM_FIELD_TEXT_MULTILINE
,
89
EV_FORM_FIELD_TEXT_FILE_SELECT
90
}
EvFormFieldTextType
;
91
92
typedef
enum
93
{
94
EV_FORM_FIELD_BUTTON_PUSH
,
95
EV_FORM_FIELD_BUTTON_CHECK
,
96
EV_FORM_FIELD_BUTTON_RADIO
97
}
EvFormFieldButtonType
;
98
99
typedef
enum
100
{
101
EV_FORM_FIELD_CHOICE_COMBO
,
102
EV_FORM_FIELD_CHOICE_LIST
103
}
EvFormFieldChoiceType
;
104
105
struct
_EvFormField
106
{
107
GObject
parent
;
108
109
gint
id
;
110
gboolean
is_read_only
;
111
gdouble
font_size
;
112
EvLink
*
activation_link
;
113
114
EvPage
*
page
;
115
gboolean
changed
;
116
};
117
118
struct
_EvFormFieldClass
119
{
120
GObjectClass
parent_class
;
121
};
122
123
struct
_EvFormFieldText
124
{
125
EvFormField
parent
;
126
127
EvFormFieldTextType
type
;
128
129
gboolean
do_spell_check
: 1;
130
gboolean
do_scroll
: 1;
131
gboolean
comb
: 1;
132
gboolean
is_rich_text
: 1;
133
gboolean
is_password
;
134
135
gint
max_len
;
136
gchar *
text
;
137
};
138
139
struct
_EvFormFieldTextClass
140
{
141
EvFormFieldClass
parent_class
;
142
};
143
144
struct
_EvFormFieldButton
145
{
146
EvFormField
parent
;
147
148
EvFormFieldButtonType
type
;
149
150
gboolean
state
;
151
};
152
153
struct
_EvFormFieldButtonClass
154
{
155
EvFormFieldClass
parent_class
;
156
};
157
158
struct
_EvFormFieldChoice
159
{
160
EvFormField
parent
;
161
162
EvFormFieldChoiceType
type
;
163
164
gboolean
multi_select
: 1;
165
gboolean
is_editable
: 1;
166
gboolean
do_spell_check
: 1;
167
gboolean
commit_on_sel_change
: 1;
168
169
GList *
selected_items
;
170
gchar *
text
;
171
};
172
173
struct
_EvFormFieldChoiceClass
174
{
175
EvFormFieldClass
parent_class
;
176
};
177
178
struct
_EvFormFieldSignature
179
{
180
EvFormField
parent
;
181
182
/* TODO */
183
};
184
185
struct
_EvFormFieldSignatureClass
186
{
187
EvFormFieldClass
parent_class
;
188
};
189
190
/* EvFormField base class */
191
GType
ev_form_field_get_type
(
void
) G_GNUC_CONST;
192
193
/* EvFormFieldText */
194
GType
ev_form_field_text_get_type
(
void
) G_GNUC_CONST;
195
EvFormField
*
ev_form_field_text_new
(gint
id
,
196
EvFormFieldTextType
type);
197
198
/* EvFormFieldButton */
199
GType
ev_form_field_button_get_type
(
void
) G_GNUC_CONST;
200
EvFormField
*
ev_form_field_button_new
(gint
id
,
201
EvFormFieldButtonType
type);
202
203
/* EvFormFieldChoice */
204
GType
ev_form_field_choice_get_type
(
void
) G_GNUC_CONST;
205
EvFormField
*
ev_form_field_choice_new
(gint
id
,
206
EvFormFieldChoiceType
type);
207
208
/* EvFormFieldSignature */
209
GType
ev_form_field_signature_get_type
(
void
) G_GNUC_CONST;
210
EvFormField
*
ev_form_field_signature_new
(gint
id
);
211
212
213
G_END_DECLS
214
215
#endif
/* !EV_FORM_FIELD_H */
216
evince-master
libdocument
ev-form-field.h
Generated on Thu Jul 13 2017 13:41:45 for Evince by
1.8.4