Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

95 righe
2.4 KiB

  1. /*
  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. /** \file caca_internals.h
  22. * \version \$Id$
  23. * \author Sam Hocevar <sam@zoy.org>
  24. * \brief The \e libcaca private header.
  25. *
  26. * This header contains the private types and functions used by \e libcaca.
  27. */
  28. #ifndef __CACA_INTERNALS_H__
  29. #define __CACA_INTERNALS_H__
  30. /* Graphics driver */
  31. enum caca_driver
  32. {
  33. #if defined(USE_CONIO)
  34. CACA_DRIVER_CONIO = 1,
  35. #endif
  36. #if defined(USE_NCURSES)
  37. CACA_DRIVER_NCURSES = 2,
  38. #endif
  39. #if defined(USE_SLANG)
  40. CACA_DRIVER_SLANG = 3,
  41. #endif
  42. #if defined(USE_X11)
  43. CACA_DRIVER_X11 = 4,
  44. #endif
  45. #if defined(USE_WIN32)
  46. CACA_DRIVER_WIN32 = 5,
  47. #endif
  48. CACA_DRIVER_NONE = 0
  49. };
  50. /* Timer structure */
  51. #define CACA_TIMER_INITIALIZER { 0, 0 }
  52. struct caca_timer
  53. {
  54. int last_sec, last_usec;
  55. };
  56. extern enum caca_driver _caca_driver;
  57. /* Initialisation functions */
  58. extern int _caca_init_graphics(void);
  59. extern int _caca_end_graphics(void);
  60. extern int _caca_init_bitmap(void);
  61. extern int _caca_end_bitmap(void);
  62. /* Timer functions */
  63. extern void _caca_sleep(unsigned int);
  64. extern unsigned int _caca_getticks(struct caca_timer *);
  65. /* Cached screen size */
  66. extern unsigned int _caca_width;
  67. extern unsigned int _caca_height;
  68. /* Internal libcaca features */
  69. extern enum caca_feature _caca_background;
  70. extern enum caca_feature _caca_dithering;
  71. extern enum caca_feature _caca_antialiasing;
  72. #if defined(USE_X11)
  73. #include <X11/Xlib.h>
  74. extern Display *x11_dpy;
  75. extern Window x11_window;
  76. extern int x11_font_width, x11_font_height;
  77. #endif
  78. #if defined(USE_WIN32)
  79. #include <windows.h>
  80. extern HANDLE win32_hin, win32_hout;
  81. #endif
  82. #endif /* __CACA_INTERNALS_H__ */