2 pygame - Python Game Library
3 Copyright (C) 2000-2001 Pete Shinners
4 Copyright (C) 2007 Rene Dudfield, Richard Goedeken
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with this library; if not, write to the Free
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 /* Bufferproxy module C api. */
25 #if !defined(PG_BUFPROXY_HEADER)
26 #define PG_BUFPROXY_HEADER
30 typedef PyObject *(*_pgbufproxy_new_t)(PyObject *, getbufferproc);
31 typedef PyObject *(*_pgbufproxy_get_obj_t)(PyObject *);
32 typedef int (*_pgbufproxy_trip_t)(PyObject *);
34 #ifndef PYGAMEAPI_BUFPROXY_INTERNAL
38 PYGAMEAPI_DEFINE_SLOTS(bufferproxy);
40 #define pgBufproxy_Type (*(PyTypeObject*) \
41 PYGAMEAPI_GET_SLOT(bufferproxy, 0) )
43 #define pgBufproxy_Check(x) ((x)->ob_type == &pgBufproxy_Type)
45 #define pgBufproxy_New (*(_pgbufproxy_new_t) \
46 PYGAMEAPI_GET_SLOT(bufferproxy, 1))
48 #define pgBufproxy_GetParent \
49 (*(_pgbufproxy_get_obj_t) \
50 PYGAMEAPI_GET_SLOT(bufferproxy, 2))
52 #define pgBufproxy_Trip (*(_pgbufproxy_trip_t) \
53 PYGAMEAPI_GET_SLOT(bufferproxy, 3))
55 #define import_pygame_bufferproxy() _IMPORT_PYGAME_MODULE(bufferproxy)
57 #endif /* ~PYGAMEAPI_BUFPROXY_INTERNAL */
59 #endif /* ~defined(PG_BUFPROXY_HEADER) */