2006-06-13 09:17:45 -04:00
|
|
|
/*
|
|
|
|
* Clutter.
|
|
|
|
*
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
*
|
|
|
|
* Authored By Matthew Allum <mallum@openedhand.com>
|
|
|
|
*
|
2010-03-01 07:56:10 -05:00
|
|
|
* Copyright (C) 2006, 2007, 2008 OpenedHand Ltd
|
|
|
|
* Copyright (C) 2009, 2010 Intel Corp
|
2006-06-13 09:17:45 -04:00
|
|
|
*
|
|
|
|
* 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/>.
|
2006-06-13 09:17:45 -04:00
|
|
|
*/
|
|
|
|
|
2023-07-21 09:37:20 -04:00
|
|
|
#pragma once
|
2015-07-07 10:51:13 -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
|
|
|
|
|
2006-06-13 09:17:45 -04:00
|
|
|
/* clutter-actor.h */
|
|
|
|
|
2015-06-29 15:22:56 -04:00
|
|
|
#include <gio/gio.h>
|
2008-12-23 09:06:55 -05:00
|
|
|
#include <pango/pango.h>
|
2010-04-12 14:10:24 -04:00
|
|
|
#include <atk/atk.h>
|
2008-12-23 09:06:55 -05:00
|
|
|
|
2023-08-07 09:38:12 -04:00
|
|
|
#include "cogl/cogl.h"
|
2010-04-08 05:55:15 -04:00
|
|
|
|
2023-08-07 09:38:12 -04:00
|
|
|
#include "clutter/clutter-types.h"
|
|
|
|
#include "clutter/clutter-event.h"
|
|
|
|
#include "clutter/clutter-paint-context.h"
|
|
|
|
#include "clutter/clutter-pick-context.h"
|
2023-07-19 10:31:26 -04:00
|
|
|
#include "mtk/mtk.h"
|
2006-08-29 15:09:43 -04:00
|
|
|
|
2006-06-13 09:17:45 -04:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2009-06-16 07:47:19 -04:00
|
|
|
#define CLUTTER_TYPE_ACTOR (clutter_actor_get_type ())
|
|
|
|
#define CLUTTER_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_ACTOR, ClutterActor))
|
|
|
|
#define CLUTTER_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_ACTOR, ClutterActorClass))
|
|
|
|
#define CLUTTER_IS_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_ACTOR))
|
|
|
|
#define CLUTTER_IS_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_ACTOR))
|
|
|
|
#define CLUTTER_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_ACTOR, ClutterActorClass))
|
2006-06-13 09:17:45 -04:00
|
|
|
|
|
|
|
typedef struct _ClutterActorClass ClutterActorClass;
|
|
|
|
typedef struct _ClutterActorPrivate ClutterActorPrivate;
|
|
|
|
|
2007-08-07 10:03:08 -04:00
|
|
|
/**
|
|
|
|
* ClutterCallback:
|
|
|
|
* @actor: a #ClutterActor
|
2011-07-27 03:14:10 -04:00
|
|
|
* @data: (closure): user data
|
2007-08-07 10:03:08 -04:00
|
|
|
*
|
|
|
|
* Generic callback
|
|
|
|
*/
|
2009-05-05 10:37:41 -04:00
|
|
|
typedef void (*ClutterCallback) (ClutterActor *actor,
|
|
|
|
gpointer data);
|
2008-02-15 09:39:25 -05:00
|
|
|
|
|
|
|
/**
|
2012-04-30 12:12:12 -04:00
|
|
|
* CLUTTER_CALLBACK:
|
2008-02-15 09:39:25 -05:00
|
|
|
* @f: a function
|
|
|
|
*
|
|
|
|
* Convenience macro to cast a function to #ClutterCallback
|
|
|
|
*/
|
2008-02-04 06:45:12 -05:00
|
|
|
#define CLUTTER_CALLBACK(f) ((ClutterCallback) (f))
|
2006-06-13 09:17:45 -04:00
|
|
|
|
2022-05-25 12:41:48 -04:00
|
|
|
|
2006-06-13 09:17:45 -04:00
|
|
|
struct _ClutterActor
|
|
|
|
{
|
2007-07-01 12:44:24 -04:00
|
|
|
/*< private >*/
|
2007-07-28 13:11:39 -04:00
|
|
|
GInitiallyUnowned parent_instance;
|
2007-11-28 07:23:31 -05:00
|
|
|
|
2007-07-01 12:44:24 -04:00
|
|
|
/*< public >*/
|
2006-07-06 Emmanuele Bassi <ebassi@openedhand.com>
Big rework of the actor management semantics: now ClutterActor
objects behave like GtkObjects - that is they have an initial
"floating" reference that gets "sunk" when they are added to
a ClutterGroup. This makes a group responsible of de-allocating
each actor inside it, so you just have to destroy the group to
get every child actor destroyed. Also, now you can do:
clutter_group_add (group, clutter_video_texture_new ());
without having to care about reference counting and explicit
unreffing.
* clutter/clutter-private.h: Add private flags setter and
getter macros.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c: Clean up; inherit from GInitiallyUnowned;
add a "visible" property; add the "destroy", "show" and "hide"
signals to ClutterActorClass.
(clutter_actor_show), (clutter_actor_hide): Refactor a bit; emit
the "show" and "hide" signals.
(clutter_actor_set_property), (clutter_actor_get_property),
(clutter_actor_class_init): Implement the "visible" property; add
signals.
(clutter_actor_finalize): Do not leak the actor's name, if it is
set.
(clutter_actor_dispose): Emit the "destroy" signal here.
(clutter_actor_init): Sink the initial floating flag if needed.
(clutter_actor_destroy): Add a function to explicitely destroy
a ClutterActor.
(clutter_actor_set_parent), (clutter_actor_get_parent),
(clutter_actor_unparent): Make set_parent require a valid parent;
add unparent; check on get_parent; ref_sink the actor when
setting its parent and unref it when unsetting it. Probably we'll
need a function that does reparenting as unparent+set_parent in
a single shot.
* clutter/clutter-group.h:
* clutter/clutter-group.c (clutter_group_dispose),
(clutter_group_finalize), (clutter_group_add),
(clutter_group_remove): Make the group destroy its children when
disposing it; clean up, and use the newly-available
clutter_actor_unparent().
* clutter/clutter-stage.h:
* clutter/clutter-stage.c (clutter_stage_init): ClutterStage is
a top-level actor; clean up.
* clutter/clutter-video-texture.h:
* clutter/clutter-video-texture.c: Clean up.
* examples/super-oh.c:
* examples/test.c:
* examples/video-player.c:
* examples/test-text.c:
* examples/video-cube.c: Remove the g_object_unref() call, as the
ClutterStage object is destroyed on clutter_main_quit().
2006-07-06 13:52:57 -04:00
|
|
|
guint32 flags;
|
2006-06-13 09:17:45 -04:00
|
|
|
|
|
|
|
/*< private >*/
|
2006-07-06 Emmanuele Bassi <ebassi@openedhand.com>
Big rework of the actor management semantics: now ClutterActor
objects behave like GtkObjects - that is they have an initial
"floating" reference that gets "sunk" when they are added to
a ClutterGroup. This makes a group responsible of de-allocating
each actor inside it, so you just have to destroy the group to
get every child actor destroyed. Also, now you can do:
clutter_group_add (group, clutter_video_texture_new ());
without having to care about reference counting and explicit
unreffing.
* clutter/clutter-private.h: Add private flags setter and
getter macros.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c: Clean up; inherit from GInitiallyUnowned;
add a "visible" property; add the "destroy", "show" and "hide"
signals to ClutterActorClass.
(clutter_actor_show), (clutter_actor_hide): Refactor a bit; emit
the "show" and "hide" signals.
(clutter_actor_set_property), (clutter_actor_get_property),
(clutter_actor_class_init): Implement the "visible" property; add
signals.
(clutter_actor_finalize): Do not leak the actor's name, if it is
set.
(clutter_actor_dispose): Emit the "destroy" signal here.
(clutter_actor_init): Sink the initial floating flag if needed.
(clutter_actor_destroy): Add a function to explicitely destroy
a ClutterActor.
(clutter_actor_set_parent), (clutter_actor_get_parent),
(clutter_actor_unparent): Make set_parent require a valid parent;
add unparent; check on get_parent; ref_sink the actor when
setting its parent and unref it when unsetting it. Probably we'll
need a function that does reparenting as unparent+set_parent in
a single shot.
* clutter/clutter-group.h:
* clutter/clutter-group.c (clutter_group_dispose),
(clutter_group_finalize), (clutter_group_add),
(clutter_group_remove): Make the group destroy its children when
disposing it; clean up, and use the newly-available
clutter_actor_unparent().
* clutter/clutter-stage.h:
* clutter/clutter-stage.c (clutter_stage_init): ClutterStage is
a top-level actor; clean up.
* clutter/clutter-video-texture.h:
* clutter/clutter-video-texture.c: Clean up.
* examples/super-oh.c:
* examples/test.c:
* examples/video-player.c:
* examples/test-text.c:
* examples/video-cube.c: Remove the g_object_unref() call, as the
ClutterStage object is destroyed on clutter_main_quit().
2006-07-06 13:52:57 -04:00
|
|
|
guint32 private_flags;
|
2007-11-28 07:23:31 -05:00
|
|
|
|
2006-07-06 Emmanuele Bassi <ebassi@openedhand.com>
Big rework of the actor management semantics: now ClutterActor
objects behave like GtkObjects - that is they have an initial
"floating" reference that gets "sunk" when they are added to
a ClutterGroup. This makes a group responsible of de-allocating
each actor inside it, so you just have to destroy the group to
get every child actor destroyed. Also, now you can do:
clutter_group_add (group, clutter_video_texture_new ());
without having to care about reference counting and explicit
unreffing.
* clutter/clutter-private.h: Add private flags setter and
getter macros.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c: Clean up; inherit from GInitiallyUnowned;
add a "visible" property; add the "destroy", "show" and "hide"
signals to ClutterActorClass.
(clutter_actor_show), (clutter_actor_hide): Refactor a bit; emit
the "show" and "hide" signals.
(clutter_actor_set_property), (clutter_actor_get_property),
(clutter_actor_class_init): Implement the "visible" property; add
signals.
(clutter_actor_finalize): Do not leak the actor's name, if it is
set.
(clutter_actor_dispose): Emit the "destroy" signal here.
(clutter_actor_init): Sink the initial floating flag if needed.
(clutter_actor_destroy): Add a function to explicitely destroy
a ClutterActor.
(clutter_actor_set_parent), (clutter_actor_get_parent),
(clutter_actor_unparent): Make set_parent require a valid parent;
add unparent; check on get_parent; ref_sink the actor when
setting its parent and unref it when unsetting it. Probably we'll
need a function that does reparenting as unparent+set_parent in
a single shot.
* clutter/clutter-group.h:
* clutter/clutter-group.c (clutter_group_dispose),
(clutter_group_finalize), (clutter_group_add),
(clutter_group_remove): Make the group destroy its children when
disposing it; clean up, and use the newly-available
clutter_actor_unparent().
* clutter/clutter-stage.h:
* clutter/clutter-stage.c (clutter_stage_init): ClutterStage is
a top-level actor; clean up.
* clutter/clutter-video-texture.h:
* clutter/clutter-video-texture.c: Clean up.
* examples/super-oh.c:
* examples/test.c:
* examples/video-player.c:
* examples/test-text.c:
* examples/video-cube.c: Remove the g_object_unref() call, as the
ClutterStage object is destroyed on clutter_main_quit().
2006-07-06 13:52:57 -04:00
|
|
|
ClutterActorPrivate *priv;
|
2006-06-13 09:17:45 -04:00
|
|
|
};
|
|
|
|
|
2007-08-07 10:03:08 -04:00
|
|
|
/**
|
|
|
|
* ClutterActorClass:
|
2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
2008-06-10 13:07:52 -04:00
|
|
|
* @show: signal class handler for #ClutterActor::show; it must chain
|
2008-01-18 06:25:47 -05:00
|
|
|
* up to the parent's implementation
|
2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
2008-06-10 13:07:52 -04:00
|
|
|
* @hide: signal class handler for #ClutterActor::hide; it must chain
|
2008-01-18 06:25:47 -05:00
|
|
|
* up to the parent's implementation
|
2007-08-07 10:03:08 -04:00
|
|
|
* @hide_all: virtual function for containers and composite actors, to
|
|
|
|
* determine which children should be shown when calling
|
|
|
|
* clutter_actor_hide_all() on the actor. Defaults to calling
|
2012-01-17 11:11:29 -05:00
|
|
|
* clutter_actor_hide(). This virtual function is deprecated and it
|
|
|
|
* should not be overridden.
|
2007-08-07 10:03:08 -04:00
|
|
|
* @realize: virtual function, used to allocate resources for the actor;
|
2013-07-04 16:53:38 -04:00
|
|
|
* it should chain up to the parent's implementation. This virtual
|
|
|
|
* function is deprecated and should not be overridden in newly
|
|
|
|
* written code.
|
2007-08-07 10:03:08 -04:00
|
|
|
* @unrealize: virtual function, used to deallocate resources allocated
|
2013-07-04 16:53:38 -04:00
|
|
|
* in ::realize; it should chain up to the parent's implementation. This
|
|
|
|
* function is deprecated and should not be overridden in newly
|
|
|
|
* written code.
|
2009-05-28 12:18:13 -04:00
|
|
|
* @map: virtual function for containers and composite actors, to
|
2010-11-24 11:34:21 -05:00
|
|
|
* map their children; it must chain up to the parent's implementation.
|
|
|
|
* Overriding this function is optional.
|
2009-05-28 12:18:13 -04:00
|
|
|
* @unmap: virtual function for containers and composite actors, to
|
2010-11-24 11:34:21 -05:00
|
|
|
* unmap their children; it must chain up to the parent's implementation.
|
|
|
|
* Overriding this function is optional.
|
2007-08-07 10:03:08 -04:00
|
|
|
* @paint: virtual function, used to paint the actor
|
2008-06-12 07:43:25 -04:00
|
|
|
* @get_preferred_width: virtual function, used when querying the minimum
|
|
|
|
* and natural widths of an actor for a given height; it is used by
|
|
|
|
* clutter_actor_get_preferred_width()
|
|
|
|
* @get_preferred_height: virtual function, used when querying the minimum
|
|
|
|
* and natural heights of an actor for a given width; it is used by
|
|
|
|
* clutter_actor_get_preferred_height()
|
2020-05-09 12:35:15 -04:00
|
|
|
* @allocate: virtual function, used when setting the coordinates of an
|
|
|
|
* actor; it is used by clutter_actor_allocate(); when overriding this
|
|
|
|
* function without chaining up, clutter_actor_set_allocation() must be
|
|
|
|
* called and children must be allocated by the implementation, when
|
|
|
|
* chaining up though, those things will be done by the parent's
|
|
|
|
* implementation.
|
[actor] Allow changing the transformations matrix
Currently, the transformation matrix for an actor is constructed
from scenegraph-related accessors. An actor, though, can call COGL
API to add new transformations inside the paint() implementation,
for instance:
static void
my_foo_paint (ClutterActor *a)
{
...
cogl_translate (-scroll_x, -scroll_y, 0);
...
}
Unfortunately these transformations will be completely ignored by
the scenegraph machinery; for instance, getting the actor-relative
coordinates from event coordinates is going to break badly because
of this.
In order to make the scenegraph aware of the potential of additional
transformations, we need a ::apply_transform() virtual function. This
vfunc will pass a CoglMatrix which can be used to apply additional
operations:
static void
my_foo_apply_transform (ClutterActor *a, CoglMatrix *m)
{
CLUTTER_ACTOR_CLASS (my_foo_parent_class)->apply_transform (a, m);
...
cogl_matrix_translate (m, -scroll_x, -scroll_y, 0);
...
}
The ::paint() implementation will be called with the actor already
using the newly applied transformation matrix, as expected:
static void
my_foo_paint (ClutterActor *a)
{
...
}
The ::apply_transform() implementations *must* chain up, so that the
various transformations of each class are preserved. The default
implementation inside ClutterActor applies all the transformations
defined by the scenegraph-related accessors.
Actors performing transformations inside the paint() function will
continue to work as previously.
2009-07-01 08:59:13 -04:00
|
|
|
* @apply_transform: virtual function, used when applying the transformations
|
|
|
|
* to an actor before painting it or when transforming coordinates or
|
2020-03-12 07:13:53 -04:00
|
|
|
* the allocation; if the transformation calculated by this function may
|
|
|
|
* have changed, the cached transformation must be invalidated by calling
|
|
|
|
* clutter_actor_invalidate_transform(); it must chain up to the parent's
|
|
|
|
* implementation
|
2008-06-12 07:43:25 -04:00
|
|
|
* @parent_set: signal class handler for the #ClutterActor::parent-set
|
2013-07-04 16:53:38 -04:00
|
|
|
* @destroy: signal class handler for #ClutterActor::destroy. It must
|
|
|
|
* chain up to the parent's implementation
|
2008-02-15 09:39:25 -05:00
|
|
|
* @pick: virtual function, used to draw an outline of the actor with
|
2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
2008-06-10 13:07:52 -04:00
|
|
|
* the given color
|
2008-06-12 07:43:25 -04:00
|
|
|
* @event: class handler for #ClutterActor::event
|
|
|
|
* @button_press_event: class handler for #ClutterActor::button-press-event
|
|
|
|
* @button_release_event: class handler for
|
2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
2008-06-10 13:07:52 -04:00
|
|
|
* #ClutterActor::button-release-event
|
|
|
|
* @scroll_event: signal class closure for #ClutterActor::scroll-event
|
|
|
|
* @key_press_event: signal class closure for #ClutterActor::key-press-event
|
2008-01-18 06:25:47 -05:00
|
|
|
* @key_release_event: signal class closure for
|
2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
2008-06-10 13:07:52 -04:00
|
|
|
* #ClutterActor::key-release-event
|
|
|
|
* @motion_event: signal class closure for #ClutterActor::motion-event
|
|
|
|
* @enter_event: signal class closure for #ClutterActor::enter-event
|
|
|
|
* @leave_event: signal class closure for #ClutterActor::leave-event
|
|
|
|
* @captured_event: signal class closure for #ClutterActor::captured-event
|
2010-08-17 09:54:20 -04:00
|
|
|
* @key_focus_in: signal class closure for #ClutterActor::key-focus-in
|
|
|
|
* @key_focus_out: signal class closure for #ClutterActor::key-focus-out
|
2009-08-07 21:16:04 -04:00
|
|
|
* @queue_relayout: class handler for #ClutterActor::queue-relayout
|
2010-10-04 06:26:46 -04:00
|
|
|
* @get_accessible: virtual function, returns the accessible object that
|
|
|
|
* describes the actor to an assistive technology.
|
|
|
|
* @get_paint_volume: virtual function, for sub-classes to define their
|
|
|
|
* #ClutterPaintVolume
|
2011-03-14 12:30:53 -04:00
|
|
|
* @has_overlaps: virtual function for
|
|
|
|
* sub-classes to advertise whether they need an offscreen redirect
|
|
|
|
* to get the correct opacity. See
|
|
|
|
* clutter_actor_set_offscreen_redirect() for details.
|
2012-03-16 08:01:28 -04:00
|
|
|
* @paint_node: virtual function for creating paint nodes and attaching
|
|
|
|
* them to the render tree
|
2012-06-25 18:47:12 -04:00
|
|
|
* @touch_event: signal class closure for #ClutterActor::touch-event
|
2007-08-07 10:03:08 -04:00
|
|
|
*
|
|
|
|
* Base class for actors.
|
|
|
|
*/
|
2006-06-13 09:17:45 -04:00
|
|
|
struct _ClutterActorClass
|
|
|
|
{
|
2007-08-07 10:03:08 -04:00
|
|
|
/*< private >*/
|
2007-07-28 13:11:39 -04:00
|
|
|
GInitiallyUnownedClass parent_class;
|
2006-06-13 09:17:45 -04:00
|
|
|
|
2007-08-07 10:03:08 -04:00
|
|
|
/*< public >*/
|
2010-12-09 07:36:50 -05:00
|
|
|
void (* show) (ClutterActor *self);
|
|
|
|
void (* hide) (ClutterActor *self);
|
|
|
|
void (* hide_all) (ClutterActor *self);
|
|
|
|
void (* realize) (ClutterActor *self);
|
|
|
|
void (* unrealize) (ClutterActor *self);
|
|
|
|
void (* map) (ClutterActor *self);
|
|
|
|
void (* unmap) (ClutterActor *self);
|
2019-11-13 16:21:58 -05:00
|
|
|
void (* paint) (ClutterActor *self,
|
|
|
|
ClutterPaintContext *paint_context);
|
2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
2008-06-10 13:07:52 -04:00
|
|
|
void (* parent_set) (ClutterActor *actor,
|
|
|
|
ClutterActor *old_parent);
|
|
|
|
|
2011-02-08 10:30:48 -05:00
|
|
|
void (* destroy) (ClutterActor *self);
|
2019-11-20 15:46:41 -05:00
|
|
|
void (* pick) (ClutterActor *actor,
|
|
|
|
ClutterPickContext *pick_context);
|
2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
2008-06-10 13:07:52 -04:00
|
|
|
|
|
|
|
/* size negotiation */
|
2010-12-09 07:36:50 -05:00
|
|
|
void (* get_preferred_width) (ClutterActor *self,
|
2009-06-03 09:02:06 -04:00
|
|
|
gfloat for_height,
|
|
|
|
gfloat *min_width_p,
|
|
|
|
gfloat *natural_width_p);
|
2010-12-09 07:36:50 -05:00
|
|
|
void (* get_preferred_height) (ClutterActor *self,
|
2009-06-03 09:02:06 -04:00
|
|
|
gfloat for_width,
|
|
|
|
gfloat *min_height_p,
|
|
|
|
gfloat *natural_height_p);
|
2010-12-09 07:36:50 -05:00
|
|
|
void (* allocate) (ClutterActor *self,
|
2020-05-09 15:09:43 -04:00
|
|
|
const ClutterActorBox *box);
|
[actor] Allow changing the transformations matrix
Currently, the transformation matrix for an actor is constructed
from scenegraph-related accessors. An actor, though, can call COGL
API to add new transformations inside the paint() implementation,
for instance:
static void
my_foo_paint (ClutterActor *a)
{
...
cogl_translate (-scroll_x, -scroll_y, 0);
...
}
Unfortunately these transformations will be completely ignored by
the scenegraph machinery; for instance, getting the actor-relative
coordinates from event coordinates is going to break badly because
of this.
In order to make the scenegraph aware of the potential of additional
transformations, we need a ::apply_transform() virtual function. This
vfunc will pass a CoglMatrix which can be used to apply additional
operations:
static void
my_foo_apply_transform (ClutterActor *a, CoglMatrix *m)
{
CLUTTER_ACTOR_CLASS (my_foo_parent_class)->apply_transform (a, m);
...
cogl_matrix_translate (m, -scroll_x, -scroll_y, 0);
...
}
The ::paint() implementation will be called with the actor already
using the newly applied transformation matrix, as expected:
static void
my_foo_paint (ClutterActor *a)
{
...
}
The ::apply_transform() implementations *must* chain up, so that the
various transformations of each class are preserved. The default
implementation inside ClutterActor applies all the transformations
defined by the scenegraph-related accessors.
Actors performing transformations inside the paint() function will
continue to work as previously.
2009-07-01 08:59:13 -04:00
|
|
|
|
|
|
|
/* transformations */
|
|
|
|
void (* apply_transform) (ClutterActor *actor,
|
2020-09-11 14:57:28 -04:00
|
|
|
graphene_matrix_t *matrix);
|
[actor] Allow changing the transformations matrix
Currently, the transformation matrix for an actor is constructed
from scenegraph-related accessors. An actor, though, can call COGL
API to add new transformations inside the paint() implementation,
for instance:
static void
my_foo_paint (ClutterActor *a)
{
...
cogl_translate (-scroll_x, -scroll_y, 0);
...
}
Unfortunately these transformations will be completely ignored by
the scenegraph machinery; for instance, getting the actor-relative
coordinates from event coordinates is going to break badly because
of this.
In order to make the scenegraph aware of the potential of additional
transformations, we need a ::apply_transform() virtual function. This
vfunc will pass a CoglMatrix which can be used to apply additional
operations:
static void
my_foo_apply_transform (ClutterActor *a, CoglMatrix *m)
{
CLUTTER_ACTOR_CLASS (my_foo_parent_class)->apply_transform (a, m);
...
cogl_matrix_translate (m, -scroll_x, -scroll_y, 0);
...
}
The ::paint() implementation will be called with the actor already
using the newly applied transformation matrix, as expected:
static void
my_foo_paint (ClutterActor *a)
{
...
}
The ::apply_transform() implementations *must* chain up, so that the
various transformations of each class are preserved. The default
implementation inside ClutterActor applies all the transformations
defined by the scenegraph-related accessors.
Actors performing transformations inside the paint() function will
continue to work as previously.
2009-07-01 08:59:13 -04:00
|
|
|
|
2007-08-13 16:48:01 -04:00
|
|
|
/* event signals */
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* event) (ClutterActor *actor,
|
2008-02-04 06:45:12 -05:00
|
|
|
ClutterEvent *event);
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* button_press_event) (ClutterActor *actor,
|
2023-08-08 18:23:28 -04:00
|
|
|
ClutterEvent *event);
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* button_release_event) (ClutterActor *actor,
|
2023-08-08 18:23:28 -04:00
|
|
|
ClutterEvent *event);
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* scroll_event) (ClutterActor *actor,
|
2023-08-08 18:23:28 -04:00
|
|
|
ClutterEvent *event);
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* key_press_event) (ClutterActor *actor,
|
2023-08-08 18:23:28 -04:00
|
|
|
ClutterEvent *event);
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* key_release_event) (ClutterActor *actor,
|
2023-08-08 18:23:28 -04:00
|
|
|
ClutterEvent *event);
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* motion_event) (ClutterActor *actor,
|
2023-08-08 18:23:28 -04:00
|
|
|
ClutterEvent *event);
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* enter_event) (ClutterActor *actor,
|
2023-08-08 18:23:28 -04:00
|
|
|
ClutterEvent *event);
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* leave_event) (ClutterActor *actor,
|
2023-08-08 18:23:28 -04:00
|
|
|
ClutterEvent *event);
|
2007-11-07 11:40:30 -05:00
|
|
|
gboolean (* captured_event) (ClutterActor *actor,
|
2008-02-04 06:45:12 -05:00
|
|
|
ClutterEvent *event);
|
2009-05-06 12:56:40 -04:00
|
|
|
void (* key_focus_in) (ClutterActor *actor);
|
|
|
|
void (* key_focus_out) (ClutterActor *actor);
|
2007-08-13 16:48:01 -04:00
|
|
|
|
2011-02-08 10:30:48 -05:00
|
|
|
void (* queue_relayout) (ClutterActor *self);
|
2009-08-07 21:16:04 -04:00
|
|
|
|
2010-05-25 07:54:59 -04:00
|
|
|
/* accessibility support */
|
2010-12-09 07:36:50 -05:00
|
|
|
AtkObject * (* get_accessible) (ClutterActor *self);
|
2010-05-25 07:54:59 -04:00
|
|
|
|
2012-02-01 12:47:15 -05:00
|
|
|
gboolean (* get_paint_volume) (ClutterActor *actor,
|
2010-08-16 10:53:28 -04:00
|
|
|
ClutterPaintVolume *volume);
|
|
|
|
|
2011-03-14 12:30:53 -04:00
|
|
|
gboolean (* has_overlaps) (ClutterActor *self);
|
|
|
|
|
2012-02-01 12:47:15 -05:00
|
|
|
void (* paint_node) (ClutterActor *self,
|
|
|
|
ClutterPaintNode *root);
|
|
|
|
|
2012-06-13 06:10:55 -04:00
|
|
|
gboolean (* touch_event) (ClutterActor *self,
|
2023-08-08 18:23:28 -04:00
|
|
|
ClutterEvent *event);
|
2020-02-24 17:36:27 -05:00
|
|
|
gboolean (* has_accessible) (ClutterActor *self);
|
2020-04-10 08:16:53 -04:00
|
|
|
void (* resource_scale_changed) (ClutterActor *self);
|
2020-04-10 08:54:11 -04:00
|
|
|
float (* calculate_resource_scale) (ClutterActor *self,
|
|
|
|
int phase);
|
2023-11-07 03:54:00 -05:00
|
|
|
|
2023-11-14 04:47:18 -05:00
|
|
|
void (* child_added) (ClutterActor *self,
|
2023-11-07 03:54:00 -05:00
|
|
|
ClutterActor *child);
|
2023-11-14 04:47:18 -05:00
|
|
|
void (* child_removed) (ClutterActor *self,
|
2023-11-07 03:54:00 -05:00
|
|
|
ClutterActor *child);
|
2006-06-13 09:17:45 -04:00
|
|
|
};
|
|
|
|
|
2012-01-25 10:27:57 -05:00
|
|
|
/**
|
|
|
|
* ClutterActorIter:
|
|
|
|
*
|
|
|
|
* An iterator structure that allows to efficiently iterate over a
|
|
|
|
* section of the scene graph.
|
|
|
|
*
|
2014-03-18 10:14:22 -04:00
|
|
|
* The contents of the #ClutterActorIter structure
|
2012-01-25 10:27:57 -05:00
|
|
|
* are private and should only be accessed using the provided API.
|
|
|
|
*/
|
|
|
|
struct _ClutterActorIter
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
gpointer CLUTTER_PRIVATE_FIELD (dummy1);
|
|
|
|
gpointer CLUTTER_PRIVATE_FIELD (dummy2);
|
2023-05-02 18:28:29 -04:00
|
|
|
gint CLUTTER_PRIVATE_FIELD (dummy3);
|
2012-01-25 10:27:57 -05:00
|
|
|
};
|
|
|
|
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2011-12-06 11:09:53 -05:00
|
|
|
GType clutter_actor_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActor * clutter_actor_new (void);
|
|
|
|
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_flags (ClutterActor *self,
|
|
|
|
ClutterActorFlags flags);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_unset_flags (ClutterActor *self,
|
|
|
|
ClutterActorFlags flags);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActorFlags clutter_actor_get_flags (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_show (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_hide (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_realize (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_unrealize (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_map (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_unmap (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2019-11-13 16:21:58 -05:00
|
|
|
void clutter_actor_paint (ClutterActor *self,
|
|
|
|
ClutterPaintContext *paint_context);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2019-11-13 16:21:58 -05:00
|
|
|
void clutter_actor_continue_paint (ClutterActor *self,
|
|
|
|
ClutterPaintContext *paint_context);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2019-11-20 15:46:41 -05:00
|
|
|
void clutter_actor_pick (ClutterActor *actor,
|
|
|
|
ClutterPickContext *pick_context);
|
2019-10-17 11:01:25 -04:00
|
|
|
CLUTTER_EXPORT
|
2019-11-20 15:46:41 -05:00
|
|
|
void clutter_actor_continue_pick (ClutterActor *actor,
|
|
|
|
ClutterPickContext *pick_context);
|
2019-10-17 11:01:25 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_queue_redraw (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2023-07-19 10:31:26 -04:00
|
|
|
void clutter_actor_queue_redraw_with_clip (ClutterActor *self,
|
|
|
|
const MtkRectangle *clip);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_queue_relayout (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_destroy (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_name (ClutterActor *self,
|
|
|
|
const gchar *name);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
const gchar * clutter_actor_get_name (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
AtkObject * clutter_actor_get_accessible (ClutterActor *self);
|
2020-02-24 17:36:27 -05:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
gboolean clutter_actor_has_accessible (ClutterActor *self);
|
2012-02-05 03:47:17 -05:00
|
|
|
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2015-04-14 07:37:42 -04:00
|
|
|
gboolean clutter_actor_is_visible (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2015-04-14 07:37:42 -04:00
|
|
|
gboolean clutter_actor_is_mapped (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2015-04-14 07:37:42 -04:00
|
|
|
gboolean clutter_actor_is_realized (ClutterActor *self);
|
|
|
|
|
2012-02-05 03:47:17 -05:00
|
|
|
/* Size negotiation */
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_request_mode (ClutterActor *self,
|
|
|
|
ClutterRequestMode mode);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterRequestMode clutter_actor_get_request_mode (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_preferred_width (ClutterActor *self,
|
|
|
|
gfloat for_height,
|
|
|
|
gfloat *min_width_p,
|
|
|
|
gfloat *natural_width_p);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_preferred_height (ClutterActor *self,
|
|
|
|
gfloat for_width,
|
|
|
|
gfloat *min_height_p,
|
|
|
|
gfloat *natural_height_p);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_preferred_size (ClutterActor *self,
|
|
|
|
gfloat *min_width_p,
|
|
|
|
gfloat *min_height_p,
|
|
|
|
gfloat *natural_width_p,
|
|
|
|
gfloat *natural_height_p);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_allocate (ClutterActor *self,
|
2020-05-09 15:09:43 -04:00
|
|
|
const ClutterActorBox *box);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2020-06-19 07:37:12 -04:00
|
|
|
void clutter_actor_allocate_preferred_size (ClutterActor *self,
|
|
|
|
float x,
|
|
|
|
float y);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_allocate_available_size (ClutterActor *self,
|
|
|
|
gfloat x,
|
|
|
|
gfloat y,
|
|
|
|
gfloat available_width,
|
2020-05-09 15:09:43 -04:00
|
|
|
gfloat available_height);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_allocate_align_fill (ClutterActor *self,
|
|
|
|
const ClutterActorBox *box,
|
|
|
|
gdouble x_align,
|
|
|
|
gdouble y_align,
|
|
|
|
gboolean x_fill,
|
2020-05-09 15:09:43 -04:00
|
|
|
gboolean y_fill);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_allocation (ClutterActor *self,
|
2020-05-09 15:09:43 -04:00
|
|
|
const ClutterActorBox *box);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_allocation_box (ClutterActor *self,
|
|
|
|
ClutterActorBox *box);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_has_allocation (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_size (ClutterActor *self,
|
|
|
|
gfloat width,
|
|
|
|
gfloat height);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_size (ClutterActor *self,
|
|
|
|
gfloat *width,
|
|
|
|
gfloat *height);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_position (ClutterActor *self,
|
|
|
|
gfloat x,
|
|
|
|
gfloat y);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2020-06-19 07:32:59 -04:00
|
|
|
gboolean clutter_actor_get_fixed_position (ClutterActor *self,
|
|
|
|
float *x,
|
|
|
|
float *y);
|
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_position (ClutterActor *self,
|
|
|
|
gfloat *x,
|
|
|
|
gfloat *y);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_get_fixed_position_set (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_fixed_position_set (ClutterActor *self,
|
|
|
|
gboolean is_set);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_move_by (ClutterActor *self,
|
|
|
|
gfloat dx,
|
|
|
|
gfloat dy);
|
2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
2008-06-10 13:07:52 -04:00
|
|
|
|
2011-11-29 12:41:33 -05:00
|
|
|
/* Actor geometry */
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gfloat clutter_actor_get_width (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gfloat clutter_actor_get_height (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_width (ClutterActor *self,
|
|
|
|
gfloat width);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_height (ClutterActor *self,
|
|
|
|
gfloat height);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gfloat clutter_actor_get_x (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gfloat clutter_actor_get_y (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_x (ClutterActor *self,
|
|
|
|
gfloat x);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_y (ClutterActor *self,
|
|
|
|
gfloat y);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-05 13:57:38 -04:00
|
|
|
void clutter_actor_set_z_position (ClutterActor *self,
|
|
|
|
gfloat z_position);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-05 13:57:38 -04:00
|
|
|
gfloat clutter_actor_get_z_position (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_layout_manager (ClutterActor *self,
|
|
|
|
ClutterLayoutManager *manager);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterLayoutManager * clutter_actor_get_layout_manager (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_x_align (ClutterActor *self,
|
|
|
|
ClutterActorAlign x_align);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActorAlign clutter_actor_get_x_align (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_y_align (ClutterActor *self,
|
|
|
|
ClutterActorAlign y_align);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActorAlign clutter_actor_get_y_align (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_margin_top (ClutterActor *self,
|
|
|
|
gfloat margin);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gfloat clutter_actor_get_margin_top (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_margin_bottom (ClutterActor *self,
|
|
|
|
gfloat margin);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gfloat clutter_actor_get_margin_bottom (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_margin_left (ClutterActor *self,
|
|
|
|
gfloat margin);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gfloat clutter_actor_get_margin_left (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_margin_right (ClutterActor *self,
|
|
|
|
gfloat margin);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gfloat clutter_actor_get_margin_right (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_margin (ClutterActor *self,
|
|
|
|
const ClutterMargin *margin);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_margin (ClutterActor *self,
|
|
|
|
ClutterMargin *margin);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-27 09:53:27 -04:00
|
|
|
void clutter_actor_set_x_expand (ClutterActor *self,
|
|
|
|
gboolean expand);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-27 09:53:27 -04:00
|
|
|
gboolean clutter_actor_get_x_expand (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-27 09:53:27 -04:00
|
|
|
void clutter_actor_set_y_expand (ClutterActor *self,
|
|
|
|
gboolean expand);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-27 09:53:27 -04:00
|
|
|
gboolean clutter_actor_get_y_expand (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-04-20 07:45:54 -04:00
|
|
|
gboolean clutter_actor_needs_expand (ClutterActor *self,
|
|
|
|
ClutterOrientation orientation);
|
2012-02-05 03:47:17 -05:00
|
|
|
|
|
|
|
/* Paint */
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_clip (ClutterActor *self,
|
|
|
|
gfloat xoff,
|
|
|
|
gfloat yoff,
|
|
|
|
gfloat width,
|
|
|
|
gfloat height);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_remove_clip (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_has_clip (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_clip (ClutterActor *self,
|
|
|
|
gfloat *xoff,
|
|
|
|
gfloat *yoff,
|
|
|
|
gfloat *width,
|
|
|
|
gfloat *height);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_clip_to_allocation (ClutterActor *self,
|
|
|
|
gboolean clip_set);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_get_clip_to_allocation (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_opacity (ClutterActor *self,
|
|
|
|
guint8 opacity);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
guint8 clutter_actor_get_opacity (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
guint8 clutter_actor_get_paint_opacity (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_get_paint_visibility (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_offscreen_redirect (ClutterActor *self,
|
|
|
|
ClutterOffscreenRedirect redirect);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterOffscreenRedirect clutter_actor_get_offscreen_redirect (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2020-10-16 09:06:39 -04:00
|
|
|
gboolean clutter_actor_should_pick (ClutterActor *self,
|
2020-10-16 09:02:56 -04:00
|
|
|
ClutterPickContext *pick_context);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_is_in_clone_paint (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_get_paint_box (ClutterActor *self,
|
|
|
|
ClutterActorBox *box);
|
2017-04-07 08:06:36 -04:00
|
|
|
|
|
|
|
CLUTTER_EXPORT
|
2020-04-10 05:41:58 -04:00
|
|
|
float clutter_actor_get_resource_scale (ClutterActor *self);
|
2017-04-07 08:06:36 -04:00
|
|
|
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_has_overlaps (ClutterActor *self);
|
2012-02-01 13:33:55 -05:00
|
|
|
|
|
|
|
/* Content */
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-01 13:33:55 -05:00
|
|
|
void clutter_actor_set_content (ClutterActor *self,
|
|
|
|
ClutterContent *content);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-01 13:33:55 -05:00
|
|
|
ClutterContent * clutter_actor_get_content (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-01 13:33:55 -05:00
|
|
|
void clutter_actor_set_content_gravity (ClutterActor *self,
|
|
|
|
ClutterContentGravity gravity);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-01 13:33:55 -05:00
|
|
|
ClutterContentGravity clutter_actor_get_content_gravity (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-08 12:18:17 -05:00
|
|
|
void clutter_actor_set_content_scaling_filters (ClutterActor *self,
|
|
|
|
ClutterScalingFilter min_filter,
|
|
|
|
ClutterScalingFilter mag_filter);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-08 12:18:17 -05:00
|
|
|
void clutter_actor_get_content_scaling_filters (ClutterActor *self,
|
|
|
|
ClutterScalingFilter *min_filter,
|
|
|
|
ClutterScalingFilter *mag_filter);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-06-08 07:44:28 -04:00
|
|
|
void clutter_actor_set_content_repeat (ClutterActor *self,
|
|
|
|
ClutterContentRepeat repeat);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-06-08 07:44:28 -04:00
|
|
|
ClutterContentRepeat clutter_actor_get_content_repeat (ClutterActor *self);
|
2022-05-20 11:47:16 -04:00
|
|
|
|
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_actor_set_color_state (ClutterActor *self,
|
|
|
|
ClutterColorState *color_state);
|
|
|
|
CLUTTER_EXPORT
|
|
|
|
ClutterColorState *clutter_actor_get_color_state (ClutterActor *self);
|
|
|
|
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-01 13:33:55 -05:00
|
|
|
void clutter_actor_get_content_box (ClutterActor *self,
|
|
|
|
ClutterActorBox *box);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_background_color (ClutterActor *self,
|
|
|
|
const ClutterColor *color);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_background_color (ClutterActor *self,
|
|
|
|
ClutterColor *color);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
const ClutterPaintVolume * clutter_actor_get_paint_volume (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
const ClutterPaintVolume * clutter_actor_get_transformed_paint_volume (ClutterActor *self,
|
|
|
|
ClutterActor *relative_to_ancestor);
|
2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box
* clutter/clutter-actor.[ch]: Rework the size allocation,
request and paint area. Now ::request_coords() is called
::allocate(), and ::query_coords() has been split into
::get_preferred_width() and ::get_preferred_height(). See
the documentation and the layout test on how to implement
a container and layout manager with the new API. (#915,
based on a patch by Havoc Pennington, Lucas Rocha and Johan
Bilien)
* clutter/clutter-clone-texture.c: Port CloneTexture to
the new size negotiation API; it just means forwarding
the requests to the parent texture.
* clutter/clutter-deprecated.h: Add deprecated and replaced
API.
* clutter/clutter-entry.c: Port Entry to the new size
negotiation API.
* clutter/clutter-group.c: Port Group to the new size
negotiation API; the semantics of the Group actor do not
change.
* clutter/clutter-label.c: Port Label to the new size
negotiation API, and vastly simplify the code.
* clutter/clutter-main.[ch]: Add API for executing a
relayout when needed.
* clutter/clutter-private.h: Add new Stage private API.
* clutter/clutter-rectangle.c: Update the get_abs_opacity()
call to get_paint_opacity().
* clutter/clutter-stage.c:
(clutter_stage_get_preferred_width),
(clutter_stage_get_preferred_height),
(clutter_stage_allocate),
(clutter_stage_class_init): Port Stage to the new size
negotiation API.
* clutter/clutter-texture.c: Port Texture to the new size
negotiation API.
* clutter/clutter-types.h: Add ClutterRequestMode enumeration.
* clutter/x11/clutter-stage-x11.c: Port the X11 stage
implementation to the new size negotiation API.
* tests/Makefile.am: Add the layout manager test case.
* tests/test-opacity.c: Update.
* tests/test-project.c: Update.
* tests/test-layout.c: Test case for a layout manager implemented
using the new size negotiation API; the layout manager handles
both transformed and untransformed children.
2008-06-10 13:07:52 -04:00
|
|
|
|
2011-12-02 09:41:55 -05:00
|
|
|
/* Events */
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_reactive (ClutterActor *actor,
|
|
|
|
gboolean reactive);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_get_reactive (ClutterActor *actor);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_has_key_focus (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_grab_key_focus (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_event (ClutterActor *actor,
|
2012-06-24 04:57:12 -04:00
|
|
|
const ClutterEvent *event,
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean capture);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_has_pointer (ClutterActor *self);
|
|
|
|
|
|
|
|
/* Text */
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
PangoContext * clutter_actor_get_pango_context (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
PangoContext * clutter_actor_create_pango_context (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
PangoLayout * clutter_actor_create_pango_layout (ClutterActor *self,
|
|
|
|
const gchar *text);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_text_direction (ClutterActor *self,
|
|
|
|
ClutterTextDirection text_dir);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterTextDirection clutter_actor_get_text_direction (ClutterActor *self);
|
2011-12-02 09:41:55 -05:00
|
|
|
|
2011-11-29 12:41:33 -05:00
|
|
|
/* Actor hierarchy */
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_add_child (ClutterActor *self,
|
|
|
|
ClutterActor *child);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_insert_child_at_index (ClutterActor *self,
|
|
|
|
ClutterActor *child,
|
|
|
|
gint index_);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_insert_child_above (ClutterActor *self,
|
|
|
|
ClutterActor *child,
|
|
|
|
ClutterActor *sibling);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_insert_child_below (ClutterActor *self,
|
|
|
|
ClutterActor *child,
|
|
|
|
ClutterActor *sibling);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_replace_child (ClutterActor *self,
|
|
|
|
ClutterActor *old_child,
|
|
|
|
ClutterActor *new_child);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_remove_child (ClutterActor *self,
|
|
|
|
ClutterActor *child);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_remove_all_children (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-13 12:26:37 -05:00
|
|
|
void clutter_actor_destroy_all_children (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
GList * clutter_actor_get_children (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gint clutter_actor_get_n_children (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActor * clutter_actor_get_child_at_index (ClutterActor *self,
|
|
|
|
gint index_);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActor * clutter_actor_get_previous_sibling (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActor * clutter_actor_get_next_sibling (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActor * clutter_actor_get_first_child (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActor * clutter_actor_get_last_child (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActor * clutter_actor_get_parent (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_contains (ClutterActor *self,
|
|
|
|
ClutterActor *descendant);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
ClutterActor* clutter_actor_get_stage (ClutterActor *actor);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_child_below_sibling (ClutterActor *self,
|
|
|
|
ClutterActor *child,
|
|
|
|
ClutterActor *sibling);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_child_above_sibling (ClutterActor *self,
|
|
|
|
ClutterActor *child,
|
|
|
|
ClutterActor *sibling);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_child_at_index (ClutterActor *self,
|
|
|
|
ClutterActor *child,
|
|
|
|
gint index_);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_iter_init (ClutterActorIter *iter,
|
|
|
|
ClutterActor *root);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_iter_next (ClutterActorIter *iter,
|
|
|
|
ClutterActor **child);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_iter_prev (ClutterActorIter *iter,
|
|
|
|
ClutterActor **child);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_iter_remove (ClutterActorIter *iter);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-09 10:49:30 -05:00
|
|
|
void clutter_actor_iter_destroy (ClutterActorIter *iter);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-06-27 07:57:36 -04:00
|
|
|
gboolean clutter_actor_iter_is_valid (const ClutterActorIter *iter);
|
2012-01-25 10:27:57 -05:00
|
|
|
|
2011-12-02 09:41:55 -05:00
|
|
|
/* Transformations */
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_is_rotated (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_is_scaled (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-06 05:35:13 -04:00
|
|
|
void clutter_actor_set_pivot_point (ClutterActor *self,
|
|
|
|
gfloat pivot_x,
|
|
|
|
gfloat pivot_y);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-06 05:35:13 -04:00
|
|
|
void clutter_actor_get_pivot_point (ClutterActor *self,
|
|
|
|
gfloat *pivot_x,
|
|
|
|
gfloat *pivot_y);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-06 09:28:48 -04:00
|
|
|
void clutter_actor_set_pivot_point_z (ClutterActor *self,
|
|
|
|
gfloat pivot_z);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-06 09:28:48 -04:00
|
|
|
gfloat clutter_actor_get_pivot_point_z (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-06 06:23:50 -04:00
|
|
|
void clutter_actor_set_rotation_angle (ClutterActor *self,
|
|
|
|
ClutterRotateAxis axis,
|
|
|
|
gdouble angle);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-06 06:23:50 -04:00
|
|
|
gdouble clutter_actor_get_rotation_angle (ClutterActor *self,
|
|
|
|
ClutterRotateAxis axis);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_set_scale (ClutterActor *self,
|
|
|
|
gdouble scale_x,
|
|
|
|
gdouble scale_y);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_scale (ClutterActor *self,
|
|
|
|
gdouble *scale_x,
|
|
|
|
gdouble *scale_y);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-09 05:59:13 -04:00
|
|
|
void clutter_actor_set_scale_z (ClutterActor *self,
|
|
|
|
gdouble scale_z);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-09 05:59:13 -04:00
|
|
|
gdouble clutter_actor_get_scale_z (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-06 12:31:52 -04:00
|
|
|
void clutter_actor_set_translation (ClutterActor *self,
|
|
|
|
gfloat translate_x,
|
|
|
|
gfloat translate_y,
|
|
|
|
gfloat translate_z);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-06 12:31:52 -04:00
|
|
|
void clutter_actor_get_translation (ClutterActor *self,
|
|
|
|
gfloat *translate_x,
|
|
|
|
gfloat *translate_y,
|
|
|
|
gfloat *translate_z);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-20 16:56:43 -04:00
|
|
|
void clutter_actor_set_transform (ClutterActor *self,
|
2020-09-11 14:57:28 -04:00
|
|
|
const graphene_matrix_t *transform);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-07-20 16:56:43 -04:00
|
|
|
void clutter_actor_get_transform (ClutterActor *self,
|
2020-09-11 14:57:28 -04:00
|
|
|
graphene_matrix_t *transform);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-08-16 12:10:50 -04:00
|
|
|
void clutter_actor_set_child_transform (ClutterActor *self,
|
2020-09-11 14:57:28 -04:00
|
|
|
const graphene_matrix_t *transform);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-08-16 12:10:50 -04:00
|
|
|
void clutter_actor_get_child_transform (ClutterActor *self,
|
2020-09-11 14:57:28 -04:00
|
|
|
graphene_matrix_t *transform);
|
2020-07-28 14:39:55 -04:00
|
|
|
|
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_actor_get_transformed_extents (ClutterActor *self,
|
|
|
|
graphene_rect_t *rect);
|
|
|
|
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_transformed_position (ClutterActor *self,
|
|
|
|
gfloat *x,
|
|
|
|
gfloat *y);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_transformed_size (ClutterActor *self,
|
|
|
|
gfloat *width,
|
|
|
|
gfloat *height);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
gboolean clutter_actor_transform_stage_point (ClutterActor *self,
|
|
|
|
gfloat x,
|
|
|
|
gfloat y,
|
|
|
|
gfloat *x_out,
|
|
|
|
gfloat *y_out);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
|
2019-02-20 08:18:48 -05:00
|
|
|
graphene_point3d_t *verts);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_apply_transform_to_point (ClutterActor *self,
|
2019-02-20 08:18:48 -05:00
|
|
|
const graphene_point3d_t *point,
|
|
|
|
graphene_point3d_t *vertex);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-02-05 03:47:17 -05:00
|
|
|
void clutter_actor_apply_relative_transform_to_point (ClutterActor *self,
|
|
|
|
ClutterActor *ancestor,
|
2019-02-20 08:18:48 -05:00
|
|
|
const graphene_point3d_t *point,
|
|
|
|
graphene_point3d_t *vertex);
|
2011-12-05 03:41:51 -05:00
|
|
|
|
actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:
for creating fast, compelling, portable, and dynamic graphical
user interfaces
and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.
This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.
So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:
clutter_actor_set_position (actor, newX, newY);
should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.
Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_restore_easing_state (actor);
And we can even start stacking animations, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_set_depth (actor, newDepth);
clutter_actor_restore_easing_state (actor);
clutter_actor_restore_easing_state (actor);
And so on, and so forth.
The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 07:09:11 -04:00
|
|
|
/* Implicit animations */
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:
for creating fast, compelling, portable, and dynamic graphical
user interfaces
and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.
This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.
So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:
clutter_actor_set_position (actor, newX, newY);
should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.
Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_restore_easing_state (actor);
And we can even start stacking animations, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_set_depth (actor, newDepth);
clutter_actor_restore_easing_state (actor);
clutter_actor_restore_easing_state (actor);
And so on, and so forth.
The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 07:09:11 -04:00
|
|
|
void clutter_actor_save_easing_state (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:
for creating fast, compelling, portable, and dynamic graphical
user interfaces
and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.
This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.
So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:
clutter_actor_set_position (actor, newX, newY);
should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.
Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_restore_easing_state (actor);
And we can even start stacking animations, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_set_depth (actor, newDepth);
clutter_actor_restore_easing_state (actor);
clutter_actor_restore_easing_state (actor);
And so on, and so forth.
The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 07:09:11 -04:00
|
|
|
void clutter_actor_restore_easing_state (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:
for creating fast, compelling, portable, and dynamic graphical
user interfaces
and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.
This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.
So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:
clutter_actor_set_position (actor, newX, newY);
should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.
Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_restore_easing_state (actor);
And we can even start stacking animations, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_set_depth (actor, newDepth);
clutter_actor_restore_easing_state (actor);
clutter_actor_restore_easing_state (actor);
And so on, and so forth.
The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 07:09:11 -04:00
|
|
|
void clutter_actor_set_easing_mode (ClutterActor *self,
|
|
|
|
ClutterAnimationMode mode);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:
for creating fast, compelling, portable, and dynamic graphical
user interfaces
and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.
This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.
So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:
clutter_actor_set_position (actor, newX, newY);
should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.
Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_restore_easing_state (actor);
And we can even start stacking animations, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_set_depth (actor, newDepth);
clutter_actor_restore_easing_state (actor);
clutter_actor_restore_easing_state (actor);
And so on, and so forth.
The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 07:09:11 -04:00
|
|
|
ClutterAnimationMode clutter_actor_get_easing_mode (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:
for creating fast, compelling, portable, and dynamic graphical
user interfaces
and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.
This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.
So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:
clutter_actor_set_position (actor, newX, newY);
should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.
Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_restore_easing_state (actor);
And we can even start stacking animations, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_set_depth (actor, newDepth);
clutter_actor_restore_easing_state (actor);
clutter_actor_restore_easing_state (actor);
And so on, and so forth.
The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 07:09:11 -04:00
|
|
|
void clutter_actor_set_easing_duration (ClutterActor *self,
|
|
|
|
guint msecs);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:
for creating fast, compelling, portable, and dynamic graphical
user interfaces
and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.
This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.
So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:
clutter_actor_set_position (actor, newX, newY);
should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.
Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_restore_easing_state (actor);
And we can even start stacking animations, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_set_depth (actor, newDepth);
clutter_actor_restore_easing_state (actor);
clutter_actor_restore_easing_state (actor);
And so on, and so forth.
The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 07:09:11 -04:00
|
|
|
guint clutter_actor_get_easing_duration (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-15 08:24:02 -04:00
|
|
|
void clutter_actor_set_easing_delay (ClutterActor *self,
|
|
|
|
guint msecs);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-15 08:24:02 -04:00
|
|
|
guint clutter_actor_get_easing_delay (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:
for creating fast, compelling, portable, and dynamic graphical
user interfaces
and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.
This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.
So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:
clutter_actor_set_position (actor, newX, newY);
should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.
Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_restore_easing_state (actor);
And we can even start stacking animations, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_set_depth (actor, newDepth);
clutter_actor_restore_easing_state (actor);
clutter_actor_restore_easing_state (actor);
And so on, and so forth.
The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 07:09:11 -04:00
|
|
|
ClutterTransition * clutter_actor_get_transition (ClutterActor *self,
|
|
|
|
const char *name);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-15 12:40:41 -04:00
|
|
|
void clutter_actor_add_transition (ClutterActor *self,
|
|
|
|
const char *name,
|
|
|
|
ClutterTransition *transition);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-15 12:40:41 -04:00
|
|
|
void clutter_actor_remove_transition (ClutterActor *self,
|
|
|
|
const char *name);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-03-15 12:40:41 -04:00
|
|
|
void clutter_actor_remove_all_transitions (ClutterActor *self);
|
actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:
for creating fast, compelling, portable, and dynamic graphical
user interfaces
and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.
This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.
So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:
clutter_actor_set_position (actor, newX, newY);
should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.
Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_restore_easing_state (actor);
And we can even start stacking animations, e.g.:
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_position (actor, newX, newY);
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 500);
clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
clutter_actor_set_opacity (actor, newOpacity);
clutter_actor_set_depth (actor, newDepth);
clutter_actor_restore_easing_state (actor);
clutter_actor_restore_easing_state (actor);
And so on, and so forth.
The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 07:09:11 -04:00
|
|
|
|
2013-07-17 06:41:27 -04:00
|
|
|
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2013-07-17 06:41:27 -04:00
|
|
|
gboolean clutter_actor_has_mapped_clones (ClutterActor *self);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-06-04 17:42:04 -04:00
|
|
|
void clutter_actor_set_opacity_override (ClutterActor *self,
|
|
|
|
gint opacity);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2012-06-04 17:42:04 -04:00
|
|
|
gint clutter_actor_get_opacity_override (ClutterActor *self);
|
2013-07-17 06:41:27 -04:00
|
|
|
|
2020-03-18 20:12:26 -04:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_actor_inhibit_culling (ClutterActor *actor);
|
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_actor_uninhibit_culling (ClutterActor *actor);
|
|
|
|
|
2015-06-29 15:22:56 -04:00
|
|
|
/**
|
|
|
|
* ClutterActorCreateChildFunc:
|
|
|
|
* @item: (type GObject): the item in the model
|
|
|
|
* @user_data: Data passed to clutter_actor_bind_model()
|
|
|
|
*
|
|
|
|
* Creates a #ClutterActor using the @item in the model.
|
|
|
|
*
|
|
|
|
* The usual way to implement this function is to create a #ClutterActor
|
|
|
|
* instance and then bind the #GObject properties to the actor properties
|
|
|
|
* of interest, using g_object_bind_property(). This way, when the @item
|
|
|
|
* in the #GListModel changes, the #ClutterActor changes as well.
|
|
|
|
*
|
2022-05-31 07:58:40 -04:00
|
|
|
* Returns: (transfer full): The newly created child #ClutterActor4
|
2015-06-29 15:22:56 -04:00
|
|
|
*/
|
|
|
|
typedef ClutterActor * (* ClutterActorCreateChildFunc) (gpointer item,
|
|
|
|
gpointer user_data);
|
|
|
|
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2015-06-29 15:22:56 -04:00
|
|
|
void clutter_actor_bind_model (ClutterActor *self,
|
|
|
|
GListModel *model,
|
|
|
|
ClutterActorCreateChildFunc create_child_func,
|
|
|
|
gpointer user_data,
|
|
|
|
GDestroyNotify notify);
|
2018-05-22 17:01:54 -04:00
|
|
|
CLUTTER_EXPORT
|
2015-07-10 06:26:34 -04:00
|
|
|
void clutter_actor_bind_model_with_properties (ClutterActor *self,
|
|
|
|
GListModel *model,
|
|
|
|
GType child_type,
|
|
|
|
const char *first_model_property,
|
|
|
|
...);
|
2015-06-29 15:22:56 -04:00
|
|
|
|
clutter: Introduce geometric picking
Currently, Clutter does picking by drawing with Cogl and reading
the pixel that's beneath the given point. Since Cogl has a journal
that records drawing operations, and has optimizations to read a
single pixel from a list of rectangle, it would be expected that
we would hit this fast path and not flush the journal while picking.
However, that's not the case: dithering, clipping with scissors, etc,
can all flush the journal, issuing commands to the GPU and making
picking slow. On NVidia-based systems, this glReadPixels() call is
extremely costly.
Introduce geometric picking, and avoid using the Cogl journal entirely.
Do this by introducing a stack of actors in ClutterStage. This stack
is cached, but for now, don't use the cache as much as possible.
The picking routines are still tied to painting.
When projecting the actor vertexes, do it manually and take the modelview
matrix of the framebuffer into account as well.
CPU usage on an Intel i7-7700, tested with two different GPUs/drivers:
| | Intel | Nvidia |
| ------: | --------: | -----: |
| Moving the mouse: |
| Before | 10% | 10% |
| After | 6% | 6% |
| Moving a window: |
| Before | 23% | 81% |
| After | 19% | 40% |
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/154,
https://gitlab.gnome.org/GNOME/mutter/issues/691
Helps significantly with: https://gitlab.gnome.org/GNOME/mutter/issues/283,
https://gitlab.gnome.org/GNOME/mutter/issues/590,
https://gitlab.gnome.org/GNOME/mutter/issues/700
v2: Fix code style issues
Simplify quadrilateral checks
Remove the 0.5f hack
Differentiate axis-aligned rectangles
https://gitlab.gnome.org/GNOME/mutter/merge_requests/189
2018-08-02 07:03:30 -04:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_actor_pick_box (ClutterActor *self,
|
2019-11-20 15:46:41 -05:00
|
|
|
ClutterPickContext *pick_context,
|
clutter: Introduce geometric picking
Currently, Clutter does picking by drawing with Cogl and reading
the pixel that's beneath the given point. Since Cogl has a journal
that records drawing operations, and has optimizations to read a
single pixel from a list of rectangle, it would be expected that
we would hit this fast path and not flush the journal while picking.
However, that's not the case: dithering, clipping with scissors, etc,
can all flush the journal, issuing commands to the GPU and making
picking slow. On NVidia-based systems, this glReadPixels() call is
extremely costly.
Introduce geometric picking, and avoid using the Cogl journal entirely.
Do this by introducing a stack of actors in ClutterStage. This stack
is cached, but for now, don't use the cache as much as possible.
The picking routines are still tied to painting.
When projecting the actor vertexes, do it manually and take the modelview
matrix of the framebuffer into account as well.
CPU usage on an Intel i7-7700, tested with two different GPUs/drivers:
| | Intel | Nvidia |
| ------: | --------: | -----: |
| Moving the mouse: |
| Before | 10% | 10% |
| After | 6% | 6% |
| Moving a window: |
| Before | 23% | 81% |
| After | 19% | 40% |
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/154,
https://gitlab.gnome.org/GNOME/mutter/issues/691
Helps significantly with: https://gitlab.gnome.org/GNOME/mutter/issues/283,
https://gitlab.gnome.org/GNOME/mutter/issues/590,
https://gitlab.gnome.org/GNOME/mutter/issues/700
v2: Fix code style issues
Simplify quadrilateral checks
Remove the 0.5f hack
Differentiate axis-aligned rectangles
https://gitlab.gnome.org/GNOME/mutter/merge_requests/189
2018-08-02 07:03:30 -04:00
|
|
|
const ClutterActorBox *box);
|
|
|
|
|
clutter/actor: Add API to get the stage-views an actor is painted on
There are certain rendering techniques and optimizations, for example
the unredirection of non-fullscreen windows, where information about the
output/stage-view an actor is on is needed to determine whether the
optimization can be enabled.
So add a new method to ClutterActor that allows listing the stage-views
the actor is being painted on: clutter_actor_peek_stage_views()
With the way Clutter works, the only point where we can reliably get
this information is during or right before the paint phase, when the
layout phase of the stage has been completed and no more changes to the
actors transformation matrices happen. So to get the stage views the
actor is on, introduce a new step that's done on every master clock tick
between layout and paint cycle: Traversing through the actor tree and
updating the stage-views the mapped actors are going to be painted on.
We're doing this in a separate step instead of inside
clutter_actor_paint() itself for a few reasons: It keeps the code
separate from the painting code, making profiling easier and issues
easier to track down (hopefully), it allows for a new
"stage-views-changed" signal that doesn't interfere with painting, and
finally, it will make it very easy to update the resource scales in the
same step in the future.
Currently, this list is only invalidated on allocation changes of
actors, but not on changes to the transformation matrices. That's
because there's no proper API to invalidate the transformation matrices
ClutterActor implementations can apply through the apply_transform()
vfunc.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1196
2020-04-09 18:34:49 -04:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
GList * clutter_actor_peek_stage_views (ClutterActor *self);
|
|
|
|
|
2020-03-12 07:13:53 -04:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_actor_invalidate_transform (ClutterActor *self);
|
|
|
|
|
2020-10-24 07:20:26 -04:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_actor_invalidate_paint_volume (ClutterActor *self);
|
|
|
|
|
2006-06-13 09:17:45 -04:00
|
|
|
G_END_DECLS
|