Rename GP_Context -> GP_Pixmap
[gfxprim.git] / pylib / gfxprim / backends / __init__.py
blobeccaf05e8711e156dc706c1e36f9eb15a0eca163
1 """
2 Module wrapping GfxPrim backends.
4 BIG FAT WARNING
5 ---------------
6 Accessing a pixmap after its backend has ben freed will probably
7 end your (program's) world
8 """
10 from . import c_backends
12 # Pull GP_Backend
13 Backend = c_backends.GP_Backend
15 def _init(module):
17 # Extend GP_Backend with convenience methods
18 from ._extend_backend import extend_backend
19 extend_backend(Backend)
21 # Imports from the SWIG module
22 import re
23 def strip_GP(s):
24 return re.sub('^GP_', '', s)
26 # Import some members from the SWIG module
27 from ..utils import import_members
28 import_members(c_backends, module, sub=strip_GP,
29 exclude=[
30 '^GP_Backend$',
31 '^gfxprim$',
32 '^\w+_swigregister$',
33 '^_\w+$'])
35 _init(locals())
36 del _init