diff options
Diffstat (limited to 'plugins/pychrysalide/helpers.h')
-rw-r--r-- | plugins/pychrysalide/helpers.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/plugins/pychrysalide/helpers.h b/plugins/pychrysalide/helpers.h index 52a9370..6b2bddf 100644 --- a/plugins/pychrysalide/helpers.h +++ b/plugins/pychrysalide/helpers.h @@ -29,7 +29,9 @@ #include <assert.h> #include <glib-object.h> #include <stdbool.h> -#include <gdk/gdk.h> +#ifdef HAVE_GTK_SUPPORT +# include <gdk/gdk.h> +#endif @@ -236,12 +238,36 @@ int convert_to_gtype(PyObject *, void *); /* Tente de convertir en instance GObject. */ int convert_to_gobject(PyObject *, void *); +#ifdef HAVE_GTK_SUPPORT + /* Tente de convertir en instance de composant GTK. */ int convert_to_gtk_widget(PyObject *, void *); /* Tente de convertir en instance de conteneur GTK. */ int convert_to_gtk_container(PyObject *, void *); +#endif + + +#if !defined(HAVE_GTK_SUPPORT) && !defined(HOMEMADE_RGBA) + +# define HOMEMADE_RGBA + +/** + * Copie depuis /usr/include/gtk-3.0/gdk/gdkrgba.h + */ +typedef struct _GdkRGBA +{ + gdouble red; + gdouble green; + gdouble blue; + gdouble alpha; + +} GdkRGBA; + +#endif + + /* Construit un objet Python pour une couleur RGBA. */ PyObject *create_gdk_rgba(const GdkRGBA *); |