summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2010-08-19 09:30:47 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2010-09-04 15:57:50 +0100
commit642b465221413dd8f1ba5e4d081256f153fe23d0 (patch)
treebcf744560ff0ef8f3f0dc4855118991918fec056
parent6d2a201ba1e8f6b189b810fd21c23914a0009c8e (diff)
downloadtotem-642b465221413dd8f1ba5e4d081256f153fe23d0.tar.gz
Generate enum types for BaconVideoWidget
-rw-r--r--docs/reference/totem-sections.txt16
-rw-r--r--src/backend/Makefile.am24
2 files changed, 39 insertions, 1 deletions
diff --git a/docs/reference/totem-sections.txt b/docs/reference/totem-sections.txt
index 98ac6a200..ed5230d6b 100644
--- a/docs/reference/totem-sections.txt
+++ b/docs/reference/totem-sections.txt
@@ -248,6 +248,22 @@ bacon_video_widget_is_playing
bacon_video_widget_is_seekable
bacon_video_widget_step
<SUBSECTION Standard>
+BVW_TYPE_ASPECT_RATIO
+BVW_TYPE_AUDIO_OUT_TYPE
+BVW_TYPE_DVD_EVENT
+BVW_TYPE_ERROR
+BVW_TYPE_METADATA_TYPE
+BVW_TYPE_USE_TYPE
+BVW_TYPE_VIDEO_PROPERTY
+BVW_TYPE_VISUALS_QUALITY
+bvw_aspect_ratio_get_type
+bvw_audio_out_type_get_type
+bvw_dvd_event_get_type
+bvw_error_get_type
+bvw_metadata_type_get_type
+bvw_use_type_get_type
+bvw_video_property_get_type
+bvw_visuals_quality_get_type
bacon_video_widget_error_quark
bacon_video_widget_get_type
BVW_ERROR
diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am
index a01dc6e49..79099a956 100644
--- a/src/backend/Makefile.am
+++ b/src/backend/Makefile.am
@@ -6,7 +6,7 @@ bvw_test_SOURCES = bvw-test.c
bvw_test_CPPFLAGS = \
-DDATADIR=\"$(pkgdatadir)\" \
- -DLOGO_PATH=DATADIR\"\"G_DIR_SEPARATOR_S\"totem\"G_DIR_SEPARATOR_S\"totem_logo.png\"
+ -DLOGO_PATH=DATADIR\"\"G_DIR_SEPARATOR_S\"totem\"G_DIR_SEPARATOR_S\"totem_logo.png\" \
$(DISABLE_DEPRECATED) \
$(AM_CPPFLAGS)
@@ -28,8 +28,30 @@ baconvideowidget-marshal.h: baconvideowidget-marshal.list
baconvideowidget-marshal.c: baconvideowidget-marshal.h
( $(GLIB_GENMARSHAL) --prefix=baconvideowidget_marshal $(srcdir)/baconvideowidget-marshal.list --body --header > baconvideowidget-marshal.c )
+# Enums
+BVW_ENUM_FILES = bacon-video-widget-enums.c bacon-video-widget-enums.h
+
+bacon-video-widget-enums.h: bacon-video-widget.h Makefile
+ $(AM_V_GEN)($(GLIB_MKENUMS) \
+ --fhead "#ifndef BVW_ENUMS_H\n#define BVW_ENUMS_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+ --fprod "/* enumerations from \"@filename@\" */\n" \
+ --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define BVW_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
+ --ftail "G_END_DECLS\n\n#endif /* !BVW_ENUMS_H */" $(srcdir)/bacon-video-widget.h > $@)
+
+bacon-video-widget-enums.c: bacon-video-widget.h Makefile bacon-video-widget-enums.h
+ $(AM_V_GEN)($(GLIB_MKENUMS) \
+ --fhead "#include \"bacon-video-widget.h\"\n#include \"bacon-video-widget-enums.h\"" \
+ --fprod "\n/* enumerations from \"@filename@\" */" \
+ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ $(srcdir)/bacon-video-widget.h > $@)
+
+BUILT_SOURCES += $(BVW_ENUM_FILES)
+
libbaconvideowidget_la_SOURCES = \
$(BVWMARSHALFILES) \
+ $(BVW_ENUM_FILES) \
bacon-video-widget.h \
bacon-resize.h bacon-resize.c \
video-utils.c video-utils.h \