Ignore:
Timestamp:
Dec 12, 2007, 8:41:00 AM (12 years ago)
Author:
Sam Hocevar
Message:
  • Implemented caca_get_display_driver_list(), unused yet.
Location:
libcaca/trunk/caca
Files:
2 edited

Legend:

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

    r2074 r2135  
    212212}
    213213
     214/** \brief Get available display drivers
     215 *
     216 *  Return a list of available display drivers. The list is a NULL-terminated
     217 *  array of strings, interleaving a string containing the internal value for
     218 *  the display driver, and a string containing the natural language
     219 *  description for that driver.
     220 *
     221 *  This function never fails.
     222 *
     223 *  \param dp Display object.
     224 *  \return An array of strings.
     225 */
     226char const * const * caca_get_display_driver_list(caca_display_t *dp)
     227{
     228    static char const * const list[] =
     229    {
     230        "none", "No antialiasing",
     231        "prefilter", "Prefilter antialiasing",
     232#if defined(USE_COCOA)
     233        "cocoa", "Mac OS X Cocoa",
     234#endif
     235#if defined(USE_WIN32)
     236        "win32", "Windows console",
     237#endif
     238#if defined(USE_CONIO)
     239        "conio", "MS-DOS conio",
     240#endif
     241#if defined(USE_X11)
     242        "x11", "X11 graphical window",
     243#endif
     244#if defined(USE_GL)
     245        "gl", "OpenGL window",
     246#endif
     247#if !defined(__KERNEL__)
     248        "raw", "raw libcaca output",
     249#endif
     250#if defined(USE_SLANG)
     251        "slang", "S-Lang console library",
     252#endif
     253#if defined(USE_NCURSES)
     254        "ncurses", "ncurses console library",
     255#endif
     256#if defined(USE_VGA)
     257        "vga", "direct VGA memory",
     258#endif
     259        NULL, NULL
     260    };
     261
     262    return list;
     263}
     264
    214265/*
    215266 * XXX: The following functions are local.
  • libcaca/trunk/caca/caca.h

    r2074 r2135  
    158158__extern cucul_canvas_t * caca_get_canvas(caca_display_t *);
    159159__extern int caca_refresh_display(caca_display_t *);
     160__extern char const * const * caca_get_display_driver_list(caca_display_t *);
    160161__extern int caca_set_display_time(caca_display_t *, unsigned int);
    161162__extern unsigned int caca_get_display_time(caca_display_t const *);
Note: See TracChangeset for help on using the changeset viewer.