[gimp] pygimp: add overrides for two _convert_surface() methods



commit a2d7a04700c8ee52d0de7d67a133297744260699
Author: Kristian Rietveld <kris loopnest org>
Date:   Sun May 1 13:51:00 2016 +0200

    pygimp: add overrides for two _convert_surface() methods

 plug-ins/pygimp/gimpui.override |   47 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/pygimp/gimpui.override b/plug-ins/pygimp/gimpui.override
index fe42da8..df9e11c 100644
--- a/plug-ins/pygimp/gimpui.override
+++ b/plug-ins/pygimp/gimpui.override
@@ -4,6 +4,9 @@ headers
 #define NO_IMPORT_PYGOBJECT
 #include <pygobject.h>
 
+#include <pycairo.h>
+extern Pycairo_CAPI_t *Pycairo_CAPI;
+
 #define GIMP_DISABLE_DEPRECATION_WARNINGS
 #include <libgimp/gimp.h>
 #undef GIMP_DISABLE_DEPRECATED
@@ -1988,3 +1991,47 @@ _wrap_gimp_ruler_get_range(PyGObject *self)
 
     return Py_BuildValue("(ddd)", lower, upper, max_size);
 }
+%%
+override gimp_color_display_convert_surface kwargs
+static PyObject *
+_wrap_gimp_color_display_convert_surface(PyGObject *self, PyObject *args,
+                                         PyObject *kwargs)
+{
+  PycairoSurface *pysurface;
+
+  static char *kwlist[] = { "surface", NULL };
+
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                   "O!:GimpColorDisplay.convert_surface",
+                                   kwlist,
+                                   &PycairoSurface_Type, &pysurface))
+    return NULL;
+
+  gimp_color_display_convert_surface(GIMP_COLOR_DISPLAY(self->obj),
+                                     pysurface->surface);
+
+  Py_INCREF(Py_None);
+  return Py_None;
+}
+%%
+override gimp_color_display_stack_convert_surface kwargs
+static PyObject *
+_wrap_gimp_color_display_stack_convert_surface(PyGObject *self, PyObject *args,
+                                               PyObject *kwargs)
+{
+  PycairoSurface *pysurface;
+
+  static char *kwlist[] = { "surface", NULL };
+
+  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                   "O!:GimpColorDisplayStack.convert_surface",
+                                   kwlist,
+                                   &PycairoSurface_Type, &pysurface))
+    return NULL;
+
+  gimp_color_display_stack_convert_surface(GIMP_COLOR_DISPLAY_STACK(self->obj),
+                                           pysurface->surface);
+
+  Py_INCREF(Py_None);
+  return Py_None;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]