From: Jon Cruz Date: Thu, 29 Jan 2015 01:24:05 +0000 (-0800) Subject: doc: Create hot-linked areas in documents. X-Git-Tag: 1.6.92~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cf9a367c98756d4bdacc987573e23f13faf28e6;p=platform%2Fupstream%2Fwayland.git doc: Create hot-linked areas in documents. Added xslt processing to give DocBook output diagram image maps/hot-linked areas consistent with those automatically generated by Doxygen. Signed-off-by: Jon A. Cruz --- diff --git a/doc/doxygen/Makefile.am b/doc/doxygen/Makefile.am index ea206b9..283e077 100644 --- a/doc/doxygen/Makefile.am +++ b/doc/doxygen/Makefile.am @@ -1,5 +1,5 @@ -.SUFFIXES = .gv .png +.SUFFIXES = .gv .png .map noinst_DATA = xml/Client/index.xml xml/Server/index.xml dist_noinst_DATA = wayland.doxygen.in @@ -27,6 +27,7 @@ scanned_src_files_man = \ diagramsdir := dot diagramssrc := $(wildcard $(diagramsdir)/*.gv) diagrams := $(patsubst $(diagramsdir)/%,xml/%,$(diagramssrc:.gv=.png)) +diagram_maps := $(patsubst $(diagramsdir)/%,xml/%,$(diagramssrc:.gv=.map)) # find all man/man3/wl_foo.3 pages # for this to work, we need to create them before the man target (hence @@ -38,7 +39,9 @@ alldirs := xml xml/Client xml/Server man/man3 $(diagrams): $(diagramssrc) -xml/%/index.xml: $(scanned_src_files_%) wayland.doxygen $(diagrams) | xml/% +$(diagram_maps): $(diagramssrc) + +xml/%/index.xml: $(scanned_src_files_%) wayland.doxygen $(diagrams) $(diagram_maps) | xml/% $(AM_V_GEN)(cat wayland.doxygen; \ echo "GENERATE_XML=YES"; \ echo "XML_OUTPUT=xml/$*"; \ @@ -56,6 +59,9 @@ man/man3/wl_display.3: $(scanned_src_files_man) wayland.doxygen | man/man3 xml/%.png: $(diagramsdir)/%.gv | xml $(AM_V_GEN)$(DOT) -Tpng -o$@ $< +xml/%.map: $(diagramsdir)/%.gv | xml + $(AM_V_GEN)$(DOT) -Tcmapx_np -o$@ $< + # general rule to create one of the listed directories. $(alldirs): $(AM_V_GEN)$(MKDIR_P) $@ diff --git a/doc/publican/Makefile.am b/doc/publican/Makefile.am index a4d6d58..7e4fc48 100644 --- a/doc/publican/Makefile.am +++ b/doc/publican/Makefile.am @@ -23,13 +23,15 @@ publican_sources = \ $(srcdir)/sources/Foreword.xml \ $(srcdir)/sources/Preface.xml \ $(srcdir)/sources/Revision_History.xml \ - $(srcdir)/sources/Introduction.xml \ - $(srcdir)/sources/Architecture.xml \ $(srcdir)/sources/Protocol.xml \ $(srcdir)/sources/Compositors.xml \ $(srcdir)/sources/images/icon.svg \ $(srcdir)/sources/images/wayland.png +processed_sources := \ + $(srcdir)/sources/Architecture.xml \ + $(srcdir)/sources/Introduction.xml + css_sources = \ $(srcdir)/sources/css/brand.css \ $(srcdir)/sources/css/common.css \ @@ -45,6 +47,10 @@ doxygen_img_sources := \ $(doxydir)/xml/wayland-architecture.png \ $(doxydir)/xml/x-architecture.png +map_sources := \ + $(doxydir)/xml/x-architecture.map \ + $(doxydir)/xml/wayland-architecture.map + if HAVE_XMLTO if HAVE_XSLTPROC noinst_DATA = $(builddir)/Wayland $(publican_targets) @@ -61,8 +67,10 @@ alldirs := $(builddir)/en-US $(builddir)/en-US/images $(html_destdir) $(html_des html_css_targets = $(addprefix $(html_destdir)/css/,$(notdir $(css_sources))) html_img_targets = $(addprefix $(html_destdir)/images/,$(notdir $(img_sources))) doxygen_img_targets := $(doxygen_img_sources:$(doxydir)/xml/%=$(html_destdir)/images/%) +map_targets := $(map_sources:$(doxydir)/xml/%=$(builddir)/en-US/images/%) +processed_targets := $(processed_sources:$(srcdir)/sources/%=$(builddir)/en-US/%) -$(builddir)/Wayland: $(publican_targets) $(html_css_targets) $(html_img_targets) $(doxygen_img_targets) | $(builddir)/en-US +$(builddir)/Wayland: $(publican_targets) $(html_css_targets) $(html_img_targets) $(processed_targets) $(doxygen_img_targets) | $(builddir)/en-US $(AM_V_GEN)$(XMLTO) $(XMLTO_PARAM) html $(builddir)/en-US/Wayland.xml -o $(html_destdir) @touch $@ @@ -111,6 +119,13 @@ $(builddir)/en-US/images/%: $(doxydir)/xml/% | $(builddir)/en-US/images $(AM_V_GEN)cp -f $< $@ $(AM_V_at)chmod a+w $@ +# More specific rule to override explicitly listed targets and perform xslt +# modifications on them. +# Note that we can't use $< as all targets must be there +$(processed_targets): $(processed_sources) $(map_targets) $(srcdir)/merge-mapcoords.xsl | $(builddir)/en-US/images + $(AM_V_GEN)$(XSLTPROC) --stringparam basedir $(builddir)/en-US \ + $(srcdir)/merge-mapcoords.xsl $(addprefix $(srcdir)/sources/,$(notdir $@)) > $@ + # general rule to create one of the listed directories. $(alldirs): $(AM_V_GEN)$(MKDIR_P) $@ diff --git a/doc/publican/merge-mapcoords.xsl b/doc/publican/merge-mapcoords.xsl new file mode 100644 index 0000000..7adaca3 --- /dev/null +++ b/doc/publican/merge-mapcoords.xsl @@ -0,0 +1,64 @@ + + + + + + + +%BOOK_ENTITIES; +]> +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/publican/sources/Architecture.xml b/doc/publican/sources/Architecture.xml index 5b9300f..5d9ada0 100644 --- a/doc/publican/sources/Architecture.xml +++ b/doc/publican/sources/Architecture.xml @@ -16,19 +16,27 @@ This is where we are now with X: - - - - - - - X architecture diagram - - - +
+ X architecture diagram + + + + + + + + + + + + + + + +
- + The kernel gets an event from an input device and sends it to X through the evdev @@ -39,7 +47,7 @@ event standard. - + The X server determines which window the event affects and sends it to the clients @@ -53,7 +61,7 @@ etc). - + The client looks at the event and decides what to do. Often the UI will have to change @@ -64,7 +72,7 @@ X server. - + When the X server receives the rendering request, it sends it to the driver to let it @@ -74,7 +82,7 @@ the compositor as a damage event. - + The damage event tells the compositor that something changed in the window and that it @@ -86,7 +94,7 @@ to go through the X server to render this. - + The X server receives the rendering requests from the compositor and either copies the @@ -125,19 +133,25 @@ to the clients and lets the client send the damage event directly to the compositor: - - - - - - - Wayland architecture diagram - - - +
+ Wayland architecture diagram + + + + + + + + + + + + + +
- + The kernel gets an event and sends it to the compositor. This @@ -146,7 +160,7 @@ input drivers in the kernel. - + The compositor looks through its scenegraph to determine which window @@ -168,7 +182,7 @@ transformation for the input events. - + As in the X case, when the client receives the event, it updates the @@ -180,7 +194,7 @@ updated. - + The compositor collects damage requests from its clients and then