Commit Graph

351 Commits

Author SHA1 Message Date
Bastian Winkler
dbf45c680f doc: Add ClutterLayoutManagerPrivate to doc sections
https://bugzilla.gnome.org/show_bug.cgi?id=677384
2012-06-04 15:21:28 +02:00
Emmanuele Bassi
65c8b11604 image: Add a data setter using GBytes
The plain C bytes array, while convenient from a C perspective, is not
well handled by language bindings: the length of the array is not
specified, and it's only just implied by the image data size, rowstride,
and pixel format.

GBytes is a read-only bytes buffer that has an implicit length; we can
use it as the storage medium so that language bindings can actually
function correctly.
2012-06-04 10:34:22 +01:00
Bastian Winkler
7f6b17bc50 layout-manager: Add a new animation API
It's similar to to the implicit animation API of ClutterActor and
compatible to deprecated API of ClutterBoxLayout and
ClutterTableLayout.

It adds :use-animations, :easing-mode, :easing-duration and
:easing-delay properties to control animations when allocation of a
child has changed. Layout manager implementers should call

use_animations = clutter_layout_manager_get_easing_state (manager,
                                                          &mode,
                                                          &duration,
                                                          &delay);

from the allocate() virtual function to access these values.

https://bugzilla.gnome.org/show_bug.cgi?id=676827
2012-05-28 19:37:10 +02:00
Emmanuele Bassi
129752e560 event: Add convenience functions for Shift and Ctrl modifiers
Instead of going through clutter_event_get_state() and checking if the
modifier mask is set, we can provide simple convenience functions to do
it for us.
2012-05-25 11:33:57 +01:00
Emmanuele Bassi
8a8cc20d93 docs: Move ClutterAnimationMode's documentation
Given that ClutterAnimation is going to be deprecated, we should move
the ClutterAnimationMode enumeration to the ClutterTimeline section.
2012-05-02 18:38:20 +01:00
Emmanuele Bassi
155e0eee89 docs: Add missing symbols to the sections file 2012-04-27 12:30:50 +01:00
Emmanuele Bassi
23f3edce61 docs: Add ScrollActor to the API reference 2012-04-27 12:30:50 +01:00
Emmanuele Bassi
0b76ba332d Fixes for the API reference
Typos, missing symbols, and missing documentation.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
024f6d40d2 keyframe-transition: Add direct accessors for key frames
This should allow modifying key frame details without requiring a full
reset of the KeyframeTransition instance.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
c500fc1844 Add ClutterTransitionGroup
The TransitionGroup class is a logical container for running multiple
transitions.

TransitionGroup is not a Score: it is a Transition that advances each
Transition it contains using the delta between frames, and ensures that
all transitions are in a consistent state; these transitions are not
advanced by the master clock.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
270894342e Add ClutterKeyframeTransition
A simple transition class that interpolates a property between key
frames.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
a9cc06257f docs: Add a reference section for geometric types 2012-04-27 12:30:47 +01:00
Emmanuele Bassi
28266a59ed docs: Fixes for the API reference 2012-03-19 14:57:46 +00:00
Emmanuele Bassi
82bc728584 Add initializer utilities for ClutterVertex
Similar to what we did for ClutterActorBox.
2012-03-17 16:29:09 +00:00
Emmanuele Bassi
5e9d6f7257 Add some utility initializers to ClutterActorBox 2012-03-17 15:27:26 +00:00
Emmanuele Bassi
8904f7cbe4 paint-nodes: Make part of the API internal
At least for the time being, we only expose the parts of the API that we
want to use internally and for new, out-of-tree Content implementations.

The full PaintNode tree API will be made public in 1.12 once we branch
master.
2012-03-16 12:33:40 +00:00
Emmanuele Bassi
0a2ee1709b docs: Fixes for the API reference 2012-03-16 12:33:39 +00:00
Emmanuele Bassi
75e6560160 image: Add set_area() method
This method allows replacing an area inside the texture data used by a
ClutterImage.
2012-03-16 12:33:39 +00:00
Emmanuele Bassi
2be850f441 image: Add get_texture()
Allow retrieving the Cogl texture used by the ClutterImage.
2012-03-16 12:33:39 +00:00
Emmanuele Bassi
b6403b01a1 Documentation fixes 2012-03-16 12:33:38 +00:00
Emmanuele Bassi
07bb35bbe3 Add ClutterCanvas, a drawing content 2012-03-16 12:33:37 +00:00
Emmanuele Bassi
2ee5851970 docs: Update the API reference
Add all the new symbols.
2012-03-16 12:33:36 +00:00
Emmanuele Bassi
9e1ec82838 doc: Reference fixes 2012-03-15 17:01:14 +00:00
Emmanuele Bassi
4bd3583dbf actor: Add generic transition support
ClutterActor should be able to hold all transitions, even the ones that
have been explicitly created.

This will allow to add new transitions types in the future, like the
keyframe-based one, or the transition group.
2012-03-15 17:01:14 +00:00
Emmanuele Bassi
388f818f41 timeline: Add more state accessors
It should be possible to ask a timeline what is its duration, taking
into account eventual repeats, and which repeat is the one currently
in progress.

These two functions allow writing animations that depend on the current
state of another timeline.
2012-03-15 17:01:13 +00:00
Emmanuele Bassi
1511e588df actor: Add delay to the easing state
It should be possible to set up the delay of a transition, but since
we start the Transition instance before returning control to the caller,
we cannot use clutter_actor_get_transition() to do it without something
extra-awkward, like:

  transition = clutter_actor_get_transition (actor, "width");
  clutter_timeline_stop (transition);
  clutter_timeline_set_delay (transition, 1000);
  clutter_timeline_start (transition);

for each property involved. It's much easier to add a delay to the
easing state of an actor.
2012-03-15 17:01:13 +00:00
Emmanuele Bassi
043cf6b284 docs: Update the API reference 2012-03-15 17:01:13 +00:00
Emmanuele Bassi
06314e9ed8 docs: Update reference symbols 2012-03-15 17:00:38 +00:00
Joseph Scheuhammer
32f57595fe Add brightness/contrast effect
The ClutterBrightnessContrastEffect effect class allows changing the
brightness and contrast levels of an actor.

Modified-by: Emmanuele Bassi <ebassi@linux.intel.com>
Modified-by: Neil Roberts <neil@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=656156
2012-03-07 14:02:55 +00:00
Emmanuele Bassi
229607464b Improve repaint functions
It is sometimes useful to be able to have better control on when a
repaint function is called. Currently, all repaint functions are called
prior to the stages update phase of the frame processing.

We can introduce flags to represent the point in the frame update
process in which we wish Clutter called the repaint function.

As a bonus, we can also add a flag that causes adding a repaint function
to spin the master clock.
2012-03-06 12:09:00 +00:00
Emmanuele Bassi
a8d8005800 docs: Updates to the API reference 2012-03-05 23:45:40 +00:00
Neil Roberts
13e3f9e5f1 Add an input device function to convert keycodes to evdev codes
This adds a virtual function to ClutterInputDevice to translate a
keycode from the hardware_keycode member of ClutterKeyEvent to an
evdev keycode. The function can fail so that input backends that don't
have a sensible way to translate to evdev keycodes can return FALSE.
There are implementations for evdev, wayland and X. The X
implementation assumes that the X server is using an evdev driver in
which case the hardware keycodes are the evdev codes plus 8.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-01 11:41:51 +00:00
Emmanuele Bassi
7d4fa54a4b docs: Add new macros to the sections file 2012-02-27 16:03:09 +00:00
Emmanuele Bassi
e4c948b150 actor: Add a method for computing the default paint volume
Now that ClutterActor has a default paint volume, subclasses may wish
to retrieve it without chaining up to the parent's implementation of
the get_paint_volume() function.

The get_default_paint_volume() returns a ClutterPaintVolume pointer
to the paint volume as computed by the default implementation of the
get_paint_volume() virtual function; it can only be used immediately,
as it's not guaranteed to survive across multiple frames.
2012-02-27 11:59:57 +00:00
Emmanuele Bassi
6a09bf5b52 paint-volume: Add a union method for boxes
Creating PaintVolume instances is not possible, and it's not recommended
anyway. It is, though, necessary to union paint volumes, especially with
2D boxes, in some cases.

Clutter should provide a simple convenience function that allows
unioning volumes to boxes in a moderately efficient way.

https://bugzilla.gnome.org/show_bug.cgi?id=670021
2012-02-27 11:24:08 +00:00
Emmanuele Bassi
0099bbf7d9 docs: Fix unused symbols 2012-02-23 11:50:43 +00:00
Emmanuele Bassi
7ec975ed3d timeline: Add progress functions
The whole progress computation should not be done using a separate
class: it should be part of the Timeline class.
2012-02-23 11:23:15 +00:00
Neil Roberts
041ac40056 offscreen-effect: Add clutter_offscreen_effect_get_texture
Sometimes a subclass of ClutterOffscreenEffect wants to paint with a
completely custom material. In that case it is awkward to modify the
material returned owned by ClutterOffscreenEffect so it makes more
sense to just get the texture and manage its own material.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-14 12:09:18 +00:00
Emmanuele Bassi
3996ae4348 actor: Add destroy_all_children()
There are times when we don't want to remove all children and count of
the reference count to drop to 0 to ensure destruction; there are cases,
such as managed environments, where it's preferable to ensure that the
children of an actor get actually destroyed.
2012-02-13 17:42:07 +00:00
Emmanuele Bassi
97feb06a6f timeline: Add repeat-count
Being able to easily set the number of repeats has been a request for
the animation framework for some time now. The usual way to implement
this is: connect to the ::completed signal, use a static counter, and
stop the timeline when the counter hits a specific spot.

In the same light as the :auto-reverse property, we can make it easier
to implement this common functionality by adding a :repeat-count
property that, when set, limits the amount of loops that a Timeline can
perform before stopping itself.

In fact, we can implement the :loop property in terms of the
:repeat-count property just by using a sentinel value mapping to
"infinity", and map loop=FALSE to repeat-count=0, and loop=TRUE to
repeat-count=-1.
2012-02-13 17:30:22 +00:00
Emmanuele Bassi
7ba9774572 text: Add the coords_to_position() method
The reverse of position_to_coords().

While providing documentation on how to implement it using the
PangoLayout API, I realized that the verbosity of it all, plus the usage
of the Pango API, was not worth it, and decided to expose the method we
are using internally.
2012-02-06 18:27:58 +00:00
Emmanuele Bassi
59f3488fa9 docs: Add private macro CLUTTER_PRIVATE_FIELD 2012-01-31 16:44:07 +00:00
Emmanuele Bassi
58ffcfb10e actor: Add ClutterActorIter
Iterating over children and ancestors of an actor is a relatively common
operation. Currently, you only have one option: start a for() loop, get
the first child of the actor, and advance to the next sibling for the
list of children; or start a for() loop and advance to the parent of the
actor.

These operations can be easily done through the ClutterActor API, but
they all require going through the public API, and performing multiple
type checks on the arguments.

Along with the DOM API, it would be nice to have an ancillary, utility
API that uses an iterator structure to hold the state, and can be
advanced in a loop.

https://bugzilla.gnome.org/show_bug.cgi?id=668669
2012-01-27 11:55:39 +00:00
Emmanuele Bassi
54c9257f28 docs: Update to show the symbolic button names
https://bugzilla.gnome.org/show_bug.cgi?id=668692
2012-01-27 09:46:51 +00:00
Emmanuele Bassi
414f8c1a0f docs: Add missing function 2012-01-24 14:20:07 +00:00
Emmanuele Bassi
acf8aff6d5 docs: Add clutter_actor_set_allocation() 2012-01-19 13:14:47 +00:00
Emmanuele Bassi
5085c11bde Add ClutterTextBuffer to the API reference 2012-01-17 14:29:45 +00:00
Emmanuele Bassi
ad2cfc0150 docs: Fixes for the API reference 2012-01-16 23:37:14 +00:00
Emmanuele Bassi
86152f478d docs: Update the Actor API reference
Given the size and scope of the changes in ClutterActor, we ought to
rewrite the overall description of what an actor is, what it does, and
how are you supposed to use it and subclass it.
2012-01-16 23:37:11 +00:00
Emmanuele Bassi
88aaad9bdf docs: Add event propagation symbolic constants 2012-01-03 14:38:56 +00:00
Robert Bragg
16ed7677e0 Adds wayland-surface actor for wayland compositors
This adds a --enable-wayland-compositor configure option which will add
support for a ClutterWaylandSurface actor which can be used to aid in
writing Wayland compositors using Clutter by providing a ClutterActor to
represent Wayland client surfaces.

Notably this configure option isn't tied into any particular backend
since conceptually the compositor support can be used in conjunction
with any clutter backend that has corresponding Cogl support.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-12-08 16:13:37 +00:00
Robert Bragg
07c6f96cb4 wayland: Updates client side wayland support
This updates Wayland support in line with upstream changes to the Wayland
API and protocol.

This update means we no longer use the Cogl stub winsys so a lot of code
that had to manually interact with EGL and implement a swap_buffers
mechanism could be removed and instead we now depend on Cogl to handle
those things for us.

This update also adds an input device manager consistent with other
clutter backends.

Note: to use the client side "wayland" clutter backend you need to have
built Cogl with --enable-wayland-egl-platform. If Cogl has been built
with support for multiple winsys backends then you should run
applications with COGL_RENDERER=EGL in the environment.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2011-12-08 16:13:37 +00:00
Emmanuele Bassi
52ea1510a1 docs: Fixes for the API reference 2011-11-22 00:29:08 +00:00
Emmanuele Bassi
31bee53eb7 docs: Fixes to build the API reference 2011-10-11 18:25:14 +01:00
Emmanuele Bassi
b1fbbe23b4 Revert "Add lightness, brightness, and contrast effects"
Discussed a bit with Neil, and I might have jumped the gun a little.
We might want a different API for 1.10. See comment 12 on:

https://bugzilla.gnome.org/show_bug.cgi?id=656156

This reverts commit 4829ae1c79.
2011-09-28 15:54:32 +01:00
Joseph Scheuhammer
4829ae1c79 Add lightness, brightness, and contrast effects
Added three classes for new clutter effects:  inverse lightness,
modify brightness, and modify contrast.

https://bugzilla.gnome.org/show_bug.cgi?id=656156
2011-09-28 10:32:15 -04:00
Emmanuele Bassi
4b7552f001 docs: Add missing clutter_backend_get_cogl_context symbol 2011-09-02 14:53:55 +01:00
Emmanuele Bassi
8ea6b7912e docs: Fix up the unused symbols warning 2011-08-15 14:08:57 +01:00
Emmanuele Bassi
fe66575a2c docs: Update with the newly added Animatable symbol 2011-07-29 11:53:16 +01:00
Emmanuele Bassi
7f8838d7cc cairo-texture: Add the :auto-resize property
Keeping the backing Cairo surface of a CairoTexture canvas in sync with
the actor's allocation is tedious and prone to mistakes. We can
definitely do better by simply exposing a property that does the surface
resize and invalidation automagically on ::allocate.
2011-07-26 14:55:19 +01:00
Emmanuele Bassi
2f445682b1 cairo-texture: Use signal-based drawing
The current "create context/draw/destroy context" pattern presents
various problems. The first issue is that it defers memory management to
the caller of the create() or create_region() methods, which makes
bookkeeping of the cairo_t* harder for language bindings and third party
libraries. The second issue is that, while it's easier for
draw-and-forget texturs, this API is needlessly complicated for contents
that have to change programmatically - and it introduces constraints
like calling the drawing code explicitly after a surface resize (e.g.
inside an allocate() implementation).

By using a signal-based approach we can make the CairoTexture actor
behave like other actors, and like other libraries using Cairo as their
2D drawing API.

The semantics of the newly-introduced ::draw signal are the same as the
one used by GTK+:

  - the signal is emitted on invalidation;
  - the cairo_t* context is owned by the actor;
  - it is safe to have multiple callbacks attached to the same
    signal, to allow composition;
  - the cairo_t* is already clipped to the invalidated area, so
    that Cairo can discard geometry immediately before we upload
    the texture data.

There are possible future improvements, like coalescing multiple
invalidations inside regions, and performing clipped draws during
the paint cycle; we could even perform clipped redraws if we know the
extent of the invalidated area.
2011-07-26 12:40:52 +01:00
Neil Roberts
a72237b876 clutter-stage: Add clutter_stage_get_redraw_clip_bounds
This adds a public function to get the bounds of the current clipped
redraw on a stage. This should only be called while the stage is being
painted. The function diverts to a virtual function on the
ClutterStageWindow implementation. If the function isn't implemented
or it returns FALSE then the entire stage is reported. The clip bounds
are in integer pixel coordinates in the stage's coordinate space.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2421
2011-07-13 13:54:50 +01:00
Emmanuele Bassi
459e1e7fc9 docs: Fix the GLX section
The whole thing should just go away.
2011-06-20 19:45:14 +01:00
Emmanuele Bassi
f971c2cb11 docs: Add the (now deprecated) GLX texture-pixmap
It was missing from the API reference.
2011-06-20 18:48:49 +01:00
Emmanuele Bassi
948461b8f2 docs: Fix duplicate symbol in the sections list 2011-06-20 18:40:31 +01:00
Emmanuele Bassi
e5641dabf8 docs: Document ClutterDropAction
And add it to the API reference.

https://bugzilla.gnome.org/show_bug.cgi?id=652842
2011-06-20 15:25:54 +01:00
Emmanuele Bassi
e4756fd764 docs: Fix up the API reference 2011-06-20 14:26:57 +01:00
Philippe Normand
494629d4b9 clutter-text: new clutter_text_get_layout_offsets API
This new function can be used to retrieve the coordinates where the
ClutterText will draw the PangoLayout representing the text.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2553
2011-06-13 16:15:22 +01:00
Emmanuele Bassi
165b2f9599 docs: Fix Clutter API reference 2011-06-13 15:36:07 +01:00
Emmanuele Bassi
cd2b36ed91 Merge branch 'swipe-action'
* swipe-action:
  test-swipe-action: Clean up the test code
  docs: Add the new actions to the API reference
  gesture-action: Remove the multi-device entry points
  swipe-action: Remove the required devices call
  swipe-action: Clean up
  gesture-action: Clean up
  Add ClutterSwipeAction and ClutterGestureAction
2011-06-13 14:39:03 +01:00
Emmanuele Bassi
4f0769d69d docs: Update missing documentation 2011-06-13 13:47:09 +01:00
Emmanuele Bassi
9b4ad40f04 docs: Add the new actions to the API reference
http://bugzilla.clutter-project.org/show_bug.cgi?id=2585
2011-06-10 15:15:15 +01:00
Emmanuele Bassi
9636a4f125 docs: Fix up new symbols for the API reference 2011-06-09 15:40:57 +01:00
Neil Roberts
701440efd8 clutter-actor: Add a 'has_overlaps' virtual
This adds a virtual to ClutterActor so that an actor subclass can
report whether it has overlapping primitives. ClutterActor uses this
to determine whether it needs to use ClutterFlattenEffect to implement
the opacity property. The default implementation of the virtual
returns TRUE which means that most actors will end up being redirected
offscreen when the opacity != 255. ClutterTexture and ClutterRectangle
override this to return FALSE because they should never need to be
redirected. ClutterClone overrides it to divert to the source.

The values for the ClutterOffscreenRedirect enum have changed to:

AUTOMATIC_FOR_OPACITY

 The actor will only be redirected if has_overlaps returns TRUE and
 the opacity is < 255

ALWAYS_FOR_OPACITY

 The actor will always be redirected if the opacity < 255 regardless
 of the return value of has_overlaps

ALWAYS

 The actor will always be redirected offscreen.

This means that the property can't be used to prevent the actor from
being redirected but only to increase the likelihood that it will be
redirected.

ClutterActor now adds and removes the flatten effect depending on
whether flattening is needed directly in clutter_actor_paint(). There
are new internal versions of add/remove_effect that don't queue a
redraw. This means that ClutterFlattenEffect is now just a no-op
subclass of ClutterOffscreen. It is only needed because
ClutterOffscreen is abstract. Removing the effect also makes it so
that the cached image will be freed as soon as an actor is repainted
without being flattened.
2011-05-13 01:46:32 +01:00
Neil Roberts
7f78237ee5 clutter-actor: Add an 'offscreen-redirect' property
This adds a property which can be used to redirect the actor through
an FBO before painting so that it becomes flattened in an image. The
image can be used as a cache to avoid having to repaint the actor if
something unrelated in the scene changes. It can also be used to
implement correct opacity even if the actor has overlapping
primitives. The property is an enum that takes three values:

CLUTTER_OFFSCREEN_REDIRECT_NEVER: The default behaviour which is to
  never flatten the actor.

CLUTTER_OFFSCREEN_REDIRECT_ALWAYS: The actor is always redirected
  through an FBO.

CLUTTER_OFFSCREEN_REDIRECT_ONLY_FOR_OPACITY: The actor is only
  redirected through an FBO if the paint opacity is not 255. This
  value would be used if the actor wants correct opacity. It will
  avoid the overhead of using an FBO whenever the actor is fully
  opaque.

The property is implemented by installing a ClutterFlattenEffect.
ClutterFlattenEffect is a new internal class which subclasses
ClutterOffscreen to redirect the painting to an FBO. When
ClutterOffscreen paints, the effect sets an opacity override on the
actor so that the image will always contain the actor at full
opacity. The opacity is then applied to the resulting image before
painting it to the stage. This means the actor does not need to be
redrawn while the opacity is being animated.

The effect has a high internal priority so that it will always occur
before any other effects and it gets hidden from the application.
2011-05-13 01:46:32 +01:00
Neil Roberts
00b733a85a clutter-effect: Add clutter_effect_queue_rerun
This adds a new public function to queue a rerun of an effect. If
nothing else queues a redraw then when the effect's actor is painted
the effect will be run without the CLUTTER_EFFECT_RUN_ACTOR_DIRTY
flag. This allows parametrised offscreen effects to report that they
need to redraw the image without having to redraw the underlying
actor. This will be used to implement the 'transparency' effect of
ClutterActor.

If multiple redraws are queued with different effects then redrawing
is started from the one that occurs last in the list of effects.

Internally the function is a wrapper around the new function
_clutter_actor_queue_redraw_full. This is intended to be the sole
point of code for queuing redraws on an actor. It has parameters for
the clip and the effect. The other two existing functions to queue a
redraw (one with a clip and one without) now wrap around this function
by passing a NULL effect.
2011-05-13 01:46:32 +01:00
Neil Roberts
c3aa4d24bf clutter-effect: Add a 'run' virtual
This adds a new virtual to ClutterEffect which is intended to be a
more flexible replacement for the pre and post_paint functions. The
implementation of a run virtual would look something like this:

void
effect_run (ClutterEffect *effect,
            ClutterEffectRunFlags flags)
{
  /* Set up state */
  /* ... */

  /* Chain to the next item in the paint sequence */
  clutter_actor_continue_paint (priv->actor);

  /* Clean up state */
  /* ... */
}

ClutterActor now just calls this virtual instead of the pre_paint and
post_paint functions. It keeps track of the next effect in the list so
that it knows what to do when clutter_actor_continue_paint is
called. clutter_actor_continue_paint is a new function added just for
implementing effects.

The default implementation of the run virtual just calls pre_paint and
post_paint so that existing effects will continue to work.

An effect is allowed to conditionally skip calling
clutter_actor_continue_paint(). This is useful to implement effects
that cache the image of an actor. The flags parameter can be used to
determine if the actor is dirty since the last paint. ClutterActor
sets this flag whenever propagated_one_redraw is TRUE which means that
a redraw for this actor or one of its children was queued.
2011-05-13 01:46:31 +01:00
Emmanuele Bassi
0c83e6a59a offscreen-effect: Add public accessor for target size
The OffscreenEffect class needs to expose a way for sub-classes to
track the size of FBO it creates, in case it has to do some geometry
deformations like the DeformEffect sub-classes.

Let's move the private symbol we used internally in 1.6 to fix
DeformEffect to the list of public symbols of OffscreenEffect.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2570
2011-02-28 14:34:36 +00:00
Emmanuele Bassi
d3a7b7502e event: Add setters for ClutterEvent members
Creating a synthetic event requires direct access to the ClutterEvent
union members; this access does not map in bindings to high-level
languages, especially run-time bindings using GObject-Introspection.
It's also midly annoying from C, as it unnecessarily exposes the guts of
ClutterEvent - something we might want to fix in the future.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2575
2011-02-28 14:16:23 +00:00
Emmanuele Bassi
b3784bd2b4 event: Add a setter for the device field
When synthesizing events coming from input devices it should be
possible to just call a setter function, to avoid a huge switch
on the type of the event.

Clutter should also store the device pointer inside the private
data, for faster access of the pointer in allocated events.

Finally, the get_device_id() and get_device_type() accessors should
just be wrappers around clutter_event_get_device(), to reduce the
amount of code duplication.
2011-01-28 18:19:49 +00:00
Emmanuele Bassi
89467abae5 docs: More documentation fixes for InputDevice 2011-01-21 10:25:46 +00:00
Emmanuele Bassi
dd5f6ca7e1 device: Add more accessors for properties
Allow using real accessor methods for getting the ClutterInputDevice
properties set on construction.
2011-01-21 10:25:45 +00:00
Emmanuele Bassi
ad06f1b20f docs: Update API reference 2011-01-21 10:25:45 +00:00
Emmanuele Bassi
431200f40d device: Add keys and axes accessors
Allow retrieving the number of keys and axes, since we provide the API
to iterate over them both.
2011-01-21 10:25:44 +00:00
Emmanuele Bassi
a3102a777e docs: Fill out documentation for new symbols 2011-01-21 10:25:44 +00:00
Emmanuele Bassi
ca092477c2 Appease the gods in introspection
Reduce the amount of bogus warnings g-ir-scanner prints out.
2011-01-20 16:35:26 +00:00
Emmanuele Bassi
54d00ebaf0 docs: Add ClutterClickAction.get_state() 2011-01-17 17:31:46 +00:00
Emmanuele Bassi
bbede9fef5 stage: Add :accept-focus property and accessors
Allow the developer to set whether the Stage should receive key focus
when mapped. The implementation is fully backend-dependent. The default
value is TRUE because that's what we've been expecting so far.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2500
2010-12-30 12:44:13 +00:00
Emmanuele Bassi
c444447cd3 timeline: Rename the reverse property to auto-reverse
Other frameworks expose the same functionality as "auto-reverse",
probably to match the cassette tape player. It actually makes sense
for Clutter to follow suit.
2010-12-17 12:07:52 +00:00
Emmanuele Bassi
24133ddadc Rename the EGLDisplay accessors
The accessor for the EGL display should be namespaced for the correct
backend-specific API.
2010-12-09 15:34:22 +00:00
Emmanuele Bassi
71a838815f timeline: Add :reverse property
The :reverse property removes the pattern of connecting to the
::completed signal of a Timeline to change the direction.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2408
2010-11-18 15:18:19 +00:00
Emmanuele Bassi
3c15c0c9bb Add SnapConstraint
A SnapConstraint is a constraint that "snaps" the edges of two actors
together.
2010-11-15 16:00:49 +00:00
Emmanuele Bassi
985518c601 color: Add named, global colors
Since EGA colors are apparently all the rage in other toolkits, Clutter
should not be left out. On top of the usual CGA/EGA palette the static
colors also include the Tango Icon palette, which at least is more
pleasant to the eye.

Static colors are accessed through an enumeration by using
clutter_color_get_static(), or using the short-hand pre-processor
macros.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2066
2010-11-11 13:14:23 +00:00
Emmanuele Bassi
b4588b57df reference: Add a Wayland section 2010-11-08 16:15:23 +00:00
Emmanuele Bassi
4909ecc71e gtk-doc: Fixes for the API references 2010-11-08 16:01:19 +00:00
Emmanuele Bassi
ef6b46d826 Merge branch 'wip/path-constraint'
* wip/path-constraint:
  docs: Add PathConstraint
  tests: Add a PathConstraint interactive test
  Add ClutterPathConstraint
  actor-box: Add setters for origin and size
2010-10-25 17:09:46 +01:00
Emmanuele Bassi
f6ab7eccd9 docs: Add PathConstraint 2010-10-25 16:09:40 +01:00
Emmanuele Bassi
3f6ec0ba5a actor-box: Add setters for origin and size 2010-10-25 15:45:35 +01:00
Neil Roberts
e66c679e84 win32: Add a public clutter_win32_handle_event function
This function handles a single windows message. The idea is that it
could be used by clutter-gtk to forward on events from a
GdkEventFilter. The function replaces the old message_translate()
function. That function didn't translate the event anymore anyway and
instead it could generate multiple events so
clutter_win32_handle_event seems like a more appropriate name. The
function returns TRUE or FALSE depending on whether the event was
completely handled instead of setting call_window_proc.
2010-10-25 13:19:17 +01:00
Emmanuele Bassi
d5376bf317 color: Add Color.interpolate() method
The interpolate() method does what it says on the tin: it interpolates
between two colors using the given factor.

ClutterColor uses it to register a progress function for Intervals.
2010-10-11 15:39:19 +01:00