Ignore:
Timestamp:
Dec 23, 2003, 2:27:40 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • src/io.c: + Added caca_wait_event(), a blocking caca_get_event().
  • src/ examples/: + More documentation.
  • doc/doxygen.cfg.in: + doc/doxygen.cfg is now generated by configure, so that we can use

@top_srcdir@ and we no longer need to hardcode PROJECT_NUMBER.

+ Create manpages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/caca.c

    r267 r268  
    11/*
    2  *   libcaca       ASCII-Art library
    3  *   Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org>
    4  *                 All Rights Reserved
    5  *
    6  *   This library is free software; you can redistribute it and/or
    7  *   modify it under the terms of the GNU Lesser General Public
    8  *   License as published by the Free Software Foundation; either
    9  *   version 2 of the License, or (at your option) any later version.
    10  *
    11  *   This library is distributed in the hope that it will be useful,
    12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    14  *   Lesser General Public License for more details.
    15  *
    16  *   You should have received a copy of the GNU Lesser General Public
    17  *   License along with this library; if not, write to the Free Software
    18  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    19  *   02111-1307  USA
    20  */
    21 
    22 /**  \file caca.c
    23  *   \version \$Id$
    24  *   \author Sam Hocevar <sam@zoy.org>
    25  *   \brief Main \e libcaca functions
    26  *
    27  *   This file contains the main functions used by \e libcaca applications to
    28  *   initialise the library, get the screen properties, set the framerate and
    29  *   so on.
     2 *  libcaca       ASCII-Art library
     3 *  Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org>
     4 *                All Rights Reserved
     5 *
     6 *  This library is free software; you can redistribute it and/or
     7 *  modify it under the terms of the GNU Lesser General Public
     8 *  License as published by the Free Software Foundation; either
     9 *  version 2 of the License, or (at your option) any later version.
     10 *
     11 *  This library is distributed in the hope that it will be useful,
     12 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     13 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     14 *  Lesser General Public License for more details.
     15 *
     16 *  You should have received a copy of the GNU Lesser General Public
     17 *  License along with this library; if not, write to the Free Software
     18 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
     19 *  02111-1307  USA
     20 */
     21
     22/** \file caca.c
     23 *  \version \$Id$
     24 *  \author Sam Hocevar <sam@zoy.org>
     25 *  \brief Main \e libcaca functions
     26 *
     27 *  This file contains the main functions used by \e libcaca applications to
     28 *  initialise the library, get the screen properties, set the framerate and
     29 *  so on.
    3030 */
    3131
     
    6262#endif
    6363
    64 /**
    65  * \brief Initialise libcaca.
    66  *
    67  * \return 0 upon success, a non-zero value if an error occurs.
     64/** \brief Initialise \e libcaca.
     65 *
     66 *  This function initialises internal \e libcaca structures and the backend
     67 *  that will be used for subsequent graphical operations. It must be the
     68 *  first \e libcaca function to be called in a function. caca_end() should
     69 *  be called at the end of the program to free all allocated resources.
     70 *
     71 *  \return 0 upon success, a non-zero value if an error occurs.
    6872 */
    6973int caca_init(void)
     
    154158}
    155159
    156 /**
    157  * \brief Get the screen width.
    158  *
    159  * \return The screen width, in character cells.
     160/** \brief Get the screen width.
     161 *
     162 *  This function returns the current screen width, in character cells.
     163 *
     164 *  \return The screen width.
    160165 */
    161166unsigned int caca_get_width(void)
     
    164169}
    165170
    166 /**
    167  * \brief Get the screen height.
    168  *
    169  * \return The screen height, in character cells.
     171/** \brief Get the screen height.
     172 *
     173 *  This function returns the current screen height, in character cells.
     174 *
     175 *  \return The screen height.
    170176 */
    171177unsigned int caca_get_height(void)
     
    210216}
    211217
    212 /**
    213  * \brief Get the current value of a feature.
    214  *
    215  * \param feature The requested feature.
    216  * \return The current value of the feature.
     218/** \brief Get the current value of a feature.
     219 *
     220 *  This function retrieves the value of an internal \e libcaca feature. A
     221 *  generic feature value is expected, such as CACA_ANTIALIASING.
     222 *
     223 *  \param feature The requested feature.
     224 *  \return The current value of the feature or CACA_UNKNOWN_FEATURE if an
     225 *          error occurred..
    217226 */
    218227enum caca_feature caca_get_feature(enum caca_feature feature)
     
    232241}
    233242
    234 /**
    235  * \brief Set a feature.
    236  *
    237  * \param feature The wanted feature.
    238  * \return void
     243/** \brief Set a feature.
     244 *
     245 *  This function sets an internal \e libcaca feature such as the antialiasing
     246 *  or dithering modes. If a specific feature such as CACA_DITHERING_RANDOM,
     247 *  caca_set_feature() will set it immediately. If a generic feature is given
     248 *  instead, such as CACA_DITHERING, the default value will be used instead.
     249 *
     250 *  \param feature The requested feature.
    239251 */
    240252void caca_set_feature(enum caca_feature feature)
     
    299311}
    300312
    301 /**
    302  * \brief Uninitialise libcaca.
    303  *
    304  * \return void
     313/** \brief Uninitialise \e libcaca.
     314 *
     315 *  This function frees all resources allocated by caca_init(). After
     316 *  caca_end() has been called, no other \e libcaca functions may be used
     317 *  unless a new call to caca_init() is done.
    305318 */
    306319void caca_end(void)
     
    346359#endif
    347360}
     361
     362/*
     363 * XXX: The following functions are local.
     364 */
    348365
    349366static void caca_init_driver(void)
Note: See TracChangeset for help on using the changeset viewer.