xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #533: pygtkglext-git.patch

File pygtkglext-git.patch, 17.7 KB (added by Antoine Martin, 7 years ago)

patch for building git version of pygtkglext

  • gtk/gdkgl/__init__.py

    diff --git a/gtk/gdkgl/__init__.py b/gtk/gdkgl/__init__.py
    index a8976f1..26864ff 100644
    a b del gobject 
    2121from _gdkgl import *
    2222from ext import *
    2323
     24MODE_RGB         = 0
     25MODE_RGBA        = 0
     26MODE_INDEX       = 1 << 0
     27MODE_SINGLE      = 0
     28MODE_DOUBLE      = 1 << 1
     29MODE_STEREO      = 1 << 2
     30MODE_ALPHA       = 1 << 3
     31MODE_DEPTH       = 1 << 4
     32MODE_STENCIL     = 1 << 5
     33MODE_ACCUM       = 1 << 6
     34MODE_MULTISAMPLE = 1 << 7
     35
     36
     37USE_GL                     = 1
     38BUFFER_SIZE                = 2
     39LEVEL                      = 3
     40RGBA                       = 4
     41DOUBLEBUFFER               = 5
     42STEREO                     = 6
     43AUX_BUFFERS                = 7
     44RED_SIZE                   = 8
     45GREEN_SIZE                 = 9
     46BLUE_SIZE                  = 10
     47ALPHA_SIZE                 = 11
     48DEPTH_SIZE                 = 12
     49STENCIL_SIZE               = 13
     50ACCUM_RED_SIZE             = 14
     51ACCUM_GREEN_SIZE           = 15
     52ACCUM_BLUE_SIZE            = 16
     53ACCUM_ALPHA_SIZE           = 17
     54CONFIG_CAVEAT              = 0x20
     55X_VISUAL_TYPE              = 0x22
     56TRANSPARENT_TYPE           = 0x23
     57TRANSPARENT_INDEX_VALUE    = 0x24
     58TRANSPARENT_RED_VALUE      = 0x25
     59TRANSPARENT_GREEN_VALUE    = 0x26
     60TRANSPARENT_BLUE_VALUE     = 0x27
     61TRANSPARENT_ALPHA_VALUE    = 0x28
     62DRAWABLE_TYPE              = 0x8010
     63RENDER_TYPE                = 0x8011
     64X_RENDERABLE               = 0x8012
     65FBCONFIG_ID                = 0x8013
     66MAX_PBUFFER_WIDTH          = 0x8016
     67MAX_PBUFFER_HEIGHT         = 0x8017
     68MAX_PBUFFER_PIXELS         = 0x8018
     69VISUAL_ID                  = 0x800B
     70SCREEN                     = 0x800C
     71SAMPLE_BUFFERS             = 100000
     72SAMPLES                    = 100001
     73CONFIG_CAVEAT_DONT_CARE    = 0xFFFFFFFF
     74CONFIG_CAVEAT_NONE         = 0x8000
     75SLOW_CONFIG                = 0x8001
     76NON_CONFORMANT_CONFIG      = 0x800D
     77VISUAL_TYPE_DONT_CARE      = 0xFFFFFFFF
     78TRUE_COLOR                 = 0x8002
     79DIRECT_COLOR               = 0x8003
     80PSEUDO_COLOR               = 0x8004
     81STATIC_COLOR               = 0x8005
     82GRAY_SCALE                 = 0x8006
     83STATIC_GRAY                = 0x8007
     84TRANSPARENT_NONE           = 0x8000
     85TRANSPARENT_RGB            = 0x8008
     86TRANSPARENT_INDEX          = 0x8009
     87WINDOW_BIT                 = 1 << 0
     88PIXMAP_BIT                 = 1 << 1
     89PBUFFER_BIT                = 1 << 2 
     90RGBA_BIT                   = 1 << 0
     91COLOR_INDEX_BIT            = 1 << 1 
     92FRONT_LEFT_BUFFER_BIT      = 1 << 0
     93FRONT_RIGHT_BUFFER_BIT     = 1 << 1
     94BACK_LEFT_BUFFER_BIT       = 1 << 2
     95BACK_RIGHT_BUFFER_BIT      = 1 << 3
     96AUX_BUFFERS_BIT            = 1 << 4
     97DEPTH_BUFFER_BIT           = 1 << 5
     98STENCIL_BUFFER_BIT         = 1 << 6
     99ACCUM_BUFFER_BIT           = 1 << 7 
     100BAD_SCREEN                 = 1
     101BAD_ATTRIBUTE              = 2
     102NO_EXTENSION               = 3
     103BAD_VISUAL                 = 4
     104BAD_CONTEXT                = 5
     105BAD_VALUE                  = 6
     106BAD_ENUM                   = 7 
     107RGBA_TYPE                  = 0x8014
     108COLOR_INDEX_TYPE           = 0x8015
     109PRESERVED_CONTENTS         = 0x801B
     110LARGEST_PBUFFER            = 0x801C
     111WIDTH                      = 0x801D
     112HEIGHT                     = 0x801E
     113EVENT_MASK                 = 0x801F
     114PBUFFER_PRESERVED_CONTENTS = 0x801B
     115PBUFFER_LARGEST_PBUFFER    = 0x801C
     116PBUFFER_HEIGHT             = 0x8040
     117PBUFFER_WIDTH              = 0x8041
     118PBUFFER_CLOBBER_MASK       = 1 << 27 
     119DAMAGED                    = 0x8020
     120SAVED                      = 0x8021
     121WINDOW                     = 0x8022
     122PBUFFER                    = 0x8023
  • gtk/gdkgl/gdkglext-types.defs

    diff --git a/gtk/gdkgl/gdkglext-types.defs b/gtk/gdkgl/gdkglext-types.defs
    index b9334fb..55ec1de 100644
    a b  
    5858  )
    5959)
    6060
    61 (define-enum ConfigAttrib
    62   (in-module "Gdk")
    63   (c-name "GdkGLConfigAttrib")
    64   (gtype-id "GDK_TYPE_GL_CONFIG_ATTRIB")
    65   (values
    66     '("use-gl" "GDK_GL_USE_GL")
    67     '("buffer-size" "GDK_GL_BUFFER_SIZE")
    68     '("level" "GDK_GL_LEVEL")
    69     '("rgba" "GDK_GL_RGBA")
    70     '("doublebuffer" "GDK_GL_DOUBLEBUFFER")
    71     '("stereo" "GDK_GL_STEREO")
    72     '("aux-buffers" "GDK_GL_AUX_BUFFERS")
    73     '("red-size" "GDK_GL_RED_SIZE")
    74     '("green-size" "GDK_GL_GREEN_SIZE")
    75     '("blue-size" "GDK_GL_BLUE_SIZE")
    76     '("alpha-size" "GDK_GL_ALPHA_SIZE")
    77     '("depth-size" "GDK_GL_DEPTH_SIZE")
    78     '("stencil-size" "GDK_GL_STENCIL_SIZE")
    79     '("accum-red-size" "GDK_GL_ACCUM_RED_SIZE")
    80     '("accum-green-size" "GDK_GL_ACCUM_GREEN_SIZE")
    81     '("accum-blue-size" "GDK_GL_ACCUM_BLUE_SIZE")
    82     '("accum-alpha-size" "GDK_GL_ACCUM_ALPHA_SIZE")
    83     '("config-caveat" "GDK_GL_CONFIG_CAVEAT")
    84     '("x-visual-type" "GDK_GL_X_VISUAL_TYPE")
    85     '("transparent-type" "GDK_GL_TRANSPARENT_TYPE")
    86     '("transparent-index-value" "GDK_GL_TRANSPARENT_INDEX_VALUE")
    87     '("transparent-red-value" "GDK_GL_TRANSPARENT_RED_VALUE")
    88     '("transparent-green-value" "GDK_GL_TRANSPARENT_GREEN_VALUE")
    89     '("transparent-blue-value" "GDK_GL_TRANSPARENT_BLUE_VALUE")
    90     '("transparent-alpha-value" "GDK_GL_TRANSPARENT_ALPHA_VALUE")
    91     '("drawable-type" "GDK_GL_DRAWABLE_TYPE")
    92     '("render-type" "GDK_GL_RENDER_TYPE")
    93     '("x-renderable" "GDK_GL_X_RENDERABLE")
    94     '("fbconfig-id" "GDK_GL_FBCONFIG_ID")
    95     '("max-pbuffer-width" "GDK_GL_MAX_PBUFFER_WIDTH")
    96     '("max-pbuffer-height" "GDK_GL_MAX_PBUFFER_HEIGHT")
    97     '("max-pbuffer-pixels" "GDK_GL_MAX_PBUFFER_PIXELS")
    98     '("visual-id" "GDK_GL_VISUAL_ID")
    99     '("screen" "GDK_GL_SCREEN")
    100     '("sample-buffers" "GDK_GL_SAMPLE_BUFFERS")
    101     '("samples" "GDK_GL_SAMPLES")
    102   )
    103 )
    104 
    105 (define-enum ConfigCaveat
    106   (in-module "Gdk")
    107   (c-name "GdkGLConfigCaveat")
    108   (gtype-id "GDK_TYPE_GL_CONFIG_CAVEAT")
    109   (values
    110     '("config-caveat-dont-care" "GDK_GL_CONFIG_CAVEAT_DONT_CARE")
    111     '("config-caveat-none" "GDK_GL_CONFIG_CAVEAT_NONE")
    112     '("slow-config" "GDK_GL_SLOW_CONFIG")
    113     '("non-conformant-config" "GDK_GL_NON_CONFORMANT_CONFIG")
    114   )
    115 )
    116 
    117 (define-enum VisualType
    118   (in-module "Gdk")
    119   (c-name "GdkGLVisualType")
    120   (gtype-id "GDK_TYPE_GL_VISUAL_TYPE")
    121   (values
    122     '("visual-type-dont-care" "GDK_GL_VISUAL_TYPE_DONT_CARE")
    123     '("true-color" "GDK_GL_TRUE_COLOR")
    124     '("direct-color" "GDK_GL_DIRECT_COLOR")
    125     '("pseudo-color" "GDK_GL_PSEUDO_COLOR")
    126     '("static-color" "GDK_GL_STATIC_COLOR")
    127     '("gray-scale" "GDK_GL_GRAY_SCALE")
    128     '("static-gray" "GDK_GL_STATIC_GRAY")
    129   )
    130 )
    131 
    13261(define-enum TransparentType
    13362  (in-module "Gdk")
    13463  (c-name "GdkGLTransparentType")
    135   (gtype-id "GDK_TYPE_GL_TRANSPARENT_TYPE")
     64  (gtype-id "GDK_GL_TRANSPARENT_TYPE")
    13665  (values
    13766    '("none" "GDK_GL_TRANSPARENT_NONE")
    13867    '("rgb" "GDK_GL_TRANSPARENT_RGB")
     
    14069  )
    14170)
    14271
    143 (define-flags DrawableTypeMask
    144   (in-module "Gdk")
    145   (c-name "GdkGLDrawableTypeMask")
    146   (gtype-id "GDK_TYPE_GL_DRAWABLE_TYPE_MASK")
    147   (values
    148     '("window-bit" "GDK_GL_WINDOW_BIT")
    149     '("pixmap-bit" "GDK_GL_PIXMAP_BIT")
    150     '("pbuffer-bit" "GDK_GL_PBUFFER_BIT")
    151   )
    152 )
    153 
    154 (define-flags RenderTypeMask
    155   (in-module "Gdk")
    156   (c-name "GdkGLRenderTypeMask")
    157   (gtype-id "GDK_TYPE_GL_RENDER_TYPE_MASK")
    158   (values
    159     '("rgba-bit" "GDK_GL_RGBA_BIT")
    160     '("color-index-bit" "GDK_GL_COLOR_INDEX_BIT")
    161   )
    162 )
    163 
    164 (define-flags BufferMask
    165   (in-module "Gdk")
    166   (c-name "GdkGLBufferMask")
    167   (gtype-id "GDK_TYPE_GL_BUFFER_MASK")
    168   (values
    169     '("front-left-buffer-bit" "GDK_GL_FRONT_LEFT_BUFFER_BIT")
    170     '("front-right-buffer-bit" "GDK_GL_FRONT_RIGHT_BUFFER_BIT")
    171     '("back-left-buffer-bit" "GDK_GL_BACK_LEFT_BUFFER_BIT")
    172     '("back-right-buffer-bit" "GDK_GL_BACK_RIGHT_BUFFER_BIT")
    173     '("aux-buffers-bit" "GDK_GL_AUX_BUFFERS_BIT")
    174     '("depth-buffer-bit" "GDK_GL_DEPTH_BUFFER_BIT")
    175     '("stencil-buffer-bit" "GDK_GL_STENCIL_BUFFER_BIT")
    176     '("accum-buffer-bit" "GDK_GL_ACCUM_BUFFER_BIT")
    177   )
    178 )
    179 
    180 (define-enum ConfigError
    181   (in-module "Gdk")
    182   (c-name "GdkGLConfigError")
    183   (gtype-id "GDK_TYPE_GL_CONFIG_ERROR")
    184   (values
    185     '("bad-screen" "GDK_GL_BAD_SCREEN")
    186     '("bad-attribute" "GDK_GL_BAD_ATTRIBUTE")
    187     '("no-extension" "GDK_GL_NO_EXTENSION")
    188     '("bad-visual" "GDK_GL_BAD_VISUAL")
    189     '("bad-context" "GDK_GL_BAD_CONTEXT")
    190     '("bad-value" "GDK_GL_BAD_VALUE")
    191     '("bad-enum" "GDK_GL_BAD_ENUM")
    192   )
    193 )
    194 
    195 (define-enum RenderType
    196   (in-module "Gdk")
    197   (c-name "GdkGLRenderType")
    198   (gtype-id "GDK_TYPE_GL_RENDER_TYPE")
    199   (values
    200     '("rgba-type" "GDK_GL_RGBA_TYPE")
    201     '("color-index-type" "GDK_GL_COLOR_INDEX_TYPE")
    202   )
    203 )
    204 
    205 (define-enum DrawableAttrib
    206   (in-module "Gdk")
    207   (c-name "GdkGLDrawableAttrib")
    208   (gtype-id "GDK_TYPE_GL_DRAWABLE_ATTRIB")
    209   (values
    210     '("preserved-contents" "GDK_GL_PRESERVED_CONTENTS")
    211     '("largest-pbuffer" "GDK_GL_LARGEST_PBUFFER")
    212     '("width" "GDK_GL_WIDTH")
    213     '("height" "GDK_GL_HEIGHT")
    214     '("event-mask" "GDK_GL_EVENT_MASK")
    215   )
    216 )
    217 
    218 (define-enum PbufferAttrib
    219   (in-module "Gdk")
    220   (c-name "GdkGLPbufferAttrib")
    221   (gtype-id "GDK_TYPE_GL_PBUFFER_ATTRIB")
    222   (values
    223     '("preserved-contents" "GDK_GL_PBUFFER_PRESERVED_CONTENTS")
    224     '("largest-pbuffer" "GDK_GL_PBUFFER_LARGEST_PBUFFER")
    225     '("height" "GDK_GL_PBUFFER_HEIGHT")
    226     '("width" "GDK_GL_PBUFFER_WIDTH")
    227   )
    228 )
    229 
    23072(define-flags EventMask
    23173  (in-module "Gdk")
    23274  (c-name "GdkGLEventMask")
    233   (gtype-id "GDK_TYPE_GL_EVENT_MASK")
     75  (gtype-id "GDK_GL_EVENT_MASK")
    23476  (values
    23577    '("k" "GDK_GL_PBUFFER_CLOBBER_MASK")
    23678  )
    23779)
    23880
    239 (define-enum EventType
    240   (in-module "Gdk")
    241   (c-name "GdkGLEventType")
    242   (gtype-id "GDK_TYPE_GL_EVENT_TYPE")
    243   (values
    244     '("damaged" "GDK_GL_DAMAGED")
    245     '("saved" "GDK_GL_SAVED")
    246   )
    247 )
    248 
    24981(define-enum DrawableType
    25082  (in-module "Gdk")
    25183  (c-name "GdkGLDrawableType")
    252   (gtype-id "GDK_TYPE_GL_DRAWABLE_TYPE")
     84  (gtype-id "GDK_GL_DRAWABLE_TYPE")
    25385  (values
    25486    '("window" "GDK_GL_WINDOW")
    25587    '("pbuffer" "GDK_GL_PBUFFER")
  • gtk/gdkgl/gdkglext.defs

    diff --git a/gtk/gdkgl/gdkglext.defs b/gtk/gdkgl/gdkglext.defs
    index f3f8e69..37fb930 100644
    a b  
    7979  (return-type "GdkVisual*")
    8080)
    8181
    82 (define-method get_depth
    83   (of-object "GdkGLConfig")
    84   (c-name "gdk_gl_config_get_depth")
    85   (return-type "gint")
    86 )
    87 
    8882(define-method get_layer_plane
    8983  (of-object "GdkGLConfig")
    9084  (c-name "gdk_gl_config_get_layer_plane")
     
    168162
    169163(define-method destroy
    170164  (of-object "GdkGLContext")
    171   (c-name "gdk_gl_context_destroy")
     165  (c-name "_gdk_gl_context_destroy")
    172166  (return-type "none")
    173167)
    174168
    175 (define-method copy
    176   (of-object "GdkGLContext")
    177   (c-name "gdk_gl_context_copy")
    178   (return-type "gboolean")
    179   (parameters
    180     '("GdkGLContext*" "src")
    181     '("unsigned-long" "mask" (default "GL_ALL_ATTRIB_BITS"))
    182   )
    183 )
    184 
    185169(define-method get_gl_drawable
    186170  (of-object "GdkGLContext")
    187171  (c-name "gdk_gl_context_get_gl_drawable")
    188172  (return-type "GdkGLDrawable*")
    189173)
    190174
    191 (define-method get_gl_config
    192   (of-object "GdkGLContext")
    193   (c-name "gdk_gl_context_get_gl_config")
    194   (return-type "GdkGLConfig*")
    195 )
    196 
    197 (define-method get_share_list
    198   (of-object "GdkGLContext")
    199   (c-name "gdk_gl_context_get_share_list")
    200   (return-type "GdkGLContext*")
    201 )
    202 
    203 (define-method is_direct
    204   (of-object "GdkGLContext")
    205   (c-name "gdk_gl_context_is_direct")
    206   (return-type "gboolean")
    207 )
    208 
    209 (define-method get_render_type
    210   (of-object "GdkGLContext")
    211   (c-name "gdk_gl_context_get_render_type")
    212   (return-type "int")
    213 )
    214 
    215175(define-function context_get_current
    216176  (c-name "gdk_gl_context_get_current")
    217177  (return-type "GdkGLContext*")
     
    282242  (return-type "none")
    283243)
    284244
    285 (define-method get_gl_config
    286   (of-object "GdkGLDrawable")
    287   (c-name "gdk_gl_drawable_get_gl_config")
    288   (return-type "GdkGLConfig*")
    289 )
    290 
    291245(define-method get_size
    292246  (of-object "GdkGLDrawable")
    293247  (c-name "gdk_gl_drawable_get_size")
     
    385339
    386340;; From gtkglext/gdk/gdkglfont.h
    387341
    388 (define-function font_use_pango_font
    389   (c-name "gdk_gl_font_use_pango_font")
    390   (return-type "PangoFont*")
    391   (parameters
    392     '("const-PangoFontDescription*" "font_desc")
    393     '("int" "first")
    394     '("int" "count")
    395     '("int" "list_base")
    396   )
    397 )
    398 
    399 (define-function font_use_pango_font_for_display
    400   (c-name "gdk_gl_font_use_pango_font_for_display")
    401   (return-type "PangoFont*")
    402   (parameters
    403     '("GdkDisplay*" "display")
    404     '("const-PangoFontDescription*" "font_desc")
    405     '("int" "first")
    406     '("int" "count")
    407     '("int" "list_base")
    408   )
    409 )
    410 
    411 
    412342
    413343;; From gtkglext/gdk/gdkglinit.h
    414344
     
    461391
    462392(define-method destroy
    463393  (of-object "GdkGLPixmap")
    464   (c-name "gdk_gl_pixmap_destroy")
     394  (c-name "_gdk_gl_pixmap_destroy")
    465395  (return-type "none")
    466396)
    467397
     
    571501
    572502
    573503
    574 ;; From gtkglext/gdk/gdkglshapes.h
    575 
    576 (define-function draw_cube
    577   (c-name "gdk_gl_draw_cube")
    578   (return-type "none")
    579   (parameters
    580     '("gboolean" "solid")
    581     '("double" "size")
    582   )
    583 )
    584 
    585 (define-function draw_sphere
    586   (c-name "gdk_gl_draw_sphere")
    587   (return-type "none")
    588   (parameters
    589     '("gboolean" "solid")
    590     '("double" "radius")
    591     '("int" "slices")
    592     '("int" "stacks")
    593   )
    594 )
    595 
    596 (define-function draw_cone
    597   (c-name "gdk_gl_draw_cone")
    598   (return-type "none")
    599   (parameters
    600     '("gboolean" "solid")
    601     '("double" "base")
    602     '("double" "height")
    603     '("int" "slices")
    604     '("int" "stacks")
    605   )
    606 )
    607 
    608 (define-function draw_torus
    609   (c-name "gdk_gl_draw_torus")
    610   (return-type "none")
    611   (parameters
    612     '("gboolean" "solid")
    613     '("double" "inner_radius")
    614     '("double" "outer_radius")
    615     '("int" "nsides")
    616     '("int" "rings")
    617   )
    618 )
    619 
    620 (define-function draw_tetrahedron
    621   (c-name "gdk_gl_draw_tetrahedron")
    622   (return-type "none")
    623   (parameters
    624     '("gboolean" "solid")
    625   )
    626 )
    627 
    628 (define-function draw_octahedron
    629   (c-name "gdk_gl_draw_octahedron")
    630   (return-type "none")
    631   (parameters
    632     '("gboolean" "solid")
    633   )
    634 )
    635 
    636 (define-function draw_dodecahedron
    637   (c-name "gdk_gl_draw_dodecahedron")
    638   (return-type "none")
    639   (parameters
    640     '("gboolean" "solid")
    641   )
    642 )
    643 
    644 (define-function draw_icosahedron
    645   (c-name "gdk_gl_draw_icosahedron")
    646   (return-type "none")
    647   (parameters
    648     '("gboolean" "solid")
    649   )
    650 )
    651 
    652 (define-function draw_teapot
    653   (c-name "gdk_gl_draw_teapot")
    654   (return-type "none")
    655   (parameters
    656     '("gboolean" "solid")
    657     '("double" "scale")
    658   )
    659 )
    660 
    661 
    662 
    663504;; From gtkglext/gdk/gdkgltokens.h
    664505
    665506
     
    692533
    693534(define-method destroy
    694535  (of-object "GdkGLWindow")
    695   (c-name "gdk_gl_window_destroy")
     536  (c-name "_gdk_gl_window_destroy")
    696537  (return-type "none")
    697538)
    698539
  • gtk/gdkgl/gdkglext.override

    diff --git a/gtk/gdkgl/gdkglext.override b/gtk/gdkgl/gdkglext.override
    index 9f71de1..02d91c7 100644
    a b ignore-glob 
    5252  *_for_display
    5353  *_for_screen
    5454  *_get_screen
     55  *gdk_gl_draw_cube
    5556%%
    5657ignore
    5758  gdk_gl_parse_args
    _wrap_gdk_gl_config_new(PyGObject *self, PyObject *args, PyObject *kwargs) 
    127128
    128129        /* Use gdk_gl_config_new_by_mode() */
    129130       
     131#define GDK_TYPE_GL_CONFIG_MODE 0
    130132        if (pyg_flags_get_value(GDK_TYPE_GL_CONFIG_MODE, py_mode, (gint *)&mode)) {
    131133            PyErr_SetString(PyExc_RuntimeError,
    132134                            "could not get display mode bitmask value");
    _wrap_gdk_gl_config_get_attrib(PyGObject *self, PyObject *args, PyObject *kwargs 
    171173    return Py_BuildValue("(i)", value);
    172174}
    173175%%
    174 override gdk_gl_context_copy kwargs
    175 static PyObject *
    176 _wrap_gdk_gl_context_copy(PyGObject *self, PyObject *args, PyObject *kwargs)
    177 {
    178     static char *kwlist[] = { "src", "mask", NULL };
    179     PyGObject *src;
    180     PyObject *py_mask = NULL, *py_ret;
    181     int ret;
    182     unsigned long mask = GL_ALL_ATTRIB_BITS;
    183 
    184     if (!PyArg_ParseTupleAndKeywords(args, kwargs,
    185                                      "O!|O!:GdkGLContext.copy",
    186                                      kwlist,
    187                                      &PyGdkGLContext_Type, &src,
    188                                      &PyLong_Type, &py_mask))
    189         return NULL;
    190 
    191     if (py_mask)
    192         mask = PyLong_AsUnsignedLong(py_mask);
    193 
    194     ret = gdk_gl_context_copy(GDK_GL_CONTEXT(self->obj),
    195                               GDK_GL_CONTEXT(src->obj),
    196                               mask);
    197 
    198     py_ret = ret ? Py_True : Py_False;
    199     Py_INCREF(py_ret);
    200 
    201     return py_ret;
    202 }
    203 %%
    204176override gdk_gl_drawable_get_size noargs
    205177static PyObject *
    206178_wrap_gdk_gl_drawable_get_size(PyGObject *self)
  • gtk/gdkgl/gdkglmodule.c

    diff --git a/gtk/gdkgl/gdkglmodule.c b/gtk/gdkgl/gdkglmodule.c
    index d1caf9b..d90a36b 100644
    a b init_gdkgl(void) 
    8383
    8484    /* GdkGLExt version */
    8585    tuple = Py_BuildValue("(iii)",
    86                           gdkglext_major_version,
    87                           gdkglext_minor_version,
    88                           gdkglext_micro_version);
     86                          gdk_gl_get_major_version(),   /* gdkglext_major_version */
     87                          gdk_gl_get_minor_version(),   /* gdkglext_minor_version */
     88                          gdk_gl_get_micro_version());  /* gdkglext_micro_version */
    8989    PyDict_SetItemString(d, "gdkglext_version", tuple);   
    9090    Py_DECREF(tuple);
    9191
  • setup.py

    diff --git a/setup.py b/setup.py
    index 93ce468..7077a70 100644
    a b PYGTK_SUFFIX = '2.0' 
    4242PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX
    4343
    4444GLOBAL_INC += ['.', 'gtk/gdkgl', 'gtk/gtkgl']
     45GLOBAL_INC.append("/usr/X11/include")
     46
    4547GLOBAL_MACROS += [('PYGTKGLEXT_MAJOR_VERSION', MAJOR_VERSION),
    4648                  ('PYGTKGLEXT_MINOR_VERSION', MINOR_VERSION),
    4749                  ('PYGTKGLEXT_MICRO_VERSION', MICRO_VERSION)]
    class PyGtkGLExtInstallLib(InstallLib): 
    8688        self.local_outputs.append(output)
    8789        return output
    8890
    89 if not pkgc_version_check('pygtk-2.0', 'PyGTK', PYGTK_REQUIRED_VERSION):
    90     raise SystemExit, "Aborting"
    9191pygtkincludedir = getoutput('pkg-config --variable pygtkincludedir pygtk-2.0')
    9292codegendir = getoutput('pkg-config --variable codegendir pygtk-2.0')
    9393defsdir = getoutput('pkg-config --variable defsdir pygtk-2.0')