source: libcaca/trunk/python/pypycaca.h @ 518

Last change on this file since 518 was 518, checked in by Jean-Yves Lamoureux, 15 years ago
  • Added -preliminary- Python bindings
File size: 5.6 KB
Line 
1/*
2 *  PypyCaca       libcaca Python bindings
3 *  Copyright (c) 2006 Jean-Yves Lamoureux <jylam@lnxscene.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
22/** \file pycaca.h
23 *  \version \$Id:
24 *  \author Jean-Yves Lamoureux <jylam@lnxscene.org>
25 *  \brief Main \e pypycaca bindings definitions
26 *
27 *  This file contains functions prototypes for python bindings
28 */
29
30
31#include <Python.h>
32#include <caca.h>
33#define SET_INTCONSTANT(dict, value) \
34     PyDict_SetItemString(dict, #value, PyInt_FromLong((long) value))
35
36
37PyMODINIT_FUNC initcaca(void);
38
39/* Basic functions */
40
41static PyObject *
42pycaca_init(PyObject *self, PyObject *args);
43static PyObject *
44pycaca_set_delay(PyObject *self, PyObject *args);
45static PyObject *
46pycaca_get_rendertime(PyObject *self, PyObject *args);
47static PyObject *
48pycaca_get_width(PyObject *self, PyObject *args);
49static PyObject *
50pycaca_get_height(PyObject *self, PyObject *args);
51static PyObject *
52pycaca_set_size(PyObject *self, PyObject *args);
53static PyObject *
54pycaca_set_width(PyObject *self, PyObject *args);
55static PyObject *
56pycaca_set_height(PyObject *self, PyObject *args);
57static PyObject *
58pycaca_set_window_title(PyObject *self, PyObject *args);
59static PyObject *
60pycaca_get_window_width(PyObject *self, PyObject *args);
61static PyObject *
62pycaca_get_window_height(PyObject *self, PyObject *args);
63static PyObject *
64pycaca_refresh(PyObject *self, PyObject *args);
65static PyObject *
66pycaca_end(PyObject *self, PyObject *args);
67static PyObject *
68pycaca_get_feature(PyObject *self, PyObject *args);
69static PyObject *
70pycaca_set_feature(PyObject *self, PyObject *args);
71static PyObject *
72pycaca_get_feature_name(PyObject *self, PyObject *args);
73
74/* Event handling */
75static PyObject *
76pycaca_get_event(PyObject *self, PyObject *args);
77static PyObject *
78pycaca_wait_event(PyObject *self, PyObject *args);
79static PyObject *
80pycaca_get_mouse_x(PyObject *self, PyObject *args);
81static PyObject *
82pycaca_get_mouse_y(PyObject *self, PyObject *args);
83
84
85/* Primitives drawing */
86static PyObject *
87pycaca_draw_line(PyObject *self, PyObject *args);
88static PyObject *
89pycaca_draw_polyline(PyObject *self, PyObject *args);
90static PyObject *
91pycaca_draw_thin_polyline(PyObject *self, PyObject *args);
92static PyObject *
93pycaca_draw_thin_line(PyObject *self, PyObject *args);
94static PyObject *
95pycaca_draw_circle(PyObject *self, PyObject *args);
96static PyObject *
97pycaca_draw_ellipse(PyObject *self, PyObject *args);
98static PyObject *
99pycaca_draw_thin_ellipse(PyObject *self, PyObject *args);
100static PyObject *
101pycaca_fill_ellipse(PyObject *self, PyObject *args);
102static PyObject *
103pycaca_draw_box(PyObject *self, PyObject *args);
104static PyObject *
105pycaca_fill_box(PyObject *self, PyObject *args);
106static PyObject *
107pycaca_draw_thin_box(PyObject *self, PyObject *args);
108static PyObject *
109pycaca_draw_triangle(PyObject *self, PyObject *args);
110static PyObject *
111pycaca_draw_thin_triangle(PyObject *self, PyObject *args);
112static PyObject *
113pycaca_fill_triangle(PyObject *self, PyObject *args);
114
115/* Charactere drawing */
116static PyObject *
117pycaca_set_color(PyObject *self, PyObject *args);
118static PyObject *
119pycaca_get_fg_color(PyObject *self, PyObject *args);
120static PyObject *
121pycaca_get_bg_color(PyObject *self, PyObject *args);
122static PyObject *
123pycaca_get_color_name(PyObject *self, PyObject *args);
124static PyObject *
125pycaca_putchar(PyObject *self, PyObject *args);
126static PyObject *
127pycaca_putstr(PyObject *self, PyObject *args);
128static PyObject *
129pycaca_printf(PyObject *self, PyObject *args);
130/*static PyObject *
131pycaca_get_screen(PyObject *self, PyObject *args);*/
132  static PyObject *
133pycaca_clear(PyObject *self, PyObject *args);
134
135
136/* Sprites functions */
137static PyObject *
138pycaca_load_sprite(PyObject *self, PyObject *args);
139static PyObject *
140pycaca_draw_sprite(PyObject *self, PyObject *args);
141static PyObject *
142pycaca_get_sprite_frames(PyObject *self, PyObject *args);
143static PyObject *
144pycaca_get_sprite_width(PyObject *self, PyObject *args);
145static PyObject *
146pycaca_get_sprite_height(PyObject *self, PyObject *args);
147static PyObject *
148pycaca_get_sprite_dx(PyObject *self, PyObject *args);
149static PyObject *
150pycaca_get_sprite_dy(PyObject *self, PyObject *args);
151static PyObject *
152pycaca_free_sprite(PyObject *self, PyObject *args);
153
154
155
156/* Exporters */
157static PyObject *
158pycaca_get_html(PyObject *self, PyObject *args);
159static PyObject *
160pycaca_get_html3(PyObject *self, PyObject *args);
161static PyObject *
162pycaca_get_irc(PyObject *self, PyObject *args);
163static PyObject *
164pycaca_get_ansi(PyObject *self, PyObject *args);
165
166
167/* Bitmap functions */
168static PyObject *
169pycaca_create_bitmap(PyObject *self, PyObject *args);
170static PyObject *
171pycaca_set_bitmap_palette(PyObject *self, PyObject *args);
172static PyObject *
173pycaca_set_bitmap_gamma(PyObject *self, PyObject *args);
174static PyObject *
175pycaca_draw_bitmap(PyObject *self, PyObject *args);
176static PyObject *
177pycaca_free_bitmap(PyObject *self, PyObject *args);
Note: See TracBrowser for help on using the repository browser.