The coverage of the Behaviour sub-classes is currently abysmal. An
initial test suite for Behaviours should at least verify that the
accessors and the constructors are doing the right thing.
This initial test suite just verifies the BehaviourOpacity sub-class,
but it already bumps up the overall coverage by 2%.
* device-manager: (37 commits)
x11: Re-enable XI1 extension keyboards
x11: Always handle core device events before XI events
docs: Documentation fixes for DeviceManager
device-manager: Fix the signals definition
docs: Add sections for InputDevice and DeviceManager
docs: Add clutter_input_device_get_device_name()
tests: Print out the device details on motion
Always register core devices
device: Remove unused is_default member
win32: Experimental implementation of device support
tests: Print the device name, as well as its Id
x11: Fill out the :name property of the InputDevices
device: Add the :name property to InputDevice
x11: Store core devices on the X11 Backend singleton
device: Unset the cursor actor when leaving the stage
device: Add pointer actor getter
x11: Discard the LeaveNotify for off-stage ButtonRelease
device: Do not overwrite the stage for an InputDevice
event: Off-stage button releases have a click count of 1
event: Scroll events do not have click count
...
It's very useful to see the actual number the reference value is
compared too when the test fails. GTest has g_assert_cmp$type()
functions for that, so make good use of them.
A small doubt has risen about the use of CoglTextureUnit in materials:
will texture matrices still work if we have several materials, each of
them having at texture on the same texture unit? The answer is yes!
test-cogl-multitexture has been extended to use 2 materials with about
the same setup except a little difference: the texture matrices for the
lightmaps rotate in opposite directions.
While at it, changed the rotation behaviour by an implicit animation
with a small additional bonus bling.
The extension keyboard support in XInput 1.x is hopelessly broken.
Nevertheless, it's possible to use some bits of it, as we prefer the
core keyboard events to the XInput events, thus at least having proper
handling for X11 key events on the Stage window.
• The enter/leave event line should take into account the case where
the related field is set to NULL (meaning entering from off-stage
and leaving the stage).
• The ButtonRelease line shows the click count but uses the button; the
button *and* the click count should be displayed for both ButtonPress
and ButtonRelease, to verify they match.
The output of test-events is a bit of a mess; this patch should clean
it up a little bit - at least enough for it to be useful again during
visual inspection.
Otherwise the paint handler will still be run for the subsequent
tests. This ends up writing to the ‘state’ variable which used to be
on the stack so it will end up corrupting some stack variable. This
was causing test-cogl-premult to fail.
This adds a test which renders a texture into a 1x1 pixel quad with
and without filters that use mipmaps. The pixel without mipmaps will
be one of the colors from the texture and the one with will be the
average of all the pixels in the texture.
If a user supplied multiple groups of texture coordinates with
cogl_rectangle_with_multitexture_coords() then we would repeatedly log only
the first group in the journal. This fixes that bug and adds a conformance
test to verify the fix.
Thanks to Gord Allott for reporting this bug.
The test-text "fake scrolling" code stopped working somewhere between
0.8 and 0.9, with the new layout code. Instead of the ::cursor-event
signal it should use an approach similar to the Scrollable interface in
the Moblin User Experience toolkit.
Right now, it makes sense to ignore this code entirely.
* animate-layout-manager:
layout-manager: Document the animation support
layout-manager: Rewind the timeline in begin_animation()
box-layout: Remove the allocations hash table
docs: Clean up the README file
layout: Let begin_animation() return the Alpha
box-layout: Add knobs for controlling animations
box-layout: Animate layout properties
layout: Add animation support to LayoutManager
Add ActorBox animation methods
* stage-use-alpha:
tests: Use accessor methods for :use-alpha
stage: Add accessors for :use-alpha
tests: Allow setting the stage opacity in test-paint-wrapper
stage: Premultiply the stage color
stage: Composite the opacity with the alpha channel
glx: Always request an ARGB visual
stage: Add :use-alpha property
materials: Get the right blend function for alpha
ClutterLayoutManager does not have any state associated with it, and
defers all the state to its sub-classes.
The BoxLayout is thus in charge of controlling:
• whether or not animations should be used
• the duration of the animation
• the easing mode of the animation
By adding three new properties:
• ClutterBoxLayout:use-animations
• ClutterBoxLayout:easing-duration
• ClutterBoxLayout:easing-mode
And their relative accessors pairs we can make BoxLayout decide whether
or not, and with which parameters, call the begin_animation() method of
ClutterLayoutManager.
The test-box-layout has been modified to reflect this new functionality,
by checking the key-press event for the 'a' key symbol to toggle the use
of animations.
* text-direction:
docs: Add text-direction accessors
Set the default language on the Pango context
actor: Set text direction on parenting
tests: Display the index inside text-box-layout
box-layout: Honour :text-direction
text: Dirty layout cache on text direction changes
actor: Add :text-direction property
Use the newly added ClutterTextDirection enumeration
Add ClutterTextDirection enumeration
This test did not open redhand.png as argc/argv should be handled
normally (argv[0] being the name of the exectutable).
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
Some tests can be given extra arguments. The test-interactive dispatch
mechanism handles that but the small shell scripts around the wrapper
do not forward the arguments to the wrapper.
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
cogl_push_draw_buffer, cogl_set_draw_buffer and cogl_pop_draw_buffer are now
deprecated and new code should use the new cogl_framebuffer_* API instead.
Code that previously did:
cogl_push_draw_buffer ();
cogl_set_draw_buffer (COGL_OFFSCREEN_BUFFER, buffer);
/* draw */
cogl_pop_draw_buffer ();
should now be re-written as:
cogl_push_framebuffer (buffer);
/* draw */
cogl_pop_framebuffer ();
As can be seen from the example above the rename has been used as an
opportunity to remove the redundant target argument from
cogl_set_draw_buffer; it now only takes one call to redirect to an offscreen
buffer, and finally the term framebuffer may be a bit more familiar to
anyone coming from an OpenGL background.
Since the rectangles packed inside the BoxLayout interactive test
have random colors it's not easy to verify the ordering. By using
the CoglPango API to print out the index in the middle of each
rectangle.
These changes caused the test to try to load redhand.png but this no
longer works since the TESTS_DATADIR changes in 0b4899ef23. The only
use of the hand is commented out anyway so it looks like the changes
were intended for temporary debugging.
cogl_clip_push, and cogl_clip_push_window_rect which are now deprecated were
used in various places internally so this just switches to using the
replacement functions.
cogl_clip_push() which accepts a rectangle in model space shouldn't have
been defined to take x,y,width,height arguments because this isn't consistant
with other Cogl API dealing with model space rectangles. If you are using a
coordinate system with the origin at the center and the y+ extending up,
then x,y,width,height isn't as natural as (x0,y0)(x1,y1). This API has
now been replace with cogl_clip_push_rectangle()
(As a general note: the Cogl API should only use the x,y,width,height style
when the appropriate coordinate space is defined by Cogl to have a top left
origin. E.g. window coordinates, or potentially texture coordinates)
cogl_clip_push_window_rect() shouldn't have been defined to take float
arguments since we only clip with integral pixel precision. We also
shouldn't have abbreviated "rectangle". This API has been replaced with
cogl_clip_push_window_rectangle()
cogl_clip_ensure() wasn't documented at all in Clutter 1.0 and probably
no one even knew it existed. This API isn't useful, and so it's now
deprecated. If no one complains we may remove the API altogether for
Clutter 1.2.
cogl_clip_stack_save() and cogl_clip_stack_restore() were originally added
to allow us to save/restore the clip when switching to/from offscreen
rendering. Now that offscreen draw buffers are defined to own their clip
state and the state will be automatically saved and restored this API is now
redundant and so deprecated.