1 | /* |
---|
2 | * php-caca Php binding for Libcaca |
---|
3 | * Copyright (c) 2008 Vion Nicolas <nico@picapo.net> |
---|
4 | * |
---|
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://sam.zoy.org/wtfpl/COPYING for more details. |
---|
11 | */ |
---|
12 | |
---|
13 | #ifndef PHP_CACA_H |
---|
14 | #define PHP_CACA_H |
---|
15 | |
---|
16 | #include <caca.h> |
---|
17 | |
---|
18 | #define PHP_CACA_VERSION "0.0" |
---|
19 | #define PHP_CACA_EXTNAME "caca" |
---|
20 | |
---|
21 | #define PHP_CACA_CANVAS_RES_NAME "caca_canvas" |
---|
22 | #define PHP_CACA_DITHER_RES_NAME "caca_dither" |
---|
23 | #define PHP_CACA_FONT_RES_NAME "caca_font" |
---|
24 | #define PHP_CACA_FILE_RES_NAME "caca_file" |
---|
25 | #define PHP_CACA_DISPLAY_RES_NAME "caca_display" |
---|
26 | #define PHP_CACA_EVENT_RES_NAME "caca_event" |
---|
27 | |
---|
28 | int le_caca_canvas; |
---|
29 | int le_caca_dither; |
---|
30 | int le_caca_font; |
---|
31 | int le_caca_file; |
---|
32 | int le_caca_display; |
---|
33 | int le_caca_event; |
---|
34 | |
---|
35 | PHP_MINIT_FUNCTION(caca); |
---|
36 | PHP_MINFO_FUNCTION(caca); |
---|
37 | |
---|
38 | PHP_FUNCTION(caca_create_event); |
---|
39 | |
---|
40 | PHP_FUNCTION(caca_create_canvas); |
---|
41 | PHP_FUNCTION(caca_set_canvas_size); |
---|
42 | PHP_FUNCTION(caca_get_canvas_width); |
---|
43 | PHP_FUNCTION(caca_get_canvas_height); |
---|
44 | PHP_FUNCTION(caca_get_canvas_chars); |
---|
45 | PHP_FUNCTION(caca_get_canvas_attrs); |
---|
46 | PHP_FUNCTION(caca_rand); |
---|
47 | PHP_FUNCTION(caca_get_version); |
---|
48 | PHP_FUNCTION(caca_gotoxy); |
---|
49 | PHP_FUNCTION(caca_get_cursor_x); |
---|
50 | PHP_FUNCTION(caca_get_cursor_y); |
---|
51 | PHP_FUNCTION(caca_put_char); |
---|
52 | PHP_FUNCTION(caca_get_char); |
---|
53 | PHP_FUNCTION(caca_put_str); |
---|
54 | PHP_FUNCTION(caca_clear_canvas); |
---|
55 | PHP_FUNCTION(caca_set_canvas_handle); |
---|
56 | PHP_FUNCTION(caca_get_canvas_handle_x); |
---|
57 | PHP_FUNCTION(caca_get_canvas_handle_y); |
---|
58 | PHP_FUNCTION(caca_blit); |
---|
59 | PHP_FUNCTION(caca_set_canvas_boundaries); |
---|
60 | PHP_FUNCTION(caca_invert); |
---|
61 | PHP_FUNCTION(caca_flip); |
---|
62 | PHP_FUNCTION(caca_flop); |
---|
63 | PHP_FUNCTION(caca_rotate_180); |
---|
64 | PHP_FUNCTION(caca_rotate_left); |
---|
65 | PHP_FUNCTION(caca_rotate_right); |
---|
66 | PHP_FUNCTION(caca_stretch_left); |
---|
67 | PHP_FUNCTION(caca_stretch_right); |
---|
68 | PHP_FUNCTION(caca_get_attr); |
---|
69 | PHP_FUNCTION(caca_set_attr); |
---|
70 | PHP_FUNCTION(caca_put_attr); |
---|
71 | PHP_FUNCTION(caca_set_color_ansi); |
---|
72 | PHP_FUNCTION(caca_set_color_argb); |
---|
73 | PHP_FUNCTION(caca_attr_to_ansi); |
---|
74 | PHP_FUNCTION(caca_attr_to_ansi_fg); |
---|
75 | PHP_FUNCTION(caca_attr_to_ansi_bg); |
---|
76 | PHP_FUNCTION(caca_attr_to_rgb12_fg); |
---|
77 | PHP_FUNCTION(caca_attr_to_rgb12_bg); |
---|
78 | PHP_FUNCTION(caca_attr_to_argb64); |
---|
79 | PHP_FUNCTION(caca_utf8_to_utf32); |
---|
80 | PHP_FUNCTION(caca_utf32_to_utf8); |
---|
81 | PHP_FUNCTION(caca_utf32_to_cp437); |
---|
82 | PHP_FUNCTION(caca_cp437_to_utf32); |
---|
83 | PHP_FUNCTION(caca_utf32_to_ascii); |
---|
84 | PHP_FUNCTION(caca_utf32_is_fullwidth); |
---|
85 | PHP_FUNCTION(caca_draw_line); |
---|
86 | PHP_FUNCTION(caca_draw_polyline); |
---|
87 | PHP_FUNCTION(caca_draw_thin_line); |
---|
88 | PHP_FUNCTION(caca_draw_thin_polyline); |
---|
89 | PHP_FUNCTION(caca_draw_circle); |
---|
90 | PHP_FUNCTION(caca_draw_ellipse); |
---|
91 | PHP_FUNCTION(caca_draw_thin_ellipse); |
---|
92 | PHP_FUNCTION(caca_fill_ellipse); |
---|
93 | PHP_FUNCTION(caca_draw_box); |
---|
94 | PHP_FUNCTION(caca_draw_thin_box); |
---|
95 | PHP_FUNCTION(caca_draw_cp437_box); |
---|
96 | PHP_FUNCTION(caca_fill_box); |
---|
97 | PHP_FUNCTION(caca_draw_triangle); |
---|
98 | PHP_FUNCTION(caca_draw_thin_triangle); |
---|
99 | PHP_FUNCTION(caca_fill_triangle); |
---|
100 | PHP_FUNCTION(caca_get_frame_count); |
---|
101 | PHP_FUNCTION(caca_set_frame); |
---|
102 | PHP_FUNCTION(caca_set_frame_name); |
---|
103 | PHP_FUNCTION(caca_create_frame); |
---|
104 | PHP_FUNCTION(caca_free_frame); |
---|
105 | PHP_FUNCTION(caca_create_dither); |
---|
106 | PHP_FUNCTION(caca_create_dither_gd); |
---|
107 | PHP_FUNCTION(caca_set_dither_palette); |
---|
108 | PHP_FUNCTION(caca_set_dither_brightness); |
---|
109 | PHP_FUNCTION(caca_get_dither_brightness); |
---|
110 | PHP_FUNCTION(caca_set_dither_gamma); |
---|
111 | PHP_FUNCTION(caca_get_dither_gamma); |
---|
112 | PHP_FUNCTION(caca_set_dither_contrast); |
---|
113 | PHP_FUNCTION(caca_get_dither_contrast); |
---|
114 | PHP_FUNCTION(caca_set_dither_antialias); |
---|
115 | PHP_FUNCTION(caca_get_dither_antialias_list); |
---|
116 | PHP_FUNCTION(caca_get_dither_antialias); |
---|
117 | PHP_FUNCTION(caca_set_dither_color); |
---|
118 | PHP_FUNCTION(caca_get_dither_color_list); |
---|
119 | PHP_FUNCTION(caca_get_dither_color); |
---|
120 | PHP_FUNCTION(caca_set_dither_charset); |
---|
121 | PHP_FUNCTION(caca_get_dither_charset_list); |
---|
122 | PHP_FUNCTION(caca_get_dither_charset); |
---|
123 | PHP_FUNCTION(caca_set_dither_algorithm); |
---|
124 | PHP_FUNCTION(caca_get_dither_algorithm_list); |
---|
125 | PHP_FUNCTION(caca_get_dither_algorithm); |
---|
126 | PHP_FUNCTION(caca_dither_bitmap_gd); |
---|
127 | PHP_FUNCTION(caca_load_font); |
---|
128 | PHP_FUNCTION(caca_get_font_list); |
---|
129 | PHP_FUNCTION(caca_get_font_width); |
---|
130 | PHP_FUNCTION(caca_get_font_height); |
---|
131 | PHP_FUNCTION(caca_get_font_blocks); |
---|
132 | PHP_FUNCTION(caca_render_canvas); |
---|
133 | PHP_FUNCTION(caca_canvas_set_figfont); |
---|
134 | PHP_FUNCTION(caca_put_figchar); |
---|
135 | PHP_FUNCTION(caca_flush_figlet); |
---|
136 | PHP_FUNCTION(caca_file_open); |
---|
137 | PHP_FUNCTION(caca_file_close); |
---|
138 | PHP_FUNCTION(caca_file_tell); |
---|
139 | PHP_FUNCTION(caca_file_read); |
---|
140 | PHP_FUNCTION(caca_file_write); |
---|
141 | PHP_FUNCTION(caca_file_gets); |
---|
142 | PHP_FUNCTION(caca_file_eof); |
---|
143 | PHP_FUNCTION(caca_import_string); |
---|
144 | PHP_FUNCTION(caca_import_file); |
---|
145 | PHP_FUNCTION(caca_get_import_list); |
---|
146 | PHP_FUNCTION(caca_export_string); |
---|
147 | PHP_FUNCTION(caca_get_export_list); |
---|
148 | PHP_FUNCTION(caca_create_display); |
---|
149 | PHP_FUNCTION(caca_create_display_with_driver); |
---|
150 | PHP_FUNCTION(caca_get_display_driver_list); |
---|
151 | PHP_FUNCTION(caca_get_display_driver); |
---|
152 | PHP_FUNCTION(caca_set_display_driver); |
---|
153 | PHP_FUNCTION(caca_get_canvas); |
---|
154 | PHP_FUNCTION(caca_refresh_display); |
---|
155 | PHP_FUNCTION(caca_set_display_time); |
---|
156 | PHP_FUNCTION(caca_get_display_time); |
---|
157 | PHP_FUNCTION(caca_get_display_width); |
---|
158 | PHP_FUNCTION(caca_get_display_height); |
---|
159 | PHP_FUNCTION(caca_set_display_title); |
---|
160 | PHP_FUNCTION(caca_set_mouse); |
---|
161 | PHP_FUNCTION(caca_set_cursor); |
---|
162 | PHP_FUNCTION(caca_get_event); |
---|
163 | PHP_FUNCTION(caca_get_mouse_x); |
---|
164 | PHP_FUNCTION(caca_get_mouse_y); |
---|
165 | PHP_FUNCTION(caca_get_event_type); |
---|
166 | PHP_FUNCTION(caca_get_event_key_ch); |
---|
167 | PHP_FUNCTION(caca_get_event_mouse_button); |
---|
168 | PHP_FUNCTION(caca_get_event_mouse_x); |
---|
169 | PHP_FUNCTION(caca_get_event_mouse_y); |
---|
170 | PHP_FUNCTION(caca_get_event_resize_width); |
---|
171 | PHP_FUNCTION(caca_get_event_resize_height); |
---|
172 | |
---|
173 | extern zend_module_entry caca_module_entry; |
---|
174 | #define phpext_caca_ptr &caca_module_entry |
---|
175 | |
---|
176 | #endif |
---|