1
0
Fork 0
Commit graph

203 commits

Author SHA1 Message Date
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
Emmanuele Bassi
7728ea951b docs: Add unused symbols to the Clutter API reference 2010-10-04 09:08:07 +01:00
Emmanuele Bassi
7ac84cf7a3 container: Add child_notify() wrapper
The child_notify() virtual function on ClutterContainer does not have a
wrapper for implementations to call.
2010-09-30 14:58:23 +01:00
Emmanuele Bassi
044809edb8 docs: Add PaintVolume to the API reference
And document the various related functions.
2010-09-29 15:12:57 +01:00
Emmanuele Bassi
ce174654bf docs: API reference fixes 2010-09-20 13:15:44 +01:00
Robert Bragg
ff4c24f0a4 geometry: Adds a clutter_geometry_intersects API
This adds a public function named clutter_geometry_intersects which
determines if two geometries intersect or not returning TRUE if so else
FALSE.
2010-09-13 18:18:34 +01:00
Emmanuele Bassi
01362effca actor: Add a method for querying key focus
A simple convenience method on Clutter.Actor for checking whether
it has key focus assigned on the Stage to which it belongs.
2010-09-10 11:42:11 +01:00
Emmanuele Bassi
71a4db6135 animation: Allow detaching an animation from an actor
When animating an actor through clutter_actor_animate() and friends we
might want forcibly detach the animation instance from the actor in
order to start a new one - for instance, in response to user
interaction.

Currently, there is no way to do that except in a very convoluted way,
by emitting the ::completed signal and adding a special case in the
signal handlers; this is due to the fact that clutter_actor_animate()
adds more logic than the one added by clutter_animation_set_object(),
so calling set_object(NULL) or unreferencing the animation instance
itself won't be enough.

The right way to approach this is to add a new method to Clutter.Actor
that detaches any eventual Animation currently referencing it.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2051
2010-09-10 11:18:53 +01:00
Emmanuele Bassi
0caef5c8aa docs: Fixes for gtk-doc 2010-09-03 16:12:24 +01:00
Damien Lespiau
0a0a59cf7b cex100: Add an API to configure the buffering mode of the GDL plane
GDL planes can be double or triple buffered. Let the user choose between
the two modes befored initalizing Clutter.
2010-09-03 11:13:35 +01:00
Damien Lespiau
01fcd11efd cex100: Add an API to configure the GDL plane to use
Intel CE3100 and CE4100 have several planes (framebuffers) and a
hardware blender to blend the planes togeteher to produce the final
image.

clutter_cex100_set_plane() lets you configure which framebuffer clutter
will use for its rendering.
2010-09-03 11:13:35 +01:00
Emmanuele Bassi
12a5bf2e06 offscreen-effect: Rename create_target to create_buffer
*** This is an API change ***

The create_target() virtual function should return a CoglHandle to a
texture; clutter_offscreen_effect_get_target(), instead, returns a
CoglMaterial to be painted in the implementation of the paint_target()
virtual function.

Instead of equating textures with materials, and confusing the user of
the API, we should mark the difference more prominently.

First of all, we should return a CoglMaterial* (now that we have that
as a public type) in get_target(); having handles all over the place
does not make it easier to distinguish the semantics of the virtual
functions.

Then we should rename create_target() to create_texture(), to make it
clear that what should be returned is a texture that is used as the
backing for the offscreen framebuffer.
2010-09-01 18:05:53 +01:00
Emmanuele Bassi
be9dd6e7da docs: Split x11-texture-pixmap in its own section 2010-08-28 21:18:12 +01:00
Emmanuele Bassi
36d45b660f click-action: Add get_button()
Allow retrieving the pointer button that caused the ::clicked signal to
be emitted.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2287
2010-08-26 16:39:39 +01:00
Emmanuele Bassi
459a6bb24c click-action: Add a method to force a release
It can be useful to be able to forcibly break the grab set up by the
ClickAction. The newly added release() method provides a mechanism to
release the grab and unset the :held state of the ClickAction.
2010-08-19 12:10:43 +01:00
José Dapena Paz
d14e294d86 Add ClutterTableLayout, a layout showing children in rows and columns
A TableLayout is a layout manager that allocates its children in rows
and columns. Each child is assigned to a cell (or more if a cell span
is set).

The supported child properties are:

  • x-expand and y-expand: if this cell with try to allocate the
    available extra space for the table.
  • x-fill and y-fill: if the child will get all the space available in
    the cell.
  • x-align and y-align: if the child does not fill the cell, then
    where the child will be aligned inside the cell.
  • row-span and col-span: number of cells the child will allocate for
    itself.

Also, the TableLayout has row-spacing and col-spacing for specifying
the space in pixels between rows and between columns.

We also include a simple test of the layout manager, and the
documentation updates.

The TableLayout was implemented starting from MxTable and
ClutterBoxLayout.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2038

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-08-10 23:20:06 +01:00
Emmanuele Bassi
07b01888ba actor: Add allocate_align_fill()
Layout managers are using the same code to allocate a child while taking
into consideration:

  • horizontal and vertical alignment
  • horizontal and vertical fill
  • the preferred minimum and natural size, depending
    on the :request-mode property
  • the text direction for the horizontal alignment
  • an offset given by the fixed position properties

Given the amount of code involved, and the amount of details that can go
horribly wrong while copy and pasting such code in various classes - let
alone various projects - Clutter should provide an allocate() variant
that does the right thing in the right way. This way, we have a single
point of failure.
2010-08-10 22:25:11 +01:00
Emmanuele Bassi
0cbfabcda4 stage: Add the NO_CLEAR_ON_PAINT hint
Some apps or some use cases don't need to clear the stage on immediate
rendering GPUs. A media player playing a fullscreen video or a
tile-based game, for instance.

These apps are redrawing the whole screen, so we can avoid clearing the
color buffer when preparing to paint the stage, since there is no
blending with the stage color being performed.

We can add an private set of hints to ClutterStage, and expose accessors
for each potential hint; the first hint is the 'no-clear' one.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2058
2010-07-13 14:57:48 +01:00
Øyvind Kolås
9e730727ca state: add clutter_state_set_state and clutter_state_warp_to_state
Replaced clutter_state_change with a boolean argument for animating the
transition or not with two separate argument-less methods.
2010-07-07 18:17:09 +01:00
Øyvind Kolås
ec05230b97 state: added clutter_state_key_get_property_type
A function to retrieve the type of the value stored in a key, the
equivalent already exists for ClutterAnimator.
2010-07-06 14:14:34 +01:00
Øyvind Kolås
38941372bf state: rename property "target-state" to "state"
This reduces the amount of typing, and should provide for more readable
code for most uses of ClutterState.
2010-07-02 17:41:33 +01:00
Emmanuele Bassi
286f307c10 docs: Various fixes 2010-06-30 11:32:15 +01:00
Robert Bragg
d45ac12628 egl: Consolidates eglx and eglnative into one "egl" winsys
This remove quite a lot of redundant code by consolidating the eglx and
eglnative window system backends.
2010-06-18 17:38:41 +01:00
Emmanuele Bassi
77c63e0237 bind-constraint: Add accessor methods
ClutterBindConstraint should have accessor methods for its properties,
to allow direct manipulation instead of going through GObject's API.
2010-06-17 12:02:28 +01:00
Emmanuele Bassi
859d1f0792 align-constraint: Publish the properties accessors
The accessor methods for the AlignConstraint properties should be
public.
2010-06-16 12:47:56 +01:00
Emmanuele Bassi
b8b2a51d44 Merge branch 'wip/deform-effect'
* wip/deform-effect:
  docs: Add DeformEffect and PageTurnEffect to the API reference
  effect: Add PageTurnEffect
  effect: Add DeformEffect
  offscreen-effect: Traslate the modelview with the offsets
  docs: Fix Effect subclassing section
2010-06-11 18:12:54 +01:00
Dan Winship
f3f3b56742 actor: add clutter_actor_contains()
It is often useful to determine if one actor is an ancestor of
another. Add a method to do that.

http://bugzilla.openedhand.com/show_bug.cgi?id=2162

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-06-11 15:19:45 +01:00
Emmanuele Bassi
d816acd834 shader-effect: Allow creating vertex shaders
By default, ShaderEffect creates a fragment shader; in order to be able
to deprecate ClutterShader we need a way for ShaderEffect sub-classes to
create a vertex shader if needed - By using a write-only, constructor
only property.

ClutterShader has, internally, a ClutterShaderType enumeration that can
be used exactly for this. We just need to expose it and create a GObject
property for ClutterShaderEffect.
2010-06-11 14:47:48 +01:00
Emmanuele Bassi
7343c66482 docs: Add DeformEffect and PageTurnEffect to the API reference 2010-06-10 18:51:22 +01:00
Emmanuele Bassi
23084b9768 docs: Effects fixes for the API reference 2010-06-03 14:34:41 +01:00
Emmanuele Bassi
f2caafa127 docs: Add Effects API to the reference 2010-06-03 14:10:55 +01:00
Emmanuele Bassi
91220c4b46 docs: Miscellaneous fixes to silence gtk-doc 2010-06-01 14:15:03 +01:00
Emmanuele Bassi
346ebce573 actor: Add accessors pair for :clip-to-allocation
We should have an accessors pair for the :clip-to-allocation property,
to avoid going through the generic GObject accessors.
2010-05-26 16:09:47 +01:00
Emmanuele Bassi
b0c0f24bd2 docs: Add ClickAction to the API reference
And clean up the reference index.
2010-05-25 11:53:59 +01:00
Emmanuele Bassi
4dd5088fe2 docs: Add Actor.get_accessible() to the API reference 2010-05-24 16:46:38 +01:00
Emmanuele Bassi
af84d97fca interval: Add a pointer variant to compute_value()
ClutterInterval.compute_value() computes the new value given a progress
and copies it to a given GValue. Since most of the time we want to pass
that very same value to another function that copies it again, we should
have a compute_value() variant that stores that computed value inside
ClutterInterval and returns a pointer to it. This way we initialize the
result GValue just once and we never copy it, as long as the Interval
instance is valid.
2010-05-24 15:06:14 +01:00
Emmanuele Bassi
489c16c6a6 docs: Align parameter names between header and source code 2010-05-24 14:20:23 +01:00
Emmanuele Bassi
07ffa015ab docs: Add ClutterState to the API reference 2010-05-24 12:00:43 +01:00
Emmanuele Bassi
7ce2693944 Add named modifiers for Action and Constraint
The ClutterActor API should have modifier methods for adding, removing
and retrieving Actions and Constraints using the ClutterActorMeta:name
property - mostly, for convenience.
2010-05-20 11:19:51 +01:00
Emmanuele Bassi
6457f66976 Miscellaneous documentation fixes 2010-05-19 16:10:05 +01:00
Owen W. Taylor
8df4a0b8fd actor: Add has_allocation() method
Add clutter_actor_has_allocation(), a method meant to be used when
deciding whether to call clutter_actor_get_allocation_box() or any
of its wrappers.

The get_allocation_box() method will, in case the allocation is invalid,
perform a costly re-allocation cycle to ensure that the returned box
is valid. The has_allocation() method is meant to be used if we have an
actor calling get_allocation_box() from outside the place where the
allocation is always guaranteed to be valid.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-03-26 00:46:31 +00:00
Øyvind Kolås
09d8460a5c animator: s/clutter_animator_run/clutter_animator_start/
This is consistent with choice of words in clutter_timeline_start and
makes the API less surprising.
2010-03-02 17:03:03 +00:00
Emmanuele Bassi
74a27bbb1c docs: Documentation fixes
Let's see if we can get a 100% coverage for Clutter too.
2010-03-02 11:12:32 +00:00
Emmanuele Bassi
53eecb8469 docs: Add Animator.compute_value()
The clutter_animator_compute_value() has been added to the API, but it
is missing from the API reference.
2010-03-01 17:47:52 +00:00
Emmanuele Bassi
543e2d3f06 container: Expose create and destroy ChildMeta methods
It is conceivable that Container implementations might add children
outside of the Container::add() implementation - e.g. for packing at
a specific index. Since the addition (and removal) might happen outside
the common path we need to expose all the API that is implicitly called
by ClutterContainer when adding and removing a child - namely the
ChildMeta creation and destruction.
2010-02-25 12:55:12 +00:00
Emmanuele Bassi
8b040cac4d docs: Fixes for DeviceManager 2010-02-17 19:02:43 +00:00
Emmanuele Bassi
51a3e49c82 device: Allow updating devices from embedding toolkits
Embedding toolkits most likely will disable the event handling, so all
the input device code will not be executed. Unfortunately, the newly
added synthetic event generation of ENTER and LEAVE event pairs depends
on having input devices.

In order to unbreak things without reintroducing the madness of the
previous code we should allow embedding toolkits to just update the
state of an InputDevice by using the data contained inside the
ClutterEvent. This strategy has two obvious reasons:

  • the embedding toolkit is creating a ClutterEvent by translating
    a toolkit-native event anyway

  • this is exactly what ClutterStage does when processing events

We are, essentially, deferring input device handling to the embedding
toolkits, just like we're deferring event handling to them.
2010-02-17 18:21:50 +00:00
Emmanuele Bassi
d62ddc374f docs: Fixes for ClutterAnimator 2010-02-08 17:37:00 +00:00
Emmanuele Bassi
6106010b6f Merge remote branch 'origin/cwiiis-stage-resize'
* origin/cwiiis-stage-resize:
  [stage-x11] Set the default size differently
  [stage] Set default size correctly
  Revert "[x11] Don't set actor size on ConfigureNotify"
  [x11] Don't set actor size on ConfigureNotify
  [stage] Now that get_geometry works, use it
  [stage-x11] make get_geometry always get geometry
  [stage] Get the current size correctly
  [stage] Set minimum width/height to 1x1
  [stage] Add set/get_minumum_size
2010-02-08 10:34:22 +00:00