From: Peter g. <pg...@co...> - 2009-01-28 17:54:14
|
Sun Jan 25 15:12:35 EST 2009 Peter Gavin <pg...@gm...> * gtk: add gtk/hsgtk.h, define PANGO_CHECK_VERSION for versions that don't define it hunk ./Makefile.am 24 + gtk/hsgtk.h \ hunk ./Makefile.am 591 -libHSgtk_a_HEADER = gtk/gtk.h +libHSgtk_a_HEADER = gtk/hsgtk.h hunk ./Makefile.am 593 +$(libHSgtk_a_PRECOMP): $(libHSgtk_a_HEADER) hunk ./Makefile.am 597 -libHSgtk_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS)) +libHSgtk_a_CPPFLAGS = $(filter -I% -D%,$(GLIB_CFLAGS) $(GTK_CFLAGS)) -I. addfile ./gtk/hsgtk.h hunk ./gtk/hsgtk.h 1 +/* GIMP Toolkit (GTK) Binding for Haskell: binding to gtk + * + * Author : Peter Gavin + * Created: 25-Jan-2009 + * + * Copyright (c) 2009 Peter Gavin + * + * This library is free software: you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * [_$_] + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * [_$_] + * You should have received a copy of the GNU Lesser General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/>. + * [_$_] + * GStreamer, the C library which this Haskell library depends on, is + * available under LGPL Version 2. The documentation included with + * this library is based on the original GStreamer documentation. + */ +#ifndef __HSGTK_H__ +#define __HSGTK_H__ + +#include <gtk/gtk.h> +#include <pango/pango.h> + +#if ((_PANGO_MAJOR_VERSION < 1) || \ + ((_PANGO_MAJOR_VERSION == 1) && (_PANGO_MINOR_VERSION < 16)) || \ + ((_PANGO_MAJOR_VERSION == 1) && (_PANGO_MINOR_VERSION == 16) && (_PANGO_MICRO_VERSION < 0))) +#define PANGO_VERSION_MAJOR _PANGO_MAJOR_VERSION +#define PANGO_VERSION_MINOR _PANGO_MINOR_VERSION +#define PANGO_VERSION_MICRO _PANGO_MICRO_VERSION + +/* Encode a Pango version as an integer */ +#define PANGO_VERSION_ENCODE(major, minor, micro) ( \ + ((major) * 10000) \ + + ((minor) * 100) \ + + ((micro) * 1)) + +/* Encoded version of Pango at compile-time */ +#define PANGO_VERSION PANGO_VERSION_ENCODE( \ + PANGO_VERSION_MAJOR, \ + PANGO_VERSION_MINOR, \ + PANGO_VERSION_MICRO) + +/* Check that compile-time Pango is as new as required */ +#define PANGO_VERSION_CHECK(major,minor,micro) \ + (PANGO_VERSION >= PANGO_VERSION_ENCODE(major,minor,micro)) +#endif + +#endif |