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

Last change on this file since 4333 was 4333, checked in by Sam Hocevar, 10 years ago

Large source code cleanup, getting rid of spaces, tabs, and svn keywords.

  • 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 *  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#include <Python.h>
14#include <caca.h>
15#define SET_INTCONSTANT(dict, value) \
16     PyDict_SetItemString(dict, #value, PyInt_FromLong((long) value))
17
18
19PyMODINIT_FUNC initcaca(void);
20
21/* Basic functions */
22
23static PyObject *
24pycaca_init(PyObject *self, PyObject *args);
25static PyObject *
26pycaca_set_display_time(PyObject *self, PyObject *args);
27static PyObject *
28pycaca_get_display_time(PyObject *self, PyObject *args);
29static PyObject *
30pycaca_get_width(PyObject *self, PyObject *args);
31static PyObject *
32pycaca_get_height(PyObject *self, PyObject *args);
33static PyObject *
34pycaca_set_size(PyObject *self, PyObject *args);
35static PyObject *
36pycaca_set_width(PyObject *self, PyObject *args);
37static PyObject *
38pycaca_set_height(PyObject *self, PyObject *args);
39static PyObject *
40pycaca_set_display_title(PyObject *self, PyObject *args);
41static PyObject *
42pycaca_get_display_width(PyObject *self, PyObject *args);
43static PyObject *
44pycaca_get_display_height(PyObject *self, PyObject *args);
45static PyObject *
46pycaca_refresh(PyObject *self, PyObject *args);
47static PyObject *
48pycaca_end(PyObject *self, PyObject *args);
49static PyObject *
50pycaca_get_feature(PyObject *self, PyObject *args);
51static PyObject *
52pycaca_set_feature(PyObject *self, PyObject *args);
53static PyObject *
54pycaca_get_feature_name(PyObject *self, PyObject *args);
55
56/* Event handling */
57static PyObject *
58pycaca_get_event(PyObject *self, PyObject *args);
59static PyObject *
60pycaca_wait_event(PyObject *self, PyObject *args);
61static PyObject *
62pycaca_get_mouse_x(PyObject *self, PyObject *args);
63static PyObject *
64pycaca_get_mouse_y(PyObject *self, PyObject *args);
65
66
67/* Primitives drawing */
68static PyObject *
69pycaca_draw_line(PyObject *self, PyObject *args);
70static PyObject *
71pycaca_draw_polyline(PyObject *self, PyObject *args);
72static PyObject *
73pycaca_draw_thin_polyline(PyObject *self, PyObject *args);
74static PyObject *
75pycaca_draw_thin_line(PyObject *self, PyObject *args);
76static PyObject *
77pycaca_draw_circle(PyObject *self, PyObject *args);
78static PyObject *
79pycaca_draw_ellipse(PyObject *self, PyObject *args);
80static PyObject *
81pycaca_draw_thin_ellipse(PyObject *self, PyObject *args);
82static PyObject *
83pycaca_fill_ellipse(PyObject *self, PyObject *args);
84static PyObject *
85pycaca_draw_box(PyObject *self, PyObject *args);
86static PyObject *
87pycaca_fill_box(PyObject *self, PyObject *args);
88static PyObject *
89pycaca_draw_thin_box(PyObject *self, PyObject *args);
90static PyObject *
91pycaca_draw_triangle(PyObject *self, PyObject *args);
92static PyObject *
93pycaca_draw_thin_triangle(PyObject *self, PyObject *args);
94static PyObject *
95pycaca_fill_triangle(PyObject *self, PyObject *args);
96
97/* Charactere drawing */
98static PyObject *
99pycaca_set_color(PyObject *self, PyObject *args);
100static PyObject *
101pycaca_get_fg_color(PyObject *self, PyObject *args);
102static PyObject *
103pycaca_get_bg_color(PyObject *self, PyObject *args);
104static PyObject *
105pycaca_get_color_name(PyObject *self, PyObject *args);
106static PyObject *
107pycaca_putchar(PyObject *self, PyObject *args);
108static PyObject *
109pycaca_putstr(PyObject *self, PyObject *args);
110static PyObject *
111pycaca_printf(PyObject *self, PyObject *args);
112/*static PyObject *
113pycaca_get_screen(PyObject *self, PyObject *args);*/
114  static PyObject *
115pycaca_clear(PyObject *self, PyObject *args);
116
117
118/* Sprites functions */
119static PyObject *
120pycaca_load_sprite(PyObject *self, PyObject *args);
121static PyObject *
122pycaca_draw_sprite(PyObject *self, PyObject *args);
123static PyObject *
124pycaca_get_sprite_frames(PyObject *self, PyObject *args);
125static PyObject *
126pycaca_get_sprite_width(PyObject *self, PyObject *args);
127static PyObject *
128pycaca_get_sprite_height(PyObject *self, PyObject *args);
129static PyObject *
130pycaca_get_sprite_dx(PyObject *self, PyObject *args);
131static PyObject *
132pycaca_get_sprite_dy(PyObject *self, PyObject *args);
133static PyObject *
134pycaca_free_sprite(PyObject *self, PyObject *args);
135
136
137
138/* Exporters */
139static PyObject *
140pycaca_get_html(PyObject *self, PyObject *args);
141static PyObject *
142pycaca_get_html3(PyObject *self, PyObject *args);
143static PyObject *
144pycaca_get_irc(PyObject *self, PyObject *args);
145static PyObject *
146pycaca_get_ansi(PyObject *self, PyObject *args);
147
148
149/* Bitmap functions */
150static PyObject *
151pycaca_create_bitmap(PyObject *self, PyObject *args);
152static PyObject *
153pycaca_set_bitmap_palette(PyObject *self, PyObject *args);
154static PyObject *
155pycaca_set_bitmap_gamma(PyObject *self, PyObject *args);
156static PyObject *
157pycaca_draw_bitmap(PyObject *self, PyObject *args);
158static PyObject *
159pycaca_free_bitmap(PyObject *self, PyObject *args);
Note: See TracBrowser for help on using the repository browser.