gnomemm r1508 - in geglmm/trunk: . libgegl libgegl/src tools/m4
- From: hub svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1508 - in geglmm/trunk: . libgegl libgegl/src tools/m4
- Date: Mon, 19 May 2008 18:27:35 +0000 (UTC)
Author: hub
Date: Mon May 19 18:27:35 2008
New Revision: 1508
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1508&view=rev
Log:
* tools/m4/convert_libgeglmm.m4, libgegl/libgeglmmconfig.h.in,
libgegl/libgeglmm.pc.in, libgegl/src/curve.ccg, libgegl/src/curve.hg,
libgegl/src/node.hg, libgegl/src/Makefile_list_of_hg.am_fragment,
libgegl/src/rectangle.ccg, libgegl/src/rectangle.hg,
libgegl/src/buffer.ccg, libgegl/src/buffer.hg, libgegl/src/color.ccg,
libgegl/src/color.hg: more wrapped classes.
* configure.in: set the soversion correctly.
* Makefile.am: remove a unused file from EXTRA_DIST.
Added:
geglmm/trunk/libgegl/src/buffer.ccg
geglmm/trunk/libgegl/src/buffer.hg
geglmm/trunk/libgegl/src/color.ccg
geglmm/trunk/libgegl/src/color.hg
geglmm/trunk/libgegl/src/curve.ccg
geglmm/trunk/libgegl/src/curve.hg
Modified:
geglmm/trunk/ChangeLog
geglmm/trunk/Makefile.am
geglmm/trunk/configure.in
geglmm/trunk/libgegl/libgeglmm.pc.in
geglmm/trunk/libgegl/libgeglmmconfig.h.in
geglmm/trunk/libgegl/src/Makefile_list_of_hg.am_fragment
geglmm/trunk/libgegl/src/node.hg
geglmm/trunk/libgegl/src/rectangle.ccg
geglmm/trunk/libgegl/src/rectangle.hg
geglmm/trunk/tools/m4/convert_libgeglmm.m4
Modified: geglmm/trunk/Makefile.am
==============================================================================
--- geglmm/trunk/Makefile.am (original)
+++ geglmm/trunk/Makefile.am Mon May 19 18:27:35 2008
@@ -4,8 +4,7 @@
EXTRA_DIST = \
build_shared/Makefile_build.am_fragment \
build_shared/Makefile_build_gensrc.am_fragment \
- build_shared/Makefile_gensrc.am_fragment \
- COPYING.examples
+ build_shared/Makefile_gensrc.am_fragment
all-local:
Modified: geglmm/trunk/configure.in
==============================================================================
--- geglmm/trunk/configure.in (original)
+++ geglmm/trunk/configure.in Mon May 19 18:27:35 2008
@@ -6,6 +6,7 @@
# Karl Nelson.
#
#
+# Copyright 2008 Hubert Figuiere
# Copyright 2001 Free Software Foundation
# Copyright 1999 gtkmm Development Team
# Copyright 1998 Stephan Kulow
@@ -15,9 +16,9 @@
# Version and initialization
#########################################################################
#We use pushdef here because we can't use shell variables before AC_INIT, but we want to use a variable with AC_INIT:
-pushdef([LIBGEGLMM_MAJOR_VERSION], [3])
+pushdef([LIBGEGLMM_MAJOR_VERSION], [0])
pushdef([LIBGEGLMM_MINOR_VERSION], [0])
-pushdef([LIBGEGLMM_MICRO_VERSION], [0])
+pushdef([LIBGEGLMM_MICRO_VERSION], [1])
pushdef([LIBGEGLMM_EXTRA_VERSION], [])
pushdef([LIBGEGLMM_VERSION], LIBGEGLMM_MAJOR_VERSION.LIBGEGLMM_MINOR_VERSION.LIBGEGLMM_MICRO_VERSION[]LIBGEGLMM_EXTRA_VERSION)
AC_INIT([libgeglmm], LIBGEGLMM_VERSION, [gtkmm-list gnome org])
@@ -32,7 +33,7 @@
# ? :+1 : ? == just some internal changes, nothing breaks but might work
# better
# CURRENT : REVISION : AGE
-LIBGEGLMM_SO_VERSION=10:0:0
+LIBGEGLMM_SO_VERSION=0:0:0
AC_SUBST(LIBGEGLMM_VERSION)
AC_SUBST(LIBGEGLMM_RELEASE)
Modified: geglmm/trunk/libgegl/libgeglmm.pc.in
==============================================================================
--- geglmm/trunk/libgegl/libgeglmm.pc.in (original)
+++ geglmm/trunk/libgegl/libgeglmm.pc.in Mon May 19 18:27:35 2008
@@ -3,9 +3,9 @@
libdir= libdir@
includedir= includedir@
-Name: libgdamm
-Description: C++ wrapper for libgda
-Requires: glibmm-2.4 libgda-3.0
+Name: libgeglmm
+Description: C++ wrapper for gegl
+Requires: glibmm-2.4 gegl >= 0.0.16
Version: @VERSION@
-Libs: -L${libdir} -lgdamm-3.0
-Cflags: -I${includedir}/libgdamm-3.0 -I${libdir}/libgdamm-3.0/include
+Libs: -L${libdir} -lgeglmm
+Cflags: -I${includedir}/libgeglmm-1.0
Modified: geglmm/trunk/libgegl/libgeglmmconfig.h.in
==============================================================================
--- geglmm/trunk/libgegl/libgeglmmconfig.h.in (original)
+++ geglmm/trunk/libgegl/libgeglmmconfig.h.in Mon May 19 18:27:35 2008
@@ -1,13 +1,13 @@
-#ifndef _LIBGDAMM_CONFIG_H
-#define _LIBGDAMM_CONFIG_H 1
+#ifndef _LIBGEGLMM_CONFIG_H
+#define _LIBGEGLMM_CONFIG_H 1
#include "glibmmconfig.h"
/* version numbers */
-#undef LIBGDAMM_MAJOR_VERSION
-#undef LIBGDAMM_MINOR_VERSION
-#undef LIBGDAMM_MICRO_VERSION
-#undef LIBGDAMM_VERSION
+#undef LIBGEGLMM_MAJOR_VERSION
+#undef LIBGEGLMM_MINOR_VERSION
+#undef LIBGEGLMM_MICRO_VERSION
+#undef LIBGEGLMM_VERSION
-#endif /* _LIBGDAMM_CONFIG_H */
+#endif /* _LIBGEGLMM_CONFIG_H */
Modified: geglmm/trunk/libgegl/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- geglmm/trunk/libgegl/src/Makefile_list_of_hg.am_fragment (original)
+++ geglmm/trunk/libgegl/src/Makefile_list_of_hg.am_fragment Mon May 19 18:27:35 2008
@@ -2,7 +2,7 @@
# The include happens in Makefile.am, not Makefile.in or Makefile,
# so it's like copy-and-pasting this into each of those Makefile.am files.
-files_hg = rectangle.hg node.hg processor.hg
+files_hg = rectangle.hg node.hg processor.hg buffer.hg curve.hg color.hg
Added: geglmm/trunk/libgegl/src/buffer.ccg
==============================================================================
--- (empty file)
+++ geglmm/trunk/libgegl/src/buffer.ccg Mon May 19 18:27:35 2008
@@ -0,0 +1,17 @@
+/* libgeglmm - a C++ wrapper for libgegl
+ *
+ * (c) 2008 Hubert Figuiere
+ *
+ * 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 GEGL; if not, see <http://www.gnu.org/licenses/>.
+ */
Added: geglmm/trunk/libgegl/src/buffer.hg
==============================================================================
--- (empty file)
+++ geglmm/trunk/libgegl/src/buffer.hg Mon May 19 18:27:35 2008
@@ -0,0 +1,64 @@
+/* libgeglmm - a C++ wrapper for libgegl
+ *
+ * (c) 2008 Hubert Figuiere
+ *
+ * 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 GEGL; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include <babl/babl.h>
+#include <gegl.h>
+#include <glibmm/refptr.h>
+#include <libgeglmm/rectangle.h>
+
+_DEFS(libgeglmm,libgegl)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gegl
+{
+
+_WRAP_ENUM(Interpolation, GeglInterpolation, NO_GTYPE)
+
+class Buffer
+ : public Glib::Object
+{
+ _CLASS_GOBJECT(Buffer, GeglBuffer, GEGL_BUFFER, Glib::Object, GObject)
+public:
+ _WRAP_METHOD(static Glib::RefPtr<Buffer> create(const Rectangle & extent, const Babl *format), gegl_buffer_new)
+ _WRAP_METHOD(Glib::RefPtr<Buffer> create_sub_buffer(const Rectangle & extent), gegl_buffer_create_sub_buffer)
+ _WRAP_METHOD(void destroy(), gegl_buffer_destroy)
+ _WRAP_METHOD(const Rectangle & get_extent(), gegl_buffer_get_extent)
+
+
+ // TODO macros
+ //x
+ //y
+ //width
+ //height
+ //pixel_count
+
+ _WRAP_METHOD(void get(double scale, const Rectangle & rect, const Babl *format, void * dest, int rowstride), gegl_buffer_get);
+ _WRAP_METHOD(void set(const Rectangle & rect, const Babl *format, void *src, int rowstride), gegl_buffer_set)
+ _WRAP_METHOD(void copy(const Rectangle & src_rect, const Glib::RefPtr<Buffer> & dest, const Rectangle & dest_rect), gegl_buffer_copy)
+ _WRAP_METHOD(Glib::RefPtr<Buffer> dup(), gegl_buffer_dup)
+
+ _WRAP_METHOD(void sample(double x, double y, double scale, void *dest, const Babl* format, Interpolation interpolation), gegl_buffer_sample)
+ _WRAP_METHOD(void sample_cleanup(), gegl_buffer_sample_cleanup)
+ _WRAP_METHOD(static Interpolation interpolation_from_string(const Glib::ustring & string), gegl_buffer_interpolation_from_string)
+
+ // _WRAP_SIGNAL(void changed(const Rectangle &r), "changed")
+};
+
+
+}
Added: geglmm/trunk/libgegl/src/color.ccg
==============================================================================
--- (empty file)
+++ geglmm/trunk/libgegl/src/color.ccg Mon May 19 18:27:35 2008
@@ -0,0 +1,18 @@
+/* libgeglmm - a C++ wrapper for libgegl
+ *
+ * (c) 2008 Hubert Figuiere
+ *
+ * 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 GEGL; if not, see <http://www.gnu.org/licenses/>.
+ */
+
Added: geglmm/trunk/libgegl/src/color.hg
==============================================================================
--- (empty file)
+++ geglmm/trunk/libgegl/src/color.hg Mon May 19 18:27:35 2008
@@ -0,0 +1,39 @@
+/* libgeglmm - a C++ wrapper for libgegl
+ *
+ * (c) 2008 Hubert Figuiere
+ *
+ * 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 GEGL; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include <gegl.h>
+#include <gegl-color.h>
+
+_DEFS(libgeglmm,libgegl)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gegl {
+
+class Color
+ : public Glib::Object
+{
+ _CLASS_GOBJECT(Color, GeglColor, GEGL_COLOR, Glib::Object, GObject)
+public:
+ _WRAP_METHOD(static Glib::RefPtr<Color> create(const Glib::ustring & s), gegl_color_new)
+ _WRAP_METHOD(void get_rgba(float & r, float & g, float & b, float & a), gegl_color_get_rgba)
+ _WRAP_METHOD(void set_rgba(float r, float g, float b, float a), gegl_color_set_rgba)
+
+};
+
+}
Added: geglmm/trunk/libgegl/src/curve.ccg
==============================================================================
--- (empty file)
+++ geglmm/trunk/libgegl/src/curve.ccg Mon May 19 18:27:35 2008
@@ -0,0 +1,17 @@
+/* libgeglmm - a C++ wrapper for libgegl
+ *
+ * (c) 2008 Hubert Figuiere
+ *
+ * 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 GEGL; if not, see <http://www.gnu.org/licenses/>.
+ */
Added: geglmm/trunk/libgegl/src/curve.hg
==============================================================================
--- (empty file)
+++ geglmm/trunk/libgegl/src/curve.hg Mon May 19 18:27:35 2008
@@ -0,0 +1,46 @@
+/* libgeglmm - a C++ wrapper for libgegl
+ *
+ * (c) 2008 Hubert Figuiere
+ *
+ * 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 GEGL; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gegl.h>
+#include <gegl-curve.h>
+
+_DEFS(libgeglmm,libgegl)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gegl {
+
+class Curve
+ : public Glib::Object
+{
+ _CLASS_GOBJECT(Curve, GeglCurve, GEGL_CURVE, Glib::Object, GObject)
+public:
+ _WRAP_METHOD(static Glib::RefPtr<Curve> create(double y_min, double y_max), gegl_curve_new)
+ _WRAP_METHOD(static Glib::RefPtr<Curve> default_curve(), gegl_curve_default_curve)
+ _WRAP_METHOD(void get_y_bounds(double & min_y, double & max_y), gegl_curve_get_y_bounds)
+ _WRAP_METHOD(void get_bounds(double & min_x, double & max_x, double & min_y, double & max_y), gegl_curve_get_bounds)
+ _WRAP_METHOD(guint add_point(double x, double y), gegl_curve_add_point)
+ _WRAP_METHOD(void get_point(guint index, double &x, double &y), gegl_curve_get_point)
+ _WRAP_METHOD(void set_point(guint index, double x, double y), gegl_curve_set_point)
+ _WRAP_METHOD(guint num_points(), gegl_curve_num_points)
+ _WRAP_METHOD(double calc_value(double x), gegl_curve_calc_value)
+ _WRAP_METHOD(void calc_values(double x_min, double x_max, guint num_samples, double & xs, double & ys), gegl_curve_calc_values)
+
+ // _WRAP_METHOD(static GParamSpec* spec_curve(const Glib::ustring & name, const Glib::ustring & nick, const Glib::ustring & blurb, const Glib::RefPtr<Curve> & default_curve, GParamFlags flags), gegl_param_spec_curve)
+};
+
+}
Modified: geglmm/trunk/libgegl/src/node.hg
==============================================================================
--- geglmm/trunk/libgegl/src/node.hg (original)
+++ geglmm/trunk/libgegl/src/node.hg Mon May 19 18:27:35 2008
@@ -56,7 +56,7 @@
_WRAP_METHOD(const Glib::RefPtr<Node> get_parent(), gegl_node_get_parent)
_WRAP_METHOD(const Glib::RefPtr<Node> detect(int x, int y), gegl_node_detect)
_WRAP_METHOD(GParamSpec* find_property(const Glib::ustring & property_name), gegl_node_find_property)
-// _WRAP_METHOD(Rectangle get_bounding_box(), gegl_node_get_bounding_box)
+ _WRAP_METHOD(Rectangle get_bounding_box(), gegl_node_get_bounding_box)
_WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<Node> > get_children(), gegl_node_get_children)
_WRAP_METHOD(int get_consumers(const Glib::ustring & output_pad, GeglNode ***nodes, const gchar ***pads), gegl_node_get_consumers)
Modified: geglmm/trunk/libgegl/src/rectangle.ccg
==============================================================================
--- geglmm/trunk/libgegl/src/rectangle.ccg (original)
+++ geglmm/trunk/libgegl/src/rectangle.ccg Mon May 19 18:27:35 2008
@@ -19,3 +19,14 @@
#include <gegl.h>
+
+
+
+namespace Gegl {
+
+ Rectangle::Rectangle(const GeglRectangle & rect)
+ {
+ *gobj() = rect;
+ }
+
+}
Modified: geglmm/trunk/libgegl/src/rectangle.hg
==============================================================================
--- geglmm/trunk/libgegl/src/rectangle.hg (original)
+++ geglmm/trunk/libgegl/src/rectangle.hg Mon May 19 18:27:35 2008
@@ -17,6 +17,7 @@
*/
#include <gegl.h>
+#include <gegl-utils.h>
_DEFS(libgeglmm,libgegl)
@@ -27,6 +28,15 @@
_CLASS_BOXEDTYPE_STATIC(Rectangle, GeglRectangle)
public:
// _CTOR_DEFAULT
+ Rectangle(const GeglRectangle & rect);
+
+ _WRAP_METHOD(void set(int x, int y, guint witdth, guint height), gegl_rectangle_set)
+ _WRAP_METHOD(bool equal(const Rectangle & s), gegl_rectangle_equal)
+ _WRAP_METHOD(bool equal_coords(int x, int y, int width, int heght), gegl_rectangle_equal_coords)
+ _WRAP_METHOD(void copy(const Rectangle & from), gegl_rectangle_copy)
+ _WRAP_METHOD(void bounding_box(const Rectangle & src1, const Rectangle & src2), gegl_rectangle_bounding_box)
+ _WRAP_METHOD(bool intersect(const Rectangle & src1, const Rectangle & src2), gegl_rectangle_intersect)
+ _WRAP_METHOD(bool contains(const Rectangle & s), gegl_rectangle_contains)
};
}
Modified: geglmm/trunk/tools/m4/convert_libgeglmm.m4
==============================================================================
--- geglmm/trunk/tools/m4/convert_libgeglmm.m4 (original)
+++ geglmm/trunk/tools/m4/convert_libgeglmm.m4 Mon May 19 18:27:35 2008
@@ -2,6 +2,7 @@
_CONV_ENUM(Gegl,BlitFlags)
+_CONV_ENUM(Gegl,Interpolation)
_CONVERSION(`GeglNode*',`const Glib::RefPtr<Node>&',Glib::wrap($3))
@@ -16,13 +17,24 @@
_CONVERSION(`const Glib::RefPtr<Processor>&',`GeglProcessor*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Processor>',`GeglProcessor*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`GeglBuffer*',`Glib::RefPtr<Buffer>',Glib::wrap($3))
+_CONVERSION(`const Glib::RefPtr<Buffer>&',`GeglBuffer*',__CONVERT_REFPTR_TO_P)
+
+_CONVERSION(`GeglCurve*',`Glib::RefPtr<Curve>',Glib::wrap($3))
+_CONVERSION(`const Glib::RefPtr<Curve>&',`GeglCurve*',__CONVERT_REFPTR_TO_P)
+
+_CONVERSION(`GeglColor*',`Glib::RefPtr<Color>',Glib::wrap($3))
+
+
_CONVERSION(`GObject*',`Glib::RefPtr<Parameter>',`Glib::wrap($3)')
_CONVERSION(const Gegl::Rectangle&,GeglRectangle*,__CFR2P)
_CONVERSION(const Rectangle&,GeglRectangle*,__CFR2P)
-_CONVERSION(const Rectangle&,const GeglRectangle*,__CFR2P)
+_CONVERSION(`const Rectangle&',`const GeglRectangle*',__CFR2P)
_CONVERSION(`const GeglRectangle*',`const Gegl::Rectangle&',`Glib::wrap($3)')
+_CONVERSION(`const GeglRectangle*',`const Rectangle &',`Glib::wrap($3)')
_CONVERSION(`GeglRectangle*',`const Rectangle&',`Glib::wrap($3)')
+_CONVERSION(`GeglRectangle',`Rectangle',`Rectangle($3)')
_CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<Node> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]