2007-07-26 13:13:23 +00: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 17:04:34 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2007-07-26 13:13:23 +00:00
|
|
|
*/
|
|
|
|
|
2023-07-21 13:37:20 +00:00
|
|
|
#pragma once
|
2015-07-07 14:51:13 +00:00
|
|
|
|
2008-10-30 17:04:34 +00:00
|
|
|
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
|
|
|
#error "Only <clutter/clutter.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2023-07-19 14:35:53 +00:00
|
|
|
#include <graphene-gobject.h>
|
2023-08-07 13:38:12 +00:00
|
|
|
|
|
|
|
#include "cogl/cogl.h"
|
|
|
|
#include "clutter/clutter-macros.h"
|
|
|
|
#include "clutter/clutter-enums.h"
|
2007-07-26 13:13:23 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2010-08-16 14:53:28 +00:00
|
|
|
#define CLUTTER_TYPE_ACTOR_BOX (clutter_actor_box_get_type ())
|
2011-11-21 17:45:32 +00:00
|
|
|
#define CLUTTER_TYPE_MARGIN (clutter_margin_get_type ())
|
2010-08-16 14:53:28 +00:00
|
|
|
#define CLUTTER_TYPE_PAINT_VOLUME (clutter_paint_volume_get_type ())
|
2012-01-03 13:50:06 +00:00
|
|
|
#define CLUTTER_TYPE_PERSPECTIVE (clutter_perspective_get_type ())
|
2007-07-26 13:13:23 +00:00
|
|
|
|
2012-04-11 17:18:27 +00:00
|
|
|
typedef struct _ClutterActor ClutterActor;
|
|
|
|
|
2023-12-05 15:14:46 +00:00
|
|
|
typedef struct _ClutterContext ClutterContext;
|
2012-04-11 17:18:27 +00:00
|
|
|
typedef struct _ClutterStage ClutterStage;
|
2020-10-09 16:16:16 +00:00
|
|
|
typedef struct _ClutterFrame ClutterFrame;
|
2016-06-08 05:07:09 +00:00
|
|
|
typedef struct _ClutterFrameInfo ClutterFrameInfo;
|
2012-04-11 17:18:27 +00:00
|
|
|
typedef struct _ClutterLayoutMeta ClutterLayoutMeta;
|
|
|
|
typedef struct _ClutterActorMeta ClutterActorMeta;
|
|
|
|
typedef struct _ClutterLayoutManager ClutterLayoutManager;
|
|
|
|
typedef struct _ClutterActorIter ClutterActorIter;
|
2022-12-21 17:30:29 +00:00
|
|
|
typedef struct _ClutterPaintContext ClutterPaintContext;
|
2012-04-11 17:18:27 +00:00
|
|
|
typedef struct _ClutterPaintNode ClutterPaintNode;
|
|
|
|
typedef struct _ClutterContent ClutterContent; /* dummy */
|
2012-04-12 14:56:53 +00:00
|
|
|
typedef struct _ClutterScrollActor ClutterScrollActor;
|
2020-03-25 17:16:39 +00:00
|
|
|
typedef struct _ClutterFrameClock ClutterFrameClock;
|
2010-05-14 15:42:50 +00:00
|
|
|
|
2012-03-20 10:59:34 +00:00
|
|
|
typedef struct _ClutterInterval ClutterInterval;
|
|
|
|
typedef struct _ClutterAnimatable ClutterAnimatable; /* dummy */
|
|
|
|
typedef struct _ClutterTimeline ClutterTimeline;
|
|
|
|
typedef struct _ClutterTransition ClutterTransition;
|
2012-03-15 11:08:38 +00:00
|
|
|
typedef struct _ClutterPropertyTransition ClutterPropertyTransition;
|
2012-04-11 14:53:52 +00:00
|
|
|
typedef struct _ClutterKeyframeTransition ClutterKeyframeTransition;
|
2012-03-20 10:59:34 +00:00
|
|
|
typedef struct _ClutterTransitionGroup ClutterTransitionGroup;
|
2023-11-11 19:04:56 +00:00
|
|
|
typedef struct _ClutterText ClutterText;
|
2007-08-13 20:48:01 +00:00
|
|
|
|
2012-04-11 17:18:27 +00:00
|
|
|
typedef struct _ClutterAction ClutterAction;
|
|
|
|
typedef struct _ClutterConstraint ClutterConstraint;
|
|
|
|
typedef struct _ClutterEffect ClutterEffect;
|
2010-11-18 18:23:49 +00:00
|
|
|
|
2012-04-11 17:18:27 +00:00
|
|
|
typedef struct _ClutterActorBox ClutterActorBox;
|
|
|
|
typedef struct _ClutterColor ClutterColor;
|
2022-05-20 15:47:16 +00:00
|
|
|
typedef struct _ClutterColorState ClutterColorState;
|
2012-04-11 17:18:27 +00:00
|
|
|
typedef struct _ClutterMargin ClutterMargin;
|
|
|
|
typedef struct _ClutterPerspective ClutterPerspective;
|
|
|
|
|
2015-01-09 16:37:28 +00:00
|
|
|
typedef struct _ClutterInputDeviceTool ClutterInputDeviceTool;
|
2012-06-16 23:44:44 +00:00
|
|
|
typedef struct _ClutterInputDevice ClutterInputDevice;
|
2016-05-03 03:27:57 +00:00
|
|
|
typedef struct _ClutterVirtualInputDevice ClutterVirtualInputDevice;
|
2012-06-16 23:44:44 +00:00
|
|
|
|
2017-12-06 11:44:55 +00:00
|
|
|
typedef struct _ClutterInputMethod ClutterInputMethod;
|
2017-12-06 11:43:14 +00:00
|
|
|
typedef struct _ClutterInputFocus ClutterInputFocus;
|
2017-12-06 11:44:55 +00:00
|
|
|
|
2012-04-11 17:18:27 +00:00
|
|
|
typedef union _ClutterEvent ClutterEvent;
|
2011-11-03 15:32:04 +00:00
|
|
|
|
2022-12-21 17:30:29 +00:00
|
|
|
typedef enum _ClutterPaintFlag ClutterPaintFlag;
|
|
|
|
|
2012-06-16 23:44:44 +00:00
|
|
|
/**
|
|
|
|
* ClutterEventSequence:
|
|
|
|
*
|
2014-03-18 14:14:22 +00:00
|
|
|
* The #ClutterEventSequence structure is an opaque
|
2012-06-16 23:44:44 +00:00
|
|
|
* type used to denote the event sequence of a touch event.
|
|
|
|
*/
|
|
|
|
typedef struct _ClutterEventSequence ClutterEventSequence;
|
|
|
|
|
2010-09-07 17:04:19 +00:00
|
|
|
/**
|
|
|
|
* ClutterPaintVolume:
|
|
|
|
*
|
2023-11-07 10:30:21 +00:00
|
|
|
* A #ClutterPaintVolume represents a bounding volume whose internal
|
2022-05-25 16:41:48 +00:00
|
|
|
* representation isn't defined but can be set and queried in terms
|
|
|
|
* of an axis aligned bounding box.
|
2010-09-07 17:04:19 +00:00
|
|
|
*
|
2022-05-25 16:41:48 +00:00
|
|
|
* A #ClutterPaintVolume for a [class@Actor]
|
2012-02-13 18:19:48 +00:00
|
|
|
* is defined to be relative from the current actor modelview matrix.
|
|
|
|
*
|
2010-09-07 17:04:19 +00:00
|
|
|
* Other internal representation and methods for describing the
|
|
|
|
* bounding volume may be added in the future.
|
|
|
|
*/
|
2010-08-16 14:53:28 +00:00
|
|
|
typedef struct _ClutterPaintVolume ClutterPaintVolume;
|
2007-07-26 13:13:23 +00:00
|
|
|
|
2009-06-16 11:47:19 +00:00
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*
|
2023-11-07 10:30:21 +00:00
|
|
|
* Bounding box of an actor.
|
|
|
|
*
|
2022-05-25 16:41:48 +00:00
|
|
|
* The coordinates of the top left and right bottom corners
|
|
|
|
* of an actor. The coordinates of the two points are expressed in
|
2009-06-16 11:47:19 +00:00
|
|
|
* pixels with sub-pixel precision
|
|
|
|
*/
|
|
|
|
struct _ClutterActorBox
|
|
|
|
{
|
|
|
|
gfloat x1;
|
|
|
|
gfloat y1;
|
|
|
|
|
|
|
|
gfloat x2;
|
|
|
|
gfloat y2;
|
|
|
|
};
|
|
|
|
|
2012-03-17 15:27:26 +00:00
|
|
|
/**
|
|
|
|
* CLUTTER_ACTOR_BOX_INIT:
|
|
|
|
* @x_1: the X coordinate of the top left corner
|
|
|
|
* @y_1: the Y coordinate of the top left corner
|
|
|
|
* @x_2: the X coordinate of the bottom right corner
|
|
|
|
* @y_2: the Y coordinate of the bottom right corner
|
|
|
|
*
|
|
|
|
* A simple macro for initializing a #ClutterActorBox when declaring
|
|
|
|
* it, e.g.:
|
|
|
|
*
|
2022-05-25 16:41:48 +00:00
|
|
|
* ```c
|
2012-03-17 15:27:26 +00:00
|
|
|
* ClutterActorBox box = CLUTTER_ACTOR_BOX_INIT (0, 0, 400, 600);
|
2022-05-25 16:41:48 +00:00
|
|
|
* ```
|
2012-03-17 15:27:26 +00:00
|
|
|
*/
|
|
|
|
#define CLUTTER_ACTOR_BOX_INIT(x_1,y_1,x_2,y_2) { (x_1), (y_1), (x_2), (y_2) }
|
|
|
|
|
2012-08-09 15:55:41 +00:00
|
|
|
/**
|
|
|
|
* CLUTTER_ACTOR_BOX_INIT_ZERO:
|
|
|
|
*
|
|
|
|
* A simple macro for initializing a #ClutterActorBox to 0 when
|
|
|
|
* declaring it, e.g.:
|
|
|
|
*
|
2022-05-25 16:41:48 +00:00
|
|
|
* ```c
|
2012-08-09 15:55:41 +00:00
|
|
|
* ClutterActorBox box = CLUTTER_ACTOR_BOX_INIT_ZERO;
|
2022-05-25 16:41:48 +00:00
|
|
|
* ```
|
2012-08-09 15:55:41 +00:00
|
|
|
*/
|
|
|
|
#define CLUTTER_ACTOR_BOX_INIT_ZERO CLUTTER_ACTOR_BOX_INIT (0.f, 0.f, 0.f, 0.f)
|
|
|
|
|
2020-06-06 10:55:07 +00:00
|
|
|
/**
|
|
|
|
* CLUTTER_ACTOR_BOX_UNINITIALIZED:
|
|
|
|
*
|
|
|
|
* A simple macro for creating a #ClutterActorBox with a size of -1 when
|
|
|
|
* declaring it, e.g.:
|
|
|
|
*
|
2022-05-25 16:41:48 +00:00
|
|
|
* ```c
|
2020-06-06 10:55:07 +00:00
|
|
|
* ClutterActorBox box = CLUTTER_ACTOR_BOX_UNINITIALIZED;
|
2022-05-25 16:41:48 +00:00
|
|
|
* ```
|
2020-06-06 10:55:07 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#define CLUTTER_ACTOR_BOX_UNINITIALIZED { .x1 = INFINITY, .y1 = INFINITY, .x2 = -INFINITY, .y2 = -INFINITY }
|
|
|
|
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 11:47:19 +00:00
|
|
|
GType clutter_actor_box_get_type (void) G_GNUC_CONST;
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 11:47:19 +00:00
|
|
|
ClutterActorBox *clutter_actor_box_new (gfloat x_1,
|
|
|
|
gfloat y_1,
|
|
|
|
gfloat x_2,
|
|
|
|
gfloat y_2);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2012-04-18 16:31:28 +00:00
|
|
|
ClutterActorBox *clutter_actor_box_alloc (void);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2012-04-18 16:31:28 +00:00
|
|
|
ClutterActorBox *clutter_actor_box_init (ClutterActorBox *box,
|
2012-03-17 15:27:26 +00:00
|
|
|
gfloat x_1,
|
|
|
|
gfloat y_1,
|
|
|
|
gfloat x_2,
|
|
|
|
gfloat y_2);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2012-03-17 15:27:26 +00:00
|
|
|
void clutter_actor_box_init_rect (ClutterActorBox *box,
|
|
|
|
gfloat x,
|
|
|
|
gfloat y,
|
|
|
|
gfloat width,
|
|
|
|
gfloat height);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 11:47:19 +00:00
|
|
|
ClutterActorBox *clutter_actor_box_copy (const ClutterActorBox *box);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 11:47:19 +00:00
|
|
|
void clutter_actor_box_free (ClutterActorBox *box);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 11:47:19 +00:00
|
|
|
gboolean clutter_actor_box_equal (const ClutterActorBox *box_a,
|
|
|
|
const ClutterActorBox *box_b);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 15:30:41 +00:00
|
|
|
gfloat clutter_actor_box_get_x (const ClutterActorBox *box);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 15:30:41 +00:00
|
|
|
gfloat clutter_actor_box_get_y (const ClutterActorBox *box);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 15:30:41 +00:00
|
|
|
gfloat clutter_actor_box_get_width (const ClutterActorBox *box);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 15:30:41 +00:00
|
|
|
gfloat clutter_actor_box_get_height (const ClutterActorBox *box);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 11:47:19 +00:00
|
|
|
void clutter_actor_box_get_origin (const ClutterActorBox *box,
|
|
|
|
gfloat *x,
|
|
|
|
gfloat *y);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 11:47:19 +00:00
|
|
|
void clutter_actor_box_get_size (const ClutterActorBox *box,
|
|
|
|
gfloat *width,
|
|
|
|
gfloat *height);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 11:47:19 +00:00
|
|
|
gfloat clutter_actor_box_get_area (const ClutterActorBox *box);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-06-16 11:47:19 +00:00
|
|
|
gboolean clutter_actor_box_contains (const ClutterActorBox *box,
|
|
|
|
gfloat x,
|
|
|
|
gfloat y);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2019-02-20 13:18:48 +00:00
|
|
|
void clutter_actor_box_from_vertices (ClutterActorBox *box,
|
|
|
|
const graphene_point3d_t verts[]);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-12-11 23:48:58 +00:00
|
|
|
void clutter_actor_box_interpolate (const ClutterActorBox *initial,
|
|
|
|
const ClutterActorBox *final,
|
|
|
|
gdouble progress,
|
|
|
|
ClutterActorBox *result);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2009-12-11 23:48:58 +00:00
|
|
|
void clutter_actor_box_clamp_to_pixel (ClutterActorBox *box);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-10-04 10:27:16 +00:00
|
|
|
void clutter_actor_box_union (const ClutterActorBox *a,
|
|
|
|
const ClutterActorBox *b,
|
2010-08-19 14:38:15 +00:00
|
|
|
ClutterActorBox *result);
|
2009-06-16 11:47:19 +00:00
|
|
|
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-10-25 14:45:35 +00:00
|
|
|
void clutter_actor_box_set_origin (ClutterActorBox *box,
|
|
|
|
gfloat x,
|
|
|
|
gfloat y);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-10-25 14:45:35 +00:00
|
|
|
void clutter_actor_box_set_size (ClutterActorBox *box,
|
|
|
|
gfloat width,
|
|
|
|
gfloat height);
|
|
|
|
|
2017-09-01 01:18:52 +00:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_actor_box_scale (ClutterActorBox *box,
|
|
|
|
gfloat scale);
|
|
|
|
|
2020-06-06 10:55:07 +00:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
gboolean clutter_actor_box_is_initialized (ClutterActorBox *box);
|
|
|
|
|
2023-11-11 10:35:34 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActorBox, clutter_actor_box_free)
|
|
|
|
|
2012-06-22 11:12:33 +00:00
|
|
|
/*
|
|
|
|
* ClutterPaintVolume
|
|
|
|
*/
|
|
|
|
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-08-16 14:53:28 +00:00
|
|
|
GType clutter_paint_volume_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
ClutterPaintVolume *clutter_paint_volume_copy (const ClutterPaintVolume *pv);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
void clutter_paint_volume_free (ClutterPaintVolume *pv);
|
|
|
|
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
void clutter_paint_volume_set_origin (ClutterPaintVolume *pv,
|
2019-02-20 13:18:48 +00:00
|
|
|
const graphene_point3d_t *origin);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
void clutter_paint_volume_get_origin (const ClutterPaintVolume *pv,
|
2019-02-20 13:18:48 +00:00
|
|
|
graphene_point3d_t *vertex);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
void clutter_paint_volume_set_width (ClutterPaintVolume *pv,
|
|
|
|
gfloat width);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
gfloat clutter_paint_volume_get_width (const ClutterPaintVolume *pv);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
void clutter_paint_volume_set_height (ClutterPaintVolume *pv,
|
|
|
|
gfloat height);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
gfloat clutter_paint_volume_get_height (const ClutterPaintVolume *pv);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
void clutter_paint_volume_set_depth (ClutterPaintVolume *pv,
|
|
|
|
gfloat depth);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
gfloat clutter_paint_volume_get_depth (const ClutterPaintVolume *pv);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
void clutter_paint_volume_union (ClutterPaintVolume *pv,
|
|
|
|
const ClutterPaintVolume *another_pv);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2012-02-13 22:40:19 +00:00
|
|
|
void clutter_paint_volume_union_box (ClutterPaintVolume *pv,
|
|
|
|
const ClutterActorBox *box);
|
2010-09-09 12:11:11 +00:00
|
|
|
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2010-09-09 12:11:11 +00:00
|
|
|
gboolean clutter_paint_volume_set_from_allocation (ClutterPaintVolume *pv,
|
|
|
|
ClutterActor *actor);
|
2010-08-16 14:53:28 +00:00
|
|
|
|
2023-11-11 10:35:34 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintVolume, clutter_paint_volume_free)
|
|
|
|
|
2011-11-25 10:27:01 +00: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.
|
|
|
|
*/
|
2011-11-21 17:45:32 +00:00
|
|
|
struct _ClutterMargin
|
|
|
|
{
|
|
|
|
float left;
|
|
|
|
float right;
|
|
|
|
float top;
|
|
|
|
float bottom;
|
|
|
|
};
|
|
|
|
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2011-11-21 17:45:32 +00:00
|
|
|
GType clutter_margin_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2011-11-21 17:45:32 +00:00
|
|
|
ClutterMargin * clutter_margin_new (void) G_GNUC_MALLOC;
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2011-11-28 15:30:52 +00:00
|
|
|
ClutterMargin * clutter_margin_copy (const ClutterMargin *margin_);
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2011-11-28 15:30:52 +00:00
|
|
|
void clutter_margin_free (ClutterMargin *margin_);
|
2011-11-21 17:45:32 +00:00
|
|
|
|
2023-11-11 10:35:34 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMargin, clutter_margin_free)
|
|
|
|
|
2012-03-15 11:02:30 +00:00
|
|
|
/**
|
|
|
|
* ClutterProgressFunc:
|
|
|
|
* @a: the initial value of an interval
|
|
|
|
* @b: the final value of an interval
|
|
|
|
* @progress: the progress factor, between 0 and 1
|
|
|
|
* @retval: the value used to store the progress
|
|
|
|
*
|
|
|
|
* Prototype of the progress function used to compute the value
|
|
|
|
* between the two ends @a and @b of an interval depending on
|
|
|
|
* the value of @progress.
|
|
|
|
*
|
|
|
|
* The #GValue in @retval is already initialized with the same
|
|
|
|
* type as @a and @b.
|
|
|
|
*
|
|
|
|
* This function will be called by #ClutterInterval if the
|
|
|
|
* type of the values of the interval was registered using
|
2024-01-04 13:40:48 +00:00
|
|
|
* [func@Clutter.Interval.register_progress_func].
|
2012-03-15 11:02:30 +00:00
|
|
|
*
|
|
|
|
* Return value: %TRUE if the function successfully computed
|
|
|
|
* the value and stored it inside @retval
|
|
|
|
*/
|
|
|
|
typedef gboolean (* ClutterProgressFunc) (const GValue *a,
|
|
|
|
const GValue *b,
|
|
|
|
gdouble progress,
|
|
|
|
GValue *retval);
|
|
|
|
|
2018-05-22 21:01:54 +00:00
|
|
|
CLUTTER_EXPORT
|
2012-03-30 12:56:18 +00:00
|
|
|
void clutter_interval_register_progress_func (GType value_type,
|
|
|
|
ClutterProgressFunc func);
|
|
|
|
|
2007-07-26 13:13:23 +00:00
|
|
|
G_END_DECLS
|