gnomemm r1573 - in geglmm/trunk: . examples libgegl/src
- From: hub svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1573 - in geglmm/trunk: . examples libgegl/src
- Date: Sat, 21 Jun 2008 20:25:41 +0000 (UTC)
Author: hub
Date: Sat Jun 21 20:25:41 2008
New Revision: 1573
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1573&view=rev
Log:
* libgegl/src/buffer.hg:
* libgegl/src/buffer.ccg:
* libgegl/src/color.hg: Updated API to new gegl
* libgegl/src/libgegl_enums.defs:
* libgegl/src/libgegl_signals.defs
* libgegl/src/libgegl_methods.defs: Updated defs to new
gegl.
* examples/geglbuffer-add-image.cc:
* examples/2geglbuffer.cc:
Fix examples to use the new API.
Modified:
geglmm/trunk/ChangeLog
geglmm/trunk/NEWS
geglmm/trunk/examples/2geglbuffer.cc
geglmm/trunk/examples/geglbuffer-add-image.cc
geglmm/trunk/libgegl/src/buffer.ccg
geglmm/trunk/libgegl/src/buffer.hg
geglmm/trunk/libgegl/src/color.hg
geglmm/trunk/libgegl/src/libgegl_enums.defs
geglmm/trunk/libgegl/src/libgegl_methods.defs
geglmm/trunk/libgegl/src/libgegl_signals.defs
Modified: geglmm/trunk/NEWS
==============================================================================
--- geglmm/trunk/NEWS (original)
+++ geglmm/trunk/NEWS Sat Jun 21 20:25:41 2008
@@ -1,6 +1,13 @@
0.0.17
- NEW: added tools/enum.pl for convenience
+ - NEW: Gegl::Color::get_float4()
+ - NEW: Gegl::Buffer::create_from_file()
+ - NEW: Gegl::Buffer::set_extent()
+ - NEW: Gegl::Buffer::save()
+ - NEW: Gegl::Buffer::flush()
+ - NEW: Gegl::Buffer::clear()
+ - NEW: Gegl::Buffer::get_format()
0.0.16
Modified: geglmm/trunk/examples/2geglbuffer.cc
==============================================================================
--- geglmm/trunk/examples/2geglbuffer.cc (original)
+++ geglmm/trunk/examples/2geglbuffer.cc Sat Jun 21 20:25:41 2008
@@ -29,9 +29,7 @@
load_file->link (save_file);
save_file->process ();
-
-// New API in 0.0.17.
-// buffer->save (argv[2]);
+ buffer->save (argv[2]);
Gegl::exit ();
return 0;
Modified: geglmm/trunk/examples/geglbuffer-add-image.cc
==============================================================================
--- geglmm/trunk/examples/geglbuffer-add-image.cc (original)
+++ geglmm/trunk/examples/geglbuffer-add-image.cc Sat Jun 21 20:25:41 2008
@@ -34,7 +34,7 @@
x = atof (argv[3]);
y = atof (argv[4]);
-// buffer = Gegl::Buffer::create_from_file (buf_file);
+ buffer = Gegl::Buffer::create_from_file (buf_file);
gegl = Gegl::Node::create();
write_buffer = gegl->new_child ("operation", "write-buffer");
Modified: geglmm/trunk/libgegl/src/buffer.ccg
==============================================================================
--- geglmm/trunk/libgegl/src/buffer.ccg (original)
+++ geglmm/trunk/libgegl/src/buffer.ccg Sat Jun 21 20:25:41 2008
@@ -15,4 +15,14 @@
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*/
-
\ No newline at end of file
+
+
+
+namespace Gegl {
+
+void Buffer::save(const Glib::ustring &p1) const
+{
+ gegl_buffer_save(const_cast<GeglBuffer*>(gobj()), p1.c_str(), NULL);
+}
+
+}
Modified: geglmm/trunk/libgegl/src/buffer.hg
==============================================================================
--- geglmm/trunk/libgegl/src/buffer.hg (original)
+++ geglmm/trunk/libgegl/src/buffer.hg Sat Jun 21 20:25:41 2008
@@ -39,11 +39,20 @@
public:
_WRAP_CREATE(const Rectangle & extent, const Babl *format) //TODO: Add an overload if format can be NULL, and use a const & for this one.
+ _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?
//TODO: What does this do. It looks odd: _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)
+
+
+ _WRAP_METHOD(void save(const Glib::ustring &, const Rectangle &) const, gegl_buffer_save)
+ void save(const Glib::ustring &) const;
+ _WRAP_METHOD(void flush(), gegl_buffer_flush)
+
+ _WRAP_METHOD(void clear(const Rectangle &), gegl_buffer_clear)
+ _WRAP_METHOD(const Babl* get_format(), gegl_buffer_get_format)
// TODO macros
//x
Modified: geglmm/trunk/libgegl/src/color.hg
==============================================================================
--- geglmm/trunk/libgegl/src/color.hg (original)
+++ geglmm/trunk/libgegl/src/color.hg Sat Jun 21 20:25:41 2008
@@ -36,7 +36,7 @@
_WRAP_CREATE(const Glib::ustring & s)
_WRAP_METHOD(void get_rgba(float & r, float & g, float & b, float & a) const, gegl_color_get_rgba)
_WRAP_METHOD(void set_rgba(float r, float g, float b, float a), gegl_color_set_rgba)
-
+ _WRAP_METHOD(const gfloat* get_float4() const, gegl_color_float4)
_WRAP_PROPERTY("string", Glib::ustring)
};
Modified: geglmm/trunk/libgegl/src/libgegl_enums.defs
==============================================================================
--- geglmm/trunk/libgegl/src/libgegl_enums.defs (original)
+++ geglmm/trunk/libgegl/src/libgegl_enums.defs Sat Jun 21 20:25:41 2008
@@ -6,6 +6,8 @@
(values
'("nearest" "GEGL_INTERPOLATION_NEAREST" "0")
'("linear" "GEGL_INTERPOLATION_LINEAR" "1")
+ '("cubic" "GEGL_INTERPOLATION_CUBIC" "2")
+ '("lanczos" "GEGL_INTERPOLATION_LANCZOS" "3")
)
)
Modified: geglmm/trunk/libgegl/src/libgegl_methods.defs
==============================================================================
--- geglmm/trunk/libgegl/src/libgegl_methods.defs (original)
+++ geglmm/trunk/libgegl/src/libgegl_methods.defs Sat Jun 21 20:25:41 2008
@@ -203,6 +203,34 @@
(gtype-id "GEGL_TYPE_CHANT")
)
+(define-object OperationPointRender
+ (in-module "Gegl")
+ (parent "GeglOperationSource")
+ (c-name "GeglOperationPointRender")
+ (gtype-id "GEGL_TYPE_OPERATION_POINT_RENDER")
+)
+
+(define-object Chant
+ (in-module "Gegl")
+ (parent "GeglOperationPointRender")
+ (c-name "GeglChant")
+ (gtype-id "GEGL_TYPE_CHANT")
+)
+
+(define-object OperationTemporal
+ (in-module "Gegl")
+ (parent "GeglOperationFilter")
+ (c-name "GeglOperationTemporal")
+ (gtype-id "GEGL_TYPE_OPERATION_TEMPORAL")
+)
+
+(define-object Chant
+ (in-module "Gegl")
+ (parent "GeglOperationTemporal")
+ (c-name "GeglChant")
+ (gtype-id "GEGL_TYPE_CHANT")
+)
+
;; Enumerations and flags ...
(define-enum Interpolation
@@ -212,6 +240,8 @@
(values
'("nearest" "GEGL_INTERPOLATION_NEAREST")
'("linear" "GEGL_INTERPOLATION_LINEAR")
+ '("cubic" "GEGL_INTERPOLATION_CUBIC")
+ '("lanczos" "GEGL_INTERPOLATION_LANCZOS")
)
)
@@ -254,6 +284,38 @@
)
)
+(define-function gegl_buffer_open
+ (c-name "gegl_buffer_open")
+ (return-type "GeglBuffer*")
+ (parameters
+ '("const-gchar*" "path")
+ )
+)
+
+(define-method save
+ (of-object "GeglBuffer")
+ (c-name "gegl_buffer_save")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "path")
+ '("const-GeglRectangle*" "roi")
+ )
+)
+
+(define-function gegl_buffer_load
+ (c-name "gegl_buffer_load")
+ (return-type "GeglBuffer*")
+ (parameters
+ '("const-gchar*" "path")
+ )
+)
+
+(define-method flush
+ (of-object "GeglBuffer")
+ (c-name "gegl_buffer_flush")
+ (return-type "none")
+)
+
(define-method create_sub_buffer
(of-object "GeglBuffer")
(c-name "gegl_buffer_create_sub_buffer")
@@ -275,6 +337,15 @@
(return-type "const-GeglRectangle*")
)
+(define-method set_extent
+ (of-object "GeglBuffer")
+ (c-name "gegl_buffer_set_extent")
+ (return-type "gboolean")
+ (parameters
+ '("const-GeglRectangle*" "extent")
+ )
+)
+
(define-method get
(of-object "GeglBuffer")
(c-name "gegl_buffer_get")
@@ -300,6 +371,21 @@
)
)
+(define-method get_format
+ (of-object "GeglBuffer")
+ (c-name "gegl_buffer_get_format")
+ (return-type "const-Babl*")
+)
+
+(define-method clear
+ (of-object "GeglBuffer")
+ (c-name "gegl_buffer_clear")
+ (return-type "none")
+ (parameters
+ '("const-GeglRectangle*" "roi")
+ )
+)
+
(define-method copy
(of-object "GeglBuffer")
(c-name "gegl_buffer_copy")
@@ -352,7 +438,21 @@
(define-function gegl_chant_get_type
(c-name "gegl_chant_get_type")
(return-type "GType")
+)
+
+(define-function gegl_module_register
+ (c-name "gegl_module_register")
+ (return-type "gboolean")
+ (parameters
+ '("GTypeModule*" "module")
+ )
+)
+
+(define-function gegl_module_query
+ (c-name "gegl_module_query")
+ (return-type "const-GeglModuleInfo*")
(parameters
+ '("GTypeModule*" "module")
)
)
@@ -398,6 +498,12 @@
)
)
+(define-method float4
+ (of-object "GeglColor")
+ (c-name "gegl_color_float4")
+ (return-type "const-gfloat*")
+)
+
(define-function gegl_param_color_get_type
(c-name "gegl_param_color_get_type")
(return-type "GType")
@@ -900,6 +1006,11 @@
(return-type "none")
)
+(define-function gegl_config
+ (c-name "gegl_config")
+ (return-type "GObject*")
+)
+
;; From gegl-paramspecs.h
@@ -1383,82 +1494,27 @@
)
)
-(define-function gegl_log_debug
- (c-name "gegl_log_debug")
- (return-type "none")
- (parameters
- '("const-gchar*" "file")
- '("gint" "line")
- '("const-gchar*" "function")
- '("const-gchar*" "format")
- )
- (varargs #t)
-)
-
-(define-function gegl_log_info
- (c-name "gegl_log_info")
- (return-type "none")
- (parameters
- '("const-gchar*" "file")
- '("gint" "line")
- '("const-gchar*" "function")
- '("const-gchar*" "format")
- )
- (varargs #t)
-)
-
-(define-function gegl_log_message
- (c-name "gegl_log_message")
- (return-type "none")
- (parameters
- '("const-gchar*" "file")
- '("gint" "line")
- '("const-gchar*" "function")
- '("const-gchar*" "format")
- )
- (varargs #t)
-)
-
-(define-function gegl_log_direct
- (c-name "gegl_log_direct")
- (return-type "none")
- (parameters
- '("const-gchar*" "format")
- )
- (varargs #t)
-)
-
(define-function gegl_rectangle_get_type
(c-name "gegl_rectangle_get_type")
(return-type "GType")
)
-
-
-;; From gegl-extension-handler.h
-
-(define-function gegl_extension_handler_register
- (c-name "gegl_extension_handler_register")
- (return-type "none")
+(define-function gegl_malloc
+ (c-name "gegl_malloc")
+ (return-type "gpointer")
(parameters
- '("const-gchar*" "extension")
- '("const-gchar*" "handler")
+ '("gsize" "size")
)
)
-(define-function gegl_extension_handler_get
- (c-name "gegl_extension_handler_get")
- (return-type "const-gchar*")
+(define-function gegl_free
+ (c-name "gegl_free")
+ (return-type "none")
(parameters
- '("const-gchar*" "extension")
+ '("gpointer" "buf")
)
)
-(define-function gegl_extension_handler_cleanup
- (c-name "gegl_extension_handler_cleanup")
- (return-type "none")
-)
-
;; From gegl-operation-area-filter.h
@@ -1490,6 +1546,16 @@
;; From gegl-operation.h
+(define-method add_processor
+ (of-object "GeglOperationClass")
+ (c-name "gegl_operation_class_add_processor")
+ (return-type "none")
+ (parameters
+ '("GCallback" "process")
+ '("const-gchar*" "string")
+ )
+)
+
(define-function gegl_operation_get_type
(c-name "gegl_operation_get_type")
(return-type "GType")
@@ -1612,6 +1678,42 @@
)
)
+(define-function gegl_list_properties
+ (c-name "gegl_list_properties")
+ (return-type "GParamSpec**")
+ (parameters
+ '("const-gchar*" "operation_type")
+ '("guint*" "n_properties_p")
+ )
+)
+
+(define-method calc_source_regions
+ (of-object "GeglOperation")
+ (c-name "gegl_operation_calc_source_regions")
+ (return-type "gboolean")
+ (parameters
+ '("gpointer" "context_id")
+ )
+)
+
+(define-function gegl_operation_vector_prop_changed
+ (c-name "gegl_operation_vector_prop_changed")
+ (return-type "none")
+ (parameters
+ '("GeglVector*" "vector")
+ '("GeglOperation*" "operation")
+ )
+)
+
+(define-method invalidate
+ (of-object "GeglOperation")
+ (c-name "gegl_operation_invalidate")
+ (return-type "none")
+ (parameters
+ '("const-GeglRectangle*" "roi")
+ )
+)
+
;; From gegl-operation-meta.h
@@ -1662,45 +1764,11 @@
-;; From gegl-operations.h
+;; From gegl-operation-point-render.h
-(define-function gegl_operation_gtype_from_name
- (c-name "gegl_operation_gtype_from_name")
+(define-function gegl_operation_point_render_get_type
+ (c-name "gegl_operation_point_render_get_type")
(return-type "GType")
- (parameters
- '("const-gchar*" "name")
- )
-)
-
-(define-function gegl_list_operations
- (c-name "gegl_list_operations")
- (return-type "gchar**")
- (parameters
- '("guint*" "n_operations_p")
- )
-)
-
-(define-function gegl_operation_gtype_cleanup
- (c-name "gegl_operation_gtype_cleanup")
- (return-type "none")
-)
-
-(define-method calc_source_regions
- (of-object "GeglOperation")
- (c-name "gegl_operation_calc_source_regions")
- (return-type "gboolean")
- (parameters
- '("gpointer" "context_id")
- )
-)
-
-(define-function gegl_operation_vector_prop_changed
- (c-name "gegl_operation_vector_prop_changed")
- (return-type "none")
- (parameters
- '("GeglVector*" "vector")
- '("GeglOperation*" "operation")
- )
)
@@ -1728,3 +1796,36 @@
)
+
+;; From gegl-operation-temporal.h
+
+(define-function gegl_operation_temporal_get_type
+ (c-name "gegl_operation_temporal_get_type")
+ (return-type "GType")
+)
+
+(define-method temporal_set_history_length
+ (of-object "GeglOperation")
+ (c-name "gegl_operation_temporal_set_history_length")
+ (return-type "none")
+ (parameters
+ '("gint" "history_length")
+ )
+)
+
+(define-method temporal_get_history_length
+ (of-object "GeglOperation")
+ (c-name "gegl_operation_temporal_get_history_length")
+ (return-type "guint")
+)
+
+(define-method temporal_get_frame
+ (of-object "GeglOperation")
+ (c-name "gegl_operation_temporal_get_frame")
+ (return-type "GeglBuffer*")
+ (parameters
+ '("gint" "frame")
+ )
+)
+
+
Modified: geglmm/trunk/libgegl/src/libgegl_signals.defs
==============================================================================
--- geglmm/trunk/libgegl/src/libgegl_signals.defs (original)
+++ geglmm/trunk/libgegl/src/libgegl_signals.defs Sat Jun 21 20:25:41 2008
@@ -388,6 +388,17 @@
(construct-only #f)
)
+;; From GeglOperationPointRender
+
+(define-property output
+ (of-object "GeglOperationPointRender")
+ (prop-type "GParamObject")
+ (docs "Ouput pad for generated image buffer.")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
;; From GeglOperationAreaFilter
(define-property output
@@ -410,4 +421,24 @@
;; From GeglOperationMeta
+;; From GeglOperationTemporal
+
+(define-property output
+ (of-object "GeglOperationTemporal")
+ (prop-type "GParamObject")
+ (docs "Ouput pad for generated image buffer.")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property input
+ (of-object "GeglOperationTemporal")
+ (prop-type "GParamObject")
+ (docs "Input pad, for image buffer input.")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]