/* Copyright (C) 2009 The cluttermm 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 <glibmm/object.h>
#include <cairomm/context.h>
#include <cluttermm/color.h>
#include <cluttermm/texture.h>

_DEFS(cluttermm,clutter)
_PINCLUDE(cluttermm/private/texture_p.h)

namespace Clutter
{

namespace Cairo
{

class Texture : public ::Clutter::Texture
{
  _CLASS_GOBJECT(Texture, ClutterCairoTexture, CLUTTER_CAIRO_TEXTURE, ::Clutter::Texture, ClutterTexture)
  _IMPLEMENTS_INTERFACE(Scriptable)

protected:
  _WRAP_CTOR(Texture(guint surface_width, guint surface_height), clutter_cairo_texture_new)

public:
  _WRAP_CREATE(guint surface_width, guint surface_height)

  _WRAP_METHOD(void clear(), clutter_cairo_texture_clear)

  _WRAP_METHOD(void set_surface_size(guint width, guint height), clutter_cairo_texture_set_surface_size)
  _WRAP_METHOD(void get_surface_size(guint& width, guint& height) const, clutter_cairo_texture_get_surface_size)

  _WRAP_METHOD(Glib::RefPtr< ::Cairo::Context > create_context(), clutter_cairo_texture_create)
  _WRAP_METHOD(Glib::RefPtr< ::Cairo::Context > create_context_region(int x_offset, int y_offset, int width, int height), clutter_cairo_texture_create_region)
};

void set_source_color(Glib::RefPtr< ::Cairo::Context >& context, ::Clutter::Color color);

} // namespace Cairo

} // namespace Clutter
