You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

117 lines
3.1 KiB

  1. /*
  2. * libcaca ASCII-Art library
  3. * Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org>
  4. * All Rights Reserved
  5. *
  6. * $Id$
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. #ifndef __EE_H__
  23. #define __EE_H__
  24. #ifdef __cplusplus
  25. extern "C"
  26. {
  27. #endif
  28. /*
  29. * Colors
  30. */
  31. enum caca_colors
  32. {
  33. EE_BLACK = 0,
  34. EE_BLUE = 1,
  35. EE_GREEN = 2,
  36. EE_CYAN = 3,
  37. EE_RED = 4,
  38. EE_MAGENTA = 5,
  39. EE_BROWN = 6,
  40. EE_LIGHTGRAY = 7,
  41. EE_DARKGRAY = 8,
  42. EE_LIGHTBLUE = 9,
  43. EE_LIGHTGREEN = 10,
  44. EE_LIGHTCYAN = 11,
  45. EE_LIGHTRED = 12,
  46. EE_LIGHTMAGENTA = 13,
  47. EE_YELLOW = 14,
  48. EE_WHITE = 15
  49. };
  50. /*
  51. * Types
  52. */
  53. struct caca_sprite;
  54. /*
  55. * Prototypes
  56. */
  57. int caca_init(void);
  58. void caca_set_delay(unsigned int);
  59. unsigned int caca_get_rendertime(void);
  60. unsigned int caca_get_width(void);
  61. unsigned int caca_get_height(void);
  62. const char *caca_get_color_name(unsigned int);
  63. void caca_refresh(void);
  64. void caca_end(void);
  65. char caca_get_key(void);
  66. void caca_set_color(int);
  67. int caca_get_color(void);
  68. void caca_putchar(int, int, char);
  69. void caca_putstr(int, int, const char *);
  70. void caca_printf(int, int, const char *, ...);
  71. void caca_clear(void);
  72. void caca_draw_line(int, int, int, int, char);
  73. void caca_draw_polyline(const int[], const int[], int, char);
  74. void caca_draw_thin_line(int, int, int, int);
  75. void caca_draw_thin_polyline(const int[], const int[], int);
  76. void caca_draw_circle(int, int, int, char);
  77. void caca_draw_ellipse(int, int, int, int, char);
  78. void caca_draw_thin_ellipse(int, int, int, int);
  79. void caca_fill_ellipse(int, int, int, int, char);
  80. void caca_draw_box(int, int, int, int, char);
  81. void caca_draw_thin_box(int, int, int, int);
  82. void caca_fill_box(int, int, int, int, char);
  83. void caca_draw_triangle(int, int, int, int, int, int, char);
  84. void caca_draw_thin_triangle(int, int, int, int, int, int);
  85. void caca_fill_triangle(int, int, int, int, int, int, char);
  86. int caca_rand(int, int);
  87. unsigned int caca_sqrt(unsigned int);
  88. struct caca_sprite * caca_load_sprite(const char *);
  89. int caca_get_sprite_frames(struct caca_sprite *);
  90. int caca_get_sprite_width(struct caca_sprite *, int);
  91. int caca_get_sprite_height(struct caca_sprite *, int);
  92. int caca_get_sprite_dx(struct caca_sprite *, int);
  93. int caca_get_sprite_dy(struct caca_sprite *, int);
  94. void caca_draw_sprite(int, int, struct caca_sprite *, int);
  95. void caca_free_sprite(struct caca_sprite *);
  96. void caca_blit(int, int, int, int, void *, int, int);
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100. #endif /* __EE_H__ */