X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=libdocument%2Fev-document-forms.c;h=c6d558ba33587432082048de87bb2398963ec890;hb=aeadd8e191190c43e94999fef077ebea69e966c9;hp=cdefb46730d686d1c0f8c6e11d551102844a45b9;hpb=6426ce3672bf190ab39d9c49c841232c127d174f;p=evince.git diff --git a/libdocument/ev-document-forms.c b/libdocument/ev-document-forms.c index cdefb467..c6d558ba 100644 --- a/libdocument/ev-document-forms.c +++ b/libdocument/ev-document-forms.c @@ -15,36 +15,24 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include #include "ev-document-forms.h" -GType -ev_document_forms_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - const GTypeInfo our_info = { - sizeof (EvDocumentFormsIface), - NULL, - NULL, - }; +G_DEFINE_INTERFACE (EvDocumentForms, ev_document_forms, 0) - type = g_type_register_static (G_TYPE_INTERFACE, - "EvDocumentForms", - &our_info, (GTypeFlags)0); - } - - return type; +static void +ev_document_forms_default_init (EvDocumentFormsInterface *klass) +{ } -GList * +EvMappingList * ev_document_forms_get_form_fields (EvDocumentForms *document_forms, - gint page) + EvPage *page) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); return iface->get_form_fields (document_forms, page); } @@ -53,7 +41,7 @@ gchar * ev_document_forms_form_field_text_get_text (EvDocumentForms *document_forms, EvFormField *field) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); return iface->form_field_text_get_text (document_forms, field); } @@ -63,7 +51,7 @@ ev_document_forms_form_field_text_set_text (EvDocumentForms *document_forms, EvFormField *field, const gchar *text) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); iface->form_field_text_set_text (document_forms, field, text); } @@ -72,7 +60,7 @@ gboolean ev_document_forms_form_field_button_get_state (EvDocumentForms *document_forms, EvFormField *field) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); return iface->form_field_button_get_state (document_forms, field); } @@ -82,7 +70,7 @@ ev_document_forms_form_field_button_set_state (EvDocumentForms *document_forms EvFormField *field, gboolean state) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); iface->form_field_button_set_state (document_forms, field, state); } @@ -92,7 +80,7 @@ ev_document_forms_form_field_choice_get_item (EvDocumentForms *document_forms, EvFormField *field, gint index) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); return iface->form_field_choice_get_item (document_forms, field, index); } @@ -101,7 +89,7 @@ gint ev_document_forms_form_field_choice_get_n_items (EvDocumentForms *document_forms, EvFormField *field) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); return iface->form_field_choice_get_n_items (document_forms, field); } @@ -111,7 +99,7 @@ ev_document_forms_form_field_choice_is_item_selected (EvDocumentForms *documen EvFormField *field, gint index) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); return iface->form_field_choice_is_item_selected (document_forms, field, index); } @@ -121,7 +109,7 @@ ev_document_forms_form_field_choice_select_item (EvDocumentForms *document_for EvFormField *field, gint index) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); iface->form_field_choice_select_item (document_forms, field, index); } @@ -131,7 +119,7 @@ ev_document_forms_form_field_choice_toggle_item (EvDocumentForms *document_for EvFormField *field, gint index) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); iface->form_field_choice_toggle_item (document_forms, field, index); } @@ -140,7 +128,7 @@ void ev_document_forms_form_field_choice_unselect_all (EvDocumentForms *document_forms, EvFormField *field) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); iface->form_field_choice_unselect_all (document_forms, field); } @@ -150,7 +138,7 @@ ev_document_forms_form_field_choice_set_text (EvDocumentForms *document_forms, EvFormField *field, const gchar *text) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); iface->form_field_choice_set_text (document_forms, field, text); } @@ -159,7 +147,7 @@ gchar * ev_document_forms_form_field_choice_get_text (EvDocumentForms *document_forms, EvFormField *field) { - EvDocumentFormsIface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); + EvDocumentFormsInterface *iface = EV_DOCUMENT_FORMS_GET_IFACE (document_forms); return iface->form_field_choice_get_text (document_forms, field); }