[geglmm] New API from Gegl 0.2
- From: Hubert FiguiÃre <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geglmm] New API from Gegl 0.2
- Date: Tue, 17 Apr 2012 15:45:58 +0000 (UTC)
commit 09e8de24a919fec44f648e3d8b79336f17974d2f
Author: Hubert FiguiÃre <hub figuiere net>
Date: Mon Apr 16 21:34:46 2012 -0700
New API from Gegl 0.2
.gitignore | 5 ++++-
ChangeLog | 8 ++++++++
gegl/src/buffer.ccg | 1 +
gegl/src/buffer.hg | 7 +++++--
gegl/src/color.hg | 3 +++
gegl/src/path.hg | 8 +++-----
tools/m4/convert_libgeglmm.m4 | 2 +-
7 files changed, 25 insertions(+), 9 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 050d435..df20dde 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@ gegl/geglmm/private/buffer_p.h
gegl/geglmm/private/buffer-iterator_p.h
gegl/geglmm/private/color_p.h
gegl/geglmm/private/curve_p.h
+gegl/geglmm/private/enums_p.h
gegl/geglmm/private/matrix3_p.h
gegl/geglmm/private/node_p.h
gegl/geglmm/private/operation_p.h
@@ -61,6 +62,8 @@ gegl/geglmm/private/processor_p.h
gegl/geglmm/private/rectangle_p.h
gegl/geglmm/processor.cc
gegl/geglmm/processor.h
+gegl/geglmm/enums.h
+gegl/geglmm/enums.cc
gegl/geglmm/rectangle.cc
gegl/geglmm/rectangle.h
gegl/geglmm/wrap_init.cc
@@ -73,4 +76,4 @@ scripts/libtool.m4
scripts/ltoptions.m4
scripts/ltsugar.m4
scripts/ltversion.m4
-scripts/lt~obsolete.m4
\ No newline at end of file
+scripts/lt~obsolete.m4
diff --git a/ChangeLog b/ChangeLog
index 51a71f6..8b546e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-04-16 Hub FiguiÃre <hub figuiere net>
+
+ * gegl/src/buffer.{hg,ccg}:
+ * gegl/src/color.hg:
+ * gegl/src/path.hg:
+ * tools/m4/convert_libgeglmm.m4:
+ New API from Gegl 0.2
+
2012-04-15 Hub FiguiÃre <hub figuiere net>
* Port to Gegl-0.2
diff --git a/gegl/src/buffer.ccg b/gegl/src/buffer.ccg
index bc2acb2..f471bce 100644
--- a/gegl/src/buffer.ccg
+++ b/gegl/src/buffer.ccg
@@ -19,6 +19,7 @@
#include <geglmm/enums.h>
#include <geglmm/buffer-iterator.h>
+#include <geglmm/color.h>
namespace Gegl {
diff --git a/gegl/src/buffer.hg b/gegl/src/buffer.hg
index e8527b6..312ada1 100644
--- a/gegl/src/buffer.hg
+++ b/gegl/src/buffer.hg
@@ -30,6 +30,7 @@ namespace Gegl
{
class BufferIterator;
+class Color;
class Buffer
: public Glib::Object
@@ -44,7 +45,6 @@ public:
_WRAP_METHOD(static Glib::RefPtr<Buffer> create_from_file(const Glib::ustring&), gegl_buffer_open)
_WRAP_METHOD(Glib::RefPtr<Buffer> create_sub_buffer(const Rectangle & extent), gegl_buffer_create_sub_buffer) //TODO: Should this be const?
- _WRAP_METHOD(void destroy(), gegl_buffer_destroy)
_WRAP_METHOD(Rectangle get_extent() const, gegl_buffer_get_extent)
_WRAP_METHOD(void set_extent(const Rectangle &), gegl_buffer_set_extent)
@@ -55,6 +55,7 @@ public:
_WRAP_METHOD(void clear(const Rectangle &), gegl_buffer_clear)
_WRAP_METHOD(const Babl* get_format(), gegl_buffer_get_format)
+ _WRAP_METHOD(void set_format(const Babl*), gegl_buffer_set_format)
// TODO macros
//x
@@ -86,6 +87,9 @@ public:
_WRAP_METHOD(const Rectangle& abyss(), gegl_buffer_get_abyss)
+ _WRAP_METHOD(void set_color(const Rectangle &rect, const Glib::RefPtr<Color> &color), gegl_buffer_set_color)
+ _WRAP_METHOD(void set_pattern(const Rectangle &rect, const Glib::RefPtr<Buffer> &pattern, double x_offset, double y_offset), gegl_buffer_set_pattern)
+
#m4 _CONVERSION(`GeglBufferIterator*',`BufferIterator*',`Glib::wrap($3)')
_WRAP_METHOD(BufferIterator* create_iterator(const Rectangle &, int level, const Babl *, guint flags, AbyssPolicy abyss_policy), gegl_buffer_iterator_new)
@@ -103,7 +107,6 @@ public:
_WRAP_PROPERTY("shift-x", int)
_WRAP_PROPERTY("shift-y", int)
_WRAP_PROPERTY("format", Babl*)
- _WRAP_PROPERTY("source", Glib::Object)
_WRAP_PROPERTY("tile_width", int)
_WRAP_PROPERTY("tile_height", int)
_WRAP_PROPERTY("path", Glib::ustring)
diff --git a/gegl/src/color.hg b/gegl/src/color.hg
index fe2508d..2c0a170 100644
--- a/gegl/src/color.hg
+++ b/gegl/src/color.hg
@@ -37,6 +37,9 @@ public:
_WRAP_METHOD(void get_rgba(double & r, double & g, double & b, double & a) const, gegl_color_get_rgba)
_WRAP_METHOD(void set_rgba(double r, double g, double b, double a), gegl_color_set_rgba)
+ _WRAP_METHOD(void get_pixel(const Babl* format, void* pixel) const, gegl_color_get_pixel)
+ _WRAP_METHOD(void set_pixel(const Babl* format, const void* pixel), gegl_color_set_pixel)
+
_WRAP_PROPERTY("string", Glib::ustring)
};
diff --git a/gegl/src/path.hg b/gegl/src/path.hg
index 5065fbd..6b04906 100644
--- a/gegl/src/path.hg
+++ b/gegl/src/path.hg
@@ -75,11 +75,9 @@ public:
_IGNORE(gegl_path_append)
// _WRAP_METHOD(Glib::RefPtr<Path> add_parameter_path(const Glib::ustring & parameter_name), gegl_path_add_parameter_path)
// _WRAP_METHOD(Glib::RefPtr<Path> get_parameter_path(const Glib::ustring & parameter_name), gegl_path_get_parameter_path)
-#m4 _CONVERSION(`GSList*', `Glib::SListHandle<Glib::ustring>', `$2($3, Glib::OWNERSHIP_NONE)')
- _WRAP_METHOD(Glib::SListHandle<Glib::ustring> parameter_get_names(int *count), gegl_path_parameter_get_names)
- _WRAP_METHOD(double parameter_calc(const Glib::ustring & parameter_name, double pos), gegl_path_parameter_calc)
- _WRAP_METHOD(void parameter_get_bounds(const Glib::ustring & parameter_name, double & min, double & max), gegl_path_parameter_get_bounds)
- _WRAP_METHOD(void parameter_calc_values(const Glib::ustring & parameter_name, guint num_samples, double * samples), gegl_path_parameter_calc_values)
+
+ _WRAP_METHOD(GeglPathList* get_flat_path() const, gegl_path_get_flat_path);
+ _WRAP_METHOD(GeglPathList* get_path() const, gegl_path_get_path);
_WRAP_METHOD(void freeze(), gegl_path_freeze)
_WRAP_METHOD(void thaw(), gegl_path_thaw)
diff --git a/tools/m4/convert_libgeglmm.m4 b/tools/m4/convert_libgeglmm.m4
index 04c1391..5a7f09e 100644
--- a/tools/m4/convert_libgeglmm.m4
+++ b/tools/m4/convert_libgeglmm.m4
@@ -35,6 +35,7 @@ _CONVERSION(`const Glib::RefPtr<NodeContext>&',`GeglNodeContext*',__CONVERT_REFP
_CONVERSION(`GeglColor*',`Glib::RefPtr<Color>',Glib::wrap($3))
_CONVERSION(`GeglColor*',`Glib::RefPtr<const Color>',Glib::wrap($3))
+_CONVERSION(`const Glib::RefPtr<Color>&',`GeglColor*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`GObject*',`Glib::RefPtr<Parameter>',`Glib::wrap($3)')
_CONVERSION(`GObject*',`Glib::RefPtr<const Parameter>',`Glib::wrap($3)')
@@ -66,7 +67,6 @@ _CONVERSION(`long&',`glong*',`&($3)')
_CONVERSION(`Glib::ustring', `const gchar*', `($3).c_str()')
-
# Lists
_CONVERSION(`const Glib::ListHandle<Value>&',`GList*',`$3.data()')
_CONVERSION(`GList*',`const Glib::ListHandle<Value>',__FL2H_SHALLOW)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]