From ed2c5a58e677d572d384fe85586a4740fc1a586f Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 21 Apr 2006 21:41:30 +0000 Subject: [PATCH] * Oops, tutorial.dox was actually missing. Also, added a style.dox skeleton. --- doc/Makefile.am | 2 +- doc/libcaca.dox | 4 ++++ doc/migrating.dox | 4 ++-- doc/style.dox | 7 +++++++ doc/tutorial.dox | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 doc/style.dox create mode 100644 doc/tutorial.dox diff --git a/doc/Makefile.am b/doc/Makefile.am index 4e930c1..8bcb332 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,7 +1,7 @@ # $Id$ EXTRA_DIST = doxygen.cfg.in footer.html header.html $(man_MANS) \ - libcaca.dox user.dox migrating.dox tutorial.dox + libcaca.dox user.dox migrating.dox tutorial.dox style.dox man_MANS = caca-config.1 cacafire.1 cacaview.1 diff --git a/doc/libcaca.dox b/doc/libcaca.dox index 3949589..d5c3e52 100644 --- a/doc/libcaca.dox +++ b/doc/libcaca.dox @@ -35,6 +35,10 @@ - \subpage tutorial - \subpage migrating + There is also information specially targeted at \e libcaca developers: + + - \subpage style + \section user User's documentation - \subpage env diff --git a/doc/migrating.dox b/doc/migrating.dox index c36bd07..7ef2c52 100644 --- a/doc/migrating.dox +++ b/doc/migrating.dox @@ -1,8 +1,8 @@ /* $Id$ */ -/** \page migrating Migrating from libcaca 0.9 to the 1.0 API +/** \page migrating Migrating from libcaca 0.x to the 1.0 API - This section will guide you through the migration of a \e libcaca 0.9 + This section will guide you through the migration of a \e libcaca 0.x application to the latest API version. \section foo1 Overview diff --git a/doc/style.dox b/doc/style.dox new file mode 100644 index 0000000..5570eda --- /dev/null +++ b/doc/style.dox @@ -0,0 +1,7 @@ +/* $Id$ */ + +/** \page style Coding style + + Code qui fait des warnings == code de porc == deux baffes dans ta gueule + +*/ diff --git a/doc/tutorial.dox b/doc/tutorial.dox new file mode 100644 index 0000000..1e590f6 --- /dev/null +++ b/doc/tutorial.dox @@ -0,0 +1,35 @@ +/* $Id$ */ + +/** \page tutorial A libcucul and libcaca tutorial + + Super short example: + +\code +#include +#include + +int main(void) +{ + /* Initialise libcaca */ + cucul_canvas_t *cv; caca_display_t *dp; caca_event_t ev; + cv = cucul_create_canvas(0, 0); + dp = caca_create_display(cv); + /* Set window title */ + caca_set_display_title(dp, "Hello!"); + /* Choose drawing colours */ + cucul_set_color(cv, CUCUL_COLOR_BLACK, CUCUL_COLOR_WHITE); + /* Draw a string at coordinates (0, 0) */ + cucul_putstr(cv, 0, 0, "This is a message"); + /* Refresh display */ + caca_refresh_display(); + /* Wait for a key press event */ + caca_get_event(dp, CACA_EVENT_KEY_PRESS, &ev, -1); + /* Clean up library */ + caca_free_display(dp); + cucul_free_canvas(cv); + + return 0; +} +\endcode + +*/