File: pypycaca.h

package info (click to toggle)
libcaca 0.99.beta14-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 6,720 kB
  • ctags: 2,334
  • sloc: ansic: 18,652; cs: 1,171; objc: 835; cpp: 741; makefile: 446; sh: 289; python: 215; ruby: 190; asm: 93
file content (161 lines) | stat: -rw-r--r-- 5,085 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*
 *  PypyCaca       libcaca Python bindings
 *  Copyright (c) 2006 Jean-Yves Lamoureux <jylam@lnxscene.org>
 *                All Rights Reserved
 *
 *  $Id$
 *
 *  This library is free software. It comes without any warranty, to
 *  the extent permitted by applicable law. You can redistribute it
 *  and/or modify it under the terms of the Do What The Fuck You Want
 *  To Public License, Version 2, as published by Sam Hocevar. See
 *  http://sam.zoy.org/wtfpl/COPYING for more details.
 */

#include <Python.h>
#include <caca.h>
#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_display_time(PyObject *self, PyObject *args);
static PyObject *
pycaca_get_display_time(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_display_title(PyObject *self, PyObject *args);
static PyObject *
pycaca_get_display_width(PyObject *self, PyObject *args);
static PyObject *
pycaca_get_display_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);