Merge branch 'mesa_7_7_branch'
[mesa.git] / src / gallium / state_trackers / python / gallium.i
1 /**************************************************************************
2 *
3 * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27
28 /**
29 * @file
30 * SWIG interface definion for Gallium types.
31 *
32 * @author Jose Fonseca <jrfonseca@tungstengraphics.com>
33 */
34
35 %module gallium;
36
37 %{
38
39 #include <stdio.h>
40
41 #include "pipe/p_screen.h"
42 #include "pipe/p_context.h"
43 #include "pipe/p_inlines.h"
44 #include "pipe/p_shader_tokens.h"
45 #include "cso_cache/cso_context.h"
46 #include "util/u_draw_quad.h"
47 #include "util/u_tile.h"
48 #include "util/u_math.h"
49 #include "util/u_format.h"
50 #include "util/u_memory.h"
51 #include "tgsi/tgsi_text.h"
52 #include "tgsi/tgsi_dump.h"
53
54 #include "st_device.h"
55 #include "st_sample.h"
56
57 %}
58
59 %include "typemaps.i"
60 %include "exception.i"
61 %include "cstring.i"
62
63 %include "carrays.i"
64 %array_class(unsigned char, ByteArray);
65 %array_class(int, IntArray);
66 %array_class(unsigned, UnsignedArray);
67 %array_class(float, FloatArray);
68
69
70 %rename(Device) st_device;
71 %rename(Context) st_context;
72 %rename(Texture) pipe_texture;
73 %rename(Surface) st_surface;
74 %rename(Buffer) pipe_buffer;
75
76 %rename(BlendColor) pipe_blend_color;
77 %rename(Blend) pipe_blend_state;
78 %rename(Clip) pipe_clip_state;
79 %rename(ConstantBuffer) pipe_constant_buffer;
80 %rename(Depth) pipe_depth_state;
81 %rename(Stencil) pipe_stencil_state;
82 %rename(Alpha) pipe_alpha_state;
83 %rename(DepthStencilAlpha) pipe_depth_stencil_alpha_state;
84 %rename(Framebuffer) pipe_framebuffer_state;
85 %rename(PolyStipple) pipe_poly_stipple;
86 %rename(Rasterizer) pipe_rasterizer_state;
87 %rename(Sampler) pipe_sampler_state;
88 %rename(Scissor) pipe_scissor_state;
89 %rename(Shader) pipe_shader_state;
90 %rename(VertexBuffer) pipe_vertex_buffer;
91 %rename(VertexElement) pipe_vertex_element;
92 %rename(Viewport) pipe_viewport_state;
93
94
95 %include "p_compiler.i"
96 %include "p_defines.h";
97 %include "p_format.i"
98
99 %include "p_device.i"
100 %include "p_context.i"
101 %include "p_texture.i"
102 %include "p_state.i"
103