[PATCH libinput 3/6] doc: include README as mainpage

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 9 16:34:01 PST 2014


doxygen supports markdown so we can expand the README with general interesting
information in markdown format and have it be the front page of the
documentation at the same time.

This requires renaming README to README.txt, but that's a relatively small
price to pay.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 README                  | 25 -------------------------
 README.txt              | 30 ++++++++++++++++++++++++++++++
 doc/Makefile.am         |  3 ++-
 doc/libinput.doxygen.in |  3 ++-
 src/libinput.h          |  7 -------
 5 files changed, 34 insertions(+), 34 deletions(-)
 delete mode 100644 README
 create mode 100644 README.txt

diff --git a/README b/README
deleted file mode 100644
index f55d7c8..0000000
--- a/README
+++ /dev/null
@@ -1,25 +0,0 @@
-libinput
-
-libinput is a library that handles input devices for display servers and other
-applications that need to directly deal with input devices.
-
-It provides device detection, device handling, input device event processing
-and abstraction so minimize the amount of custom input code the user of
-libinput need to provide the common set of functionality that users expect.
-
-Input event processing includes scaling touch coordinates, generating
-pointer events from touchpads, pointer acceleration, etc.
-
-libinput originates from weston, the Wayland reference compositor.
-
-The source code of libinput can be found at:
-http://cgit.freedesktop.org/wayland/libinput
-
-For more information, visit:
-http://www.freedesktop.org/wiki/Software/libinput/
-
-Bugs can be filed in the libinput component of Wayland:
-https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland
-
-Online API documentation:
-http://wayland.freedesktop.org/libinput/doc/latest/modules.html
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..fabe304
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,30 @@
+/*!@mainpage
+
+libinput
+========
+
+libinput is a library that handles input devices for display servers and other
+applications that need to directly deal with input devices.
+
+It provides device detection, device handling, input device event processing
+and abstraction so minimize the amount of custom input code the user of
+libinput need to provide the common set of functionality that users expect.
+
+Input event processing includes scaling touch coordinates, generating
+pointer events from touchpads, pointer acceleration, etc.
+
+libinput originates from weston, the Wayland reference compositor.
+
+The source code of libinput can be found at:
+http://cgit.freedesktop.org/wayland/libinput
+
+For more information, visit:
+http://www.freedesktop.org/wiki/Software/libinput/
+
+Bugs can be filed in the libinput component of Wayland:
+https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland
+
+Online API documentation:
+http://wayland.freedesktop.org/libinput/doc/latest/modules.html
+
+*/
diff --git a/doc/Makefile.am b/doc/Makefile.am
index a33638d..8f05bd2 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -5,7 +5,8 @@ if HAVE_DOXYGEN
 noinst_DATA = html/index.html
 
 header_files = \
-	$(top_srcdir)/src/libinput.h
+	$(top_srcdir)/src/libinput.h \
+	$(top_srcdir)/README.txt
 
 html/index.html: libinput.doxygen $(header_files)
 	$(AM_V_GEN)$(DOXYGEN) $<
diff --git a/doc/libinput.doxygen.in b/doc/libinput.doxygen.in
index 865cf97..9800f80 100644
--- a/doc/libinput.doxygen.in
+++ b/doc/libinput.doxygen.in
@@ -753,7 +753,8 @@ WARN_LOGFILE           =
 # spaces.
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = @top_srcdir@/src/libinput.h
+INPUT                  = @top_srcdir@/src/libinput.h \
+			 @top_srcdir@/README.txt
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/src/libinput.h b/src/libinput.h
index e2a3eef..682e16f 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -36,13 +36,6 @@ extern "C" {
 #define LIBINPUT_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
 
 /**
- * @mainpage
- * libinput is a generic input device handling library. It abstracts
- * commonly-used concepts such as keyboard, pointer and touchpad handling
- * behind an API.
- */
-
-/**
  * @page tpbuttons Touchpad button behavior
  *
  * For touchpad devices without physical buttons, libinput enables an
-- 
2.1.0



More information about the wayland-devel mailing list