From 020219a96edacff8fd84bc2ba3635708a1aebba4 Mon Sep 17 00:00:00 2001 From: Jean-Yves Lamoureux Date: Sun, 5 Feb 2006 17:47:23 +0000 Subject: [PATCH] * Added -preliminary- Python bindings --- python/Makefile | 17 + python/README | 16 + python/pypycaca.c | 877 ++++++++++++++++++++++++++++++++++++++++++++++ python/pypycaca.h | 177 ++++++++++ 4 files changed, 1087 insertions(+) create mode 100644 python/Makefile create mode 100644 python/README create mode 100644 python/pypycaca.c create mode 100644 python/pypycaca.h diff --git a/python/Makefile b/python/Makefile new file mode 100644 index 0000000..5181e65 --- /dev/null +++ b/python/Makefile @@ -0,0 +1,17 @@ +CC = gcc +RM = rm -f +CACAFLAGS = `caca-config --cflags` +CACALIBS = `caca-config --libs` + +PYTHONFLAGS = -I/usr/include/python2.4 +PYTHONLIBS = -lpython2.4 + +NAME = caca.so + +all: + $(CC) pypycaca.c -c $(CACAFLAGS) $(PYTHONFLAGS) -Wall + $(LD) pypycaca.o -o $(NAME) $(CACALIBS) $(PYTHONLIBS) -shared + + +clean: + $(RM) *.o $(NAME) \ No newline at end of file diff --git a/python/README b/python/README new file mode 100644 index 0000000..e5e9fb6 --- /dev/null +++ b/python/README @@ -0,0 +1,16 @@ +Pypycaca - libcaca bindings for Python +(c) 2006 Jean-Yves Lamoureux + + +No warranty blaaah blaaah + + +These Python bindings will work with either Python 2.3 or 2.4, not tested previous versions. + +Don't forget to change Makefile options in case you are not using Python 2.4. + +No documentation yet, functions are all the same, with same arguments (using arrays or lists instead of C pointers, of course). + +It hasn't been tested on anything else than IA32 yet. + +I eat beef tonight, that was cool. Thanks. \ No newline at end of file diff --git a/python/pypycaca.c b/python/pypycaca.c new file mode 100644 index 0000000..6b52ea0 --- /dev/null +++ b/python/pypycaca.c @@ -0,0 +1,877 @@ +/* + * PypyCaca libcaca Python bindings + * Copyright (c) 2006 Jean-Yves Lamoureux + * All Rights Reserved + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 USA + */ + +/** \file pycaca.c + * \version \$Id: + * \author Jean-Yves Lamoureux + * \brief Main \e pypycaca bindings functions + * + * This file contains functions for python bindings + */ + +#include "pypycaca.h" + +static PyMethodDef CacaMethods[] = { + {"init", pycaca_init, METH_VARARGS, "Init libcaca"}, + {"set_delay", pycaca_set_delay, METH_VARARGS, "Set delay"}, + {"get_rendertime", pycaca_get_rendertime, METH_NOARGS, "Get render time"}, + {"get_width", pycaca_get_width, METH_NOARGS, "Get width"}, + {"get_height", pycaca_get_height, METH_NOARGS, "Get Height"}, + {"set_size", pycaca_set_size, METH_VARARGS, "Set size"}, + {"set_width", pycaca_set_width, METH_VARARGS, "Set width"}, + {"set_height", pycaca_set_height, METH_VARARGS, "Set height"}, + {"set_window_title", pycaca_set_window_title, METH_VARARGS, "Set window titl"}, + {"get_window_width", pycaca_get_window_width, METH_NOARGS, "Get window width"}, + {"get_window_height", pycaca_get_window_height, METH_NOARGS, "Get Window height"}, + {"refresh", pycaca_refresh, METH_NOARGS, "Refresh window"}, + {"end", pycaca_end, METH_NOARGS, "End libcaca"}, + {"get_feature", pycaca_get_feature, METH_VARARGS, "Get feature"}, + {"set_feature", pycaca_set_feature, METH_VARARGS, "Set feature"}, + {"get_feature_name", pycaca_get_feature_name, METH_VARARGS, "Get feature name"}, + + {"get_event", pycaca_get_event, METH_VARARGS, "Get event"}, + {"wait_event", pycaca_wait_event, METH_VARARGS, "Wait event"}, + {"get_mouse_x", pycaca_get_mouse_x, METH_NOARGS, "Get Mouse X"}, + {"get_mouse_y", pycaca_get_mouse_y, METH_NOARGS, "Get mouse Y"}, + {"draw_line", pycaca_draw_line, METH_VARARGS, "Init libcaca"}, + {"draw_thin_line", pycaca_draw_thin_line, METH_VARARGS, "Init libcaca"}, + {"draw_circle", pycaca_draw_circle, METH_VARARGS, "Init libcaca"}, + {"draw_ellipse", pycaca_draw_ellipse, METH_VARARGS, "Init libcaca"}, + {"draw_thin_ellipse", pycaca_draw_thin_ellipse, METH_VARARGS, "Init libcaca"}, + {"fill_ellipse", pycaca_fill_ellipse, METH_VARARGS, "Init libcaca"}, + {"draw_box", pycaca_draw_box, METH_VARARGS, "Init libcaca"}, + {"fill_box", pycaca_fill_box, METH_VARARGS, "Init libcaca"}, + {"draw_thin_box", pycaca_draw_thin_box, METH_VARARGS, "Init libcaca"}, + {"draw_triangle", pycaca_draw_triangle, METH_VARARGS, "Init libcaca"}, + {"draw_thin_triangle", pycaca_draw_thin_triangle, METH_VARARGS, "Init libcaca"}, + {"fill_triangle", pycaca_fill_triangle, METH_VARARGS, "Init libcaca"}, + {"draw_polyline", pycaca_draw_polyline, METH_VARARGS, ""}, + {"draw_thin_polyline", pycaca_draw_thin_polyline, METH_VARARGS, ""}, + + {"set_color", pycaca_set_color, METH_VARARGS, "Init libcaca"}, + {"get_fg_color", pycaca_get_fg_color, METH_VARARGS, ""}, + {"get_bg_color", pycaca_get_bg_color, METH_VARARGS, ""}, + {"get_color_name", pycaca_get_color_name, METH_VARARGS, ""}, + {"putchar", pycaca_putchar, METH_VARARGS, ""}, + {"putstr", pycaca_putstr, METH_VARARGS, ""}, + {"printf", pycaca_printf, METH_VARARGS, ""}, + {"clear", pycaca_clear, METH_VARARGS, ""}, + + {"load_sprite", pycaca_load_sprite, METH_VARARGS, ""}, + {"draw_sprite", pycaca_draw_sprite, METH_VARARGS, ""}, + {"get_sprite_frames", pycaca_get_sprite_frames, METH_VARARGS, ""}, + {"get_sprite_width", pycaca_get_sprite_width, METH_VARARGS, ""}, + {"get_sprite_height", pycaca_get_sprite_height, METH_VARARGS, ""}, + {"get_sprite_dx", pycaca_get_sprite_dx, METH_VARARGS, ""}, + {"get_sprite_dy", pycaca_get_sprite_dy, METH_VARARGS, ""}, + {"free_sprite", pycaca_free_sprite, METH_VARARGS, ""}, + + {"get_html", pycaca_get_html, METH_VARARGS, ""}, + {"get_html3", pycaca_get_html3, METH_VARARGS, ""}, + {"get_irc", pycaca_get_irc, METH_VARARGS, ""}, + {"get_ansi", pycaca_get_ansi, METH_VARARGS, ""}, + + {"create_bitmap", pycaca_create_bitmap, METH_VARARGS, ""}, + {"set_bitmap_palette", pycaca_set_bitmap_palette, METH_VARARGS, ""}, + {"set_bitmap_gamma", pycaca_set_bitmap_gamma, METH_VARARGS, ""}, + {"draw_bitmap", pycaca_draw_bitmap, METH_VARARGS, ""}, + {"free_bitmap", pycaca_free_bitmap, METH_VARARGS, ""}, + + + + + // {"", , METH_VARARGS, ""}, + + + + + {NULL, NULL, 0, NULL} /* Sentinel */ +}; + +PyMODINIT_FUNC +initcaca(void) +{ + PyObject *obj, *dict; + + obj = Py_InitModule("caca", CacaMethods); + dict = PyModule_GetDict(obj); + + SET_INTCONSTANT(dict,CACA_EVENT_NONE ); + SET_INTCONSTANT(dict,CACA_EVENT_KEY_PRESS ); + SET_INTCONSTANT(dict,CACA_EVENT_KEY_RELEASE ); + SET_INTCONSTANT(dict,CACA_EVENT_MOUSE_PRESS ); + SET_INTCONSTANT(dict,CACA_EVENT_MOUSE_RELEASE ); + SET_INTCONSTANT(dict,CACA_EVENT_MOUSE_MOTION ); + SET_INTCONSTANT(dict,CACA_EVENT_RESIZE ); + SET_INTCONSTANT(dict,CACA_EVENT_ANY ); + + SET_INTCONSTANT(dict, CACA_COLOR_BLACK ); + SET_INTCONSTANT(dict, CACA_COLOR_BLUE ); + SET_INTCONSTANT(dict, CACA_COLOR_GREEN ); + SET_INTCONSTANT(dict, CACA_COLOR_CYAN ); + SET_INTCONSTANT(dict, CACA_COLOR_RED ); + SET_INTCONSTANT(dict, CACA_COLOR_MAGENTA ); + SET_INTCONSTANT(dict, CACA_COLOR_BROWN ); + SET_INTCONSTANT(dict, CACA_COLOR_LIGHTGRAY ); + SET_INTCONSTANT(dict, CACA_COLOR_DARKGRAY ); + SET_INTCONSTANT(dict, CACA_COLOR_LIGHTBLUE ); + SET_INTCONSTANT(dict, CACA_COLOR_LIGHTGREEN ); + SET_INTCONSTANT(dict, CACA_COLOR_LIGHTCYAN ); + SET_INTCONSTANT(dict, CACA_COLOR_LIGHTRED ); + SET_INTCONSTANT(dict, CACA_COLOR_LIGHTMAGENTA ); + SET_INTCONSTANT(dict, CACA_COLOR_YELLOW ); + SET_INTCONSTANT(dict, CACA_COLOR_WHITE ); + + SET_INTCONSTANT(dict, CACA_BACKGROUND ); + SET_INTCONSTANT(dict, CACA_BACKGROUND_BLACK ); + SET_INTCONSTANT(dict, CACA_BACKGROUND_SOLID ); + SET_INTCONSTANT(dict, CACA_BACKGROUND_MIN ); + SET_INTCONSTANT(dict, CACA_BACKGROUND_MAX ); + SET_INTCONSTANT(dict, CACA_ANTIALIASING ); + SET_INTCONSTANT(dict, CACA_ANTIALIASING_NONE ); + SET_INTCONSTANT(dict, CACA_ANTIALIASING_PREFILTER ); + SET_INTCONSTANT(dict, CACA_ANTIALIASING_MIN ); + SET_INTCONSTANT(dict, CACA_ANTIALIASING_MAX ); + SET_INTCONSTANT(dict, CACA_DITHERING ); + SET_INTCONSTANT(dict, CACA_DITHERING_NONE ); + SET_INTCONSTANT(dict, CACA_DITHERING_ORDERED2 ); + SET_INTCONSTANT(dict, CACA_DITHERING_ORDERED4 ); + SET_INTCONSTANT(dict, CACA_DITHERING_ORDERED8 ); + SET_INTCONSTANT(dict, CACA_DITHERING_RANDOM ); + SET_INTCONSTANT(dict, CACA_DITHERING_FSTEIN ); + SET_INTCONSTANT(dict, CACA_DITHERING_MIN ); + SET_INTCONSTANT(dict, CACA_DITHERING_MAX ); + SET_INTCONSTANT(dict, CACA_FEATURE_UNKNOWN ); + + SET_INTCONSTANT(dict, CACA_KEY_UNKNOWN ); + SET_INTCONSTANT(dict, CACA_KEY_BACKSPACE ); + SET_INTCONSTANT(dict, CACA_KEY_TAB ); + SET_INTCONSTANT(dict, CACA_KEY_RETURN ); + SET_INTCONSTANT(dict, CACA_KEY_PAUSE ); + SET_INTCONSTANT(dict, CACA_KEY_ESCAPE ); + SET_INTCONSTANT(dict, CACA_KEY_DELETE ); + SET_INTCONSTANT(dict, CACA_KEY_UP ); + SET_INTCONSTANT(dict, CACA_KEY_DOWN ); + SET_INTCONSTANT(dict, CACA_KEY_LEFT ); + SET_INTCONSTANT(dict, CACA_KEY_RIGHT ); + SET_INTCONSTANT(dict, CACA_KEY_INSERT ); + SET_INTCONSTANT(dict, CACA_KEY_HOME ); + SET_INTCONSTANT(dict, CACA_KEY_END ); + SET_INTCONSTANT(dict, CACA_KEY_PAGEUP ); + SET_INTCONSTANT(dict, CACA_KEY_PAGEDOWN ); + SET_INTCONSTANT(dict, CACA_KEY_F1 ); + SET_INTCONSTANT(dict, CACA_KEY_F2 ); + SET_INTCONSTANT(dict, CACA_KEY_F3 ); + SET_INTCONSTANT(dict, CACA_KEY_F4 ); + SET_INTCONSTANT(dict, CACA_KEY_F5 ); + SET_INTCONSTANT(dict, CACA_KEY_F6 ); + SET_INTCONSTANT(dict, CACA_KEY_F7 ); + SET_INTCONSTANT(dict, CACA_KEY_F8 ); + SET_INTCONSTANT(dict, CACA_KEY_F9 ); + SET_INTCONSTANT(dict, CACA_KEY_F10 ); + SET_INTCONSTANT(dict, CACA_KEY_F11 ); + SET_INTCONSTANT(dict, CACA_KEY_F12 ); + SET_INTCONSTANT(dict, CACA_KEY_F13 ); + SET_INTCONSTANT(dict, CACA_KEY_F14 ); + SET_INTCONSTANT(dict, CACA_KEY_F15 ); + + + + +} + + +/*******************/ +/* Basic functions */ +/*******************/ +static PyObject * +pycaca_init(PyObject *self, PyObject *args) +{ + int ret; + + ret = caca_init(); + return Py_BuildValue("i", ret); +} + +static PyObject * +pycaca_set_delay(PyObject *self, PyObject *args) +{ + int value=0; + if (!PyArg_ParseTuple(args, "i", &value)) + caca_set_delay(value); + return Py_BuildValue("i", 1); /*FIXME*/ +} + +static PyObject * +pycaca_get_rendertime(PyObject *self, PyObject *args) +{ + int ret = caca_get_rendertime(); + return Py_BuildValue("i", ret); +} + +static PyObject * +pycaca_get_width(PyObject *self, PyObject *args) +{ + int ret = caca_get_width(); + return Py_BuildValue("i", ret); +} + +static PyObject * +pycaca_get_height(PyObject *self, PyObject *args) +{ + int ret = caca_get_height(); + return Py_BuildValue("i", ret); +} + +static PyObject * +pycaca_set_size(PyObject *self, PyObject *args) +{ + int width, height; + if (!PyArg_ParseTuple(args, "ii", &width, &height)) + caca_set_size(width, height); + return Py_BuildValue("i", 1); /* FIXME */ +} + +static PyObject * +pycaca_set_width(PyObject *self, PyObject *args) +{ + int width; + + if (!PyArg_ParseTuple(args, "i", &width)); + caca_set_width(width); + + return Py_BuildValue("i", 1); /* FIXME */ +} + +static PyObject * +pycaca_set_height(PyObject *self, PyObject *args) +{ + int height; + if (!PyArg_ParseTuple(args, "i", &height)); + caca_set_height(height); + return Py_BuildValue("i", 1); /* FIXME */ +} + +static PyObject * +pycaca_set_window_title(PyObject *self, PyObject *args) +{ + int ret; + const char *str; + if (!PyArg_ParseTuple(args, "s", &str)); + ret = caca_set_window_title(str); + return Py_BuildValue("i", ret); /* FIXME */ +} + +static PyObject * +pycaca_get_window_width(PyObject *self, PyObject *args) +{ + int ret = caca_get_window_width(); + return Py_BuildValue("i", ret); +} + +static PyObject * +pycaca_get_window_height(PyObject *self, PyObject *args) +{ + int ret = caca_get_window_height(); + return Py_BuildValue("i", ret); +} + +static PyObject * +pycaca_refresh(PyObject *self, PyObject *args) +{ + caca_refresh(); + return Py_BuildValue("i", 1); /*FIXME*/ +} + +static PyObject * +pycaca_end(PyObject *self, PyObject *args) +{ + caca_end(); + return Py_BuildValue("i", 1); /*FIXME*/ +} + + +static PyObject * +pycaca_get_feature(PyObject *self, PyObject *args) +{ + int value, ret; + if (!PyArg_ParseTuple(args, "i", &value)); + ret = caca_get_feature(value); + + return Py_BuildValue("i", ret); + +} + +static PyObject * +pycaca_set_feature(PyObject *self, PyObject *args) +{ + int value; + if (!PyArg_ParseTuple(args, "i", &value)); + caca_set_feature(value); + + return Py_BuildValue("i", 1); /* FIXME */ + +} +static PyObject * +pycaca_get_feature_name(PyObject *self, PyObject *args) +{ + int value; + char* ret; + if (!PyArg_ParseTuple(args, "i", &value)); + + ret = (char* const)caca_get_feature_name(value); + + return Py_BuildValue("s", ret); +} + +/******************/ +/* Event handling */ +/******************/ +static PyObject * +pycaca_get_event(PyObject *self, PyObject *args) +{ + int value, ret; + if (!PyArg_ParseTuple(args, "i", &value)); + + ret = caca_get_event(value); + + return Py_BuildValue("i", ret); +} +static PyObject * +pycaca_wait_event(PyObject *self, PyObject *args) +{ + int value, ret; + if (!PyArg_ParseTuple(args, "i", &value)); + + ret = caca_get_event(value); + + return Py_BuildValue("i", ret); +} + +static PyObject * +pycaca_get_mouse_x(PyObject *self, PyObject *args) +{ + int ret = caca_get_mouse_x(); + return Py_BuildValue("i", ret); +} + +static PyObject * +pycaca_get_mouse_y(PyObject *self, PyObject *args) +{ + int ret = caca_get_mouse_y(); + return Py_BuildValue("i", ret); +} + +/**********************/ +/* Primitives drawing */ +/**********************/ +static PyObject * +pycaca_draw_line(PyObject *self, PyObject *args) +{ + int x1, y1, x2, y2; + char c; + + if (!PyArg_ParseTuple(args, "iiiic", &x1,&y1,&x2,&y2,&c)); + caca_draw_line(x1,y1,x2,y2,c); + return Py_BuildValue("i", 1); /* FIXME */ +} +static PyObject * +pycaca_draw_polyline(PyObject *self, PyObject *args) +{ + PyObject *list_x, *list_y, *item; + int *x, *y, n, lenx, leny, i; + char c; + + if (!PyArg_ParseTuple(args, "OOic", &list_x, &list_y, &n, &c)); + + lenx = PySequence_Length(list_x); + leny = PySequence_Length(list_y); + + x = (int*) malloc(lenx*sizeof(int)); + y = (int*) malloc(leny*sizeof(int)); + + if((x == NULL) || (y==NULL)) + return NULL; /* FIXME */ + + for(i=0;i + * All Rights Reserved + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 USA + */ + +/** \file pycaca.h + * \version \$Id: + * \author Jean-Yves Lamoureux + * \brief Main \e pypycaca bindings definitions + * + * This file contains functions prototypes for python bindings + */ + + +#include +#include +#define SET_INTCONSTANT(dict, value) \ + PyDict_SetItemString(dict, #value, PyInt_FromLong((long) value)) + + +PyMODINIT_FUNC initcaca(void); + +/* Basic functions */ + +static PyObject * +pycaca_init(PyObject *self, PyObject *args); +static PyObject * +pycaca_set_delay(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_rendertime(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_width(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_height(PyObject *self, PyObject *args); +static PyObject * +pycaca_set_size(PyObject *self, PyObject *args); +static PyObject * +pycaca_set_width(PyObject *self, PyObject *args); +static PyObject * +pycaca_set_height(PyObject *self, PyObject *args); +static PyObject * +pycaca_set_window_title(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_window_width(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_window_height(PyObject *self, PyObject *args); +static PyObject * +pycaca_refresh(PyObject *self, PyObject *args); +static PyObject * +pycaca_end(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_feature(PyObject *self, PyObject *args); +static PyObject * +pycaca_set_feature(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_feature_name(PyObject *self, PyObject *args); + +/* Event handling */ +static PyObject * +pycaca_get_event(PyObject *self, PyObject *args); +static PyObject * +pycaca_wait_event(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_mouse_x(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_mouse_y(PyObject *self, PyObject *args); + + +/* Primitives drawing */ +static PyObject * +pycaca_draw_line(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_polyline(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_thin_polyline(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_thin_line(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_circle(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_ellipse(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_thin_ellipse(PyObject *self, PyObject *args); +static PyObject * +pycaca_fill_ellipse(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_box(PyObject *self, PyObject *args); +static PyObject * +pycaca_fill_box(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_thin_box(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_triangle(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_thin_triangle(PyObject *self, PyObject *args); +static PyObject * +pycaca_fill_triangle(PyObject *self, PyObject *args); + +/* Charactere drawing */ +static PyObject * +pycaca_set_color(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_fg_color(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_bg_color(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_color_name(PyObject *self, PyObject *args); +static PyObject * +pycaca_putchar(PyObject *self, PyObject *args); +static PyObject * +pycaca_putstr(PyObject *self, PyObject *args); +static PyObject * +pycaca_printf(PyObject *self, PyObject *args); +/*static PyObject * +pycaca_get_screen(PyObject *self, PyObject *args);*/ + static PyObject * +pycaca_clear(PyObject *self, PyObject *args); + + +/* Sprites functions */ +static PyObject * +pycaca_load_sprite(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_sprite(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_sprite_frames(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_sprite_width(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_sprite_height(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_sprite_dx(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_sprite_dy(PyObject *self, PyObject *args); +static PyObject * +pycaca_free_sprite(PyObject *self, PyObject *args); + + + +/* Exporters */ +static PyObject * +pycaca_get_html(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_html3(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_irc(PyObject *self, PyObject *args); +static PyObject * +pycaca_get_ansi(PyObject *self, PyObject *args); + + +/* Bitmap functions */ +static PyObject * +pycaca_create_bitmap(PyObject *self, PyObject *args); +static PyObject * +pycaca_set_bitmap_palette(PyObject *self, PyObject *args); +static PyObject * +pycaca_set_bitmap_gamma(PyObject *self, PyObject *args); +static PyObject * +pycaca_draw_bitmap(PyObject *self, PyObject *args); +static PyObject * +pycaca_free_bitmap(PyObject *self, PyObject *args);