From 07a802df5f6cee7e045815db5faf4e2998fec8bd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 20 Feb 2012 15:52:39 +1000 Subject: protocol: add xslt convertion to prettify the protocol Includes rudimentary styling only. Signed-off-by: Peter Hutterer --- Makefile.am | 2 +- configure.ac | 6 +- protocol/Makefile.am | 7 ++ protocol/protocol.xsl | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++ protocol/wayland.css | 41 ++++++++++ 5 files changed, 258 insertions(+), 2 deletions(-) create mode 100644 protocol/Makefile.am create mode 100644 protocol/protocol.xsl create mode 100644 protocol/wayland.css diff --git a/Makefile.am b/Makefile.am index 4461e48..016bb76 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src +SUBDIRS = src protocol ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} diff --git a/configure.ac b/configure.ac index a1c9d2a..fc623e8 100644 --- a/configure.ac +++ b/configure.ac @@ -48,9 +48,13 @@ if test "x$enable_scanner" = "xyes"; then AC_SUBST(EXPAT_LIBS) fi +AC_PATH_PROG(XSLTPROC, xsltproc) +AM_CONDITIONAL([HAVE_XSLTPROC], [test $XSLTPROC != ""]) + AC_CONFIG_FILES([Makefile wayland-scanner.m4 src/Makefile src/wayland-server.pc - src/wayland-client.pc]) + src/wayland-client.pc + protocol/Makefile]) AC_OUTPUT diff --git a/protocol/Makefile.am b/protocol/Makefile.am new file mode 100644 index 0000000..9b57441 --- /dev/null +++ b/protocol/Makefile.am @@ -0,0 +1,7 @@ +if HAVE_XSLTPROC +doc_DATA = wayland.html wayland.css + +wayland.html: wayland.xml protocol.xsl + $(AM_V_GEN)$(XSLTPROC) protocol.xsl wayland.xml > $@ + +endif diff --git a/protocol/protocol.xsl b/protocol/protocol.xsl new file mode 100644 index 0000000..b2867f0 --- /dev/null +++ b/protocol/protocol.xsl @@ -0,0 +1,204 @@ + + + + + + + + + + Wayland + + +

Wayland logo

+

Wayland Protocol Specification

+ + + + + + + + + + + + +
+ + + +
+ +
+
+ + + +
+

Table of Contents

+
    + +
+
+
+ + + +
  • + + + + + + +
    + Requests: +
      + +
    +
    +
    + + + +
    + Events: +
      + +
    +
    +
    + + + +
    + Enums: +
      + +
    +
    +
    +
  • +
    + + + + + + + # + + - + + - + + + + + - + + + + + + +
  • + + + +
  • +
    + + + +
    + + + +

    + + + + - + +

    +

    Version:

    +

    + +
    +

    Requests

    + + +
    +
    + + +
    +

    Events

    + + +
    +
    + + +
    +

    Enums

    + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + +
    + + + +

    + :: + + - + +

    +

    + + Arguments: + + +
    +
    + + Values: + + +
    +
    +
    +
    +
    + + diff --git a/protocol/wayland.css b/protocol/wayland.css new file mode 100644 index 0000000..91f458a --- /dev/null +++ b/protocol/wayland.css @@ -0,0 +1,41 @@ +body { padding: 0px 150px; } +h1 { margin: 40px 0px; color: #aaa; } +p { margin: 20px 0px; } +h1 img { vertical-align: middle; border-width: 0px; } +h2 { font-family: sans; color: #888; } +h3 { font-family: sans; color: #888; font-style: italic; } +a { color: #444; } +a:hover { color: #888; } +a:visited { color: #666; } +li { margin: 10px 0px }; +table { border: 1px solid gray;} + +.version { font-size: small } +div.interface { padding: 2% } + +div.requests div:nth-child(even) { background-color: #eeeeee; } +div.requests div { margin-left: 2%; padding-left: 2%; } +div.requests table { border: 0px; margin: 10px; } +div.requests table th { padding: 5px } +div.requests table td { padding: 5px } + +div.events div:nth-child(even) { background-color: #eeeeee; } +div.events div { margin-left: 2%; padding-left: 2%; } +div.events table { border: 0px; margin: 10px; } +div.events table th { padding: 5px } +div.events table td { padding: 5px } + +div.enums div:nth-child(even) { background-color: #eeeeee; } +div.enums div { margin-left: 2%; padding-left: 2%; } +div.enums table { border: 0px; margin: 10px; } +div.enums table th { padding: 5px } +div.enums table td { padding: 5px } + +.arg_name { font-family: monospace; padding:5px} +.arg_type { font-family: monospace; color: #338833; padding:5px } +.arg_value { font-family: monospace; color: #338833; padding:5px } +.arg_desc { font-style: italic;padding:5px; } +.mono { font-family: monospace; font-weight: bold; } + +div.toc span { font-size: 11pt; line-height: 150%; } +div.toc li li { line-height: 100%; margin: 0%; } -- cgit v1.2.3