blob: 96b13c2258e859d87fbd6141b59b68d9c6ac3d26 [file] [log] [blame]
José Fonseca6410e942008-07-13 23:36:59 +09001 /**************************************************************************
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>
José Fonseca6410e942008-07-13 23:36:59 +090040
41#include "pipe/p_screen.h"
42#include "pipe/p_context.h"
43#include "pipe/p_inlines.h"
Michal Krol7b0c4592009-03-17 10:33:25 +010044#include "pipe/p_shader_tokens.h"
José Fonseca05a23e62008-07-14 10:45:40 +090045#include "cso_cache/cso_context.h"
Michal Krol7b0c4592009-03-17 10:33:25 +010046#include "util/u_draw_quad.h"
47#include "util/u_tile.h"
48#include "util/u_math.h"
Zack Rusine9c6f012009-12-23 13:43:30 -050049#include "util/u_format.h"
Michal Krol7b0c4592009-03-17 10:33:25 +010050#include "util/u_memory.h"
51#include "tgsi/tgsi_text.h"
52#include "tgsi/tgsi_dump.h"
José Fonseca6410e942008-07-13 23:36:59 +090053
54#include "st_device.h"
José Fonsecae74f94b2008-07-18 01:08:06 +090055#include "st_sample.h"
José Fonseca6410e942008-07-13 23:36:59 +090056
57%}
58
José Fonseca0ecaa372008-08-13 12:31:53 +010059%include "typemaps.i"
José Fonsecabb84ce72009-03-26 11:29:59 +000060%include "exception.i"
José Fonseca2f153b52008-11-20 01:01:48 +090061%include "cstring.i"
62
José Fonseca6410e942008-07-13 23:36:59 +090063%include "carrays.i"
José Fonseca3aea28b2008-07-14 22:26:40 +090064%array_class(unsigned char, ByteArray);
José Fonseca6410e942008-07-13 23:36:59 +090065%array_class(int, IntArray);
José Fonsecab5f7dd02008-08-11 00:16:20 +010066%array_class(unsigned, UnsignedArray);
José Fonseca6410e942008-07-13 23:36:59 +090067%array_class(float, FloatArray);
68
69
70%rename(Device) st_device;
71%rename(Context) st_context;
72%rename(Texture) pipe_texture;
José Fonseca28de69d2009-03-30 16:02:21 +010073%rename(Surface) st_surface;
José Fonsecad18c2ee2009-03-26 11:19:15 +000074%rename(Buffer) pipe_buffer;
José Fonsecad5ed1582008-07-15 17:13:37 +090075
José Fonseca6410e942008-07-13 23:36:59 +090076%rename(BlendColor) pipe_blend_color;
77%rename(Blend) pipe_blend_state;
78%rename(Clip) pipe_clip_state;
79%rename(ConstantBuffer) pipe_constant_buffer;
José Fonsecae69e94d2008-08-11 16:57:50 +010080%rename(Depth) pipe_depth_state;
81%rename(Stencil) pipe_stencil_state;
82%rename(Alpha) pipe_alpha_state;
José Fonseca6410e942008-07-13 23:36:59 +090083%rename(DepthStencilAlpha) pipe_depth_stencil_alpha_state;
José Fonseca6410e942008-07-13 23:36:59 +090084%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
José Fonsecad5ed1582008-07-15 17:13:37 +090094
José Fonsecae08072c2008-08-11 17:08:53 +010095%include "p_compiler.i"
Michal Krol7b0c4592009-03-17 10:33:25 +010096%include "p_defines.h";
José Fonsecae7f1ac32008-08-11 14:06:24 +010097%include "p_format.i"
José Fonseca6410e942008-07-13 23:36:59 +090098
José Fonsecae7f1ac32008-08-11 14:06:24 +010099%include "p_device.i"
100%include "p_context.i"
101%include "p_texture.i"
102%include "p_state.i"
José Fonseca05a23e62008-07-14 10:45:40 +0900103