/* Copyright (C) 2007 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 <clutter/clutter.h>
#include <cogl/cogl.h>

_DEFS(cluttermm,clutter)
namespace Cogl
{
typedef CoglAngle Angle;
typedef CoglFixed Fixed;
} // namespace Cogl

namespace Clutter
{

typedef ClutterEvent Event;
typedef ClutterButtonEvent ButtonEvent;
typedef ClutterKeyEvent KeyEvent;
typedef ClutterMotionEvent MotionEvent;
typedef ClutterScrollEvent ScrollEvent;
typedef ClutterCrossingEvent CrossingEvent;

//TODO: Maybe redefine these, to avoid including a C header in our C++ header:

_WRAP_GERROR(InitError, ClutterInitError, CLUTTER_INIT_ERROR)

_WRAP_ENUM(AnimationMode, ClutterAnimationMode)
_WRAP_ENUM(RotateDirection, ClutterRotateDirection)
_WRAP_ENUM(RotateAxis, ClutterRotateAxis)
_WRAP_ENUM(Gravity, ClutterGravity)
_WRAP_ENUM(RequestMode, ClutterRequestMode)
_WRAP_ENUM(FontFlags, ClutterFontFlags)
_WRAP_ENUM(TextDirection, ClutterTextDirection)

class Vertex
{
  _CLASS_BOXEDTYPE_STATIC(Vertex, ClutterVertex)
public:
  Vertex(float x, float y, float z = 0);

  _MEMBER_GET(x, x, float, float)
  _MEMBER_SET(x, x, float, float)
  _MEMBER_GET(y, y, float, float)
  _MEMBER_SET(y, y, float, float)
  _MEMBER_GET(z, z, float, float)
  _MEMBER_SET(z, z, float, float)
};

class Geometry
{
  _CLASS_BOXEDTYPE_STATIC(Geometry, ClutterGeometry)
public:
  Geometry(int x, int y, unsigned int width = 0, unsigned int height = 0);

  _MEMBER_GET(x, x, int, gint)
  void set_x(int x);
  _MEMBER_GET(y, y, int, gint)
  void set_y(int y);
  void set_xy(int x, int y);

  _MEMBER_GET(width, width, unsigned int, guint)
  void set_width(unsigned int width);
  _MEMBER_GET(height, height, unsigned int, guint)
  void set_height(unsigned int height);
  void set_size(unsigned int width, unsigned int height);
};

class Knot
{
  _CLASS_BOXEDTYPE(Knot, ClutterKnot, NONE, clutter_knot_copy, clutter_knot_free)
  _IGNORE(clutter_knot_copy)
  _IGNORE(clutter_knot_free)
public:

  // NOTE: _CUSTOM_DEFAULT_CTOR must be used on the last class definition
  // as it "falls through" to any following definitions in the same file.
  _CUSTOM_DEFAULT_CTOR
  Knot();
  Knot(int x, int y);

  _MEMBER_GET(x, x, int, int)
  void set_x(int x);
  _MEMBER_GET(y, y, int, int)
  void set_y(int y);
  void set_xy(int x, int y);

#m4begin
  _WRAP_EQUAL(clutter_knot_equal)
#m4end
  _IGNORE(clutter_knot_equal)
};

} // namespace Clutter
