2007-07-26 09:13:23 -04:00
|
|
|
/*
|
|
|
|
* Clutter.
|
|
|
|
*
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
*
|
|
|
|
* Authored By Matthew Allum <mallum@openedhand.com>
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 OpenedHand
|
|
|
|
*
|
|
|
|
* 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 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
|
2008-10-30 13:04:34 -04:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2007-07-26 09:13:23 -04:00
|
|
|
*/
|
|
|
|
|
2008-10-30 13:04:34 -04:00
|
|
|
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
|
|
|
#error "Only <clutter/clutter.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2007-07-26 09:13:23 -04:00
|
|
|
#ifndef __CLUTTER_TYPES_H__
|
|
|
|
#define __CLUTTER_TYPES_H__
|
|
|
|
|
2011-10-31 07:53:45 -04:00
|
|
|
#include <cairo.h>
|
|
|
|
|
2012-02-27 09:03:57 -05:00
|
|
|
#include <clutter/clutter-macros.h>
|
2011-10-04 08:28:04 -04:00
|
|
|
#include <clutter/clutter-enums.h>
|
2007-07-26 09:13:23 -04:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2010-08-16 10:53:28 -04:00
|
|
|
#define CLUTTER_TYPE_ACTOR_BOX (clutter_actor_box_get_type ())
|
2012-01-03 08:50:06 -05:00
|
|
|
#define CLUTTER_TYPE_FOG (clutter_fog_get_type ())
|
2010-08-16 10:53:28 -04:00
|
|
|
#define CLUTTER_TYPE_GEOMETRY (clutter_geometry_get_type ())
|
|
|
|
#define CLUTTER_TYPE_KNOT (clutter_knot_get_type ())
|
2011-11-21 12:45:32 -05:00
|
|
|
#define CLUTTER_TYPE_MARGIN (clutter_margin_get_type ())
|
2010-08-16 10:53:28 -04:00
|
|
|
#define CLUTTER_TYPE_PAINT_VOLUME (clutter_paint_volume_get_type ())
|
2012-01-03 08:50:06 -05:00
|
|
|
#define CLUTTER_TYPE_PERSPECTIVE (clutter_perspective_get_type ())
|
2010-08-16 10:53:28 -04:00
|
|
|
#define CLUTTER_TYPE_VERTEX (clutter_vertex_get_type ())
|
2007-07-26 09:13:23 -04:00
|
|
|
|
2008-05-28 09:48:11 -04:00
|
|
|
typedef struct _ClutterActor ClutterActor;
|
2010-05-14 11:42:50 -04:00
|
|
|
|
2008-05-28 09:48:11 -04:00
|
|
|
typedef struct _ClutterStage ClutterStage;
|
|
|
|
typedef struct _ClutterContainer ClutterContainer; /* dummy */
|
|
|
|
typedef struct _ClutterChildMeta ClutterChildMeta;
|
2009-09-15 12:37:11 -04:00
|
|
|
typedef struct _ClutterLayoutMeta ClutterLayoutMeta;
|
2010-05-14 07:13:49 -04:00
|
|
|
typedef struct _ClutterActorMeta ClutterActorMeta;
|
2011-11-17 12:07:10 -05:00
|
|
|
typedef struct _ClutterLayoutManager ClutterLayoutManager;
|
2012-01-25 10:27:57 -05:00
|
|
|
typedef struct _ClutterActorIter ClutterActorIter;
|
2010-05-14 11:42:50 -04:00
|
|
|
|
2011-10-04 06:52:47 -04:00
|
|
|
typedef struct _ClutterAlpha ClutterAlpha;
|
2011-10-04 09:21:32 -04:00
|
|
|
typedef struct _ClutterAnimatable ClutterAnimatable; /* dummy */
|
2010-02-05 07:32:00 -05:00
|
|
|
typedef struct _ClutterAnimator ClutterAnimator;
|
2012-02-27 10:29:50 -05:00
|
|
|
typedef struct _ClutterInterval ClutterInterval;
|
2011-10-04 09:21:32 -04:00
|
|
|
typedef struct _ClutterState ClutterState;
|
|
|
|
typedef struct _ClutterTimeline ClutterTimeline;
|
2007-08-13 16:48:01 -04:00
|
|
|
|
2010-05-14 07:13:49 -04:00
|
|
|
typedef struct _ClutterAction ClutterAction;
|
|
|
|
typedef struct _ClutterConstraint ClutterConstraint;
|
2010-11-18 13:23:49 -05:00
|
|
|
typedef struct _ClutterEffect ClutterEffect;
|
|
|
|
|
2011-10-04 09:21:32 -04:00
|
|
|
typedef struct _ClutterPath ClutterPath;
|
2010-02-17 13:21:50 -05:00
|
|
|
|
2009-06-16 07:47:19 -04:00
|
|
|
typedef struct _ClutterActorBox ClutterActorBox;
|
2011-10-04 09:21:32 -04:00
|
|
|
typedef struct _ClutterColor ClutterColor;
|
2012-01-03 08:50:06 -05:00
|
|
|
typedef struct _ClutterFog ClutterFog;
|
2007-07-26 09:13:23 -04:00
|
|
|
typedef struct _ClutterGeometry ClutterGeometry;
|
|
|
|
typedef struct _ClutterKnot ClutterKnot;
|
2011-11-21 12:45:32 -05:00
|
|
|
typedef struct _ClutterMargin ClutterMargin;
|
2012-01-03 08:50:06 -05:00
|
|
|
typedef struct _ClutterPerspective ClutterPerspective;
|
2007-07-26 09:13:23 -04:00
|
|
|
typedef struct _ClutterVertex ClutterVertex;
|
2010-09-07 13:04:19 -04:00
|
|
|
|
2011-11-03 11:32:04 -04:00
|
|
|
typedef struct _ClutterBehaviour ClutterBehaviour;
|
|
|
|
typedef struct _ClutterShader ClutterShader;
|
|
|
|
|
2011-10-04 09:21:32 -04:00
|
|
|
typedef union _ClutterEvent ClutterEvent;
|
|
|
|
|
2010-09-07 13:04:19 -04:00
|
|
|
/**
|
|
|
|
* ClutterPaintVolume:
|
|
|
|
*
|
|
|
|
* <structname>ClutterPaintVolume</structname> is an opaque structure
|
|
|
|
* whose members cannot be directly accessed.
|
|
|
|
*
|
|
|
|
* A <structname>ClutterPaintVolume</structname> represents an
|
2012-02-13 13:19:48 -05:00
|
|
|
* a bounding volume whose internal representation isn't defined but
|
2010-09-07 13:04:19 -04:00
|
|
|
* can be set and queried in terms of an axis aligned bounding box.
|
|
|
|
*
|
2012-02-13 13:19:48 -05:00
|
|
|
* A <structname>ClutterPaintVolume</structname> for a #ClutterActor
|
|
|
|
* is defined to be relative from the current actor modelview matrix.
|
|
|
|
*
|
2010-09-07 13:04:19 -04:00
|
|
|
* Other internal representation and methods for describing the
|
|
|
|
* bounding volume may be added in the future.
|
|
|
|
*
|
|
|
|
* Since: 1.4
|
|
|
|
*/
|
2010-08-16 10:53:28 -04:00
|
|
|
typedef struct _ClutterPaintVolume ClutterPaintVolume;
|
2007-07-26 09:13:23 -04:00
|
|
|
|
2009-06-16 07:47:19 -04:00
|
|
|
/**
|
|
|
|
* ClutterVertex:
|
|
|
|
* @x: X coordinate of the vertex
|
|
|
|
* @y: Y coordinate of the vertex
|
|
|
|
* @z: Z coordinate of the vertex
|
|
|
|
*
|
|
|
|
* Vertex of an actor in 3D space, expressed in pixels
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
struct _ClutterVertex
|
|
|
|
{
|
|
|
|
gfloat x;
|
|
|
|
gfloat y;
|
|
|
|
gfloat z;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType clutter_vertex_get_type (void) G_GNUC_CONST;
|
|
|
|
ClutterVertex *clutter_vertex_new (gfloat x,
|
|
|
|
gfloat y,
|
|
|
|
gfloat z);
|
|
|
|
ClutterVertex *clutter_vertex_copy (const ClutterVertex *vertex);
|
|
|
|
void clutter_vertex_free (ClutterVertex *vertex);
|
|
|
|
gboolean clutter_vertex_equal (const ClutterVertex *vertex_a,
|
|
|
|
const ClutterVertex *vertex_b);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ClutterActorBox:
|
|
|
|
* @x1: X coordinate of the top left corner
|
|
|
|
* @y1: Y coordinate of the top left corner
|
|
|
|
* @x2: X coordinate of the bottom right corner
|
|
|
|
* @y2: Y coordinate of the bottom right corner
|
|
|
|
*
|
|
|
|
* Bounding box of an actor. The coordinates of the top left and right bottom
|
|
|
|
* corners of an actor. The coordinates of the two points are expressed in
|
|
|
|
* pixels with sub-pixel precision
|
|
|
|
*/
|
|
|
|
struct _ClutterActorBox
|
|
|
|
{
|
|
|
|
gfloat x1;
|
|
|
|
gfloat y1;
|
|
|
|
|
|
|
|
gfloat x2;
|
|
|
|
gfloat y2;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType clutter_actor_box_get_type (void) G_GNUC_CONST;
|
|
|
|
ClutterActorBox *clutter_actor_box_new (gfloat x_1,
|
|
|
|
gfloat y_1,
|
|
|
|
gfloat x_2,
|
|
|
|
gfloat y_2);
|
|
|
|
ClutterActorBox *clutter_actor_box_copy (const ClutterActorBox *box);
|
|
|
|
void clutter_actor_box_free (ClutterActorBox *box);
|
|
|
|
gboolean clutter_actor_box_equal (const ClutterActorBox *box_a,
|
|
|
|
const ClutterActorBox *box_b);
|
2009-06-16 11:30:41 -04:00
|
|
|
gfloat clutter_actor_box_get_x (const ClutterActorBox *box);
|
|
|
|
gfloat clutter_actor_box_get_y (const ClutterActorBox *box);
|
|
|
|
gfloat clutter_actor_box_get_width (const ClutterActorBox *box);
|
|
|
|
gfloat clutter_actor_box_get_height (const ClutterActorBox *box);
|
2009-06-16 07:47:19 -04:00
|
|
|
void clutter_actor_box_get_origin (const ClutterActorBox *box,
|
|
|
|
gfloat *x,
|
|
|
|
gfloat *y);
|
|
|
|
void clutter_actor_box_get_size (const ClutterActorBox *box,
|
|
|
|
gfloat *width,
|
|
|
|
gfloat *height);
|
|
|
|
gfloat clutter_actor_box_get_area (const ClutterActorBox *box);
|
|
|
|
gboolean clutter_actor_box_contains (const ClutterActorBox *box,
|
|
|
|
gfloat x,
|
|
|
|
gfloat y);
|
|
|
|
void clutter_actor_box_from_vertices (ClutterActorBox *box,
|
|
|
|
const ClutterVertex verts[]);
|
2009-12-11 18:48:58 -05:00
|
|
|
void clutter_actor_box_interpolate (const ClutterActorBox *initial,
|
|
|
|
const ClutterActorBox *final,
|
|
|
|
gdouble progress,
|
|
|
|
ClutterActorBox *result);
|
|
|
|
void clutter_actor_box_clamp_to_pixel (ClutterActorBox *box);
|
2010-10-04 06:27:16 -04:00
|
|
|
void clutter_actor_box_union (const ClutterActorBox *a,
|
|
|
|
const ClutterActorBox *b,
|
2010-08-19 10:38:15 -04:00
|
|
|
ClutterActorBox *result);
|
2009-06-16 07:47:19 -04:00
|
|
|
|
2010-10-25 10:45:35 -04:00
|
|
|
void clutter_actor_box_set_origin (ClutterActorBox *box,
|
|
|
|
gfloat x,
|
|
|
|
gfloat y);
|
|
|
|
void clutter_actor_box_set_size (ClutterActorBox *box,
|
|
|
|
gfloat width,
|
|
|
|
gfloat height);
|
|
|
|
|
2007-07-26 09:13:23 -04:00
|
|
|
/**
|
|
|
|
* ClutterGeometry:
|
|
|
|
* @x: X coordinate of the top left corner of an actor
|
|
|
|
* @y: Y coordinate of the top left corner of an actor
|
|
|
|
* @width: width of an actor
|
|
|
|
* @height: height of an actor
|
|
|
|
*
|
2008-02-15 09:39:25 -05:00
|
|
|
* The rectangle containing an actor's bounding box, measured in pixels.
|
2007-07-26 09:13:23 -04:00
|
|
|
*/
|
|
|
|
struct _ClutterGeometry
|
|
|
|
{
|
|
|
|
/*< public >*/
|
|
|
|
gint x;
|
|
|
|
gint y;
|
|
|
|
guint width;
|
|
|
|
guint height;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType clutter_geometry_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2010-09-07 12:00:49 -04:00
|
|
|
void clutter_geometry_union (const ClutterGeometry *geometry_a,
|
|
|
|
const ClutterGeometry *geometry_b,
|
|
|
|
ClutterGeometry *result);
|
|
|
|
gboolean clutter_geometry_intersects (const ClutterGeometry *geometry0,
|
|
|
|
const ClutterGeometry *geometry1);
|
2010-03-18 13:55:01 -04:00
|
|
|
|
2007-07-26 09:13:23 -04:00
|
|
|
/**
|
|
|
|
* ClutterKnot:
|
|
|
|
* @x: X coordinate of the knot
|
|
|
|
* @y: Y coordinate of the knot
|
|
|
|
*
|
|
|
|
* Point in a path behaviour.
|
|
|
|
*
|
|
|
|
* Since: 0.2
|
|
|
|
*/
|
|
|
|
struct _ClutterKnot
|
|
|
|
{
|
|
|
|
gint x;
|
|
|
|
gint y;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType clutter_knot_get_type (void) G_GNUC_CONST;
|
|
|
|
ClutterKnot *clutter_knot_copy (const ClutterKnot *knot);
|
|
|
|
void clutter_knot_free (ClutterKnot *knot);
|
|
|
|
gboolean clutter_knot_equal (const ClutterKnot *knot_a,
|
|
|
|
const ClutterKnot *knot_b);
|
|
|
|
|
2010-08-16 10:53:28 -04:00
|
|
|
GType clutter_paint_volume_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2010-09-09 08:11:11 -04:00
|
|
|
ClutterPaintVolume *clutter_paint_volume_copy (const ClutterPaintVolume *pv);
|
|
|
|
void clutter_paint_volume_free (ClutterPaintVolume *pv);
|
|
|
|
|
|
|
|
void clutter_paint_volume_set_origin (ClutterPaintVolume *pv,
|
|
|
|
const ClutterVertex *origin);
|
|
|
|
void clutter_paint_volume_get_origin (const ClutterPaintVolume *pv,
|
|
|
|
ClutterVertex *vertex);
|
|
|
|
void clutter_paint_volume_set_width (ClutterPaintVolume *pv,
|
|
|
|
gfloat width);
|
|
|
|
gfloat clutter_paint_volume_get_width (const ClutterPaintVolume *pv);
|
|
|
|
void clutter_paint_volume_set_height (ClutterPaintVolume *pv,
|
|
|
|
gfloat height);
|
|
|
|
gfloat clutter_paint_volume_get_height (const ClutterPaintVolume *pv);
|
|
|
|
void clutter_paint_volume_set_depth (ClutterPaintVolume *pv,
|
|
|
|
gfloat depth);
|
|
|
|
gfloat clutter_paint_volume_get_depth (const ClutterPaintVolume *pv);
|
|
|
|
void clutter_paint_volume_union (ClutterPaintVolume *pv,
|
|
|
|
const ClutterPaintVolume *another_pv);
|
2012-02-27 11:31:53 -05:00
|
|
|
CLUTTER_AVAILABLE_IN_1_10
|
2012-02-13 17:40:19 -05:00
|
|
|
void clutter_paint_volume_union_box (ClutterPaintVolume *pv,
|
|
|
|
const ClutterActorBox *box);
|
2010-09-09 08:11:11 -04:00
|
|
|
|
|
|
|
gboolean clutter_paint_volume_set_from_allocation (ClutterPaintVolume *pv,
|
|
|
|
ClutterActor *actor);
|
2010-08-16 10:53:28 -04:00
|
|
|
|
2011-11-25 05:27:01 -05:00
|
|
|
/**
|
|
|
|
* ClutterMargin:
|
|
|
|
* @left: the margin from the left
|
|
|
|
* @right: the margin from the right
|
|
|
|
* @top: the margin from the top
|
|
|
|
* @bottom: the margin from the bottom
|
|
|
|
*
|
|
|
|
* A representation of the components of a margin.
|
|
|
|
*
|
|
|
|
* Since: 1.10
|
|
|
|
*/
|
2011-11-21 12:45:32 -05:00
|
|
|
struct _ClutterMargin
|
|
|
|
{
|
|
|
|
float left;
|
|
|
|
float right;
|
|
|
|
float top;
|
|
|
|
float bottom;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType clutter_margin_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
ClutterMargin * clutter_margin_new (void) G_GNUC_MALLOC;
|
2011-11-28 10:30:52 -05:00
|
|
|
ClutterMargin * clutter_margin_copy (const ClutterMargin *margin_);
|
|
|
|
void clutter_margin_free (ClutterMargin *margin_);
|
2011-11-21 12:45:32 -05:00
|
|
|
|
2007-07-26 09:13:23 -04:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __CLUTTER_TYPES_H__ */
|