summaryrefslogtreecommitdiff
path: root/extra/wxpython/wxpython-cairo.patch
blob: f3fc6fba07648b74d88a952cc9237e20fb4a80a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- wxPython/trunk/wx/lib/wxcairo.py	2011/08/25 18:50:02	68894
+++ wxPython/trunk/wx/lib/wxcairo.py	2011/09/22 00:30:25	69181
@@ -401,6 +401,48 @@
                                                       ctypes.py_object)),
             ('Check_Status', ctypes.PYFUNCTYPE(ctypes.c_int, ctypes.c_int))]
 
+    # This structure is known good with pycairo 1.10.0. The keep adding stuff
+    # to the middle of the structure instead of only adding to the end!
+    elif cairo.version_info < (1,11):  
+        _fields_ = [
+            ('Context_Type', ctypes.py_object),
+            ('Context_FromContext', ctypes.PYFUNCTYPE(ctypes.py_object,
+                                                      ctypes.c_void_p,
+                                                      ctypes.py_object,
+                                                      ctypes.py_object)),
+            ('FontFace_Type', ctypes.py_object),
+            ('ToyFontFace_Type', ctypes.py_object),  #** new in 1.8.4
+            ('FontFace_FromFontFace', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
+            ('FontOptions_Type', ctypes.py_object),
+            ('FontOptions_FromFontOptions', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
+            ('Matrix_Type', ctypes.py_object),
+            ('Matrix_FromMatrix', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
+            ('Path_Type', ctypes.py_object),
+            ('Path_FromPath', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
+            ('Pattern_Type', ctypes.py_object),
+            ('SolidPattern_Type', ctypes.py_object),
+            ('SurfacePattern_Type', ctypes.py_object),
+            ('Gradient_Type', ctypes.py_object),
+            ('LinearGradient_Type', ctypes.py_object),
+            ('RadialGradient_Type', ctypes.py_object),
+            ('Pattern_FromPattern', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p,
+                                                      ctypes.py_object)), #** changed in 1.8.4
+            ('ScaledFont_Type', ctypes.py_object),
+            ('ScaledFont_FromScaledFont', ctypes.PYFUNCTYPE(ctypes.py_object, ctypes.c_void_p)),
+            ('Surface_Type', ctypes.py_object),
+            ('ImageSurface_Type', ctypes.py_object),
+            ('PDFSurface_Type', ctypes.py_object),
+            ('PSSurface_Type', ctypes.py_object),
+            ('SVGSurface_Type', ctypes.py_object),
+            ('Win32Surface_Type', ctypes.py_object),
+            ('Win32PrintingSurface_Type', ctypes.py_object),
+            ('XCBSurface_Type', ctypes.py_object),
+            ('XlibSurface_Type', ctypes.py_object),
+            ('Surface_FromSurface', ctypes.PYFUNCTYPE(ctypes.py_object,
+                                                      ctypes.c_void_p,
+                                                      ctypes.py_object)),
+            ('Check_Status', ctypes.PYFUNCTYPE(ctypes.c_int, ctypes.c_int))]
+
 
 def _loadPycairoAPI():
     global pycairoAPI