From 7fe381861bd1aca396575b1ea79060c274a3f048 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 8 Oct 2012 18:39:58 +0300 Subject: [PATCH] doc: Auto-generate Protocol/Interfaces section instead Signed-off-by: Tiago Vignatti --- doc/Wayland/Makefile.am | 12 +- doc/Wayland/en_US/Protocol.xml | 126 +----------------- .../protocol-interfaces-to-docbook.xsl | 56 ++++++++ 3 files changed, 66 insertions(+), 128 deletions(-) create mode 100644 doc/Wayland/protocol-interfaces-to-docbook.xsl diff --git a/doc/Wayland/Makefile.am b/doc/Wayland/Makefile.am index 6d73de86..600bf865 100644 --- a/doc/Wayland/Makefile.am +++ b/doc/Wayland/Makefile.am @@ -17,7 +17,7 @@ noinst_DATA = Wayland $(publican_targets) pubdir = $(docdir)/Wayland/en-US publican_targets = $(publican_sources:$(srcdir)/en_US%=$(builddir)/en-US%) \ - en-US/ProtocolSpec.xml + en-US/ProtocolSpec.xml en-US/ProtocolInterfaces.xml # The Protocol.xml is purely generated and required before running publican en-US/ProtocolSpec.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/protocol-to-docbook.xsl @@ -25,10 +25,16 @@ en-US/ProtocolSpec.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/protocol-to $(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol-to-docbook.xsl \ $(top_srcdir)/protocol/wayland.xml > en-US/ProtocolSpec.xml +en-US/ProtocolInterfaces.xml: $(top_srcdir)/protocol/wayland.xml $(srcdir)/protocol-interfaces-to-docbook.xsl + $(AM_V_GEN)$(MKDIR_P) en-US/images + $(AM_V_GEN)$(XSLTPROC) $(srcdir)/protocol-interfaces-to-docbook.xsl \ + $(top_srcdir)/protocol/wayland.xml > en-US/ProtocolInterfaces.xml + + # Copy the en_US source files into en-US destination # This is required for out-of-source-tree build as publican does not allow us # to specify the location of the source code. -$(builddir)/en-US/%: $(srcdir)/en_US/% en-US/ProtocolSpec.xml $(publican_sources) +$(builddir)/en-US/%: $(srcdir)/en_US/% en-US/ProtocolSpec.xml en-US/ProtocolInterfaces.xml $(publican_sources) $(AM_V_GEN)cp -f $< $@ # Run publican for the builddir on the generated (or copied) source @@ -38,7 +44,7 @@ Wayland: $(publican_targets) --config $(srcdir)/publican.cfg @touch Wayland -CLEANFILES = en-US/ProtocolSpec.xml $(publican_targets) +CLEANFILES = en-US/ProtocolSpec.xml en-US/ProtocolInterfaces.xml $(publican_targets) clean-local: $(AM_V_at)rm -fr en-US diff --git a/doc/Wayland/en_US/Protocol.xml b/doc/Wayland/en_US/Protocol.xml index 8927837f..943dd3b5 100644 --- a/doc/Wayland/en_US/Protocol.xml +++ b/doc/Wayland/en_US/Protocol.xml @@ -163,131 +163,7 @@ -
- Interfaces - - The protocol includes several interfaces which are used for - interacting with the server. Each interface provides requests, - events, and errors (which are really just special events) as described - above. Specific compositor implementations may have their own - interfaces provided as extensions, but there are several which are - always expected to be present. - - - Core interfaces: - - - wl_display - - - provides global functionality like object binding and - fatal error events - - - - - wl_callback - - - callback interface for done events - - - - - wl_compositor - - - core compositor interface, allows surface creation - - - - - wl_shm - - - buffer management interface with buffer creation and format - handling - - - - - wl_buffer - - - buffer handling interface for indicating damage and object - destruction, also provides buffer release events from the - server - - - - - wl_data_offer - - - for accepting and receiving specific mime types - - - - - wl_data_source - - - for offering specific mime types - - - - - wl_data_device - - - lets clients manage drag & drop, provides pointer enter/leave events and motion - - - - - wl_data_device_manager - - - for managing data sources and devices - - - - - wl_shell - - - shell surface handling - - - - - wl_shell_surface - - - shell surface handling and desktop-like events (e.g. set a - surface to fullscreen, display a popup, etc.) - - - - - wl_seat - - - cursor setting, motion, button, and key events, etc. - - - - - wl_output - - - events describing an attached output (subpixel orientation, - current mode & geometry, etc.) - - - - -
+
Connect Time diff --git a/doc/Wayland/protocol-interfaces-to-docbook.xsl b/doc/Wayland/protocol-interfaces-to-docbook.xsl new file mode 100644 index 00000000..ad6bdda0 --- /dev/null +++ b/doc/Wayland/protocol-interfaces-to-docbook.xsl @@ -0,0 +1,56 @@ + + + + + + + + +%BOOK_ENTITIES; +]> +]]> + +
+ Interfaces + + The protocol includes several interfaces which are used for + interacting with the server. Each interface provides requests, + events, and errors (which are really just special events) as described + above. Specific compositor implementations may have their own + interfaces provided as extensions, but there are several which are + always expected to be present. + + + + Core interfaces: + + + + +
+
+ + + + + protocol-summary-- + + + + + - + + + + + + + + + + + +
+