From 891e641abe99e836e6578dfaca077385ec41f72f Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 20 Sep 2017 09:04:54 +0200 Subject: [PATCH] Sectionalize API docs better and update README ToC Signed-off-by: Joachim Nilsson --- API.md | 12 ++++++++++-- README.md | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index 5e72911..dd94b1f 100644 --- a/API.md +++ b/API.md @@ -1,7 +1,8 @@ API Documentation ------------------ +================= -* [API](#api) +* [Introduction](#introduction) +* [Overview](#overview) * [Create an Event Context](#create-an-event-context) * [Register an Event Watcher](#register-an-event-watcher) * [Start Event Loop](#start-event-loop) @@ -10,6 +11,9 @@ API Documentation * [Joystick Example](#joystick-example) +Introduction +------------ + 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 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 use relative timers as often as possible. + +Overview +-------- + ```C /* * Callback example, arg comes from the watcher's *_init() function, diff --git a/README.md b/README.md index c03881a..6a95843 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ libuEv | Simple event loop for Linux * [Introduction](#introduction) -* [API](API.md#api) +* [API](API.md#overview) * [Create an Event Context](API.md#create-an-event-context) * [Register an Event Watcher](API.md#register-an-event-watcher) * [Start Event Loop](API.md#start-event-loop)