From 4912987303aefef0d02a45726b75e5fdae043982 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 25 Jan 2009 15:08:57 +0000 Subject: Renamed from evince-backend.pc.in. Renamed library to libevdocument.la. * configure.ac: * evince-document.pc.in: Renamed from evince-backend.pc.in. * libdocument/Makefile.am: Renamed library to libevdocument.la. * libview/Makefile.am: * shell/Makefile.am: * backend/*/Makefile.am: Adapt to changed library name. * libdocument/Makefile.am: * libview/Makefile.am: Change the installed headers path to match the directory names in SVN. * evince-document.h: * evince-view.h: Add single headers. Bug #568227. * libdocument/*.h: * libview/*.h: Add single headers guards. * libview/Makefile.am: * libdocument/Makefile.am: * backend/*/Makefile.am: * help/reference/Makefile.am: Define EVINCE_COMPILATION, so we can still include individual headers. * properties/Makefile.am: * properties/ev-properties-main.c: * properties/ev-properties-view.h: * thumbnailer/Makefile.am: * thumbnailer/evince-thumbnailer.c: Include only evince-document.h. * libdocument/Makefile.am: * libview/Makefile.am: Generate type builtins from all installed headers. * libdocument/ev-link-action.[ch]: * libdocument/ev-link-dest.[ch]: * libdocument/ev-transition-effect.[ch]: * libview/ev-view.[ch]: Remove handcoded type builtins. * libdocument/Makefile.am: * evince-document.h: Add ev-document-factory.h to the public headers. svn path=/trunk/; revision=3381 --- (limited to 'libdocument') diff --git a/libdocument/Makefile.am b/libdocument/Makefile.am index a44ed64..0580c62 100644 --- a/libdocument/Makefile.am +++ b/libdocument/Makefile.am @@ -1,30 +1,14 @@ -INCLUDES= \ - -DG_LOG_DOMAIN=\"EvDocument\" \ - -DEVINCE_UIDIR=\"$(pkgdatadir)\" \ - -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ - -DEV_BACKENDSDIR=\"$(libdir)/evince/backends\" \ - $(LIBDOCUMENT_CFLAGS) \ - $(WARN_CFLAGS) \ - $(DISABLE_DEPRECATED) - -lib_LTLIBRARIES = libevbackend.la - -libevbackend_la_LDFLAGS = \ - -version-info $(EV_BACKEND_LT_VERSION_INFO) \ - -export-symbols-regex "^ev_*" \ - $(AM_LDFLAGS) - -libevbackend_la_LIBADD = $(LIBDOCUMENT_LIBS) +lib_LTLIBRARIES = libevdocument.la NOINST_H_FILES = \ ev-debug.h \ - ev-document-factory.h \ ev-module.h INST_H_FILES = \ ev-async-renderer.h \ ev-attachment.h \ ev-backends-manager.h \ + ev-document-factory.h \ ev-document-find.h \ ev-document-fonts.h \ ev-document-forms.h \ @@ -52,10 +36,10 @@ INST_H_FILES = \ ev-transition-effect.h \ ev-version.h -headerdir = $(includedir)/evince/$(EV_API_VERSION)/ev-backend +headerdir = $(includedir)/evince/$(EV_API_VERSION)/libdocument header_DATA = $(INST_H_FILES) -libevbackend_la_SOURCES= \ +libevdocument_la_SOURCES= \ ev-async-renderer.c \ ev-attachment.c \ ev-backends-manager.c \ @@ -89,6 +73,27 @@ libevbackend_la_SOURCES= \ $(NOINST_H_FILES) \ $(INST_H_FILES) +libevdocument_la_CPPFLAGS = \ + -DG_LOG_DOMAIN=\"EvDocument\" \ + -DEVINCE_UIDIR=\"$(pkgdatadir)\" \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DEV_BACKENDSDIR=\"$(libdir)/evince/backends\" \ + -DEVINCE_COMPILATION \ + $(AM_CPPFLAGS) + +libevdocument_la_CFLAGS = \ + $(LIBDOCUMENT_CFLAGS) \ + $(WARN_CFLAGS) \ + $(DISABLE_DEPRECATED) \ + $(AM_CFLAGS) + +libevdocument_la_LDFLAGS = \ + -version-info $(EV_DOCUMENT_LT_VERSION_INFO) \ + -export-symbols-regex "^ev_*" \ + $(AM_LDFLAGS) + +libevdocument_la_LIBADD = $(LIBDOCUMENT_LIBS) + BUILT_SOURCES = \ ev-document-type-builtins.c \ ev-document-type-builtins.h @@ -98,13 +103,13 @@ CLEANFILES = $(BUILT_SOURCES) stamp-ev-document-type-builtins.h ev-document-type-builtins.h: stamp-ev-document-type-builtins.h @true -stamp-ev-document-type-builtins.h: ev-document-type-builtins.h.template ev-document-info.h +stamp-ev-document-type-builtins.h: ev-document-type-builtins.h.template $(INST_H_FILES) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \ && (cmp -s xgen-etbh ev-document-type-builtins.h || cp xgen-etbh ev-document-type-builtins.h ) \ && rm -f xgen-etbh \ && echo timestamp > $(@F) -ev-document-type-builtins.c: ev-document-type-builtins.c.template ev-document-info.h +ev-document-type-builtins.c: ev-document-type-builtins.c.template $(INST_H_FILES) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \ && (cmp -s xgen-etbc ev-document-type-builtins.c || cp xgen-etbc ev-document-type-builtins.c ) \ && rm -f xgen-etbc @@ -112,4 +117,3 @@ ev-document-type-builtins.c: ev-document-type-builtins.c.template ev-document-in EXTRA_DIST = \ ev-document-type-builtins.c.template \ ev-document-type-builtins.h.template - diff --git a/libdocument/ev-async-renderer.h b/libdocument/ev-async-renderer.h index e516a05..1615187 100644 --- a/libdocument/ev-async-renderer.h +++ b/libdocument/ev-async-renderer.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_ASYNC_RENDERER_H #define EV_ASYNC_RENDERER_H diff --git a/libdocument/ev-attachment.h b/libdocument/ev-attachment.h index f163c0a..ccc41ba 100644 --- a/libdocument/ev-attachment.h +++ b/libdocument/ev-attachment.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_ATTACHMENT_H__ #define __EV_ATTACHMENT_H__ diff --git a/libdocument/ev-backends-manager.h b/libdocument/ev-backends-manager.h index a78d6f8..4fb1656 100644 --- a/libdocument/ev-backends-manager.h +++ b/libdocument/ev-backends-manager.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_BACKENDS_MANAGER #define EV_BACKENDS_MANAGER diff --git a/libdocument/ev-debug.h b/libdocument/ev-debug.h index c8b8a34..7acb41f 100644 --- a/libdocument/ev-debug.h +++ b/libdocument/ev-debug.h @@ -32,6 +32,10 @@ /* Modified by Evince Team */ +#if !defined (EVINCE_COMPILATION) +#error "This is a private header." +#endif + #ifndef __EV_DEBUG_H__ #define __EV_DEBUG_H__ diff --git a/libdocument/ev-document-factory.h b/libdocument/ev-document-factory.h index 82e47a2..6b55181 100644 --- a/libdocument/ev-document-factory.h +++ b/libdocument/ev-document-factory.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_FACTORY_H #define EV_DOCUMENT_FACTORY_H diff --git a/libdocument/ev-document-find.h b/libdocument/ev-document-find.h index 40db017..835ca24 100644 --- a/libdocument/ev-document-find.h +++ b/libdocument/ev-document-find.h @@ -19,6 +19,10 @@ * $Id$ */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_FIND_H #define EV_DOCUMENT_FIND_H diff --git a/libdocument/ev-document-fonts.h b/libdocument/ev-document-fonts.h index c9f58f5..71433a5 100644 --- a/libdocument/ev-document-fonts.h +++ b/libdocument/ev-document-fonts.h @@ -21,6 +21,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_FONTS_H #define EV_DOCUMENT_FONTS_H diff --git a/libdocument/ev-document-forms.h b/libdocument/ev-document-forms.h index 1337a5e..f72b08b 100644 --- a/libdocument/ev-document-forms.h +++ b/libdocument/ev-document-forms.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_FORMS_H #define EV_DOCUMENT_FORMS_H diff --git a/libdocument/ev-document-images.h b/libdocument/ev-document-images.h index d8699b9..d9d7696 100644 --- a/libdocument/ev-document-images.h +++ b/libdocument/ev-document-images.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_IMAGES_H #define EV_DOCUMENT_IMAGES_H diff --git a/libdocument/ev-document-info.h b/libdocument/ev-document-info.h index 51d5f7d..a75f681 100644 --- a/libdocument/ev-document-info.h +++ b/libdocument/ev-document-info.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_INFO_H #define EV_DOCUMENT_INFO_H diff --git a/libdocument/ev-document-layers.h b/libdocument/ev-document-layers.h index 506808b..b04c805 100644 --- a/libdocument/ev-document-layers.h +++ b/libdocument/ev-document-layers.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_LAYERS_H #define EV_DOCUMENT_LAYERS_H diff --git a/libdocument/ev-document-links.h b/libdocument/ev-document-links.h index f6a6a48..b8ea601 100644 --- a/libdocument/ev-document-links.h +++ b/libdocument/ev-document-links.h @@ -21,6 +21,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_LINKS_H #define EV_DOCUMENT_LINKS_H diff --git a/libdocument/ev-document-misc.h b/libdocument/ev-document-misc.h index 4c31dc7..5a2ea03 100644 --- a/libdocument/ev-document-misc.h +++ b/libdocument/ev-document-misc.h @@ -19,6 +19,10 @@ * $Id$ */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_MISC_H #define EV_DOCUMENT_MISC_H diff --git a/libdocument/ev-document-security.h b/libdocument/ev-document-security.h index 154a3b1..298d9b7 100644 --- a/libdocument/ev-document-security.h +++ b/libdocument/ev-document-security.h @@ -21,6 +21,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_SECURITY_H #define EV_DOCUMENT_SECURITY_H diff --git a/libdocument/ev-document-thumbnails.h b/libdocument/ev-document-thumbnails.h index 648c0eb..cdcb472 100644 --- a/libdocument/ev-document-thumbnails.h +++ b/libdocument/ev-document-thumbnails.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_THUMBNAILS_H #define EV_DOCUMENT_THUMBNAILS_H diff --git a/libdocument/ev-document-transition.h b/libdocument/ev-document-transition.h index 9171acf..ad2b507 100644 --- a/libdocument/ev-document-transition.h +++ b/libdocument/ev-document-transition.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_TRANSITION_H #define EV_DOCUMENT_TRANSITION_H diff --git a/libdocument/ev-document-type-builtins.c.template b/libdocument/ev-document-type-builtins.c.template index 1996838..600a20f 100644 --- a/libdocument/ev-document-type-builtins.c.template +++ b/libdocument/ev-document-type-builtins.c.template @@ -1,4 +1,6 @@ /*** BEGIN file-header ***/ +#include + #include "ev-document-type-builtins.h" /*** END file-header ***/ diff --git a/libdocument/ev-document-type-builtins.h.template b/libdocument/ev-document-type-builtins.h.template index 91e3e61..4b70c87 100644 --- a/libdocument/ev-document-type-builtins.h.template +++ b/libdocument/ev-document-type-builtins.h.template @@ -1,5 +1,9 @@ /*** BEGIN file-header ***/ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_TYPE_BUILTINS_H #define EV_DOCUMENT_TYPE_BUILTINS_H diff --git a/libdocument/ev-document.h b/libdocument/ev-document.h index 7cb6d84..cfcd5ba 100644 --- a/libdocument/ev-document.h +++ b/libdocument/ev-document.h @@ -19,6 +19,10 @@ * $Id$ */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_DOCUMENT_H #define EV_DOCUMENT_H diff --git a/libdocument/ev-file-exporter.h b/libdocument/ev-file-exporter.h index 6302cd2..f623d5f 100644 --- a/libdocument/ev-file-exporter.h +++ b/libdocument/ev-file-exporter.h @@ -20,6 +20,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_FILE_EXPORTER_H #define EV_FILE_EXPORTER_H diff --git a/libdocument/ev-file-helpers.h b/libdocument/ev-file-helpers.h index 833eade..2c27b38 100644 --- a/libdocument/ev-file-helpers.h +++ b/libdocument/ev-file-helpers.h @@ -18,6 +18,10 @@ * $Id$ */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_FILE_HELPERS_H #define EV_FILE_HELPERS_H diff --git a/libdocument/ev-form-field.h b/libdocument/ev-form-field.h index 027bee6..92dd9fd 100644 --- a/libdocument/ev-form-field.h +++ b/libdocument/ev-form-field.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_FORM_FIELD_H #define EV_FORM_FIELD_H diff --git a/libdocument/ev-image.h b/libdocument/ev-image.h index e603010..29c1deb 100644 --- a/libdocument/ev-image.h +++ b/libdocument/ev-image.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_IMAGE_H__ #define __EV_IMAGE_H__ diff --git a/libdocument/ev-layer.h b/libdocument/ev-layer.h index 86fc403..5df3328 100644 --- a/libdocument/ev-layer.h +++ b/libdocument/ev-layer.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_LAYER_H__ #define __EV_LAYER_H__ diff --git a/libdocument/ev-link-action.c b/libdocument/ev-link-action.c index 52eb9f4..982ab55 100644 --- a/libdocument/ev-link-action.c +++ b/libdocument/ev-link-action.c @@ -20,6 +20,7 @@ #include #include "ev-link-action.h" +#include "ev-document-type-builtins.h" enum { PROP_0, @@ -55,27 +56,6 @@ G_DEFINE_TYPE (EvLinkAction, ev_link_action, G_TYPE_OBJECT) #define EV_LINK_ACTION_GET_PRIVATE(object) \ (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK_ACTION, EvLinkActionPrivate)) -GType -ev_link_action_type_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_LINK_ACTION_TYPE_GOTO_DEST, "EV_LINK_ACTION_TYPE_GOTO_DEST", "goto-dest" }, - { EV_LINK_ACTION_TYPE_GOTO_REMOTE, "EV_LINK_ACTION_TYPE_GOTO_REMOTE", "goto-remote" }, - { EV_LINK_ACTION_TYPE_LAUNCH, "EV_LINK_ACTION_TYPE_LAUNCH", "launch" }, - { EV_LINK_ACTION_TYPE_EXTERNAL_URI, "EV_LINK_ACTION_TYPE_EXTERNAL_URI", "external-uri"}, - { EV_LINK_ACTION_TYPE_NAMED, "EV_LINK_ACTION_TYPE_NAMED", "named"}, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvLinkActionType", values); - } - - return type; -} - EvLinkActionType ev_link_action_get_action_type (EvLinkAction *self) { diff --git a/libdocument/ev-link-action.h b/libdocument/ev-link-action.h index 32211fe..1965679 100644 --- a/libdocument/ev-link-action.h +++ b/libdocument/ev-link-action.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_LINK_ACTION_H #define EV_LINK_ACTION_H @@ -37,8 +41,6 @@ typedef struct _EvLinkActionPrivate EvLinkActionPrivate; #define EV_IS_LINK_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_LINK_ACTION)) #define EV_LINK_ACTION_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_LINK_ACTION, EvLinkActionClass)) -#define EV_TYPE_LINK_ACTION_TYPE (ev_link_action_type_get_type ()) - typedef enum { EV_LINK_ACTION_TYPE_GOTO_DEST, EV_LINK_ACTION_TYPE_GOTO_REMOTE, @@ -49,7 +51,6 @@ typedef enum { * actions */ } EvLinkActionType; -GType ev_link_action_type_get_type (void) G_GNUC_CONST; GType ev_link_action_get_type (void) G_GNUC_CONST; EvLinkActionType ev_link_action_get_action_type (EvLinkAction *self); diff --git a/libdocument/ev-link-dest.c b/libdocument/ev-link-dest.c index b712f9b..a1a6b26 100644 --- a/libdocument/ev-link-dest.c +++ b/libdocument/ev-link-dest.c @@ -19,7 +19,9 @@ */ #include + #include "ev-link-dest.h" +#include "ev-document-type-builtins.h" enum { PROP_0, @@ -69,31 +71,6 @@ G_DEFINE_TYPE (EvLinkDest, ev_link_dest, G_TYPE_OBJECT) #define EV_LINK_DEST_GET_PRIVATE(object) \ (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK_DEST, EvLinkDestPrivate)) -GType -ev_link_dest_type_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_LINK_DEST_TYPE_PAGE, "EV_LINK_DEST_TYPE_PAGE", "page" }, - { EV_LINK_DEST_TYPE_XYZ, "EV_LINK_DEST_TYPE_XYZ", "xyz" }, - { EV_LINK_DEST_TYPE_FIT, "EV_LINK_DEST_TYPE_FIT", "fit" }, - { EV_LINK_DEST_TYPE_FITH, "EV_LINK_DEST_TYPE_FITH", "fith" }, - { EV_LINK_DEST_TYPE_FITV, "EV_LINK_DEST_TYPE_FITV", "fitv" }, - { EV_LINK_DEST_TYPE_FITR, "EV_LINK_DEST_TYPE_FITR", "fitr" }, - { EV_LINK_DEST_TYPE_NAMED, "EV_LINK_DEST_TYPE_NAMED", "named" }, - { EV_LINK_DEST_TYPE_PAGE_LABEL, "EV_LINK_DEST_TYPE_PAGE_LABEL", "page_label" }, - { EV_LINK_DEST_TYPE_UNKNOWN, "EV_LINK_DEST_TYPE_UNKNOWN", "unknown" }, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvLinkDestType", values); - } - - return type; -} - EvLinkDestType ev_link_dest_get_dest_type (EvLinkDest *self) { diff --git a/libdocument/ev-link-dest.h b/libdocument/ev-link-dest.h index a7ee059..7cfd7bb 100644 --- a/libdocument/ev-link-dest.h +++ b/libdocument/ev-link-dest.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_LINK_DEST_H #define EV_LINK_DEST_H @@ -36,8 +40,6 @@ typedef struct _EvLinkDestPrivate EvLinkDestPrivate; #define EV_IS_LINK_DEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_LINK_DEST)) #define EV_LINK_DEST_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_LINK_DEST, EvLinkDestClass)) -#define EV_TYPE_LINK_DEST_TYPE (ev_link_dest_type_get_type ()) - typedef enum { EV_LINK_DEST_TYPE_PAGE, EV_LINK_DEST_TYPE_XYZ, @@ -50,7 +52,6 @@ typedef enum { EV_LINK_DEST_TYPE_UNKNOWN } EvLinkDestType; -GType ev_link_dest_type_get_type (void) G_GNUC_CONST; GType ev_link_dest_get_type (void) G_GNUC_CONST; EvLinkDestType ev_link_dest_get_dest_type (EvLinkDest *self); diff --git a/libdocument/ev-link.h b/libdocument/ev-link.h index 136047c..cb3733a 100644 --- a/libdocument/ev-link.h +++ b/libdocument/ev-link.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_LINK_H #define EV_LINK_H diff --git a/libdocument/ev-module.h b/libdocument/ev-module.h index 09d46fa..d983c1c 100644 --- a/libdocument/ev-module.h +++ b/libdocument/ev-module.h @@ -38,6 +38,10 @@ /* Modified by Evince Team */ +#if !defined (EVINCE_COMPILATION) +#error "This is a private header." +#endif + #ifndef EV_MODULE_H #define EV_MODULE_H diff --git a/libdocument/ev-page.h b/libdocument/ev-page.h index 801b3e1..e169a84 100644 --- a/libdocument/ev-page.h +++ b/libdocument/ev-page.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_PAGE_H #define EV_PAGE_H diff --git a/libdocument/ev-render-context.h b/libdocument/ev-render-context.h index eb324e8..96664bb 100644 --- a/libdocument/ev-render-context.h +++ b/libdocument/ev-render-context.h @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_RENDER_CONTEXT_H #define EV_RENDER_CONTEXT_H diff --git a/libdocument/ev-selection.h b/libdocument/ev-selection.h index 59f731c..7a1252a 100644 --- a/libdocument/ev-selection.h +++ b/libdocument/ev-selection.h @@ -18,6 +18,10 @@ * */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef EV_SELECTION_H #define EV_SELECTION_H diff --git a/libdocument/ev-transition-effect.c b/libdocument/ev-transition-effect.c index 1986b77..a80fd6a 100644 --- a/libdocument/ev-transition-effect.c +++ b/libdocument/ev-transition-effect.c @@ -18,8 +18,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#include + #include "ev-transition-effect.h" +#include "ev-document-type-builtins.h" + #define EV_TRANSITION_EFFECT_GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EV_TYPE_TRANSITION_EFFECT, EvTransitionEffectPrivate)) typedef struct EvTransitionEffectPrivate EvTransitionEffectPrivate; @@ -49,71 +53,6 @@ enum { G_DEFINE_TYPE (EvTransitionEffect, ev_transition_effect, G_TYPE_OBJECT) - -GType -ev_transition_effect_type_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_TRANSITION_EFFECT_REPLACE, "EV_TRANSITION_EFFECT_REPLACE", "replace" }, - { EV_TRANSITION_EFFECT_SPLIT, "EV_TRANSITION_EFFECT_SPLIT", "split" }, - { EV_TRANSITION_EFFECT_BLINDS, "EV_TRANSITION_EFFECT_BLINDS", "blinds" }, - { EV_TRANSITION_EFFECT_BOX, "EV_TRANSITION_EFFECT_BOX", "box" }, - { EV_TRANSITION_EFFECT_WIPE, "EV_TRANSITION_EFFECT_WIPE", "wipe" }, - { EV_TRANSITION_EFFECT_DISSOLVE, "EV_TRANSITION_EFFECT_DISSOLVE", "dissolve" }, - { EV_TRANSITION_EFFECT_GLITTER, "EV_TRANSITION_EFFECT_GLITTER", "glitter" }, - { EV_TRANSITION_EFFECT_FLY, "EV_TRANSITION_EFFECT_FLY", "fly" }, - { EV_TRANSITION_EFFECT_PUSH, "EV_TRANSITION_EFFECT_PUSH", "push" }, - { EV_TRANSITION_EFFECT_COVER, "EV_TRANSITION_EFFECT_COVER", "cover" }, - { EV_TRANSITION_EFFECT_UNCOVER, "EV_TRANSITION_EFFECT_UNCOVER", "uncover" }, - { EV_TRANSITION_EFFECT_FADE, "EV_TRANSITION_EFFECT_FADE", "fade" }, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvTransitionEffectType", values); - } - - return type; -} - -GType -ev_transition_effect_alignment_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_TRANSITION_ALIGNMENT_HORIZONTAL, "EV_TRANSITION_ALIGNMENT_HORIZONTAL", "horizontal" }, - { EV_TRANSITION_ALIGNMENT_VERTICAL, "EV_TRANSITION_ALIGNMENT_VERTICAL", "vertical" }, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvTransitionEffectAlignment", values); - } - - return type; -} - -GType -ev_transition_effect_direction_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GEnumValue values[] = { - { EV_TRANSITION_DIRECTION_INWARD, "EV_TRANSITION_DIRECTION_INWARD", "inward" }, - { EV_TRANSITION_DIRECTION_OUTWARD, "EV_TRANSITION_DIRECTION_OUTWARD", "outward" }, - { 0, NULL, NULL } - }; - - type = g_enum_register_static ("EvTransitionEffectDirection", values); - } - - return type; -} - static void ev_transition_effect_set_property (GObject *object, guint prop_id, diff --git a/libdocument/ev-transition-effect.h b/libdocument/ev-transition-effect.h index 0d778a9..f1b868f 100644 --- a/libdocument/ev-transition-effect.h +++ b/libdocument/ev-transition-effect.h @@ -18,6 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ +#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __EV_TRANSITION_EFFECT_H__ #define __EV_TRANSITION_EFFECT_H__ @@ -26,9 +30,6 @@ G_BEGIN_DECLS #define EV_TYPE_TRANSITION_EFFECT (ev_transition_effect_get_type ()) -#define EV_TYPE_TRANSITION_EFFECT_TYPE (ev_transition_effect_type_get_type ()) -#define EV_TYPE_TRANSITION_EFFECT_ALIGNMENT (ev_transition_effect_alignment_get_type ()) -#define EV_TYPE_TRANSITION_EFFECT_DIRECTION (ev_transition_effect_direction_get_type ()) #define EV_TRANSITION_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_TRANSITION_EFFECT, EvTransitionEffect)) #define EV_TRANSITION_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_TRANSITION_EFFECT, EvTransitionEffectClass)) #define EV_IS_TRANSITION_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_TRANSITION_EFFECT)) @@ -76,9 +77,6 @@ struct EvTransitionEffectClass GType ev_transition_effect_get_type (void) G_GNUC_CONST; -GType ev_transition_effect_type_get_type (void) G_GNUC_CONST; -GType ev_transition_effect_alignment_get_type (void) G_GNUC_CONST; -GType ev_transition_effect_direction_get_type (void) G_GNUC_CONST; EvTransitionEffect *ev_transition_effect_new (EvTransitionEffectType type, const gchar *first_property_name, -- cgit v0.9.1