Преглед на файлове

* Implemented caca_get_display_driver_list(), unused yet.

tags/v0.99.beta14
Sam Hocevar sam преди 17 години
родител
ревизия
5b2b3e27db
променени са 2 файла, в които са добавени 52 реда и са изтрити 0 реда
  1. +51
    -0
      caca/caca.c
  2. +1
    -0
      caca/caca.h

+ 51
- 0
caca/caca.c Целия файл

@@ -211,6 +211,57 @@ char const * caca_get_version(void)
return VERSION;
}

/** \brief Get available display drivers
*
* Return a list of available display drivers. The list is a NULL-terminated
* array of strings, interleaving a string containing the internal value for
* the display driver, and a string containing the natural language
* description for that driver.
*
* This function never fails.
*
* \param dp Display object.
* \return An array of strings.
*/
char const * const * caca_get_display_driver_list(caca_display_t *dp)
{
static char const * const list[] =
{
"none", "No antialiasing",
"prefilter", "Prefilter antialiasing",
#if defined(USE_COCOA)
"cocoa", "Mac OS X Cocoa",
#endif
#if defined(USE_WIN32)
"win32", "Windows console",
#endif
#if defined(USE_CONIO)
"conio", "MS-DOS conio",
#endif
#if defined(USE_X11)
"x11", "X11 graphical window",
#endif
#if defined(USE_GL)
"gl", "OpenGL window",
#endif
#if !defined(__KERNEL__)
"raw", "raw libcaca output",
#endif
#if defined(USE_SLANG)
"slang", "S-Lang console library",
#endif
#if defined(USE_NCURSES)
"ncurses", "ncurses console library",
#endif
#if defined(USE_VGA)
"vga", "direct VGA memory",
#endif
NULL, NULL
};

return list;
}

/*
* XXX: The following functions are local.
*/


+ 1
- 0
caca/caca.h Целия файл

@@ -157,6 +157,7 @@ __extern caca_display_t * caca_create_display(cucul_canvas_t *);
__extern int caca_free_display(caca_display_t *);
__extern cucul_canvas_t * caca_get_canvas(caca_display_t *);
__extern int caca_refresh_display(caca_display_t *);
__extern char const * const * caca_get_display_driver_list(caca_display_t *);
__extern int caca_set_display_time(caca_display_t *, unsigned int);
__extern unsigned int caca_get_display_time(caca_display_t const *);
__extern unsigned int caca_get_display_width(caca_display_t const *);


Зареждане…
Отказ
Запис