Sectionalize API docs better and update README ToC

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-09-20 09:04:54 +02:00
1 parent b67c62045f
commit 891e641abe
2 files changed
+11 -3

No files matched your search

+10 -2
View File
@@ -1,7 +1,8 @@
API Documentation API Documentation
----------------- =================
* [API](#api) * [Introduction](#introduction)
* [Overview](#overview)
* [Create an Event Context](#create-an-event-context) * [Create an Event Context](#create-an-event-context)
* [Register an Event Watcher](#register-an-event-watcher) * [Register an Event Watcher](#register-an-event-watcher)
* [Start Event Loop](#start-event-loop) * [Start Event Loop](#start-event-loop)
@@ -10,6 +11,9 @@ API Documentation
* [Joystick Example](#joystick-example) * [Joystick Example](#joystick-example)
Introduction
------------
The C API to [libuEv][], listed in `uev/uev.h`, handles three different The C API to [libuEv][], listed in `uev/uev.h`, handles three different
types of events: I/O (files, sockets, message queues, etc.), timers, and types of events: I/O (files, sockets, message queues, etc.), timers, and
signals. The [Summary](#summary) details a slight caveat on signals. signals. The [Summary](#summary) details a slight caveat on signals.
@@ -25,6 +29,10 @@ the wall clock changes, either via NTP or user input.
other C libraries have no known fix. It is strongly recommended to other C libraries have no known fix. It is strongly recommended to
use relative timers as often as possible. use relative timers as often as possible.
Overview
--------
```C ```C
/* /*
* Callback example, arg comes from the watcher's *_init() function, * Callback example, arg comes from the watcher's *_init() function,
+1 -1
View File
@@ -4,7 +4,7 @@ libuEv | Simple event loop for Linux
* [Introduction](#introduction) * [Introduction](#introduction)
* [API](API.md#api) * [API](API.md#overview)
* [Create an Event Context](API.md#create-an-event-context) * [Create an Event Context](API.md#create-an-event-context)
* [Register an Event Watcher](API.md#register-an-event-watcher) * [Register an Event Watcher](API.md#register-an-event-watcher)
* [Start Event Loop](API.md#start-event-loop) * [Start Event Loop](API.md#start-event-loop)