Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libview
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-01-18 15:59:21 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2009-01-18 15:59:21 (GMT)
commitf8f243a0620938f655f7fdf45d73f3a387436462 (patch)
treefa3c43ff2aa3a63bf6d20d038e52ae79cd44a862 /libview
parent451e3d74f9fb9b885428336e4125406b29c1ed4d (diff)
Make EvJobPriority a proper GType. Fixes bug #567788.
2009-01-18 Tomeu Vizoso <tomeu@sugarlabs.org> * libview/Makefile.am: * libview/ev-view-type-builtins.c.template: * libview/ev-view-type-builtins.h.template: Make EvJobPriority a proper GType. Fixes bug #567788. svn path=/trunk/; revision=3353
Diffstat (limited to 'libview')
-rw-r--r--libview/Makefile.am23
-rw-r--r--libview/ev-view-type-builtins.c.template42
-rw-r--r--libview/ev-view-type-builtins.h.template25
3 files changed, 88 insertions, 2 deletions
diff --git a/libview/Makefile.am b/libview/Makefile.am
index dfdb20e..e41b3a8 100644
--- a/libview/Makefile.am
+++ b/libview/Makefile.am
@@ -22,7 +22,8 @@ NOINST_H_FILES = \
INST_H_FILES = \
ev-jobs.h \
ev-page-cache.h \
- ev-view.h
+ ev-view.h \
+ ev-view-type-builtins.h
headerdir = $(prefix)/include/evince/@EV_API_VERSION@/ev-view
header_DATA = $(INST_H_FILES)
@@ -37,12 +38,15 @@ libevview_la_SOURCES = \
ev-view.c \
ev-view-accessible.c \
ev-view-marshal.c \
+ ev-view-type-builtins.c \
$(NOINST_H_FILES) \
$(INST_H_FILES)
BUILT_SOURCES = \
ev-view-marshal.h \
- ev-view-marshal.c
+ ev-view-marshal.c \
+ ev-view-type-builtins.c \
+ ev-view-type-builtins.h
CLEANFILES = $(BUILT_SOURCES)
@@ -54,3 +58,18 @@ ev-view-marshal.c: $(srcdir)/ev-view-marshal.list
$(GLIB_GENMARSHAL) --prefix=ev_view_marshal $(srcdir)/ev-view-marshal.list --body >> $@
EXTRA_DIST = ev-view-marshal.list
+
+ev-view-type-builtins.h: stamp-ev-view-type-builtins.h
+ @true
+
+stamp-ev-view-type-builtins.h: ev-view-type-builtins.h.template ev-job-scheduler.h
+ $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \
+ && (cmp -s xgen-etbh ev-view-type-builtins.h || cp xgen-etbh ev-view-type-builtins.h ) \
+ && rm -f xgen-etbh \
+ && echo timestamp > $(@F)
+
+ev-view-type-builtins.c: ev-view-type-builtins.c.template ev-job-scheduler.h
+ $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \
+ && (cmp -s xgen-etbc ev-view-type-builtins.c || cp xgen-etbc ev-view-type-builtins.c ) \
+ && rm -f xgen-etbc
+
diff --git a/libview/ev-view-type-builtins.c.template b/libview/ev-view-type-builtins.c.template
new file mode 100644
index 0000000..2365a44
--- /dev/null
+++ b/libview/ev-view-type-builtins.c.template
@@ -0,0 +1,42 @@
+/*** BEGIN file-header ***/
+#include "ev-view-type-builtins.h"
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@filename@" */
+#include "@filename@"
+/*** END file-production ***/
+
+
+/*** BEGIN value-header ***/
+GType
+@enum_name@_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id = \
+ g_@type@_register_static (/* g_intern_static_string */ ("@EnumName@"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+/*** END value-tail ***/
+
+/*** BEGIN file-tail ***/
+
+/*** END file-tail ***/
diff --git a/libview/ev-view-type-builtins.h.template b/libview/ev-view-type-builtins.h.template
new file mode 100644
index 0000000..a6ac309
--- /dev/null
+++ b/libview/ev-view-type-builtins.h.template
@@ -0,0 +1,25 @@
+/*** BEGIN file-header ***/
+
+#ifndef EV_VIEW_TYPE_BUILTINS_H
+#define EV_VIEW_TYPE_BUILTINS_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType @enum_name@_get_type (void) G_GNUC_CONST;
+#define EV_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
+/*** END value-header ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif /* !EV_VIEW_TYPE_BUILTINS_H */
+/*** END file-tail ***/