Changeset 268 for libcaca/trunk/src/caca.c
- Timestamp:
- Dec 23, 2003, 2:27:40 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/src/caca.c
r267 r268 1 1 /* 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 * 20 */ 21 22 /** 23 * 24 * 25 * 26 * 27 * 28 * 29 * 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. 30 30 */ 31 31 … … 62 62 #endif 63 63 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. 68 72 */ 69 73 int caca_init(void) … … 154 158 } 155 159 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. 160 165 */ 161 166 unsigned int caca_get_width(void) … … 164 169 } 165 170 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. 170 176 */ 171 177 unsigned int caca_get_height(void) … … 210 216 } 211 217 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.. 217 226 */ 218 227 enum caca_feature caca_get_feature(enum caca_feature feature) … … 232 241 } 233 242 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. 239 251 */ 240 252 void caca_set_feature(enum caca_feature feature) … … 299 311 } 300 312 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. 305 318 */ 306 319 void caca_end(void) … … 346 359 #endif 347 360 } 361 362 /* 363 * XXX: The following functions are local. 364 */ 348 365 349 366 static void caca_init_driver(void)
Note: See TracChangeset
for help on using the changeset viewer.