/* 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(geglmm,gegl)
_PINCLUDE(glibmm/private/object_p.h)

namespace Gegl {

class Curve 
	: public Glib::Object
{
	_CLASS_GOBJECT(Curve, GeglCurve, GEGL_CURVE, Glib::Object, GObject)

protected:
	_WRAP_CTOR(Curve(double y_min, double y_max), gegl_curve_new)

public:
	_WRAP_CREATE(double y_min, double y_max)
	_WRAP_METHOD(static Glib::RefPtr<Curve> create_default_curve(), gegl_curve_default_curve) //TODO: The default values should be in the C properties or its *_init(), so we don't need to use this C function.

	_WRAP_METHOD(void get_y_bounds(double & min_y, double & max_y) const, gegl_curve_get_y_bounds)
    // this one is defined but still not implemented.
    //	_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) const, gegl_curve_get_point)
	_WRAP_METHOD(void set_point(guint index, double x, double y), gegl_curve_set_point)
	_WRAP_METHOD(guint num_points() const, 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)
};

}
