// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _CLUTTERMM_CAIRO_TEXTURE_H
#define _CLUTTERMM_CAIRO_TEXTURE_H


#include <glibmm.h>

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


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _ClutterCairoTexture ClutterCairoTexture;
typedef struct _ClutterCairoTextureClass ClutterCairoTextureClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Clutter
{

namespace Cairo
{ class Texture_Class; } // namespace Cairo

} // namespace Clutter
namespace Clutter
{

namespace Cairo
{


class Texture : public ::Clutter::Texture
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef Texture CppObjectType;
  typedef Texture_Class CppClassType;
  typedef ClutterCairoTexture BaseObjectType;
  typedef ClutterCairoTextureClass BaseClassType;

private:  friend class Texture_Class;
  static CppClassType texture_class_;

private:
  // noncopyable
  Texture(const Texture&);
  Texture& operator=(const Texture&);

protected:
  explicit Texture(const Glib::ConstructParams& construct_params);
  explicit Texture(ClutterCairoTexture* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~Texture();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;


  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  ClutterCairoTexture*       gobj()       { return reinterpret_cast<ClutterCairoTexture*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const ClutterCairoTexture* gobj() const { return reinterpret_cast<ClutterCairoTexture*>(gobject_); }

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  ClutterCairoTexture* gobj_copy();

private:

  
protected:
  explicit Texture(guint width, guint height);

public:
  
  static Glib::RefPtr<Texture> create(guint width, guint height);


  /** Clears @a self's internal drawing surface, so that the next upload
   * will replace the previous contents of the Clutter::CairoTexture
   * rather than adding to it.
   * 
   * @newin{1,0}
   */
  void clear();

  
  /** Resizes the Cairo surface used by @a self to @a width and @a height.
   * 
   * @newin{1,0}
   * @param width The new width of the surface.
   * @param height The new height of the surface.
   */
  void set_surface_size(guint width, guint height);
  
  /** Retrieves the surface width and height for @a self.
   * 
   * @newin{1,0}
   * @param width Return location for the surface width, or <tt>0</tt>.
   * @param height Return location for the surface height, or <tt>0</tt>.
   */
  void get_surface_size(guint& width, guint& height) const;

  
  /** Creates a new Cairo context for the @a cairo texture. It is
   * similar to using create_region() with @a x_offset
   * and @a y_offset of 0, @a width equal to the @a cairo texture surface width
   * and @a height equal to the @a cairo texture surface height.
   * 
   * <warning><para>Do not call this function within the paint virtual
   * function or from a callback to the Clutter::Actor::paint
   * signal.</para></warning>
   * 
   * @newin{1,0}
   * @return A newly created Cairo context. Use cairo_destroy()
   * to upload the contents of the context when done drawing.
   */
  Glib::RefPtr< ::Cairo::Context > create_context();
  
  /** Creates a new Cairo context that will updat the region defined
   * by @a x_offset, @a y_offset, @a width and @a height.
   * 
   * <warning><para>Do not call this function within the paint virtual
   * function or from a callback to the Clutter::Actor::paint
   * signal.</para></warning>
   * 
   * @newin{1,0}
   * @param x_offset Offset of the region on the X axis.
   * @param y_offset Offset of the region on the Y axis.
   * @param width Width of the region, or -1 for the full surface width.
   * @param height Height of the region, or -1 for the full surface height.
   * @return A newly created Cairo context. Use cairo_destroy()
   * to upload the contents of the context when done drawing.
   */
  Glib::RefPtr< ::Cairo::Context > create_context_region(int x_offset, int y_offset, int width, int height);


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::


};

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

} // namespace Cairo

} // namespace Clutter


namespace Glib
{
  /** A Glib::wrap() method for this object.
   * 
   * @param object The C instance.
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   *
   * @relates Clutter::Cairo::Texture
   */
  Glib::RefPtr<Clutter::Cairo::Texture> wrap(ClutterCairoTexture* object, bool take_copy = false);
}


#endif /* _CLUTTERMM_CAIRO_TEXTURE_H */

