.gitignore added
[dotfiles/.git] / .local / include / python3.9 / pygame / include / pygame_mask.h
1 /*
2   pygame - Python Game Library
3
4   This library is free software; you can redistribute it and/or
5   modify it under the terms of the GNU Library General Public
6   License as published by the Free Software Foundation; either
7   version 2 of the License, or (at your option) any later version.
8
9   This library is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   Library General Public License for more details.
13
14   You should have received a copy of the GNU Library General Public
15   License along with this library; if not, write to the Free
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18
19 #ifndef PGMASK_H
20 #define PGMASK_H
21
22 #include <Python.h>
23 #include "bitmask.h"
24
25 typedef struct {
26   PyObject_HEAD
27   bitmask_t *mask;
28   void *bufdata;
29 } pgMaskObject;
30
31 #define pgMask_AsBitmap(x) (((pgMaskObject*)x)->mask)
32
33 #ifndef PYGAMEAPI_MASK_INTERNAL
34
35 #include "pgimport.h"
36
37 PYGAMEAPI_DEFINE_SLOTS(mask);
38
39 #define pgMask_Type     (*(PyTypeObject*) \
40     PYGAMEAPI_GET_SLOT(mask, 0))
41 #define pgMask_Check(x) ((x)->ob_type == &pgMask_Type)
42
43 #define import_pygame_mask() _IMPORT_PYGAME_MODULE(mask)
44
45 #endif /* ~PYGAMEAPI_MASK_INTERNAL */
46
47 #endif /* ~PGMASK_H */