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

Last change on this file since 4300 was 1462, checked in by Sam Hocevar, 13 years ago
  • Bwarf, typo in the no warranty clause.
  • Property svn:keywords set to Id
File size: 5.0 KB
Line 
1/*
2 *  PypyCaca       libcaca Python bindings
3 *  Copyright (c) 2006 Jean-Yves Lamoureux <jylam@lnxscene.org>
4 *                All Rights Reserved
5 *
6 *  $Id: pypycaca.h 1462 2006-12-12 01:53:54Z sam $
7 *
8 *  This library is free software. It comes without any warranty, to
9 *  the extent permitted by applicable law. You can redistribute it
10 *  and/or modify it under the terms of the Do What The Fuck You Want
11 *  To Public License, Version 2, as published by Sam Hocevar. See
12 *  http://sam.zoy.org/wtfpl/COPYING for more details.
13 */
14
15#include <Python.h>
16#include <caca.h>
17#define SET_INTCONSTANT(dict, value) \
18     PyDict_SetItemString(dict, #value, PyInt_FromLong((long) value))
19
20
21PyMODINIT_FUNC initcaca(void);
22
23/* Basic functions */
24
25static PyObject *
26pycaca_init(PyObject *self, PyObject *args);
27static PyObject *
28pycaca_set_display_time(PyObject *self, PyObject *args);
29static PyObject *
30pycaca_get_display_time(PyObject *self, PyObject *args);
31static PyObject *
32pycaca_get_width(PyObject *self, PyObject *args);
33static PyObject *
34pycaca_get_height(PyObject *self, PyObject *args);
35static PyObject *
36pycaca_set_size(PyObject *self, PyObject *args);
37static PyObject *
38pycaca_set_width(PyObject *self, PyObject *args);
39static PyObject *
40pycaca_set_height(PyObject *self, PyObject *args);
41static PyObject *
42pycaca_set_display_title(PyObject *self, PyObject *args);
43static PyObject *
44pycaca_get_display_width(PyObject *self, PyObject *args);
45static PyObject *
46pycaca_get_display_height(PyObject *self, PyObject *args);
47static PyObject *
48pycaca_refresh(PyObject *self, PyObject *args);
49static PyObject *
50pycaca_end(PyObject *self, PyObject *args);
51static PyObject *
52pycaca_get_feature(PyObject *self, PyObject *args);
53static PyObject *
54pycaca_set_feature(PyObject *self, PyObject *args);
55static PyObject *
56pycaca_get_feature_name(PyObject *self, PyObject *args);
57
58/* Event handling */
59static PyObject *
60pycaca_get_event(PyObject *self, PyObject *args);
61static PyObject *
62pycaca_wait_event(PyObject *self, PyObject *args);
63static PyObject *
64pycaca_get_mouse_x(PyObject *self, PyObject *args);
65static PyObject *
66pycaca_get_mouse_y(PyObject *self, PyObject *args);
67
68
69/* Primitives drawing */
70static PyObject *
71pycaca_draw_line(PyObject *self, PyObject *args);
72static PyObject *
73pycaca_draw_polyline(PyObject *self, PyObject *args);
74static PyObject *
75pycaca_draw_thin_polyline(PyObject *self, PyObject *args);
76static PyObject *
77pycaca_draw_thin_line(PyObject *self, PyObject *args);
78static PyObject *
79pycaca_draw_circle(PyObject *self, PyObject *args);
80static PyObject *
81pycaca_draw_ellipse(PyObject *self, PyObject *args);
82static PyObject *
83pycaca_draw_thin_ellipse(PyObject *self, PyObject *args);
84static PyObject *
85pycaca_fill_ellipse(PyObject *self, PyObject *args);
86static PyObject *
87pycaca_draw_box(PyObject *self, PyObject *args);
88static PyObject *
89pycaca_fill_box(PyObject *self, PyObject *args);
90static PyObject *
91pycaca_draw_thin_box(PyObject *self, PyObject *args);
92static PyObject *
93pycaca_draw_triangle(PyObject *self, PyObject *args);
94static PyObject *
95pycaca_draw_thin_triangle(PyObject *self, PyObject *args);
96static PyObject *
97pycaca_fill_triangle(PyObject *self, PyObject *args);
98
99/* Charactere drawing */
100static PyObject *
101pycaca_set_color(PyObject *self, PyObject *args);
102static PyObject *
103pycaca_get_fg_color(PyObject *self, PyObject *args);
104static PyObject *
105pycaca_get_bg_color(PyObject *self, PyObject *args);
106static PyObject *
107pycaca_get_color_name(PyObject *self, PyObject *args);
108static PyObject *
109pycaca_putchar(PyObject *self, PyObject *args);
110static PyObject *
111pycaca_putstr(PyObject *self, PyObject *args);
112static PyObject *
113pycaca_printf(PyObject *self, PyObject *args);
114/*static PyObject *
115pycaca_get_screen(PyObject *self, PyObject *args);*/
116  static PyObject *
117pycaca_clear(PyObject *self, PyObject *args);
118
119
120/* Sprites functions */
121static PyObject *
122pycaca_load_sprite(PyObject *self, PyObject *args);
123static PyObject *
124pycaca_draw_sprite(PyObject *self, PyObject *args);
125static PyObject *
126pycaca_get_sprite_frames(PyObject *self, PyObject *args);
127static PyObject *
128pycaca_get_sprite_width(PyObject *self, PyObject *args);
129static PyObject *
130pycaca_get_sprite_height(PyObject *self, PyObject *args);
131static PyObject *
132pycaca_get_sprite_dx(PyObject *self, PyObject *args);
133static PyObject *
134pycaca_get_sprite_dy(PyObject *self, PyObject *args);
135static PyObject *
136pycaca_free_sprite(PyObject *self, PyObject *args);
137
138
139
140/* Exporters */
141static PyObject *
142pycaca_get_html(PyObject *self, PyObject *args);
143static PyObject *
144pycaca_get_html3(PyObject *self, PyObject *args);
145static PyObject *
146pycaca_get_irc(PyObject *self, PyObject *args);
147static PyObject *
148pycaca_get_ansi(PyObject *self, PyObject *args);
149
150
151/* Bitmap functions */
152static PyObject *
153pycaca_create_bitmap(PyObject *self, PyObject *args);
154static PyObject *
155pycaca_set_bitmap_palette(PyObject *self, PyObject *args);
156static PyObject *
157pycaca_set_bitmap_gamma(PyObject *self, PyObject *args);
158static PyObject *
159pycaca_draw_bitmap(PyObject *self, PyObject *args);
160static PyObject *
161pycaca_free_bitmap(PyObject *self, PyObject *args);
Note: See TracBrowser for help on using the repository browser.