libcaca  0.99.beta19
About: libcaca is a graphics library that outputs text instead of pixels, so that it can work on older video cards or text terminals (something like an advanced AAlib library).
  Fossies Dox: libcaca-0.99.beta19.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

caca.h
Go to the documentation of this file.
1 /*
2  * libcaca Colour ASCII-Art library
3  * Copyright (c) 2002-2012 Sam Hocevar <sam@hocevar.net>
4  * All Rights Reserved
5  *
6  * This library is free software. It comes without any warranty, to
7  * the extent permitted by applicable law. You can redistribute it
8  * and/or modify it under the terms of the Do What the Fuck You Want
9  * to Public License, Version 2, as published by Sam Hocevar. See
10  * http://www.wtfpl.net/ for more details.
11  */
12 
21 #ifndef __CACA_H__
22 #define __CACA_H__
23 
24 #include <caca_types.h>
25 
26 #if !defined(__KERNEL__)
27 # include <stdarg.h>
28 #endif
29 
30 #undef __extern
31 #if defined _DOXYGEN_SKIP_ME
32 #elif defined _WIN32 && defined __LIBCACA__ && defined DLL_EXPORT
33 # define __extern extern __declspec(dllexport)
34 #elif defined _WIN32 && !defined __LIBCACA__ && !defined CACA_STATIC
35 # define __extern extern __declspec(dllimport)
36 #else
37 # define __extern extern
38 #endif
39 
41 #define CACA_API_VERSION_1
42 
43 #ifdef __cplusplus
44 extern "C"
45 {
46 #endif
47 
49 typedef struct caca_canvas caca_canvas_t;
51 typedef struct caca_dither caca_dither_t;
55 typedef struct caca_font caca_font_t;
57 typedef struct caca_file caca_file_t;
61 typedef struct caca_event caca_event_t;
62 
70 {
71  CACA_BLACK = 0x00,
72  CACA_BLUE = 0x01,
73  CACA_GREEN = 0x02,
74  CACA_CYAN = 0x03,
75  CACA_RED = 0x04,
76  CACA_MAGENTA = 0x05,
77  CACA_BROWN = 0x06,
78  CACA_LIGHTGRAY = 0x07,
79  CACA_DARKGRAY = 0x08,
80  CACA_LIGHTBLUE = 0x09,
81  CACA_LIGHTGREEN = 0x0a,
82  CACA_LIGHTCYAN = 0x0b,
83  CACA_LIGHTRED = 0x0c,
85  CACA_YELLOW = 0x0e,
86  CACA_WHITE = 0x0f,
87  CACA_DEFAULT = 0x10,
89 };
90 
93 {
94  CACA_BOLD = 0x01,
95  CACA_ITALICS = 0x02,
96  CACA_UNDERLINE = 0x04,
97  CACA_BLINK = 0x08,
98 };
99 /* @} */
100 
108 {
109  CACA_EVENT_NONE = 0x0000,
116  CACA_EVENT_RESIZE = 0x0020,
117  CACA_EVENT_QUIT = 0x0040,
119  CACA_EVENT_ANY = 0xffff
120 };
121 
130 {
132  union
133  {
134  struct { int x, y, button; } mouse;
135  struct { int w, h; } resize;
136  struct { int ch; uint32_t utf32; char utf8[8]; } key;
137  } data;
138 #if !defined(_DOXYGEN_SKIP_ME)
139  uint8_t padding[16];
140 #endif
141 };
142 
149 {
150  char const *name;
151  int has_arg;
152  int *flag;
153  int val;
154 };
155 
162 {
165  /* The following keys have ASCII equivalents */
174  CACA_KEY_TAB = 0x09,
184  CACA_KEY_PAUSE = 0x13,
195  /* The following keys do not have ASCII equivalents but have been
196  * chosen to match the SDL equivalents */
197  CACA_KEY_UP = 0x111,
198  CACA_KEY_DOWN = 0x112,
199  CACA_KEY_LEFT = 0x113,
200  CACA_KEY_RIGHT = 0x114,
202  CACA_KEY_INSERT = 0x115,
203  CACA_KEY_HOME = 0x116,
204  CACA_KEY_END = 0x117,
205  CACA_KEY_PAGEUP = 0x118,
208  CACA_KEY_F1 = 0x11a,
209  CACA_KEY_F2 = 0x11b,
210  CACA_KEY_F3 = 0x11c,
211  CACA_KEY_F4 = 0x11d,
212  CACA_KEY_F5 = 0x11e,
213  CACA_KEY_F6 = 0x11f,
214  CACA_KEY_F7 = 0x120,
215  CACA_KEY_F8 = 0x121,
216  CACA_KEY_F9 = 0x122,
217  CACA_KEY_F10 = 0x123,
218  CACA_KEY_F11 = 0x124,
219  CACA_KEY_F12 = 0x125,
220  CACA_KEY_F13 = 0x126,
221  CACA_KEY_F14 = 0x127,
222  CACA_KEY_F15 = 0x128
223 };
224 
232 __extern int caca_manage_canvas(caca_canvas_t *, int (*)(void *), void *);
233 __extern int caca_unmanage_canvas(caca_canvas_t *, int (*)(void *), void *);
237 __extern uint32_t const * caca_get_canvas_chars(caca_canvas_t const *);
238 __extern uint32_t const * caca_get_canvas_attrs(caca_canvas_t const *);
240 __extern int caca_rand(int, int);
241 __extern char const * caca_get_version(void);
242 /* @} */
243 
250 #define CACA_MAGIC_FULLWIDTH 0x000ffffe
251 __extern int caca_gotoxy(caca_canvas_t *, int, int);
252 __extern int caca_wherex(caca_canvas_t const *);
253 __extern int caca_wherey(caca_canvas_t const *);
254 __extern int caca_put_char(caca_canvas_t *, int, int, uint32_t);
255 __extern uint32_t caca_get_char(caca_canvas_t const *, int, int);
256 __extern int caca_put_str(caca_canvas_t *, int, int, char const *);
257 __extern int caca_printf(caca_canvas_t *, int, int, char const *, ...);
258 __extern int caca_vprintf(caca_canvas_t *, int, int, char const *, va_list);
263 __extern int caca_blit(caca_canvas_t *, int, int, caca_canvas_t const *,
264  caca_canvas_t const *);
265 __extern int caca_set_canvas_boundaries(caca_canvas_t *, int, int, int, int);
266 /* @} */
267 
275 __extern int caca_get_dirty_rect(caca_canvas_t *, int, int *, int *,
276  int *, int *);
277 __extern int caca_add_dirty_rect(caca_canvas_t *, int, int, int, int);
278 __extern int caca_remove_dirty_rect(caca_canvas_t *, int, int, int, int);
280 /* @} */
281 
295 /* @} */
296 
302 __extern uint32_t caca_get_attr(caca_canvas_t const *, int, int);
303 __extern int caca_set_attr(caca_canvas_t *, uint32_t);
304 __extern int caca_unset_attr(caca_canvas_t *, uint32_t);
305 __extern int caca_toggle_attr(caca_canvas_t *, uint32_t);
306 __extern int caca_put_attr(caca_canvas_t *, int, int, uint32_t);
307 __extern int caca_set_color_ansi(caca_canvas_t *, uint8_t, uint8_t);
308 __extern int caca_set_color_argb(caca_canvas_t *, uint16_t, uint16_t);
309 __extern uint8_t caca_attr_to_ansi(uint32_t);
310 __extern uint8_t caca_attr_to_ansi_fg(uint32_t);
311 __extern uint8_t caca_attr_to_ansi_bg(uint32_t);
312 __extern uint16_t caca_attr_to_rgb12_fg(uint32_t);
313 __extern uint16_t caca_attr_to_rgb12_bg(uint32_t);
314 __extern void caca_attr_to_argb64(uint32_t, uint8_t[8]);
315 /* @} */
316 
322 __extern uint32_t caca_utf8_to_utf32(char const *, size_t *);
323 __extern size_t caca_utf32_to_utf8(char *, uint32_t);
324 __extern uint8_t caca_utf32_to_cp437(uint32_t);
325 __extern uint32_t caca_cp437_to_utf32(uint8_t);
326 __extern char caca_utf32_to_ascii(uint32_t);
327 __extern int caca_utf32_is_fullwidth(uint32_t);
328 /* @} */
329 
336 __extern int caca_draw_line(caca_canvas_t *, int, int, int, int, uint32_t);
337 __extern int caca_draw_polyline(caca_canvas_t *, int const x[],
338  int const y[], int, uint32_t);
339 __extern int caca_draw_thin_line(caca_canvas_t *, int, int, int, int);
341  int const y[], int);
342 
343 __extern int caca_draw_circle(caca_canvas_t *, int, int, int, uint32_t);
344 __extern int caca_draw_ellipse(caca_canvas_t *, int, int, int, int, uint32_t);
345 __extern int caca_draw_thin_ellipse(caca_canvas_t *, int, int, int, int);
346 __extern int caca_fill_ellipse(caca_canvas_t *, int, int, int, int, uint32_t);
347 
348 __extern int caca_draw_box(caca_canvas_t *, int, int, int, int, uint32_t);
349 __extern int caca_draw_thin_box(caca_canvas_t *, int, int, int, int);
350 __extern int caca_draw_cp437_box(caca_canvas_t *, int, int, int, int);
351 __extern int caca_fill_box(caca_canvas_t *, int, int, int, int, uint32_t);
352 
353 __extern int caca_draw_triangle(caca_canvas_t *, int, int, int, int, int,
354  int, uint32_t);
355 __extern int caca_draw_thin_triangle(caca_canvas_t *, int, int, int, int,
356  int, int);
357 __extern int caca_fill_triangle(caca_canvas_t *, int, int, int, int, int,
358  int, uint32_t);
360  int coords[6],
361  caca_canvas_t *tex,
362  float uv[6]);
363 /* @} */
364 
373 __extern char const *caca_get_frame_name(caca_canvas_t const *);
374 __extern int caca_set_frame_name(caca_canvas_t *, char const *);
377 /* @} */
378 
385 __extern caca_dither_t *caca_create_dither(int, int, int, int,
386  uint32_t, uint32_t,
387  uint32_t, uint32_t);
389  uint32_t r[], uint32_t g[],
390  uint32_t b[], uint32_t a[]);
399  const *);
400 __extern char const * caca_get_dither_antialias(caca_dither_t const *);
401 __extern int caca_set_dither_color(caca_dither_t *, char const *);
403  const *);
404 __extern char const * caca_get_dither_color(caca_dither_t const *);
405 __extern int caca_set_dither_charset(caca_dither_t *, char const *);
407  const *);
408 __extern char const * caca_get_dither_charset(caca_dither_t const *);
411  const *);
412 __extern char const * caca_get_dither_algorithm(caca_dither_t const *);
413 __extern int caca_dither_bitmap(caca_canvas_t *, int, int, int, int,
414  caca_dither_t const *, void const *);
416 /* @} */
417 
423 __extern caca_charfont_t *caca_load_charfont(void const *, size_t);
425 /* @} */
426 
433 __extern caca_font_t *caca_load_font(void const *, size_t);
434 __extern char const * const * caca_get_font_list(void);
437 __extern uint32_t const *caca_get_font_blocks(caca_font_t const *);
439  void *, int, int, int);
441 /* @} */
442 
448 __extern int caca_canvas_set_figfont(caca_canvas_t *, char const *);
449 __extern int caca_set_figfont_smush(caca_canvas_t *, char const *);
451 __extern int caca_put_figchar(caca_canvas_t *, uint32_t);
453 /* @} */
454 
460 __extern caca_file_t *caca_file_open(char const *, const char *);
463 __extern size_t caca_file_read(caca_file_t *, void *, size_t);
464 __extern size_t caca_file_write(caca_file_t *, const void *, size_t);
465 __extern char * caca_file_gets(caca_file_t *, char *, int);
467 /* @} */
468 
477  size_t, char const *);
478 __extern ssize_t caca_import_canvas_from_file(caca_canvas_t *, char const *,
479  char const *);
481  void const *, size_t,
482  char const *);
484  char const *, char const *);
485 __extern char const * const * caca_get_import_list(void);
487  char const *, size_t *);
488 __extern void *caca_export_area_to_memory(caca_canvas_t const *, int, int,
489  int, int, char const *, size_t *);
490 __extern char const * const * caca_get_export_list(void);
491 /* @} */
492 
501  char const *);
502 __extern char const * const * caca_get_display_driver_list(void);
504 __extern int caca_set_display_driver(caca_display_t *, char const *);
512 __extern int caca_set_display_title(caca_display_t *, char const *);
515 /* @} */
516 
529 __extern int caca_get_event_key_utf8(caca_event_t const *, char *);
535 /* @} */
536 
544 __extern char *caca_optarg;
545 __extern int caca_getopt(int, char * const[], char const *,
546  struct caca_option const *, int *);
547 /* @} */
548 
555 {
573 };
574 
581 {
585 };
586 
593 {
601 };
602 
609 {
610  unsigned char winleft;
611  unsigned char wintop;
612  unsigned char winright;
613  unsigned char winbottom;
614  unsigned char attribute;
615  unsigned char normattr;
616  unsigned char currmode;
618  unsigned char screenheight;
619  unsigned char screenwidth;
620  unsigned char curx;
621  unsigned char cury;
622 };
623 
626 
629 
636 __extern char * caca_conio_cgets(char *str);
637 __extern void caca_conio_clreol(void);
638 __extern void caca_conio_clrscr(void);
639 __extern int caca_conio_cprintf(const char *format, ...);
640 __extern int caca_conio_cputs(const char *str);
641 __extern int caca_conio_cscanf(char *format, ...);
642 __extern void caca_conio_delay(unsigned int);
643 __extern void caca_conio_delline(void);
644 __extern int caca_conio_getch(void);
645 __extern int caca_conio_getche(void);
646 __extern char * caca_conio_getpass(const char *prompt);
647 __extern int caca_conio_gettext(int left, int top, int right, int bottom,
648  void *destin);
650 __extern void caca_conio_gotoxy(int x, int y);
651 __extern void caca_conio_highvideo(void);
652 __extern void caca_conio_insline(void);
653 __extern int caca_conio_kbhit(void);
654 __extern void caca_conio_lowvideo(void);
655 __extern int caca_conio_movetext(int left, int top, int right, int bottom,
656  int destleft, int desttop);
657 __extern void caca_conio_normvideo(void);
658 __extern void caca_conio_nosound(void);
659 __extern int caca_conio_printf(const char *format, ...);
660 __extern int caca_conio_putch(int ch);
661 __extern int caca_conio_puttext(int left, int top, int right, int bottom,
662  void *destin);
663 __extern void caca_conio__setcursortype(int cur_t);
664 __extern void caca_conio_sleep(unsigned int);
665 __extern void caca_conio_sound(unsigned int);
666 __extern void caca_conio_textattr(int newattr);
667 __extern void caca_conio_textbackground(int newcolor);
668 __extern void caca_conio_textcolor(int newcolor);
669 __extern void caca_conio_textmode(int newmode);
670 __extern int caca_conio_ungetch(int ch);
671 __extern int caca_conio_wherex(void);
672 __extern int caca_conio_wherey(void);
673 __extern void caca_conio_window(int left, int top, int right, int bottom);
674 /* @} */
675 
676 #if !defined(_DOXYGEN_SKIP_ME)
677  /* Legacy stuff from beta versions, will probably disappear in 1.0 */
679 
680 # if defined __GNUC__ && __GNUC__ >= 3
681 # define CACA_DEPRECATED __attribute__ ((__deprecated__))
682 # else
683 # define CACA_DEPRECATED
684 # endif
685 
686 # if defined __GNUC__ && __GNUC__ > 3 && !defined __APPLE__
687 # define CACA_ALIAS(x) __attribute__ ((weak, alias(#x)))
688 # else
689 # define CACA_ALIAS(x)
690 # endif
691 
692 # if defined __GNUC__ && __GNUC__ > 3
693 # define CACA_WEAK __attribute__ ((weak))
694 # else
695 # define CACA_WEAK
696 # endif
697 
698 
699 /* Aliases from old libcaca and libcucul functions */
700 __extern int cucul_putchar(caca_canvas_t *, int, int,
701  unsigned long int) CACA_DEPRECATED;
702 __extern unsigned long int cucul_getchar(caca_canvas_t *,
703  int, int) CACA_DEPRECATED;
704 __extern int cucul_putstr(caca_canvas_t *, int, int,
705  char const *) CACA_DEPRECATED;
706 __extern int cucul_set_color(caca_canvas_t *, unsigned char,
707  unsigned char) CACA_DEPRECATED;
708 __extern int cucul_set_truecolor(caca_canvas_t *, unsigned int,
709  unsigned int) CACA_DEPRECATED;
713  unsigned int) CACA_DEPRECATED;
715  unsigned int) CACA_DEPRECATED;
717  unsigned int) CACA_DEPRECATED;
719  unsigned long int) CACA_DEPRECATED;
721 __extern unsigned long int cucul_get_buffer_size(cucul_buffer_t *)
726  char const *) CACA_DEPRECATED;
728  char const *) CACA_DEPRECATED;
729 #if !defined _WIN32 || !defined __GNUC__
730 __extern ssize_t caca_import_memory(caca_canvas_t *, void const *, size_t,
731  char const *) CACA_DEPRECATED;
732 __extern ssize_t caca_import_file(caca_canvas_t *, char const *,
733  char const *) CACA_DEPRECATED;
734 __extern void *caca_export_memory(caca_canvas_t const *, char const *,
735  size_t *) CACA_DEPRECATED;
736 #endif
740  char const *) CACA_DEPRECATED;
741 __extern char const * const * cucul_get_dither_mode_list(caca_dither_t const *)
743 # define CUCUL_COLOR_BLACK CACA_BLACK
744 # define CUCUL_COLOR_BLUE CACA_BLUE
745 # define CUCUL_COLOR_GREEN CACA_GREEN
746 # define CUCUL_COLOR_CYAN CACA_CYAN
747 # define CUCUL_COLOR_RED CACA_RED
748 # define CUCUL_COLOR_MAGENTA CACA_MAGENTA
749 # define CUCUL_COLOR_BROWN CACA_BROWN
750 # define CUCUL_COLOR_LIGHTGRAY CACA_LIGHTGRAY
751 # define CUCUL_COLOR_DARKGRAY CACA_DARKGRAY
752 # define CUCUL_COLOR_LIGHTBLUE CACA_LIGHTBLUE
753 # define CUCUL_COLOR_LIGHTGREEN CACA_LIGHTGREEN
754 # define CUCUL_COLOR_LIGHTCYAN CACA_LIGHTCYAN
755 # define CUCUL_COLOR_LIGHTRED CACA_LIGHTRED
756 # define CUCUL_COLOR_LIGHTMAGENTA CACA_LIGHTMAGENTA
757 # define CUCUL_COLOR_YELLOW CACA_YELLOW
758 # define CUCUL_COLOR_WHITE CACA_YELLOW
759 # define CUCUL_COLOR_DEFAULT CACA_DEFAULT
760 # define CUCUL_COLOR_TRANSPARENT CACA_TRANSPARENT
761 
762 /* Aliases from the libcucul/libcaca merge */
763 # define cucul_canvas_t caca_canvas_t
764 # define cucul_dither_t caca_dither_t
765 # define cucul_font_t caca_font_t
766 # define cucul_file_t caca_file_t
767 # define cucul_display_t caca_display_t
768 # define cucul_event_t caca_event_t
769 
770 # define CUCUL_BLACK CACA_BLACK
771 # define CUCUL_BLUE CACA_BLUE
772 # define CUCUL_GREEN CACA_GREEN
773 # define CUCUL_CYAN CACA_CYAN
774 # define CUCUL_RED CACA_RED
775 # define CUCUL_MAGENTA CACA_MAGENTA
776 # define CUCUL_BROWN CACA_BROWN
777 # define CUCUL_LIGHTGRAY CACA_LIGHTGRAY
778 # define CUCUL_DARKGRAY CACA_DARKGRAY
779 # define CUCUL_LIGHTBLUE CACA_LIGHTBLUE
780 # define CUCUL_LIGHTGREEN CACA_LIGHTGREEN
781 # define CUCUL_LIGHTCYAN CACA_LIGHTCYAN
782 # define CUCUL_LIGHTRED CACA_LIGHTRED
783 # define CUCUL_LIGHTMAGENTA CACA_LIGHTMAGENTA
784 # define CUCUL_YELLOW CACA_YELLOW
785 # define CUCUL_WHITE CACA_YELLOW
786 # define CUCUL_DEFAULT CACA_DEFAULT
787 # define CUCUL_TRANSPARENT CACA_TRANSPARENT
788 
789 # define CUCUL_BOLD CACA_BOLD
790 # define CUCUL_ITALICS CACA_ITALICS
791 # define CUCUL_UNDERLINE CACA_UNDERLINE
792 # define CUCUL_BLINK CACA_BLINK
793 
794 # if !defined __LIBCACA__
795 # define caca_get_cursor_x caca_wherex
796 # define caca_get_cursor_y caca_wherey
797 # define cucul_draw_triangle caca_draw_triangle
798 # define cucul_draw_thin_triangle caca_draw_thin_triangle
799 # define cucul_fill_triangle caca_fill_triangle
800 # define cucul_load_font caca_load_font
801 # define cucul_get_font_list caca_get_font_list
802 # define cucul_get_font_width caca_get_font_width
803 # define cucul_get_font_height caca_get_font_height
804 # define cucul_get_font_blocks caca_get_font_blocks
805 # define cucul_render_canvas caca_render_canvas
806 # define cucul_free_font caca_free_font
807 # define cucul_gotoxy caca_gotoxy
808 # define cucul_get_cursor_x caca_wherex
809 # define cucul_get_cursor_y caca_wherey
810 # define cucul_put_char caca_put_char
811 # define cucul_get_char caca_get_char
812 # define cucul_put_str caca_put_str
813 # define cucul_printf caca_printf
814 # define cucul_clear_canvas caca_clear_canvas
815 # define cucul_set_canvas_handle caca_set_canvas_handle
816 # define cucul_get_canvas_handle_x caca_get_canvas_handle_x
817 # define cucul_get_canvas_handle_y caca_get_canvas_handle_y
818 # define cucul_blit caca_blit
819 # define cucul_set_canvas_boundaries caca_set_canvas_boundaries
820 # define cucul_import_memory caca_import_memory
821 # define cucul_import_file caca_import_file
822 # define cucul_get_import_list caca_get_import_list
823 # define cucul_create_canvas caca_create_canvas
824 # define cucul_manage_canvas caca_manage_canvas
825 # define cucul_unmanage_canvas caca_unmanage_canvas
826 # define cucul_set_canvas_size caca_set_canvas_size
827 # define cucul_get_canvas_width caca_get_canvas_width
828 # define cucul_get_canvas_height caca_get_canvas_height
829 # define cucul_get_canvas_chars caca_get_canvas_chars
830 # define cucul_get_canvas_attrs caca_get_canvas_attrs
831 # define cucul_free_canvas caca_free_canvas
832 # define cucul_rand caca_rand
833 # define cucul_export_memory caca_export_memory
834 # define cucul_get_export_list caca_get_export_list
835 # define cucul_get_version caca_get_version
836 # define cucul_utf8_to_utf32 caca_utf8_to_utf32
837 # define cucul_utf32_to_utf8 caca_utf32_to_utf8
838 # define cucul_utf32_to_cp437 caca_utf32_to_cp437
839 # define cucul_cp437_to_utf32 caca_cp437_to_utf32
840 # define cucul_utf32_to_ascii caca_utf32_to_ascii
841 # define cucul_utf32_is_fullwidth caca_utf32_is_fullwidth
842 # define cucul_draw_circle caca_draw_circle
843 # define cucul_draw_ellipse caca_draw_ellipse
844 # define cucul_draw_thin_ellipse caca_draw_thin_ellipse
845 # define cucul_fill_ellipse caca_fill_ellipse
846 # define cucul_canvas_set_figfont caca_canvas_set_figfont
847 # define cucul_put_figchar caca_put_figchar
848 # define cucul_flush_figlet caca_flush_figlet
849 # define cucul_putchar caca_putchar
850 # define cucul_getchar caca_getchar
851 # define cucul_get_attr caca_get_attr
852 # define cucul_set_attr caca_set_attr
853 # define cucul_put_attr caca_put_attr
854 # define cucul_set_color_ansi caca_set_color_ansi
855 # define cucul_set_color_argb caca_set_color_argb
856 # define cucul_attr_to_ansi caca_attr_to_ansi
857 # define cucul_attr_to_ansi_fg caca_attr_to_ansi_fg
858 # define cucul_attr_to_ansi_bg caca_attr_to_ansi_bg
859 # define cucul_attr_to_rgb12_fg caca_attr_to_rgb12_fg
860 # define cucul_attr_to_rgb12_bg caca_attr_to_rgb12_bg
861 # define cucul_attr_to_argb64 caca_attr_to_argb64
862 # define cucul_invert caca_invert
863 # define cucul_flip caca_flip
864 # define cucul_flop caca_flop
865 # define cucul_rotate_180 caca_rotate_180
866 # define cucul_rotate_left caca_rotate_left
867 # define cucul_rotate_right caca_rotate_right
868 # define cucul_stretch_left caca_stretch_left
869 # define cucul_stretch_right caca_stretch_right
870 # define cucul_file_open caca_file_open
871 # define cucul_file_close caca_file_close
872 # define cucul_file_tell caca_file_tell
873 # define cucul_file_read caca_file_read
874 # define cucul_file_write caca_file_write
875 # define cucul_file_gets caca_file_gets
876 # define cucul_file_eof caca_file_eof
877 # define cucul_create_dither caca_create_dither
878 # define cucul_set_dither_palette caca_set_dither_palette
879 # define cucul_set_dither_brightness caca_set_dither_brightness
880 # define cucul_get_dither_brightness caca_get_dither_brightness
881 # define cucul_set_dither_gamma caca_set_dither_gamma
882 # define cucul_get_dither_gamma caca_get_dither_gamma
883 # define cucul_set_dither_contrast caca_set_dither_contrast
884 # define cucul_get_dither_contrast caca_get_dither_contrast
885 # define cucul_set_dither_antialias caca_set_dither_antialias
886 # define cucul_get_dither_antialias_list caca_get_dither_antialias_list
887 # define cucul_get_dither_antialias caca_get_dither_antialias
888 # define cucul_set_dither_color caca_set_dither_color
889 # define cucul_get_dither_color_list caca_get_dither_color_list
890 # define cucul_get_dither_color caca_get_dither_color
891 # define cucul_set_dither_charset caca_set_dither_charset
892 # define cucul_get_dither_charset_list caca_get_dither_charset_list
893 # define cucul_get_dither_charset caca_get_dither_charset
894 # define cucul_set_dither_algorithm caca_set_dither_algorithm
895 # define cucul_get_dither_algorithm_list caca_get_dither_algorithm_list
896 # define cucul_get_dither_algorithm caca_get_dither_algorithm
897 # define cucul_dither_bitmap caca_dither_bitmap
898 # define cucul_free_dither caca_free_dither
899 # define cucul_draw_line caca_draw_line
900 # define cucul_draw_polyline caca_draw_polyline
901 # define cucul_draw_thin_line caca_draw_thin_line
902 # define cucul_draw_thin_polyline caca_draw_thin_polyline
903 # define cucul_draw_box caca_draw_box
904 # define cucul_draw_thin_box caca_draw_thin_box
905 # define cucul_draw_cp437_box caca_draw_cp437_box
906 # define cucul_fill_box caca_fill_box
907 # define cucul_get_frame_count caca_get_frame_count
908 # define cucul_set_frame caca_set_frame
909 # define cucul_get_frame_name caca_get_frame_name
910 # define cucul_set_frame_name caca_set_frame_name
911 # define cucul_create_frame caca_create_frame
912 # define cucul_free_frame caca_free_frame
913 # endif
914 #endif
915 
916 #ifdef __cplusplus
917 }
918 #endif
919 
920 #undef __extern
921 
922 #endif /* __CACA_H__ */
caca_event::data
union caca_event::@0 data
caca_get_font_height
int caca_get_font_height(caca_font_t const *)
Get a font's standard glyph height.
Definition: font.c:339
caca_conio_getpass
char * caca_conio_getpass(const char *prompt)
DOS conio.h getpass() equivalent.
Definition: caca_conio.c:223
CACA_KEY_DOWN
Definition: caca.h:198
caca_create_dither
caca_dither_t * caca_create_dither(int, int, int, int, uint32_t, uint32_t, uint32_t, uint32_t)
Create an internal dither object.
Definition: dither.c:261
CACA_LIGHTGREEN
Definition: caca.h:81
caca_draw_ellipse
int caca_draw_ellipse(caca_canvas_t *, int, int, int, int, uint32_t)
Draw an ellipse on the canvas using the given character.
Definition: conic.c:128
caca_wherey
int caca_wherey(caca_canvas_t const *)
Get Y cursor position.
Definition: string.c:89
CACA_DEPRECATED
#define CACA_DEPRECATED
Definition: caca.h:683
caca_dither
Definition: dither.c:116
caca_get_canvas_handle_y
int caca_get_canvas_handle_y(caca_canvas_t const *)
Get Y handle position.
Definition: string.c:434
caca_set_dither_antialias
int caca_set_dither_antialias(caca_dither_t *, char const *)
Set dither antialiasing.
Definition: dither.c:544
CACA_CONIO_DARKGRAY
Definition: caca.h:565
caca_event::w
int w
Definition: caca.h:135
cucul_load_memory
cucul_buffer_t * cucul_load_memory(void *, unsigned long int)
Definition: legacy.c:166
CACA_KEY_PAUSE
Definition: caca.h:184
caca_key
caca_key
Special key values.
Definition: caca.h:161
cucul_set_truecolor
int cucul_set_truecolor(caca_canvas_t *, unsigned int, unsigned int)
Definition: legacy.c:64
caca_conio_text_info::attribute
unsigned char attribute
Definition: caca.h:614
CACA_CONIO_MAGENTA
Definition: caca.h:562
cucul_buffer
Definition: legacy.c:29
caca_event::h
int h
Definition: caca.h:135
caca_wherex
int caca_wherex(caca_canvas_t const *)
Get X cursor position.
Definition: string.c:75
caca_file
Definition: file.c:38
caca_get_dither_color
const char * caca_get_dither_color(caca_dither_t const *)
Get current colour mode.
Definition: dither.c:714
caca_get_event_resize_height
int caca_get_event_resize_height(caca_event_t const *)
Return a resize event's display height value.
Definition: event.c:340
caca_utf32_to_ascii
char caca_utf32_to_ascii(uint32_t)
Convert a UTF-32 character to ASCII.
Definition: charset.c:249
caca_types.h
__extern
#define __extern
Definition: caca.h:37
caca_set_dither_brightness
int caca_set_dither_brightness(caca_dither_t *, float)
Set the brightness of a dither object.
Definition: dither.c:421
CACA_KEY_CTRL_V
Definition: caca.h:187
caca_flip
int caca_flip(caca_canvas_t *)
Flip a canvas horizontally.
Definition: transform.c:73
caca_conio_cprintf
int caca_conio_cprintf(const char *format,...)
DOS conio.h cprintf() equivalent.
Definition: caca_conio.c:99
caca_free_charfont
int caca_free_charfont(caca_charfont_t *)
caca_export_canvas_to_memory
void * caca_export_canvas_to_memory(caca_canvas_t const *, char const *, size_t *)
Export a canvas into a foreign format.
Definition: export.c:83
caca_blit
int caca_blit(caca_canvas_t *, int, int, caca_canvas_t const *, caca_canvas_t const *)
Blit a canvas onto another one.
Definition: string.c:455
caca_remove_dirty_rect
int caca_remove_dirty_rect(caca_canvas_t *, int, int, int, int)
Remove an area from the dirty rectangle list.
Definition: dirty.c:219
caca_canvas_set_figfont
int caca_canvas_set_figfont(caca_canvas_t *, char const *)
load a figfont and attach it to a canvas
Definition: figfont.c:60
caca_get_event_key_utf8
int caca_get_event_key_utf8(caca_event_t const *, char *)
Return a key press or key release event's UTF-8 value.
Definition: event.c:256
caca_create_display
caca_display_t * caca_create_display(caca_canvas_t *)
Attach a caca graphical context to a caca canvas.
Definition: caca.c:68
caca_set_dither_palette
int caca_set_dither_palette(caca_dither_t *, uint32_t r[], uint32_t g[], uint32_t b[], uint32_t a[])
Set the palette of an 8bpp dither object.
Definition: dither.c:372
CACA_KEY_F10
Definition: caca.h:217
caca_free_frame
int caca_free_frame(caca_canvas_t *, int)
Remove a frame from a canvas.
Definition: frame.c:205
caca_file_write
size_t caca_file_write(caca_file_t *, const void *, size_t)
Write data to a file handle.
Definition: file.c:222
caca_get_dither_gamma
float caca_get_dither_gamma(caca_dither_t const *)
Get the gamma of a dither object.
Definition: dither.c:490
caca_conio_directvideo
int caca_conio_directvideo
DOS direct video control.
Definition: caca_conio.c:43
caca_draw_polyline
int caca_draw_polyline(caca_canvas_t *, int const x[], int const y[], int, uint32_t)
Draw a polyline.
Definition: line.c:85
caca_get_dither_color_list
const char *const * caca_get_dither_color_list(caca_dither_t const *)
Get available colour modes.
Definition: dither.c:688
caca_set_mouse
int caca_set_mouse(caca_display_t *, int)
Show or hide the mouse pointer.
Definition: graphics.c:243
caca_draw_cp437_box
int caca_draw_cp437_box(caca_canvas_t *, int, int, int, int)
Draw a box on the canvas using CP437 characters.
Definition: box.c:86
CACA_KEY_F2
Definition: caca.h:209
CACA_KEY_UNKNOWN
Definition: caca.h:163
CACA_CONIO_LIGHTGREEN
Definition: caca.h:567
CACA_CONIO_LIGHTMAGENTA
Definition: caca.h:570
caca_conio_gotoxy
void caca_conio_gotoxy(int x, int y)
DOS conio.h gotoxy() equivalent.
Definition: caca_conio.c:264
caca_draw_circle
int caca_draw_circle(caca_canvas_t *, int, int, int, uint32_t)
Draw a circle on the canvas using the given character.
Definition: conic.c:40
caca_get_version
const char * caca_get_version(void)
Return the libcaca version.
Definition: caca.c:272
y
static int y
Definition: cacadraw.c:27
CACA_KEY_CTRL_L
Definition: caca.h:177
caca_enable_dirty_rect
int caca_enable_dirty_rect(caca_canvas_t *)
Enable dirty rectangles.
Definition: dirty.c:69
caca_load_charfont
caca_charfont_t * caca_load_charfont(void const *, size_t)
CACA_CONIO_YELLOW
Definition: caca.h:571
caca_event::y
int y
Definition: caca.h:134
CACA_CYAN
Definition: caca.h:74
caca_conio_highvideo
void caca_conio_highvideo(void)
DOS conio.h highvideo() equivalent.
Definition: caca_conio.c:274
caca_set_dither_algorithm
int caca_set_dither_algorithm(caca_dither_t *, char const *)
Set dithering algorithm.
Definition: dither.c:828
caca_utf32_to_utf8
size_t caca_utf32_to_utf8(char *, uint32_t)
Convert a UTF-32 character to UTF-8.
Definition: charset.c:151
cucul_getchar
#define cucul_getchar
Definition: caca.h:850
caca_clear_dirty_rect_list
int caca_clear_dirty_rect_list(caca_canvas_t *)
Clear a canvas's dirty rectangle list.
Definition: dirty.c:256
caca_conio_text_info::winleft
unsigned char winleft
Definition: caca.h:610
caca_set_display_time
int caca_set_display_time(caca_display_t *, int)
Set the refresh delay.
Definition: graphics.c:100
caca_invert
int caca_invert(caca_canvas_t *)
Invert a canvas' colours.
Definition: transform.c:44
CACA_KEY_F14
Definition: caca.h:221
CACA_ITALICS
Definition: caca.h:95
caca_conio__wscroll
int caca_conio__wscroll
DOS scrolling control.
Definition: caca_conio.c:44
caca_get_display_driver
const char * caca_get_display_driver(caca_display_t *)
Return a caca graphical context's current output driver.
Definition: caca.c:196
caca_rotate_left
int caca_rotate_left(caca_canvas_t *)
Rotate a canvas, 90 degrees counterclockwise.
Definition: transform.c:255
caca_set_frame_name
int caca_set_frame_name(caca_canvas_t *, char const *)
Set the current frame's name.
Definition: frame.c:108
caca_draw_line
int caca_draw_line(caca_canvas_t *, int, int, int, int, uint32_t)
Draw a line on the canvas using the given character.
Definition: line.c:54
caca_import_area_from_memory
ssize_t caca_import_area_from_memory(caca_canvas_t *, int, int, void const *, size_t, char const *)
Import a memory buffer into a canvas area.
Definition: import.c:209
caca_get_dither_charset
const char * caca_get_dither_charset(caca_dither_t const *)
Get current character set.
Definition: dither.c:803
g
int g
Definition: cacaview.c:60
caca_event::padding
uint8_t padding[16]
Definition: caca.h:139
CACA_KEY_LEFT
Definition: caca.h:199
CACA_KEY_BACKSPACE
Definition: caca.h:173
caca_set_attr
int caca_set_attr(caca_canvas_t *, uint32_t)
Set the default character attribute.
Definition: attr.c:97
caca_draw_box
int caca_draw_box(caca_canvas_t *, int, int, int, int, uint32_t)
Draw a box on the canvas using the given character.
Definition: box.c:41
CACA_KEY_TAB
Definition: caca.h:174
CACA_CONIO_BW80
Definition: caca.h:597
caca_option
Option parsing.
Definition: caca.h:148
caca_flush_figlet
int caca_flush_figlet(caca_canvas_t *)
flush the figlet context
Definition: figfont.c:267
caca_conio_textcolor
void caca_conio_textcolor(int newcolor)
DOS conio.h textcolor() equivalent.
Definition: caca_conio.c:480
caca_render_canvas
int caca_render_canvas(caca_canvas_t const *, caca_font_t const *, void *, int, int, int)
Render the canvas onto an image buffer.
Definition: font.c:415
caca_conio_cputs
int caca_conio_cputs(const char *str)
DOS conio.h cputs() equivalent.
Definition: caca_conio.c:119
caca_create_frame
int caca_create_frame(caca_canvas_t *, int)
Add a frame to a canvas.
Definition: frame.c:145
caca_conio_gettextinfo
void caca_conio_gettextinfo(struct caca_conio_text_info *r)
DOS conio.h gettextinfo() equivalent.
Definition: caca_conio.c:256
caca_event
Handling of user events.
Definition: caca.h:129
CACA_KEY_CTRL_D
Definition: caca.h:169
caca_get_dither_contrast
float caca_get_dither_contrast(caca_dither_t const *)
Get the contrast of a dither object.
Definition: dither.c:523
caca_file_eof
int caca_file_eof(caca_file_t *)
Tell whether a file handle reached end of file.
Definition: file.c:298
caca_event::x
int x
Definition: caca.h:134
CACA_KEY_F9
Definition: caca.h:216
caca_event::resize
struct caca_event::@0::@2 resize
caca_conio_lowvideo
void caca_conio_lowvideo(void)
DOS conio.h lowvideo() equivalent.
Definition: caca_conio.c:324
caca_rand
int caca_rand(int, int)
Definition: canvas.c:346
CACA_KEY_F7
Definition: caca.h:214
caca_create_canvas
caca_canvas_t * caca_create_canvas(int, int)
Initialise a libcaca canvas.
Definition: canvas.c:54
caca_conio_text_info::normattr
unsigned char normattr
Definition: caca.h:615
caca_display
Definition: caca_internals.h:167
caca_free_canvas
int caca_free_canvas(caca_canvas_t *)
Free a libcaca canvas.
Definition: canvas.c:308
caca_conio_textbackground
void caca_conio_textbackground(int newcolor)
DOS conio.h textbackground() equivalent.
Definition: caca_conio.c:471
caca_conio_text_info
DOS text area information.
Definition: caca.h:608
cucul_free_buffer
int cucul_free_buffer(cucul_buffer_t *)
Definition: legacy.c:232
caca_conio_clrscr
void caca_conio_clrscr(void)
DOS conio.h clrscr() equivalent.
Definition: caca_conio.c:87
caca_get_canvas_attrs
const uint32_t * caca_get_canvas_attrs(caca_canvas_t const *)
Get the canvas attribute array.
Definition: canvas.c:291
caca_get_event_type
enum caca_event_type caca_get_event_type(caca_event_t const *)
Return an event's type.
Definition: event.c:202
caca_get_canvas_height
int caca_get_canvas_height(caca_canvas_t const *)
Get the canvas height.
Definition: canvas.c:253
caca_conio_sleep
void caca_conio_sleep(unsigned int)
DOS dos.h sleep() equivalent.
Definition: caca_conio.c:431
caca_unset_attr
int caca_unset_attr(caca_canvas_t *, uint32_t)
Unset flags in the default character attribute.
Definition: attr.c:127
caca_event::utf32
uint32_t utf32
Definition: caca.h:136
CACA_EVENT_QUIT
Definition: caca.h:117
caca_conio_kbhit
int caca_conio_kbhit(void)
DOS conio.h kbhit() equivalent.
Definition: caca_conio.c:290
caca_put_figchar
int caca_put_figchar(caca_canvas_t *, uint32_t)
paste a character using the current figfont
Definition: figfont.c:143
cucul_get_canvas_frame_count
unsigned int cucul_get_canvas_frame_count(caca_canvas_t *)
Definition: legacy.c:142
caca_style
caca_style
Definition: caca.h:92
CACA_CONIO_MODE
CACA_CONIO_MODE
DOS video modes.
Definition: caca.h:592
caca_export_memory
void * caca_export_memory(caca_canvas_t const *, char const *, size_t *)
CACA_CONIO_LIGHTGRAY
Definition: caca.h:564
CACA_KEY_PAGEUP
Definition: caca.h:205
caca_event::type
enum caca_event_type type
Definition: caca.h:131
caca_get_dirty_rect
int caca_get_dirty_rect(caca_canvas_t *, int, int *, int *, int *, int *)
Get a canvas's dirty rectangle.
Definition: dirty.c:125
CACA_KEY_CTRL_F
Definition: caca.h:171
CACA_KEY_CTRL_N
Definition: caca.h:179
caca_set_display_driver
int caca_set_display_driver(caca_display_t *, char const *)
Set the output driver.
Definition: caca.c:212
caca_conio_insline
void caca_conio_insline(void)
DOS conio.h insline() equivalent.
Definition: caca_conio.c:282
caca_conio_textattr
void caca_conio_textattr(int newattr)
DOS conio.h textattr() equivalent.
Definition: caca_conio.c:463
CACA_CONIO_C40
Definition: caca.h:596
CACA_KEY_END
Definition: caca.h:204
caca_get_dither_antialias_list
const char *const * caca_get_dither_antialias_list(caca_dither_t const *)
Get available antialiasing methods.
Definition: dither.c:579
CACA_KEY_CTRL_J
Definition: caca.h:175
cucul_rotate
int cucul_rotate(caca_canvas_t *)
Definition: legacy.c:246
caca_get_event_mouse_y
int caca_get_event_mouse_y(caca_event_t const *)
Return a mouse motion event's Y coordinate.
Definition: event.c:308
CACA_CONIO_C4350
Definition: caca.h:600
caca_get_canvas_width
int caca_get_canvas_width(caca_canvas_t const *)
Get the canvas width.
Definition: canvas.c:239
caca_get_font_list
const char *const * caca_get_font_list(void)
Get available builtin fonts.
Definition: font.c:302
CACA_EVENT_MOUSE_MOTION
Definition: caca.h:115
caca_option::name
const char * name
Definition: caca.h:150
caca_draw_thin_line
int caca_draw_thin_line(caca_canvas_t *, int, int, int, int)
Draw a thin line on the canvas, using ASCII art.
Definition: line.c:116
caca_import_memory
ssize_t caca_import_memory(caca_canvas_t *, void const *, size_t, char const *)
CACA_KEY_CTRL_U
Definition: caca.h:186
caca_conio_clreol
void caca_conio_clreol(void)
DOS conio.h clreol() equivalent.
Definition: caca_conio.c:75
CACA_EVENT_ANY
Definition: caca.h:119
caca_option::has_arg
int has_arg
Definition: caca.h:151
caca_conio_movetext
int caca_conio_movetext(int left, int top, int right, int bottom, int destleft, int desttop)
DOS conio.h movetext() equivalent.
Definition: caca_conio.c:332
caca_conio_window
void caca_conio_window(int left, int top, int right, int bottom)
DOS conio.h window() equivalent.
Definition: caca_conio.c:526
caca_get_dither_algorithm
const char * caca_get_dither_algorithm(caca_dither_t const *)
Get current dithering algorithm.
Definition: dither.c:919
caca_get_event_mouse_button
int caca_get_event_mouse_button(caca_event_t const *)
Return a mouse press or mouse release event's button.
Definition: event.c:276
caca_event::key
struct caca_event::@0::@3 key
caca_get_font_width
int caca_get_font_width(caca_font_t const *)
Get a font's standard glyph width.
Definition: font.c:324
caca_get_dither_antialias
const char * caca_get_dither_antialias(caca_dither_t const *)
Get current antialiasing method.
Definition: dither.c:600
CACA_LIGHTBLUE
Definition: caca.h:80
caca_attr_to_argb64
void caca_attr_to_argb64(uint32_t, uint8_t[8])
Get 64-bit ARGB information from attribute.
Definition: attr.c:433
CACA_BLINK
Definition: caca.h:97
CACA_LIGHTGRAY
Definition: caca.h:78
caca_conio_nosound
void caca_conio_nosound(void)
DOS dos.h nosound() equivalent.
Definition: caca_conio.c:363
caca_conio__setcursortype
void caca_conio__setcursortype(int cur_t)
DOS conio.h _setcursortype() equivalent.
Definition: caca_conio.c:412
caca_fill_box
int caca_fill_box(caca_canvas_t *, int, int, int, int, uint32_t)
Fill a box on the canvas using the given character.
Definition: box.c:109
caca_set_cursor
int caca_set_cursor(caca_display_t *, int)
Show or hide the cursor.
Definition: graphics.c:218
caca_option::val
int val
Definition: caca.h:153
caca_event::button
int button
Definition: caca.h:134
CACA_EVENT_MOUSE_PRESS
Definition: caca.h:113
caca_cp437_to_utf32
uint32_t caca_cp437_to_utf32(uint8_t)
Convert a CP437 character to UTF-32.
Definition: charset.c:223
caca_stretch_left
int caca_stretch_left(caca_canvas_t *)
Rotate and stretch a canvas, 90 degrees counterclockwise.
Definition: transform.c:493
caca_set_figfont_width
int caca_set_figfont_width(caca_canvas_t *, int)
set the width of the figfont rendering
Definition: figfont.c:102
caca_set_dither_gamma
int caca_set_dither_gamma(caca_dither_t *, float)
Set the gamma of a dither object.
Definition: dither.c:455
caca_conio_ungetch
int caca_conio_ungetch(int ch)
DOS conio.h ungetch() equivalent.
Definition: caca_conio.c:497
CACA_WHITE
Definition: caca.h:86
caca_put_str
int caca_put_str(caca_canvas_t *, int, int, char const *)
Print a string.
Definition: string.c:254
CACA_TRANSPARENT
Definition: caca.h:88
CACA_KEY_CTRL_T
Definition: caca.h:185
caca_stretch_right
int caca_stretch_right(caca_canvas_t *)
Rotate and stretch a canvas, 90 degrees clockwise.
Definition: transform.c:586
caca_get_canvas
caca_canvas_t * caca_get_canvas(caca_display_t *)
Get the canvas attached to a caca graphical context.
Definition: caca.c:259
cucul_free_canvas_frame
int cucul_free_canvas_frame(caca_canvas_t *, unsigned int)
Definition: legacy.c:157
caca_get_event
int caca_get_event(caca_display_t *, int, caca_event_t *, int)
Get the next mouse or keyboard input event.
Definition: event.c:63
caca_get_event_resize_width
int caca_get_event_resize_width(caca_event_t const *)
Return a resize event's display width value.
Definition: event.c:324
caca_conio_text_info::curx
unsigned char curx
Definition: caca.h:620
caca_set_dither_charset
int caca_set_dither_charset(caca_dither_t *, char const *)
Choose characters used for dithering.
Definition: dither.c:739
caca_import_file
ssize_t caca_import_file(caca_canvas_t *, char const *, char const *)
caca_fill_triangle_textured
int caca_fill_triangle_textured(caca_canvas_t *cv, int coords[6], caca_canvas_t *tex, float uv[6])
Fill a triangle on the canvas using an arbitrary-sized texture.
Definition: triangle.c:361
caca_attr_to_rgb12_bg
uint16_t caca_attr_to_rgb12_bg(uint32_t)
Get 12-bit RGB background information from attribute.
Definition: attr.c:398
CACA_CONIO_COLORS
CACA_CONIO_COLORS
DOS colours.
Definition: caca.h:554
CACA_KEY_CTRL_Z
Definition: caca.h:191
CACA_KEY_CTRL_E
Definition: caca.h:170
caca_conio_text_info::winright
unsigned char winright
Definition: caca.h:612
caca_get_frame_name
const char * caca_get_frame_name(caca_canvas_t const *)
Get the current frame's name.
Definition: frame.c:90
CACA_CONIO_BROWN
Definition: caca.h:563
caca_conio_cscanf
int caca_conio_cscanf(char *format,...)
DOS stdio.h cscanf() equivalent.
Definition: caca_conio.c:138
caca_unmanage_canvas
int caca_unmanage_canvas(caca_canvas_t *, int(*)(void *), void *)
unmanage a canvas.
Definition: canvas.c:167
caca_conio_text_info::screenheight
unsigned char screenheight
Definition: caca.h:618
caca_free_font
int caca_free_font(caca_font_t *)
Free a font structure.
Definition: font.c:381
CACA_EVENT_RESIZE
Definition: caca.h:116
caca_conio_normvideo
void caca_conio_normvideo(void)
DOS conio.h normvideo() equivalent.
Definition: caca_conio.c:355
caca_add_dirty_rect
int caca_add_dirty_rect(caca_canvas_t *, int, int, int, int)
Add an area to the canvas's dirty rectangle list.
Definition: dirty.c:164
caca_get_mouse_x
int caca_get_mouse_x(caca_display_t const *)
Return the X mouse coordinate.
Definition: event.c:148
caca_rotate_180
int caca_rotate_180(caca_canvas_t *)
Rotate a canvas.
Definition: transform.c:184
CACA_GREEN
Definition: caca.h:73
caca_getopt
int caca_getopt(int, char *const [], char const *, struct caca_option const *, int *)
Definition: getopt.c:33
caca_disable_dirty_rect
int caca_disable_dirty_rect(caca_canvas_t *)
Disable dirty rectangles.
Definition: dirty.c:51
CACA_CONIO_WHITE
Definition: caca.h:572
caca_get_event_key_utf32
uint32_t caca_get_event_key_utf32(caca_event_t const *)
Return a key press or key release event's Unicode value.
Definition: event.c:236
caca_optind
int caca_optind
Definition: getopt.c:30
caca_get_attr
uint32_t caca_get_attr(caca_canvas_t const *, int, int)
Get the text attribute at the given coordinates.
Definition: attr.c:66
CACA_BROWN
Definition: caca.h:77
caca_conio_cgets
char * caca_conio_cgets(char *str)
DOS conio.h cgets() equivalent.
Definition: caca_conio.c:47
cucul_get_buffer_data
void * cucul_get_buffer_data(cucul_buffer_t *)
Definition: legacy.c:227
caca_conio_wherex
int caca_conio_wherex(void)
DOS conio.h wherex() equivalent.
Definition: caca_conio.c:510
caca_attr_to_rgb12_fg
uint16_t caca_attr_to_rgb12_fg(uint32_t)
Get 12-bit RGB foreground information from attribute.
Definition: attr.c:367
caca_get_import_list
const char *const * caca_get_import_list(void)
Get available import formats.
Definition: import.c:276
CACA_KEY_CTRL_O
Definition: caca.h:180
caca_file_tell
uint64_t caca_file_tell(caca_file_t *)
Return the position in a file handle.
Definition: file.c:176
caca_get_display_driver_list
const char *const * caca_get_display_driver_list(void)
Get available display drivers.
Definition: caca.c:149
CACA_KEY_ESCAPE
Definition: caca.h:192
cv
caca_canvas_t * cv
Definition: cacaview.c:45
CACA_KEY_DELETE
Definition: caca.h:193
caca_file_close
int caca_file_close(caca_file_t *)
Close a file handle.
Definition: file.c:151
CACA_RED
Definition: caca.h:75
CACA_CONIO_MONO
Definition: caca.h:599
caca_optarg
char * caca_optarg
Definition: getopt.c:31
CACA_KEY_F1
Definition: caca.h:208
cucul_putstr
int cucul_putstr(caca_canvas_t *, int, int, char const *)
Definition: legacy.c:50
caca_refresh_display
int caca_refresh_display(caca_display_t *)
Flush pending changes and redraw the screen.
Definition: graphics.c:146
CACA_EVENT_NONE
Definition: caca.h:109
caca_printf
int caca_printf(caca_canvas_t *, int, int, char const *,...)
Print a formated string.
Definition: string.c:304
caca_import_area_from_file
ssize_t caca_import_area_from_file(caca_canvas_t *, int, int, char const *, char const *)
Import a file into a canvas area.
Definition: import.c:248
caca_set_figfont_smush
int caca_set_figfont_smush(caca_canvas_t *, char const *)
set the smushing mode of the figfont rendering
Definition: figfont.c:117
caca_color
caca_color
Definition: caca.h:69
caca_create_display_with_driver
caca_display_t * caca_create_display_with_driver(caca_canvas_t *, char const *)
Attach a specific caca graphical context to a caca canvas.
Definition: caca.c:98
caca_fill_triangle
int caca_fill_triangle(caca_canvas_t *, int, int, int, int, int, int, uint32_t)
Fill a triangle on the canvas using the given character.
Definition: triangle.c:87
caca_get_canvas_handle_x
int caca_get_canvas_handle_x(caca_canvas_t const *)
Get X handle position.
Definition: string.c:420
CACA_KEY_F11
Definition: caca.h:218
CACA_DEFAULT
Definition: caca.h:87
caca_draw_triangle
int caca_draw_triangle(caca_canvas_t *, int, int, int, int, int, int, uint32_t)
Draw a triangle on the canvas using the given character.
Definition: triangle.c:40
caca_attr_to_ansi_bg
uint8_t caca_attr_to_ansi_bg(uint32_t)
Get ANSI background information from attribute.
Definition: attr.c:347
CACA_UNDERLINE
Definition: caca.h:96
caca_draw_thin_ellipse
int caca_draw_thin_ellipse(caca_canvas_t *, int, int, int, int)
Draw a thin ellipse on the canvas.
Definition: conic.c:184
CACA_LIGHTCYAN
Definition: caca.h:82
CACA_CONIO_LASTMODE
Definition: caca.h:594
caca_conio_delline
void caca_conio_delline(void)
DOS conio.h delline() equivalent.
Definition: caca_conio.c:172
caca_import_canvas_from_memory
ssize_t caca_import_canvas_from_memory(caca_canvas_t *, void const *, size_t, char const *)
Import a memory buffer into a canvas.
Definition: import.c:73
CACA_KEY_CTRL_R
Definition: caca.h:183
CACA_KEY_F8
Definition: caca.h:215
caca_put_char
int caca_put_char(caca_canvas_t *, int, int, uint32_t)
Print an ASCII or Unicode character.
Definition: string.c:120
caca_conio_delay
void caca_conio_delay(unsigned int)
DOS dos.h delay() equivalent.
Definition: caca_conio.c:148
caca_free_display
int caca_free_display(caca_display_t *)
Detach a caca graphical context from a caca backend context.
Definition: caca.c:238
caca_fill_ellipse
int caca_fill_ellipse(caca_canvas_t *, int, int, int, int, uint32_t)
Fill an ellipse on the canvas using the given character.
Definition: conic.c:68
caca_conio_getch
int caca_conio_getch(void)
DOS conio.h getch() equivalent.
Definition: caca_conio.c:180
caca_get_dither_algorithm_list
const char *const * caca_get_dither_algorithm_list(caca_dither_t const *)
Get dithering algorithms.
Definition: dither.c:894
CACA_KEY_CTRL_G
Definition: caca.h:172
CACA_KEY_CTRL_X
Definition: caca.h:189
caca_set_dither_contrast
int caca_set_dither_contrast(caca_dither_t *, float)
Set the contrast of a dither object.
Definition: dither.c:506
caca_conio_puttext
int caca_conio_puttext(int left, int top, int right, int bottom, void *destin)
DOS conio.h puttext() equivalent.
Definition: caca_conio.c:402
CACA_CONIO_LIGHTRED
Definition: caca.h:569
CACA_CONIO__NOCURSOR
Definition: caca.h:582
CACA_KEY_CTRL_C
Definition: caca.h:168
CACA_BLUE
Definition: caca.h:72
caca_manage_canvas
int caca_manage_canvas(caca_canvas_t *, int(*)(void *), void *)
Manage a canvas.
Definition: canvas.c:133
CACA_CONIO_LIGHTBLUE
Definition: caca.h:566
caca_set_canvas_handle
int caca_set_canvas_handle(caca_canvas_t *, int, int)
Set cursor handle.
Definition: string.c:403
caca_vprintf
int caca_vprintf(caca_canvas_t *, int, int, char const *, va_list)
Print a formated string (va_list version).
Definition: string.c:335
cucul_create_canvas_frame
int cucul_create_canvas_frame(caca_canvas_t *, unsigned int)
Definition: legacy.c:152
CACA_KEY_RETURN
Definition: caca.h:178
caca_utf32_to_cp437
uint8_t caca_utf32_to_cp437(uint32_t)
Convert a UTF-32 character to CP437.
Definition: charset.c:191
caca_get_display_height
int caca_get_display_height(caca_display_t const *)
Get the display height.
Definition: graphics.c:79
caca_put_attr
int caca_put_attr(caca_canvas_t *, int, int, uint32_t)
Set the character attribute at the given coordinates.
Definition: attr.c:182
cucul_set_canvas_frame
int cucul_set_canvas_frame(caca_canvas_t *, unsigned int)
Definition: legacy.c:147
CACA_BLACK
Definition: caca.h:71
caca_get_export_list
const char *const * caca_get_export_list(void)
Get available export formats.
Definition: export.c:180
CACA_KEY_RIGHT
Definition: caca.h:200
caca_utf8_to_utf32
uint32_t caca_utf8_to_utf32(char const *, size_t *)
Convert a UTF-8 character to UTF-32.
Definition: charset.c:112
CACA_DARKGRAY
Definition: caca.h:79
CACA_CONIO_BLACK
Definition: caca.h:557
CACA_CONIO_BW40
Definition: caca.h:595
caca_event::mouse
struct caca_event::@0::@1 mouse
cucul_set_dither_invert
int cucul_set_dither_invert(caca_dither_t *, int)
Definition: legacy.c:72
CACA_KEY_F15
Definition: caca.h:222
CACA_CONIO_GREEN
Definition: caca.h:559
caca_draw_thin_triangle
int caca_draw_thin_triangle(caca_canvas_t *, int, int, int, int, int, int)
Draw a thin triangle on the canvas.
Definition: triangle.c:63
CACA_CONIO_BLUE
Definition: caca.h:558
caca_get_dirty_rect_count
int caca_get_dirty_rect_count(caca_canvas_t *)
Get the number of dirty rectangles in the canvas.
Definition: dirty.c:98
CACA_CONIO_C80
Definition: caca.h:598
caca_get_font_blocks
const uint32_t * caca_get_font_blocks(caca_font_t const *)
Get a font's list of supported glyphs.
Definition: font.c:364
CACA_LIGHTMAGENTA
Definition: caca.h:84
CACA_CONIO__NORMALCURSOR
Definition: caca.h:584
caca_conio_sound
void caca_conio_sound(unsigned int)
DOS dos.h sound() equivalent.
Definition: caca_conio.c:455
caca_set_display_title
int caca_set_display_title(caca_display_t *, char const *)
Set the display title.
Definition: graphics.c:40
caca_dither_bitmap
int caca_dither_bitmap(caca_canvas_t *, int, int, int, int, caca_dither_t const *, void const *)
Dither a bitmap on the canvas.
Definition: dither.c:940
caca_conio_gettext
int caca_conio_gettext(int left, int top, int right, int bottom, void *destin)
DOS conio.h gettext() equivalent.
Definition: caca_conio.c:246
caca_file_open
caca_file_t * caca_file_open(char const *, const char *)
Open a file for reading or writing.
Definition: file.c:64
caca_draw_thin_box
int caca_draw_thin_box(caca_canvas_t *, int, int, int, int)
Draw a thin box on the canvas.
Definition: box.c:65
CACA_EVENT_KEY_RELEASE
Definition: caca.h:112
cucul_import_canvas
caca_canvas_t * cucul_import_canvas(cucul_buffer_t *, char const *)
Definition: legacy.c:96
caca_font
Definition: font.c:56
caca_set_color_ansi
int caca_set_color_ansi(caca_canvas_t *, uint8_t, uint8_t)
Set the default colour pair for text (ANSI version).
Definition: attr.c:234
caca_set_canvas_size
int caca_set_canvas_size(caca_canvas_t *, int, int)
Resize a canvas.
Definition: canvas.c:212
cucul_set_dither_mode
int cucul_set_dither_mode(caca_dither_t *, char const *)
Definition: legacy.c:82
CACA_KEY_HOME
Definition: caca.h:203
cucul_get_dither_mode_list
const char *const * cucul_get_dither_mode_list(caca_dither_t const *)
Definition: legacy.c:87
caca_charfont
Definition: figfont.c:37
CACA_CONIO_CYAN
Definition: caca.h:560
caca_toggle_attr
int caca_toggle_attr(caca_canvas_t *, uint32_t)
Toggle flags in the default character attribute.
Definition: attr.c:154
CACA_CONIO_LIGHTCYAN
Definition: caca.h:568
CACA_KEY_UP
Definition: caca.h:197
caca_get_event_mouse_x
int caca_get_event_mouse_x(caca_event_t const *)
Return a mouse motion event's X coordinate.
Definition: event.c:292
caca_utf32_is_fullwidth
int caca_utf32_is_fullwidth(uint32_t)
Tell whether a UTF-32 character is fullwidth.
Definition: charset.c:388
caca_set_canvas_boundaries
int caca_set_canvas_boundaries(caca_canvas_t *, int, int, int, int)
Set a canvas' new boundaries.
Definition: string.c:561
caca_get_mouse_y
int caca_get_mouse_y(caca_display_t const *)
Return the Y mouse coordinate.
Definition: event.c:170
caca_conio_text_info::wintop
unsigned char wintop
Definition: caca.h:611
CACA_KEY_F12
Definition: caca.h:219
CACA_EVENT_MOUSE_RELEASE
Definition: caca.h:114
cucul_get_buffer_size
unsigned long int cucul_get_buffer_size(cucul_buffer_t *)
Definition: legacy.c:222
caca_conio_textmode
void caca_conio_textmode(int newmode)
DOS conio.h textmode() equivalent.
Definition: caca_conio.c:489
CACA_KEY_F5
Definition: caca.h:212
caca_import_canvas_from_file
ssize_t caca_import_canvas_from_file(caca_canvas_t *, char const *, char const *)
Import a file into a canvas.
Definition: import.c:152
caca_get_char
uint32_t caca_get_char(caca_canvas_t const *, int, int)
Get the Unicode character at the given coordinates.
Definition: string.c:224
caca_conio_putch
int caca_conio_putch(int ch)
DOS conio.h putch() equivalent.
Definition: caca_conio.c:390
cucul_putchar
#define cucul_putchar
Definition: caca.h:849
caca_get_dither_brightness
float caca_get_dither_brightness(caca_dither_t const *)
Get the brightness of a dither object.
Definition: dither.c:438
caca_event::ch
int ch
Definition: caca.h:136
CACA_KEY_CTRL_P
Definition: caca.h:181
caca_load_font
caca_font_t * caca_load_font(void const *, size_t)
Load a font from memory for future use.
Definition: font.c:111
caca_get_canvas_chars
const uint32_t * caca_get_canvas_chars(caca_canvas_t const *)
Get the canvas character array.
Definition: canvas.c:272
caca_option::flag
int * flag
Definition: caca.h:152
caca_conio_text_info::currmode
unsigned char currmode
Definition: caca.h:616
CACA_KEY_CTRL_W
Definition: caca.h:188
caca_conio_text_info::cury
unsigned char cury
Definition: caca.h:621
caca_clear_canvas
int caca_clear_canvas(caca_canvas_t *)
Clear the canvas.
Definition: string.c:374
CACA_KEY_F6
Definition: caca.h:213
CACA_EVENT_KEY_PRESS
Definition: caca.h:111
caca_attr_to_ansi_fg
uint8_t caca_attr_to_ansi_fg(uint32_t)
Get ANSI foreground information from attribute.
Definition: attr.c:327
CACA_KEY_INSERT
Definition: caca.h:202
caca_set_frame
int caca_set_frame(caca_canvas_t *, int)
Activate a given canvas frame.
Definition: frame.c:57
caca_get_dither_charset_list
const char *const * caca_get_dither_charset_list(caca_dither_t const *)
Get available dither character sets.
Definition: dither.c:781
caca_draw_thin_polyline
int caca_draw_thin_polyline(caca_canvas_t *, int const x[], int const y[], int)
Draw an ASCII art thin polyline.
Definition: line.c:144
CACA_KEY_F4
Definition: caca.h:211
caca_free_dither
int caca_free_dither(caca_dither_t *)
Free the memory associated with a dither.
Definition: dither.c:1209
CACA_KEY_CTRL_A
Definition: caca.h:166
caca_set_color_argb
int caca_set_color_argb(caca_canvas_t *, uint16_t, uint16_t)
Set the default colour pair for text (truecolor version).
Definition: attr.c:267
caca_event::utf8
char utf8[8]
Definition: caca.h:136
caca_conio_text_info::winbottom
unsigned char winbottom
Definition: caca.h:613
CACA_KEY_F13
Definition: caca.h:220
caca_conio_wherey
int caca_conio_wherey(void)
DOS conio.h wherey() equivalent.
Definition: caca_conio.c:518
CACA_KEY_CTRL_Y
Definition: caca.h:190
caca_rotate_right
int caca_rotate_right(caca_canvas_t *)
Rotate a canvas, 90 degrees counterclockwise.
Definition: transform.c:375
caca_conio_printf
int caca_conio_printf(const char *format,...)
DOS stdio.h printf() equivalent.
Definition: caca_conio.c:371
CACA_KEY_CTRL_Q
Definition: caca.h:182
caca_flop
int caca_flop(caca_canvas_t *)
Flip a canvas vertically.
Definition: transform.c:135
caca_get_display_time
int caca_get_display_time(caca_display_t const *)
Get the display's average rendering time.
Definition: graphics.c:125
caca_set_dither_color
int caca_set_dither_color(caca_dither_t *, char const *)
Choose colours used for dithering.
Definition: dither.c:628
caca_file_read
size_t caca_file_read(caca_file_t *, void *, size_t)
Read data from a file handle.
Definition: file.c:199
CACA_BOLD
Definition: caca.h:94
CACA_CONIO_BLINK
Definition: caca.h:556
caca_get_display_width
int caca_get_display_width(caca_display_t const *)
Get the display width.
Definition: graphics.c:62
caca_file_gets
char * caca_file_gets(caca_file_t *, char *, int)
Read a line from a file handle.
Definition: file.c:255
CACA_LIGHTRED
Definition: caca.h:83
CACA_CONIO_CURSOR
CACA_CONIO_CURSOR
DOS cursor modes.
Definition: caca.h:580
caca_export_area_to_memory
void * caca_export_area_to_memory(caca_canvas_t const *, int, int, int, int, char const *, size_t *)
Export a canvas portion into a foreign format.
Definition: export.c:145
caca_get_event_key_ch
int caca_get_event_key_ch(caca_event_t const *)
Return a key press or key release event's value.
Definition: event.c:219
CACA_CONIO__SOLIDCURSOR
Definition: caca.h:583
CACA_YELLOW
Definition: caca.h:85
CACA_MAGENTA
Definition: caca.h:76
CACA_KEY_CTRL_B
Definition: caca.h:167
CACA_KEY_PAGEDOWN
Definition: caca.h:206
caca_attr_to_ansi
uint8_t caca_attr_to_ansi(uint32_t)
Get DOS ANSI information from attribute.
Definition: attr.c:303
caca_canvas
Definition: caca_internals.h:47
CACA_CONIO_RED
Definition: caca.h:561
CACA_KEY_CTRL_K
Definition: caca.h:176
caca_conio_getche
int caca_conio_getche(void)
DOS conio.h getche() equivalent.
Definition: caca_conio.c:212
x
static int x
Definition: cacadraw.c:27
CACA_KEY_F3
Definition: caca.h:210
cucul_export_canvas
cucul_buffer_t * cucul_export_canvas(caca_canvas_t *, char const *)
Definition: legacy.c:115
cucul_set_color
int cucul_set_color(caca_canvas_t *, unsigned char, unsigned char)
Definition: legacy.c:59
caca_event_type
caca_event_type
User event type enumeration.
Definition: caca.h:107
cucul_load_file
cucul_buffer_t * cucul_load_file(char const *)
Definition: legacy.c:181
caca_get_frame_count
int caca_get_frame_count(caca_canvas_t const *)
Get the number of frames in a canvas.
Definition: frame.c:37
caca_conio_text_info::screenwidth
unsigned char screenwidth
Definition: caca.h:619