Commit Graph

7694 Commits

Author SHA1 Message Date
Bastian Winkler
1eb869ec8f Add ClutterGridLayout
ClutterGridLayout is port of GtkGrid to a Clutter layout manager. All
the logic is taken from gtkgrid.c, so all the credits should go to
Matthias Clasen for writing this nice piece of code.

ClutterGridLayout supports adding children with it's own methods
GridLayout.attach() and GridLayout.attach_next_to() as well as
Actor.add_child() and friends. The latter adds children in a similar
fashion to ClutterBoxLayout

https://bugzilla.gnome.org/show_bug.cgi?id=677372
2012-06-05 12:28:25 +02:00
Alexander Larsson
8ef55e4e98 Don't allocate size for invisible BinLayout children 2012-06-05 10:55:17 +02:00
Bastian Winkler
c7c3d85225 box-layout: Deprecate expand/fill/align child properties
These are covered by ClutterActor:[xy]-align and
ClutterActor:[xy]-expand

https://bugzilla.gnome.org/show_bug.cgi?id=677283
2012-06-04 16:16:41 +02:00
Bastian Winkler
f14c71cd3c examples: Updated box-layout example
Updated test-box-layout to use modern API and move it to examples.

https://bugzilla.gnome.org/show_bug.cgi?id=677283
2012-06-04 16:16:39 +02:00
Bastian Winkler
157353ec3c box-layout: Honor actor expand and alignment
Check if the actor has needs to expand and use Actor.allocate() instead
of Actor.allocate_align_fill() in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=677283
2012-06-04 16:16:37 +02:00
Bastian Winkler
8e24de86b6 table-layout: Honor actors expand and alignment settings
Check if the actor has needs to expand and use Actor.allocate() instead
of Actor.allocate_align_fill in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=677284
2012-06-04 16:12:47 +02:00
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
Bruno Brouard
dcae4909f3 Updated French translation 2012-06-03 13:51:19 +02:00
Fran Diéguez
23daf302ae Updated Galician translations 2012-06-03 03:23:40 +02:00
Debarshi Ray
d154a10fa0 cookbook/examples: Don't mix up height and width while splitting
Fixes: https://bugzilla.gnome.org/675998
2012-05-31 11:50:58 +01:00
Emmanuele Bassi
b1fcc828be osx/backend: Chain up in create_context()
This will ensure that we have a CoglContext, albeit the stub winsys one,
on Mac.

Tested-by: Roland Peffer <gdevel@clixxun.com>
Tested-by: Laszlo Pandy <laszlok2@gmail.com>
2012-05-31 10:06:05 +01:00
Emanuele Aina
7f9c3976a1 Fix width-for-height allocations
https://bugzilla.gnome.org/show_bug.cgi?id=677039
2012-05-31 09:55:26 +01:00
Emmanuele Bassi
de4d70af69 timeline: Add a new "stopped" signal
The ::stopped signal is emitted when the timeline has been completely
exhausted or when the timeline has been programmatically stopped by
using clutter_timeline_stop(); the notification at the end of the
timeline run allows to write handlers without having to check whether
the current repeat is the last one, like we are forced to do when using
the ::completed signal.

Based on the patch by: Jasper St. Pierre <jstpierre@mecheye.net>

https://bugzilla.gnome.org/show_bug.cgi?id=676854
2012-05-31 09:54:23 +01:00
Emmanuele Bassi
4634dde613 actor: Stop transitions on remove_child()
There's no point in having transitions running when removing a child, so
we just stop them.

https://bugzilla.gnome.org/show_bug.cgi?id=677098
2012-05-31 10:28:54 +02:00
Daniel Mustieles
78e789007f Updated Spanish translation 2012-05-30 17:48:00 +02:00
Emmanuele Bassi
b9533cb397 actor: Finally fix RESIZE_ASPECT content gravity
Ensure that resizing transitions smoothly when switching between major
axis; the allocation aspect ratio is not important: it's the size of the
allocation that dictates the major axis.
2012-05-30 12:49:11 +01:00
Bastian Winkler
7df4bfcf3b box-layout: Remove unused BoxChild members
These are leftovers from the old animation API an are unused now.

https://bugzilla.gnome.org/show_bug.cgi?id=677086
2012-05-30 12:47:32 +02:00
Bastian Winkler
93627c876d examples: Allow optional animations in flow-layout
Allow animations to demonstrate the LayoutManager animation API

https://bugzilla.gnome.org/show_bug.cgi?id=677085
2012-05-30 12:47:21 +02:00
Matej Urbančič
4c3bb5e2de Updated Slovenian translation 2012-05-29 20:04:11 +02:00
Bastian Winkler
1339b39132 examples: Update layout-manager example to use the animations API
https://bugzilla.gnome.org/show_bug.cgi?id=676827
2012-05-28 19:37:19 +02:00
Bastian Winkler
793bde9143 table-layout: Use the ClutterLayoutManager animation API
ClutterTableLayout now only calls the animation API of
ClutterLayoutManager

https://bugzilla.gnome.org/show_bug.cgi?id=676827
2012-05-28 19:37:11 +02:00
Bastian Winkler
58a1854b57 box-layout: Use the ClutterLayoutManager animation API
ClutterBoxLayout now only calls the animation API of
ClutterLayoutManager

https://bugzilla.gnome.org/show_bug.cgi?id=676827
2012-05-28 19:37:11 +02:00
Bastian Winkler
320fb156b4 flow-layout: Implement layout animations
Allow to animate the child allocation using the ClutterLayoutManager
animation API

https://bugzilla.gnome.org/show_bug.cgi?id=676827
2012-05-28 19:37:10 +02:00
Bastian Winkler
03ec016faa bin-layout: Implement layout animations
Allow to animate the child allocation using the ClutterLayoutManager
animation API

https://bugzilla.gnome.org/show_bug.cgi?id=676827
2012-05-28 19:37:10 +02: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
Bastian Winkler
734720ef0f layout-manager: Add a private struct to hold future properties
In order to allow the abstract ClutterLayoutManager class to have own
GObject properties we'll need a private structure.

https://bugzilla.gnome.org/show_bug.cgi?id=676827
2012-05-28 19:37:10 +02:00
Emmanuele Bassi
f9c29d5067 build: Move test-unit-names.h out of the dist
Let it be generated at build time, as it should.

https://bugzilla.gnome.org/show_bug.cgi?id=674365
2012-05-28 15:36:48 +01:00
Emmanuele Bassi
8e9992de7c paint-volume: Use the correct coordinate for axis alignment
The z coordinate of the origin should be checked against the same
coordinate of the vertex behind it. Given that most actors are flat
surfaces, this check should always succeed.

https://bugzilla.gnome.org/show_bug.cgi?id=675396
2012-05-28 15:22:54 +01:00
Bastian Winkler
58b13aa412 text: Enable implicit color animations
Implement the ClutterAnimatable interface to enable implicit animations
for :color, :cursor-color, :selected-text-color and :selection-color.

https://bugzilla.gnome.org/show_bug.cgi?id=676963
2012-05-28 15:22:47 +01: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
Chun-wei Fan
0230f97f60 Visual C++ support: Copy clutter-gdk.h as well
... when the GDK backend is also built
2012-05-24 23:34:36 +08:00
Chun-wei Fan
26285416b2 Visual C++ 2010: Fix x64 Release_GDK configs 2012-05-24 22:27:57 +08:00
Emmanuele Bassi
2878258fc0 examples: Update drag and drop action code
Use modern API and show idiomatic behaviour.
2012-05-24 13:58:31 +01:00
Alexandre Franke
a45d6455f7 Update French translation 2012-05-24 11:50:34 +02:00
Mike Ruprecht
ee708d1cf8 flow-layout: Check for all positive values
When creating a FlowLayout container, setting a specific size on it, and
adding a child to it, as per the attached testcase, it crashes. The line
on the backtrace doesn't really make sense, but from looking over it, it
appears that it's probably because priv->line_natural is NULL. The
attached patch makes it so in this case, priv->line_natural is
allocated.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-05-22 14:25:19 +01:00
Emmanuele Bassi
403e1c7e70 modules: Use 0.10 branch for GStreamer packages 2012-05-22 13:58:40 +01:00
Chun-wei Fan
be5eb2f163 vs9/clutter.sln: Fix missing build item 2012-05-22 01:50:12 +08:00
Chun-wei Fan
ef1860d71d Bug 676150 GDK: Fix build on Windows
-Don't include unistd.h and stdint.h unconditionally as not all Windows
 compilers have them around.
-Only include cogl/cogl-xlib.h when it is really supported by Cogl and GDK.
-sys/ioctl.h is not available on Windows (MinGW/MSVC).
-Correct the call to cogl_renderer_set_winsys_id:
 (backend_cogl->cogl_renderer, COGL_WINSYS_ID_WGL) ->
 (renderer, COGL_WINSYS_ID_WGL)
2012-05-21 23:01:23 +08:00
Bastian Winkler
aeea9ee778 actor: Add a custom scriptable "margin" property
The property uses an array with the following CSS style syntax

 [ top, right, bottom, left ] or
 [ top, left/right, bottom ] or
 [ top/bottom, left/right ] or
 [ top/right/bottom/left ]

https://bugzilla.gnome.org/show_bug.cgi?id=676367
2012-05-21 15:31:34 +02:00
Dominique Bureau
a2d40fcf8c ClutterText: Cannot pass NULL string to clutter_text_set_text()
Passing a NULL buffer to clutter_text_set_text() does not behave the same
way as passing an empty string "" (as specified in the documentation).
This was working as expected previously, but somehow the behaviour changed
at some point and created 2 new issues:
- Passing a NULL pointer will not reset the string
- If the ClutterText is editable, it will segfault in strcmp

Validations have been added to prevent this.

https://bugzilla.gnome.org/show_bug.cgi?id=675890
2012-05-21 11:30:22 +01:00
Tristan Van Berkom
dd61be7c2e ClutterDropAction: Avoid accessing priv->stage is not yet resolved.
This fixes drop_action_unregister() to not call g_object_get_data()
on priv->stage if not yet resolved. This can happen if the action's
actor was destroyed before ever being mapped.
2012-05-21 08:43:17 +01:00
Emmanuele Bassi
2c5af0c868 scroll-actor: Check for point equality in the internal setter
The public API should just accept any valid value; it's up to the
internal setter to check if we're getting the same value as the one
currently set.
2012-05-18 18:00:30 +01:00
Bastien Nocera
26c1d89d19 scroll-actor: Fix ->transition not being reset
When the transition was removed from the scroll-actor manually,
to cancel a not-finished animation, the transition struct member
wasn't reset to NULL.

This fixes this problem, and removes the need for the struct member
to be reset manually when animation has completed.

https://bugzilla.gnome.org/show_bug.cgi?id=676334
2012-05-18 17:36:44 +01:00
Emmanuele Bassi
c9028cee48 Move scroll actor test to the examples
Nothing specific to test, and the code is idiomatic enough to be used as
an example.
2012-05-17 10:57:15 +01:00
Bastian Winkler
06d1398592 table-layout: Remove unused animation helpers
They aren't used since ClutterTableLayout switched to the implicit
animations API.

https://bugzilla.gnome.org/show_bug.cgi?id=676158
2012-05-16 14:55:10 +02:00
Chun-wei Fan
ac05ad47bf VS property sheets: Correct "install" process
Fix the location where clutter-win32.h is "installed".
2012-05-16 18:58:53 +08:00
Chun-wei Fan
1153e04766 Visual C++ support: Fix clutter.def generation
I forgot about the Visual C++ 2010 files... :|
2012-05-16 18:36:51 +08:00
Chun-wei Fan
d5851c8bf9 Visual C++ support: Fix clutter.def generation
Some Windows-specific functions were not exported due to this problem.
2012-05-16 18:35:27 +08:00
Chun-wei Fan
37e9215521 Visual C++ support: Avoid redefinition warnings
CLUTTER_WINDOWING_GDK is defined in the (pre-configured) clutter-config.h,
so don't define that in the Projects again.
2012-05-16 17:21:10 +08:00