/* gstreamermm - a C++ wrapper for gstreamer
 *
 * Copyright 2008 The gstreamermm Development Team
 *
 * 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 2.1 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 this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gst/interfaces/colorbalance.h>
#include <glibmm/interface.h>

_DEFS(gstreamermm,gst)

namespace Gst
{

_WRAP_ENUM(ColorBalanceType, GstColorBalanceType)

class ColorBalanceChannel;

/** Gst::ColorBalance - Interface for adjusting color balance settings.
 * @ingroup GstInterfaces
 */
class ColorBalance : public Glib::Interface
{
  _CLASS_INTERFACE(ColorBalance, GstColorBalance, GST_COLOR_BALANCE, GstColorBalanceClass)

public:
#m4 _CONVERSION(`const GList*', `Glib::ListHandle< Glib::RefPtr<ColorBalanceChannel> >', `$2(const_cast<GList*>($3), Glib::OWNERSHIP_NONE)')
  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<ColorBalanceChannel> > list_channels(), gst_color_balance_list_channels)

#m4 _CONVERSION(`const GList*', `Glib::ListHandle< Glib::RefPtr<const ColorBalanceChannel> >', `$2(const_cast<GList*>($3), Glib::OWNERSHIP_NONE)')
  _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<const ColorBalanceChannel> > list_channels() const, gst_color_balance_list_channels)

  _WRAP_METHOD(int get_value(const Glib::RefPtr<const ColorBalanceChannel>& channel) const, gst_color_balance_get_value)
  _WRAP_METHOD(void set_value(const Glib::RefPtr<ColorBalanceChannel>& channel, int value), gst_color_balance_set_value)
  _WRAP_METHOD(void value_changed(const Glib::RefPtr<ColorBalanceChannel>& channel, int value), gst_color_balance_value_changed)

#m4 _CONVERSION(`GstColorBalanceChannel*', `const Glib::RefPtr<ColorBalanceChannel>&', `Glib::wrap($3, true)')
  /** Fired when the value of the indicated channel has changed.
   */
  _WRAP_SIGNAL(void value_changed(const Glib::RefPtr<ColorBalanceChannel>& channel, int value), "value-changed")

#m4 _CONVERSION(`Glib::ListHandle< Glib::RefPtr<ColorBalanceChannel> >', `const GList*', `($3).data()')
  //TODO: Include when bug #530416 is resolved.
  ///** Lists the channels of the Gst::ColorBalance.
   //*/
  //_WRAP_VFUNC(Glib::ListHandle< Glib::RefPtr<ColorBalanceChannel> > list_channels(), "list_channels")

  /** Sets the value of a Gst::ColorBalanceChannel of the Gst::ColorBalance.
   */
  _WRAP_VFUNC(void set_value(const Glib::RefPtr<ColorBalanceChannel>& channel, int value), "set_value")

#m4 _CONVERSION(`GstColorBalanceChannel*', `const Glib::RefPtr<const ColorBalanceChannel>&', `Glib::wrap($3, true)')
  /** Gets the value of a Gst::ColorBalanceChannel of the Gst::ColorBalance.
   */
  _WRAP_VFUNC(int get_value(const Glib::RefPtr<const ColorBalanceChannel>& channel) const, "get_value")
};

} // namespace Gst
