Commit Graph

4982 Commits

Author SHA1 Message Date
Emmanuele Bassi
40af71fad7 build: List the units inside a file
This avoids trying to run test-conformance -l multiple times.
2010-09-13 02:10:35 +01:00
Emmanuele Bassi
c03458a861 build: Remove gir files from dist
The introspection data is going to be generated, so it should never be
in the dist.
2010-09-13 02:10:35 +01:00
Emmanuele Bassi
64924f0e98 build: Do not build a noinst library for the tesselator
Let's try to keep Cogl's build as non-recursive as possible, in the hope
that one day we'll be able to make it fully non-recursive along with the
rest of Clutter.
2010-09-12 19:25:47 +01:00
Emmanuele Bassi
732eecf5c6 cookbook: Use the new CLUTTER_KEY_* symbol constants
Instead of the deprecated CLUTTER_* ones.
2010-09-10 18:21:45 +01:00
Emmanuele Bassi
f2669df6b5 build: Disable deprecated API when building the cookbook examples
Make sure we always use the latest API.
2010-09-10 18:21:19 +01:00
Emmanuele Bassi
4ee05f8e21 keysyms: Update the macros to CLUTTER_KEY_*
The keysyms defines in clutter-keysyms.h are generated from the X11 key
symbols headers by doing the equivalent of a pass of sed from XK_* to
CLUTTER_*. This might lead to namespace collisions, down the road.
Instead, we should use the CLUTTER_KEY_* namespace.

This commit includes the script, taken from GDK, that parses the X11
key symbols and generates two headers:

  - clutter-keysyms.h: the default included header, with CLUTTER_KEY_*
  - clutter-keysyms-compat.h: the compatibility header, with CLUTTER_*

The compat.h header file is included if CLUTTER_DISABLE_DEPRECATED is
not defined - essentially deprecating all the old key symbols.

This does not change any ABI and, assuming that an application or
library is not compiling with CLUTTER_DISABLE_DEPRECATED, the source
compatibility is still guaranteed.
2010-09-10 17:54:52 +01:00
Lucas Rocha
1447eff00f introspection: Add full path for the Clutter-1.0 inclusion
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-10 17:51:19 +01:00
Emmanuele Bassi
edb54574fa build: Disable deprecated API when building Clutter
Make sure we don't use deprecated API internally by adding
CLUTTER_DISABLE_DEPRECATED to the AM_CPPFLAGS.

This requires adding -UCLUTTER_DISABLE_DEPRECATED to the introspection
scanner CFLAGS, otherwise the deprecated API will never be introspected
and the data generated will not be compatible.
2010-09-10 17:51:18 +01:00
Emmanuele Bassi
d76f64a10c Do not use deprecated API internally 2010-09-10 17:51:13 +01:00
Emmanuele Bassi
0bd18fbcc9 Update the NEWS 2010-09-10 12:24:37 +01:00
Emmanuele Bassi
01362effca actor: Add a method for querying key focus
A simple convenience method on Clutter.Actor for checking whether
it has key focus assigned on the Stage to which it belongs.
2010-09-10 11:42:11 +01:00
Emmanuele Bassi
71a4db6135 animation: Allow detaching an animation from an actor
When animating an actor through clutter_actor_animate() and friends we
might want forcibly detach the animation instance from the actor in
order to start a new one - for instance, in response to user
interaction.

Currently, there is no way to do that except in a very convoluted way,
by emitting the ::completed signal and adding a special case in the
signal handlers; this is due to the fact that clutter_actor_animate()
adds more logic than the one added by clutter_animation_set_object(),
so calling set_object(NULL) or unreferencing the animation instance
itself won't be enough.

The right way to approach this is to add a new method to Clutter.Actor
that detaches any eventual Animation currently referencing it.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2051
2010-09-10 11:18:53 +01:00
Colin Walters
3aa2d00c3b introspection: Don't look for installed Cogl-1.0.gir
If we're depending on an uninstalled .gir, use --include-uninstalled.
We need to explicitly specify Cogl to let the scanner know it's also
uninstalled.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-09 23:01:40 +01:00
Colin Walters
5f5369990f introspection: Don't look for installed Clutter-1.0.gir
If we're depending on an uninstalled .gir, use --include-uninstalled.
2010-09-09 18:44:03 +01:00
Emmanuele Bassi
72a4fd9250 po: Update Polish localization 2010-09-09 16:45:51 +01:00
Chris Kühl
d86dc377de Added documentation for alpha parameter in Behaviour constructors.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2304

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-09 16:34:21 +01:00
Neil Roberts
9e1cd15b48 cogl-vertex-buffer: Flush the framebuffer state first
Flushing the framebuffer state can cause some drawing to occur if the
framebuffer has a clip stack which needs the stencil buffer. This was
causing the array pointers set up by enable_state_for_drawing_buffer
to get mangled so it would crash when it hits glDrawArrays. This patch
moves the framebuffer state flush to before it sets up the array
pointers.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2297
2010-09-09 12:19:53 +01:00
Emmanuele Bassi
0e325404aa build: Allow using gettext 0.17
This requires some autotools magic when setting up the environment
through autogen.sh, because autoreconf does not do the right thing
by default.

The correct order for setting up localization is:

  ‣ autopoint
  ‣ aclocal
  ‣ ...

otherwise aclocal will copy the system's gettext.m4 instead of honouring
the version we specified with AM_GNU_GETTEXT_VERSION in configure.ac.
2010-09-09 11:58:03 +01:00
Emmanuele Bassi
cfab64c1db po: Update German localization 2010-09-09 11:39:56 +01:00
Robert Bragg
bcf20955d3 ClutterX11TexturePixmap: Fix unbalanced error trapping
I think this is what commit 2cf1405506 intended to do since it
specifically mentioned cleaning up the trap in
clutter_x11_texture_pixmap_set_pixmap, but although it moved the untrap
to only be done in the case where Pixmap != None it left the position of
the trap itself unchanged. This meant the error trapping wouldn't be
balanced if pixmap == None since the untrap wouldn't be done. We now
only trap and untrap around the XGetGeometry call done when pixmap !=
None.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2303
2010-09-09 11:18:53 +01:00
Emmanuele Bassi
089a20e79d build: Add ClutterX11 introspection generation 2010-09-08 18:27:12 +01:00
Emmanuele Bassi
32ea9702e6 build: Add XML files to the ignore blacklist 2010-09-08 17:50:38 +01:00
Emmanuele Bassi
f8bd45dbce x11-texture-pixmap: Do not go through g_object_get()
The pixmap width and height are stored in our own private data
structure; going through g_object_get() is pointless overhead.
2010-09-08 17:39:04 +01:00
Owen W. Taylor
2cf1405506 Clean up CoglTexturePixmapX11 first
With currently distributed versions of Mesa, calling XFreePixmap()
before glxDestroyPixmap() will cause an X error from DRI. So, we
need to make sure that we get rid of the CoglTexturePixmapX11 before
we XFreePixmap().

clutter_x11_texture_pixmap_dispose(): Call
 clutter_x11_texture_pixmap_set_pixmap() instead of using XFreePixmap
 directly so that we leverage the text-clearing hack and destroy
 things in the right order.

clutter_x11_texture_pixmap_set_pixmap(): Don't do a pointless roundtrip
 and trap a pointless error when setting pixmap to None.

clutter_x11_texture_pixmap_set_pixmap(): Free damage resources when
 we are setting Pixmap to None.

clutter_x11_texture_pixmap_set_window(): When setting a new window
 or setting the window to None, immedediately  call
 cluter_x11_texture_pixmap_set_pixmap(). This means that set_window(None)
 immediately will free any referenced resources related to the window.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2303
2010-09-08 17:24:49 +01:00
Emmanuele Bassi
ca8db4c2ee Add caller-allocates annotations
For ClutterColor, ClutterUnits, ClutterInterval and the Perspective
accessor in ClutterStage.
2010-09-08 17:04:21 +01:00
Emmanuele Bassi
8a5686d835 Further annotation fixes 2010-09-08 16:41:47 +01:00
Owen W. Taylor
f1c44a27a1 introspection: Add missing (out) annotations
Comprehensively add (out) annotations to functions parameters
returning int/float/double.

Not handled here: structure out returns like ClutterColor or
ClutterPerspective or GValue that should get (out caller-allocates).

Not handled here: Cogl

http://bugzilla.clutter-project.org/show_bug.cgi?id=2302
2010-09-08 15:43:07 +01:00
Emmanuele Bassi
e4870ebaf4 Constify Event accessors and copy method
This is still C, but at least we can get some sort of safety net when
using the API correctly.
2010-09-08 15:15:57 +01:00
Emmanuele Bassi
8fb4c7b9a9 po: Rename the POT file 2010-09-08 14:48:40 +01:00
Emmanuele Bassi
144da2ae3b po: Add clutter.pot to the repository
Since we're not using intltool, and since we need to let people on
Transifex generate their translations, we need to add the POT file
to the repository.
2010-09-08 14:40:52 +01:00
ElleUca
82bef432ed po: Add italian translation 2010-09-08 12:45:21 +01:00
Emmanuele Bassi
33b0d5ddb5 po: Update the translation files
We are finally able to add the properties nicks and blurbs to the list
of translatable strings, for UI builders to use. This means bumping the
list of strings from 20-ish to a whopping 400. Whoopsie.
2010-09-08 12:25:25 +01:00
Emmanuele Bassi
948da3728d Add more /po files to the ignore list 2010-09-08 12:25:02 +01:00
Emmanuele Bassi
94c17dba51 build: Update autogen.sh
Remove the fix-ups for shave and gtk-doc with libtool 1.5: we don't use
shave any more, and we require libtool 2.2.

Also remove the unnecessary autopoint: we use autoreconf, which calls it
automatically.
2010-09-08 12:23:50 +01:00
Emmanuele Bassi
dfca349bbe build: Bump gettext version
Apparently, gettext can only work with the same exact version it's
autogenerated from.
2010-09-08 12:22:58 +01:00
Emmanuele Bassi
dc8c7be7f0 Ignore more files under /po 2010-09-08 11:56:06 +01:00
Emmanuele Bassi
4fedbad24e Update ignore files for m4 macros 2010-09-08 11:53:07 +01:00
Emmanuele Bassi
a9e29e6fba Add Makevars 2010-09-08 11:50:09 +01:00
Javier Jardón
98cac30d82 build: Use upstream gettext instead the glib one
Fixes http://bugzilla.clutter-project.org/show_bug.cgi?id=2300
2010-09-08 11:46:36 +01:00
Owen W. Taylor
c4ca75350f introspection: Fix annotation for clutter_container_get_children()
(element-type) should have a full name like Clutter.Actor rather than
a non-namespaced name like Actor. gobject-introspection has become
more strict about this with the recent scanner rewrite.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2301
2010-09-08 01:05:27 +01:00
Emmanuele Bassi
5e57539f3b build: Update introspection.m4 2010-09-07 21:10:40 +01:00
Emmanuele Bassi
e678c746da build: Add escaping in AS_IF()
Based on a patch by: Owen W. Taylor <otaylor@fishsoup.net>
2010-09-07 16:17:51 +01:00
Emmanuele Bassi
287b3ba542 Makefile.am.enums: Forgot an AM_V_GEN 2010-09-07 15:23:35 +01:00
Emmanuele Bassi
368b24b420 build: Fix up rules for enums and marshallers
• Use addprefix instead of manually concatenating $(srcdir)
• Use AM_V_GEN instead of QUIET_GEN, to avoid inter-dependencies
• Do basic checks on GLIB_MKENUMS and GLIB_GENMARSHAL being defined
• Do checks on the required variables being defined
2010-09-07 15:01:50 +01:00
Damien Lespiau
d7e5e9247b build: Make the generated glib-mkenums c file depend on the headers
What happens now if you rename an enum inside a header:

  • glib-mkenums generates the header file
  • a comparison is made with the previous version of the heade is made
    and no difference is found as you don't remove or create enums
  • the compilation of the generated mkenums c file fails because it has
    not been regenerated with the new, renamed, enum.

That's why the generated clutter-enum-types.c needs to depend on the
headers too.

Of course such scenario should not happen in stable releases as enums
are part of the API, but renaming enums happens in the development cycle
and create compilation errors (very annoying when doing git bissects for
instance).
2010-09-07 14:17:18 +01:00
Henrik Hedberg
1eae9fcd7e drag-action: Added x-drag-threshold and y-drag-threshold properties
*** This is an API change ***

Replaced the original drag-threshold property with two separate
horizontal (x-drag-threshold) and vertical (y-drag-threshold)
thresholds.

It is some times necessary to have different drag thresholds for the
horizontal and vertical axes. For example, when a draggable actor is
inside a horizontal scrolling area, only vertical movement must begin
dragging. That can be achieved by setting the x-drag-threshold to
G_MAXUINT while y-drag-threshold is something usual, say, 20 pixels.

This is different than drag axis, because after the threshold
has been cleared by the pointer, the draggable actor can be dragged
along both axes (if allowed by the drag-axis property).

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-07 10:40:49 +01:00
Emmanuele Bassi
ba9aa3b332 texture: Move the material unref() in ::dispose 2010-09-06 18:09:19 +01:00
Emmanuele Bassi
128e981f6c texture: Do some more validation in get_cogl_texture()
Check the layer type, even though right now we only have one type
available.
2010-09-06 18:09:19 +01:00
Emmanuele Bassi
7e56a98413 texture: Use a base material for all instances
Creating new materials for every Texture instance results in a lot of
ARBfp programs being generated/compiled. Since most textures will just
be similar we should create a template material for all of them, and
then copy it in every instance. Cogl will try to optimize the generation
of the program and, hopefully, will reuse the same program most of the
time.

With this change, a simple test shows that loading 48 textures will
result in just two programs being compiled - with and without batching
enabled.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2295
2010-09-06 18:09:19 +01:00
Emmanuele Bassi
283dce8e21 material: Check before unreferencing a texture
When disposing a material layer of type 'texture' we should check that
the texture handle is still valid before calling cogl_handle_unref().
This avoids an assertion failure when disposing a ClutterTexture.
2010-09-06 18:09:19 +01:00