X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=libdocument%2Fev-document-forms.c;h=9e8fb0e3e78a4e2dc520878db74e9b0640723d4e;hb=1d0de30170119eade2a7305ffa8ec6d9a3e4af32;hp=db90bb886380b9600135a1d3e9dc0d9ab9123d55;hpb=1af6600934d1f723e5b492b8322e52a1144fb0af;p=evince.git diff --git a/libdocument/ev-document-forms.c b/libdocument/ev-document-forms.c index db90bb88..9e8fb0e3 100644 --- a/libdocument/ev-document-forms.c +++ b/libdocument/ev-document-forms.c @@ -15,37 +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 * 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); } @@ -54,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); } @@ -64,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); } @@ -73,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); } @@ -83,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); } @@ -93,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); } @@ -102,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); } @@ -112,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); } @@ -122,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); } @@ -132,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); } @@ -141,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); } @@ -151,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); } @@ -160,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); }