Commit Graph

3743 Commits

Author SHA1 Message Date
Emmanuele Bassi
7dd09e2186 Use G_DEFINE_BOXED_TYPE for all boxed types
We actually need a couple more macros for registering GValue
transformation functions. Those should be added to upstream
GLib.
2010-10-18 11:26:45 +01:00
Emmanuele Bassi
09a830d294 Remove conditional wrappers for property installation/notification
For the time being, just keep the #define's.
2010-10-18 11:26:45 +01:00
Emmanuele Bassi
9caf11f2d8 Use G_DEFINE_INTERFACE
GObject provides us with a nice, safe macro for defining interface
types.
2010-10-18 11:26:44 +01:00
Emmanuele Bassi
2b4ee9ab54 actor: Add more checks to the redraw queue 2010-10-15 16:05:44 +01:00
Emmanuele Bassi
56c89bd86b osx: Fix glib.h include path
The fix for removing glib/gmain.h introduced the wrong path for glib.h.
2010-10-15 12:40:43 +01:00
Roland Peffer
d842619755 osx: Add button mask to the modifier state translation
The modifier state translation is missing the CLUTTER_BUTTON*_MASK.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-10-14 18:23:02 +01:00
Kristian Høgsberg
134ce072e7 The amazing lazy-copy-back-repaint-page-flip
Always use pageflipping, but avoid full repaint by copying back dirty
regions from front to back.  Additionally, we dealy copying back until
we're ready to paint the new frame, so we can avoid copying areas that
will be repainted anyway.

This is the least amount of copying per frame we can get away with at all
and at the same time we don't have to worry about stalling the GPU on
synchronized blits since we always pageflip.
2010-10-14 16:23:05 +01:00
Kristian Høgsberg
cb5582c4ab Add wayland backend
This adds a clutter backend for running under the wayland window system.
Initial cogl framebuffer integration by Robert Bragg.
2010-10-14 16:23:05 +01:00
Kristian Høgsberg
a7cf98ebfc Initialize color masks lazily
When we don't use a window system drawable, we can't query the color
masks at context initialization time.  Do it lazily so we're sure to have
a current context with a valid framebuffer.
2010-10-14 16:23:05 +01:00
Robert Bragg
f456116c18 When unparenting an actor, remove queued redraws for all descendants
We need to make sure that redraws queued for actors on a stage are for
actors actually in the stage. So in clutter_actor_unparent() descend
through the children and remove redraws. Just removing the actor itself
isn't good enough since an entire hierarchy can be removed from the
stage without breaking it up into individual actors.

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

This is based on an original patch from Owen Taylor who debugged the
root cause of this bug; thanks.
2010-10-14 16:19:55 +01:00
Robert Bragg
07f2dba7e2 stage: handle unclipped redraw following clipped
In the case that an unclipped redraw of an actor is queued after a
clipped we should update any existing ClutterStageQueueRedrawEntry
so entry->has_clip = FALSE and free the previous clip.
2010-10-14 15:29:33 +01:00
Emmanuele Bassi
e6418a9dec constraints: Remove unused variable 2010-10-12 15:44:57 +01:00
Emmanuele Bassi
4e724aed46 bind-constraint: Use ::queue-relayout
Instead of using the allocation-changed signal, use the queue-relayout
signal on the source to queue a relayout on the actor to which the
BindConstraint has been attached to.

The ::allocation-changed signal is not always enough, given that a
BindConstraint can use the position as well as the size of an actor to
drive the allocation of another; in this regard, it's much similar
to a ClutterClone, which requires a notification on every change, even
potential, and not just real ones, given the short-circuiting done
inside ClutterActor.
2010-10-12 14:09:47 +01:00
Emmanuele Bassi
5c82b2551c constraints: Do not check for :enabled
ClutterActor will do it for us.
2010-10-12 14:09:17 +01:00
Emmanuele Bassi
3f27afde24 actor: Use an explicit check for NULL
Follow the coding style, and don't use the implicit C boolean
equivalence for NULL pointers.
2010-10-12 14:08:07 +01:00
Emmanuele Bassi
3b72fdb20c actor: Queue a relayout when adding/removing constraints
Constraints change the way an actor is allocated; this warrants a
relayout.
2010-10-12 14:07:27 +01:00
Emmanuele Bassi
91a9a355c3 actor: Check CluterActorMeta:enabled
Instead of delegating the check for the ActorMeta:enabled property to
the sub-classes of ClutterActorMeta, ClutterActor can do the check prior
to using the ClutterActorMeta instances.
2010-10-12 14:07:17 +01:00
Emmanuele Bassi
3f6b82c9c9 actor: Add debugging note for allocation changes 2010-10-12 14:04:05 +01:00
Emmanuele Bassi
89a389cd2b actor-box: Split out ActorBox into its own file
clutter-actor.c is getting way too large, so splitting it up wherever
possible makes sense.
2010-10-11 15:57:22 +01:00
Emmanuele Bassi
7a54bdc65d vertex: Register progress function
This allows animating properties storing a ClutterVertex.
2010-10-11 15:52:50 +01:00
Emmanuele Bassi
4931802fee geometry: Register a progress function
This allows animating properties storing a ClutterGeometry.
2010-10-11 15:44:09 +01:00
Emmanuele Bassi
a5fc90d4d9 actor-box: Register a progress function
So that we can animate properties storing ClutterActorBox.
2010-10-11 15:39:19 +01:00
Emmanuele Bassi
2f21c851ea script: Fix annotation for get_object()'s return value 2010-10-11 15:39:19 +01:00
Emmanuele Bassi
dcf2662616 interval: Remove special casing for ClutterColor
ClutterColor registers a progress function on type initialization, so we
don't need to special case it any more.
2010-10-11 15:39:19 +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
Neil Roberts
7e112472b5 cogl-texture-2d-sliced: Use the smallest possible waste
When picking a size for the last slice in a texture, Cogl would always
pick the biggest power of two size that doesn't create too much
waste and is less than or equal to the previous slice size. However
this can end up creating a texture that is bigger than needed if there
is a smaller power of two.

For example, if the maximum waste is 127 (the current default) and we
try to create a texture that is 257 pixels wide it will decide that
the next power of two (512) is too much waste (255) so it will create
the first slice at 256 pixels wide. Then we only have 1 pixel left to
allocate but Cogl would pick the next smaller size that has a small
enough waste which is 128. But of course 1 is already a power of two
so that's redundantly oversized by 127.

This patch fixes it so that whenever it finds a size that would be big
enough, instead of using exactly that it picks the next power of two
up from the size we need to fill.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2355
2010-10-11 14:40:04 +01:00
Emmanuele Bassi
1f106b35a9 Whitespace alignment fixes 2010-10-11 13:52:09 +01:00
Emmanuele Bassi
68d656c61b paint-volume: Add arguments checks
In some cases we access the arguments in public functions without, or
prior to checking the arguments.
2010-10-11 13:51:12 +01:00
Owen W. Taylor
8089af3c1b ClutterClone: Handle clone_source == NULL for get_paint_volume()
It's valid to have a ClutterClone without a clone source; in this
case the paint volume is empty.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2360
2010-10-11 13:43:39 +01:00
Emmanuele Bassi
e005892534 clone: Remove unnecessary G_UNLIKELY macros
A Clone:source property might be NULL, and we should not penalize
performance when we can just bail out early, because that would kind of
defeat the point.
2010-10-11 13:32:26 +01:00
Emmanuele Bassi
f8af2da4c8 osx: Compilation fixes
Replace deprecated symbols with the correct ones.
2010-10-10 09:31:55 +01:00
Emmanuele Bassi
981fed1f63 box-layout: Plug a memory leak
Similar to commit 4724be167f for
TableLayout.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2358
2010-10-08 13:29:49 +01:00
Neil Roberts
4724be167f Plug a memory leak in clutter-table-layout
Whenever the allocation is changed on a child of a ClutterTableLayout
and animations are not in effect then it would store a copy of the
allocation in the child meta data. However it was not freeing the old
copy of the allocation so it would end up with a small leak.

Instead of just changing it to free the old value this patch makes it
store the allocation inline in the meta data struct because it seems
that the size of an actor box is already quite small compared to the
size of the meta data struct so it is probably not worth having a
separate allocation for it. To detect the case when there has not yet
been an allocation a separate boolean is used instead of storing NULL.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2358
2010-10-08 12:11:39 +01:00
Damien Lespiau
155bde2465 texture: Fix the typos in the blurbs and make them not end with '.'
All the nifty things you discover when translating strings not exposed
to anyone. First the clutter-wide record of the number of typos in one
string. Second, ClutterTexture happened to have the only property blurbs
ending with a '.', remove them.
2010-10-05 08:39:40 +01:00
Damien Lespiau
2d56ed637c text: Rename the nick of the position property "Cursor Position"
the "position" property of ClutterText is really the position of the
cursor. Rename the nick accordingly not to confuse it with the position
of the actor itself and be consistent with all the other cursor-related
properties.
2010-10-05 08:25:06 +01:00
Damien Lespiau
a13182c740 cogl: Use Cogl (not COGL) consistently
If I remember correctly, Robert wants to name Cogl, Cogl (not COGL) so
start by having a consistent naming in the code.
2010-10-05 08:03:19 +01:00
Damien Lespiau
24577a0538 bin-layer: Fix the property blurbs
The descriptions for the 'y-align' and 'x-align' properties talk about a
layer and a layer manager. It seems that these properties are the
alignement factors relative to the BinLayout, so document them
accordingly.
2010-10-05 07:50:52 +01:00
Damien Lespiau
9ae1729f37 box-layout: Fix missing spaces in the blurbs of vertical and homogeneous 2010-10-04 18:52:57 +01:00
Damien Lespiau
9258f9bebb deform-effect: Fix Horiontal/Horizontal typo 2010-10-04 17:21:15 +01:00
Emmanuele Bassi
6af0ee2cbe cogl-x11: Trap glXDestroyPixmap()
There are ordering issues in the pixmap destruction with current and
past X11 server, Mesa and dri2. Under some circumstances, an X pixmap
might be destroyed with the GLX pixmap still referencing it, and thus
the X server will decide to destroy the GLX pixmap as well; then, when
Cogl tries to destroy the GLX pixmap, it gets BadDrawable errors.

Clutter 1.2 used to trap + sync all calls to glXDestroyPixmap(), but
then we assumed that the ordering issue had been solved. So, we're back
to square 1.

I left a Big Fat Comment™ right above the glXDestroyPixmap() call
referencing the bug and the reasoning behind the trap, so that we don't
go and remove it in the future without checking that the issue has been
in fact solved.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2324
2010-10-04 14:26:23 +01:00
Alejandro Piñeiro
f5aeabadd5 Fixing cally.pc.in and moving include headers to previous directory
After commit 8dd8fbdb some errors appear if you try work directly
against cally:

 * cally.pc.in removed some elements. After install clutter, doing
   pkg-config --cflags cally-1.0
   fails due missing winsys

 * cally headers were moved from clutter-1.0/cally to
   clutter-1.0/clutter/cally.  Applications using it (yes I know,
   nobody is officially using it) would require to:
    * Change their include.
    * Add directly a dependency to cally, in order to use the cally.pc
      file with the correct directory include.

Note: Take into account that accessibility support still works (ie:
clutter_get_accessibility_enabled). This bug only prevents
applications to work directly against cally (ie: create a CallyActor
subclass)

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-10-04 13:05:02 +01:00
Emmanuele Bassi
d3b6dd5ec7 effect: Fix up the class ABI
Landing the paint-box branch accidentally added two slots to the
ClutterEffectClass vtable, plus the get_paint_volume() function
pointer. This is an ABI break from 1.4.
2010-10-04 11:30:32 +01:00
Emmanuele Bassi
e1a1050a39 actor-box: Constify arguments for union
The input arguments for clutter_actor_box_union() should be constified,
since they will not be modified by the function.
2010-10-04 11:27:16 +01:00
Emmanuele Bassi
45b6d7d47a docs: Fix the annotations of ActorClass 2010-10-04 11:26:46 +01:00
Emmanuele Bassi
bdb24701f0 build: Add -xobjective-c to the fruity backend section
Like we do for the Quartz backend, we should turn on the -xobjective-c
compiler flag for the Fruity backend.

This does not mean that the backend actually works.
2010-10-04 10:52:36 +01:00
Emmanuele Bassi
0cf2f50ba6 build: Remove redundant EXTRA_DISTs
The files for the backend that we conditionally compile are
automatically added to the dist process by automake.
2010-10-04 09:09:13 +01:00
Emmanuele Bassi
a29623e838 build: Unconditionally add GLES2 shaders to EXTRA_DIST 2010-10-04 08:57:29 +01:00
Emmanuele Bassi
939333b4f2 build: Dist every backend file
All backend files should be present in the tarball generated by `make
dist`, to allow building Clutter on different platforms.
2010-10-03 16:10:44 +01:00
Emmanuele Bassi
6df136ae7c container: Do not emit a signal in the class handler
Yes, I am that stupid.
2010-10-03 15:28:14 +01:00
Emmanuele Bassi
e8d3ab4fd3 introspection: Skip Script.connect_signals_full()
It's meant to be used by language bindings, not by applications.
2010-10-03 15:16:41 +01:00