This makes ClutterText implement the Scriptable interface so that we can
have a custom property parser and setter for the font-description
property. This works by simply passing the string description through
to clutter_text_set_font_name.
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
Actually this change has two notable effects; firstly we no longer
perform culling during picking and secondly we avoid updating the
last-paint-volume of an actor when picking.
We shouldn't perform culling during picking until clutter-stage.c is
updated to setup the clipping planes appropriately.
Since the last-paint-volume is intended to represent the visible region
of the actor the last time it was painted on screen it doesn't make
sense to update this during off screen pick renders since we are liable
to end up with a last-paint-volume that maps to an actors new position
when we next come to paint for real.
This fixes a bug in gnome-shell with dragging dash icons leaving a
messy trail on the screen.
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
The FSF changed address, so we need to update the license accordingly to
avoid triggering issues with automated license checkers used by build
systems, like OBS.
https://bugzilla.gnome.org/show_bug.cgi?id=656588
All 2D coordinate spaces in Cogl have their origin at the top-left so we
shouldn't be flipping the coordinates we pass to
cogl_framebuffer_swap_region to be relative to the bottom of the
framebuffer.
This bumps the Cogl version requirement to 1.7.5 since we've had to fix
a bug in the semantics of cogl_framebuffer_swap_region.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
Since commit 38b67e2884 of Cogl the naming scheme for winsys-specific
API has changed to be cogl_win32_onscreen_* instead of
cogl_onscreen_win32_* so it wouldn't build on Windows.
Added isHiding field to _ClutterStageOSX to allow windowDidResignKey
delegate to not order full screen window back whilst the full screen
window was being hidden. This caused other application windows to be
hidden. Also added code to keep hidden stage windows from being listed
in the application's Windows menu.
https://bugzilla.gnome.org/show_bug.cgi?id=655311
Added -windowDidChangeScreen: delegate to handle condition where moving
host window to a different screen would cause pick errors to be output.
The delegate just causes the stage to be redrawn which re-creates the
pick buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=655306
The Animatable interface allows object classes to provide and animate
properties outside of the usual GObject property introspection API.
This change allows ClutterState to defer to the animatable objects the
property introspection and animation, just like ClutterAnimation does.
The animate_property() method of the Animatable interface is far less
than optimal:
• it has a direct reference to ClutterAnimation;
• it has an interval decomposed as two values.
These issues tie the Animatable interface with the Animation object,
even though it's neither necessary nor future-proof.
Let's introduce a new method, interpolate_value(), which does not
reference ClutterAnimation and uses a ClutterInterval to express the
initial and final states.
All ClutterModelIter virtual functions have a default implementation,
and G_TYPE_INSTANCE_GET_CLASS cannot return NULL unless in case of a
catastrophic event in the type system - which will most likely blow up
any application code way before you could call a ModelIter method.
Thus, the idiom:
klass = CLUTTER_MODEL_ITER_GET_CLASS (instance);
if (klass && klass->vfunc)
klass->vfunc (instance);
is utterly useless complication, and it can be perfectly replaced by:
CLUTTER_MODEL_ITER_GET_CLASS (instance)->vfunc (instance);
without any loss of safety.
Currently, only clutter_model_iter_set_valist() is in charge of emitting
the ClutterModel::row-changed signal. Both the set() and the
set_valist() functions can be called with multiple columns, so we
coalesce the signal emission at the end of the set_valist(), to have a
single ::row-changed emission per change.
The clutter_model_iter_set_value() function is just a thin wrapper
around the set_value() virtual function, but since it's called
internally we cannot add the signal emission there as well, as we'd
break the signal coalescing.
For this reason, we need some code refactoring inside the various set()
variants of ClutterModelIter:
- we only use the internal va_arg variant for both the set() and
set_valist() public functions, to avoid multiple type checks;
- the internal set_valist() calls an internal set_value() method
which calls the virtual function from the iterator vtable;
- a new internal emit_row_changed() method is needed to retrieve
the ClutterModel from the iterator, and emit the signal;
Now, all three variants of the value setter will call an internal
ClutterModelIter::set_value() wrapper, and emit the ::row-changed
signal.
To check that the intended behaviour has been implemented, and it's not
going to be broken, the test suite has grown a new unit which populates
a model and changes a random row.
Cally was initially created with Clutter 0.6 in mind. To check
recursively the visibility of a actor a custom method was added.
Since 0.8.4 clutter_actor_get_pain_visibility provides
the same functionality.
Also removed a dummy method. Lets add methods that provide a real
functionality.
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.
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.