Commit Graph

5336 Commits

Author SHA1 Message Date
Neil Roberts
c9a81f035e Don't use any GL types or defines in Clutter
Some of the Clutter code was using GL types for the primitive types
such as GLint and GLubyte and then passing these to Cogl. This doesn't
make much sense because the Cogl functions directly take native C
types. This patch just replaces them with either a native C type or a
glib type.

Some of the cogl conformance tests are trying to directly call GL for
example to test creating a foreign texture. These tests have been
changed to manually define the GL enum values instead of relying on a
GL header to define them.

This is necessary because Cogl may soon stop including a GL header
from its public headers.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-23 17:24:42 +00:00
Neil Roberts
04f2be34b2 configure: Fix the -o operator in a call to test
The disjunction operator was misspelt as -O which tests whether the
following file is owned by the calling user. This doesn't take enough
arguments so bash was showing an error and the test was always
failing. This meant that NEED_XKB_UTILS was always false which should
have broken the build but the Makefile was mistakenly including
clutter-xkb-utils.c again if SUPPORT_WAYLAND is defined.

See 1b77565e for reference.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-23 16:42:35 +00:00
Emmanuele Bassi
1b3777f169 version: Add 1.12 version macros 2012-03-22 12:00:56 +00:00
Emmanuele Bassi
22fad59c26 osx: Fix compilation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=672536
2012-03-22 12:00:55 +00:00
Emmanuele Bassi
2bf5e89140 Fix fallback profile counter macro 2012-03-22 12:00:55 +00:00
Jasper St. Pierre
40c345a42a table-layout: Remove dead code
If a column/row is expanding, n_expand has to be greater than 1.

https://bugzilla.gnome.org/show_bug.cgi?id=672557
2012-03-21 11:41:25 -04:00
Jasper St. Pierre
8c0be4181b table-layout: Fix x/y-expand for spanning actors
Ported to ClutterTableLayout from MxTable:

239e53146a

https://bugzilla.gnome.org/show_bug.cgi?id=672557
2012-03-21 11:41:25 -04:00
Jasper St. Pierre
16d28853fa table-layout: Fix column visibility for spanning actors
Ported to ClutterTableLayout from MxTable:

6633f185fc

https://bugzilla.gnome.org/show_bug.cgi?id=672557
2012-03-21 11:41:25 -04:00
Jasper St. Pierre
67ddf8745b table-layout: Remove unused 'shrink' field.
Ported to ClutterTableLayout from MxTable:

053a1b0429

https://bugzilla.gnome.org/show_bug.cgi?id=672557
2012-03-21 11:41:25 -04:00
Jasper St. Pierre
5dc1cd399c actor: Freeze property change notifications on destroy 2012-03-21 11:41:25 -04:00
Emmanuele Bassi
d7c922c72a docs: Clean up the animations sections of the Actor reference 2012-03-21 13:36:44 +00:00
Emmanuele Bassi
e3cbec48a8 paint-node: Initialize ClutterPaintOperation
Don't leave it to the compiler.
2012-03-20 16:19:23 +00:00
Robert Bragg
f1aa16069d clutter-wayland-compositor.h: Adds missing header guards
Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-20 14:37:08 +00:00
Neil Roberts
dee544645b wayland: Fix some missing includes
The commit 90e5088 added some extra compiler warning options that were
triggering warnings when enabling the wayland build due to missing
header includes. This adds those header includes in.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-20 14:36:58 +00:00
Robert Bragg
cf96c9caf3 include standalone cogl-wayland-server/client headers
Because the wayland-server-protocol.h header includes symbols that
collide with wayland-client-protocol.h Cogl now provides top level
<cogl/cogl-wayland-server.h> and <cogl/cogl-wayland-client.h> headers so
that applications can ensure they only include one of the wayland
protocol headers in a particular compilation unit. This updates clutter
accordingly to include those headers.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-20 14:36:50 +00:00
Rob Bradford
568951b8ac wayland: Only try and resize the framebuffer if there is a valid framebuffer 2012-03-20 13:32:20 +00:00
Emmanuele Bassi
d6e710d252 docs: Fix typo 2012-03-20 12:06:21 +00:00
Emmanuele Bassi
7af1d4b847 docs: Add a section on actor animations
Detail the implicit and explicit animation models used by ClutterActor.
2012-03-20 11:59:32 +00:00
Emmanuele Bassi
15952f26cb property-transition: Remove animatable from the ctor
Should not have been there in the first place: the animatable will be
set either using ClutterTransition API, or when adding the transition
to a ClutterActor.
2012-03-20 11:59:32 +00:00
Emmanuele Bassi
552a949695 Use g_clear_object() instead of unref() + NULL 2012-03-20 11:22:07 +00:00
Emmanuele Bassi
227c7b404d actor: Clarify and improve memory management of transitions
When adding a transition to a ClutterActor, the actor should hold a
reference on it, and release it only when we remove it. This makes
transitions just like other objects held by ClutterActor.
2012-03-20 11:17:53 +00:00
Emmanuele Bassi
65cf2039d8 timeline: Increment current-repeat after ::completed
The ::completed signal emission is part of the current cycle; repeating,
like the automatic reverse of the timeline's direction, happens after
the ::completed chain of handlers has been called.
2012-03-19 18:07:26 +00:00
Emmanuele Bassi
28266a59ed docs: Fixes for the API reference 2012-03-19 14:57:46 +00:00
Emmanuele Bassi
5a77f814ab x11/keymap: Silence deprecation warnings around a fallback
We still use XKeycodeToKeysym() in a fallback path in case we're not
running on a decent enough system; XKeycodeToKeysym() is deprecated as
of version 1.12 of the X server, but since I don't want to copy a bunch
of code from GDK or, god forbid, from Xlib, for a fallback path, it's
probably more reasonable to just silence the compiler warnings - at
least until we can drop all the X compatibility crap, and just use
modern, or semi-modern, API.
2012-03-19 14:40:46 +00:00
Emmanuele Bassi
09a317d23d x11: Add support for touch events
For the time being, we just relay everything we get from the X server to
the Clutter application.
2012-03-19 14:29:24 +00:00
Emmanuele Bassi
d15b828cc5 event: Add ClutterTouchEvent
The ClutterTouchEvent structure contains the data relative to a touch
event.
2012-03-19 14:29:24 +00:00
Emmanuele Bassi
ab3582be1c gdk: Relay scroll delta from GDK 2012-03-19 14:29:23 +00:00
Emmanuele Bassi
1c500f7de9 x11: Reset scroll valuators
We need to clear up the state on enter and leave, as well as when the X
server tells us that the device has changed.
2012-03-19 14:29:23 +00:00
Emmanuele Bassi
676a317439 x11: Add support for scroll valuators on XInput2.2 2012-03-19 12:41:24 +00:00
Emmanuele Bassi
6b07f8a3df event: Expose precise scrolling information
Some events may contain precise scrolling information coming from
devices like trackpads and touchscreens. ClutterEvent should allow
setting and getting this information.
2012-03-19 12:41:24 +00:00
Emmanuele Bassi
103438cfe2 actor: Add ::transitions-completed signal
While you can get a per-transition notification of completion, it can be
convenient to also have a way to notify that all the transitions
involving an actor are complete. A simple signal triggered by the
removal of the last transition fits the bill pretty neatly.
2012-03-18 08:07:56 +00:00
Jasper St. Pierre
a37ec4bd34 script-parser: Fix build 2012-03-18 03:08:00 -04:00
Lionel Landwerlin
4d42904fcc x11/stage: fix multi-stage support
When handling Configure events from the X server we update the
internal copy of the window size. Unfortunately we may be updating the
wrong stage implementation because we use the one related to the event
translator (which is the first created stage).

This patch fix flickering/redrawning issues with multi-stage by
looking for the right stage implementation associated with an XEvent.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
2012-03-18 00:17:36 +00:00
Emmanuele Bassi
d5738b6bd4 script: Add 'context' to the translatable definitions
This should cover all the possible options.
2012-03-17 22:55:33 +00:00
Emmanuele Bassi
05f78306d1 actor: Avoid popping the easing state stack once too many
If restore_easing_state() is called on the last easing state on the
stack, clean up the stack, so that we don't leave stale pointers
around to later segfault on.
2012-03-17 16:49:35 +00:00
Emmanuele Bassi
229241b875 actor: Remove the implicit easing state save
When setting the easing mode, duration, or delay without having ever
called clutter_actor_save_easing_state(). It's confusing, and not
really nice.

In the future, we'll have a default easing state implicitly created by
the actor itself, but for the time being explicitly opting in is
preferrable.
2012-03-17 16:46:38 +00:00
Emmanuele Bassi
b3b1994c13 Use G_VALUE_INIT instead of { 0, }
The macro avoids warnings from anal-retentive compilers.
2012-03-17 16:40:55 +00:00
Emmanuele Bassi
82bc728584 Add initializer utilities for ClutterVertex
Similar to what we did for ClutterActorBox.
2012-03-17 16:29:09 +00:00
Emmanuele Bassi
63f3eaab62 actor: Fix set_scale_with_gravity()
Add a scale-gravity internal setter, and make set_scale_with_gravity()
call it, along with the scale factor.
2012-03-17 16:17:39 +00:00
Emmanuele Bassi
5e9d6f7257 Add some utility initializers to ClutterActorBox 2012-03-17 15:27:26 +00:00
Emmanuele Bassi
b6f5609b2f osx/stage: Synthesize an enter event on show
If the pointer is inside the window frame when it's shown then we need
to synthesize and emit a NSMouseEnterEvent ourselves, as Quartz won't
do it for us.

This is a bit of a blind commit - but it's taken from an equivalent
patch that has been verified to work in GDK.
2012-03-16 23:12:33 +00:00
Emmanuele Bassi
f7735ff1ad docs: Change the short description of ClutterActor
The Actor class is not abstract any more.
2012-03-16 18:10:34 +00:00
Emmanuele Bassi
e5e10b6a04 Annotate functionality added in 1.10 2012-03-16 17:30:26 +00:00
Emmanuele Bassi
1df14c1bac Debugging cleanups
Add some more debugging notes to the layout and paint node output.
2012-03-16 16:16:40 +00:00
Emmanuele Bassi
a7714e294e actor: Remove an has_allocation() check
The get_content_box() method should always succeed; if the actor does
not have an allocation, we are just going to return a 0-box.
2012-03-16 16:13:11 +00:00
Emmanuele Bassi
800b5b6ef7 actor: Restore a lost queue_relayout()
It got lost during a rebase conflict resolution.
2012-03-16 14:47:02 +00:00
Emmanuele Bassi
ae554a5061 Rename 'bilinear' scaling filter to 'trilinear'
Yes, it's not really the proper GL name for a linear-on-every-axis of a
texture plus linear-between-mipmap-levels minification filter, but it
has three redeeming qualities as a name:

  - LINEAR_MIPMAP_LINEAR sucks, as it introduces GL concepts like
    mipmaps in the API naming, while we're trying to avoid that;
  - people using GL already know what 'trilinear' means in this context
    without going all Khronos on their asses;
  - we're using 2D textures anyway, so 'linear on two axes and linear
    between mipmap levels' can be effectively approximated to
    'trilinear'.

I mean, if even the OpenGL official wiki says:

  Unfortunately, what most people think of as "trilinear" is not linear
  filtering of a 3D texture, but what in OpenGL terms is GL_LINEAR mag
  filter and GL_LINEAR_MIPMAP_LINEAR in the min filter in a 2D texture.
  That is, it is bilinear filtering of each appropriate mipmap level,
  and doing a third linear filter between the adjacent mipmap levels.
  Hence the term "trilinear".
                -- http://www.opengl.org/wiki/Texture

then the horse has already been flogged to death, and I don't intend to
be accused of necrophilia and sadism by flogging it some more.

Prior art: every single GL tutorial in the history of ever;
CoreAnimation's scaling filter enumerations.

If people want to start using 1D or 3D textures they they are probably
going to be using Cogl API directly, and that has the GL naming scheme
for minification and magnification filters anyway.
2012-03-16 12:33:40 +00:00
Emmanuele Bassi
b44290c436 docs: Add ClutterActorClass.paint_node() description 2012-03-16 12:33:40 +00:00
Emmanuele Bassi
8904f7cbe4 paint-nodes: Make part of the API internal
At least for the time being, we only expose the parts of the API that we
want to use internally and for new, out-of-tree Content implementations.

The full PaintNode tree API will be made public in 1.12 once we branch
master.
2012-03-16 12:33:40 +00:00
Emmanuele Bassi
74f5bbe5aa docs: Fixes for ClutterImage's API reference 2012-03-16 12:33:39 +00:00