/* 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/>.
 */


_DEFS(geglmm,gegl)
_PINCLUDE(glibmm/private/object_p.h)


namespace Gegl
{

class Rectangle;
class Node;

class Processor
	: public Glib::Object
{
	_CLASS_GOBJECT(Processor, GeglProcessor, GEGL_PROCESSOR, Glib::Object, GObject)
public:
	_CTOR_DEFAULT

	_WRAP_METHOD(void set_rectangle(const Rectangle & rectangle), gegl_processor_set_rectangle);
	_WRAP_METHOD(bool work(double & progress), gegl_processor_work);

//TODO: This "Frees up resources used by a processing handle", 
//but does it really destroy the whole GeglProcessor? If so, how does that work/clash with reference-counting.
//We should generally avoid having this in public C++ API.
	_WRAP_METHOD(void destroy(), gegl_processor_destroy)
	_WRAP_PROPERTY("node", Glib::RefPtr<Gegl::Node>)
	_WRAP_PROPERTY("chunksize", int)
	_WRAP_PROPERTY("rectangle", Gegl::Rectangle &)
	_WRAP_PROPERTY("progress", double);
};

}
