Emmanuele Bassi [Fri, 15 Jan 2010 11:38:58 +0000 (11:38 +0000)]
x11: Fill out the :name property of the InputDevices
For the core pointer and keyboard we assign the names ourselves; for
devices coming from XI we can use the XDeviceInfo.name member.
Emmanuele Bassi [Fri, 15 Jan 2010 11:37:43 +0000 (11:37 +0000)]
device: Add the :name property to InputDevice
The InputDevice should have a name, possibly user readable, coming from
the backend.
Emmanuele Bassi [Fri, 15 Jan 2010 11:21:52 +0000 (11:21 +0000)]
x11: Store core devices on the X11 Backend singleton
Instead of overloading the device id of 0 and 1 we should treat the core
devices as special, and have a pointer inside the X11 backend singleton
structure, for fast access.
Emmanuele Bassi [Thu, 14 Jan 2010 17:14:33 +0000 (17:14 +0000)]
device: Unset the cursor actor when leaving the stage
When an InputDevice leaves a stage we set the stage member of
InputDevice to NULL. We should also unset the cursor_actor (as the
device is obviously not on an actor any more).
When the device re-enters the Stage the ENTER/LEAVE event generation
machinery will then be able to emit the ENTER event on the Stage.
Emmanuele Bassi [Tue, 12 Jan 2010 11:53:12 +0000 (11:53 +0000)]
device: Add pointer actor getter
ClutterInputDevice should have a getter method for retrieving the
reactive actor underneath the pointer.
Emmanuele Bassi [Wed, 9 Dec 2009 00:03:13 +0000 (00:03 +0000)]
x11: Discard the LeaveNotify for off-stage ButtonRelease
If the user presses a button on a pointer device and then moves out the
Stage X11 will emit the following events:
LeaveNotify ➔ MotionNotify ... ➔ ButtonRelease ➔ LeaveNotify
The second LeaveNotify differs from the first by the state field.
Unfortunately, ClutterCrossingEvent doesn't have a modifier_state field
like other events, so we cannot provide a way for programmatically
distinguishing them from a Clutter perspective. This is also an X11-ism
we might not even want to replicate on every backend with sane
enter/leave semantics.
For this reason we should check inside the X11 event processing if the
pointer device has already left the Stage and ignore the second
LeaveNotify.
Emmanuele Bassi [Wed, 9 Dec 2009 00:01:50 +0000 (00:01 +0000)]
device: Do not overwrite the stage for an InputDevice
The Stage field of an InputDevice is set by the backend, whenever the
pointer enters or leaves the Stage. The Stage should not overwrite the
stage field for every event it processes.
Emmanuele Bassi [Wed, 9 Dec 2009 00:00:49 +0000 (00:00 +0000)]
event: Off-stage button releases have a click count of 1
The ButtonRelease off-stage should not have a click count of 0 but a
click count initialized to 1.
Emmanuele Bassi [Tue, 8 Dec 2009 23:59:56 +0000 (23:59 +0000)]
event: Scroll events do not have click count
Remove the unneeded CLUTTER_SCROLL case from the click count checks.
Emmanuele Bassi [Tue, 8 Dec 2009 18:33:01 +0000 (18:33 +0000)]
Whitespace and indentation fixes
Emmanuele Bassi [Mon, 7 Dec 2009 23:13:52 +0000 (23:13 +0000)]
event: Clean up click-count detection
Avoid a few indirections and direct access to the Event and InputDevice
structures.
Emmanuele Bassi [Mon, 7 Dec 2009 23:05:20 +0000 (23:05 +0000)]
device: Store the current state, not the previous
The previous state for the device is used by the click count machinery
and we should not be overwriting it at every event; instead, we should
use a parallel storage for the current state coming from the windowing
system.
Emmanuele Bassi [Mon, 7 Dec 2009 23:02:48 +0000 (23:02 +0000)]
tests: Fix test-events output
• 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.
Emmanuele Bassi [Mon, 7 Dec 2009 18:38:18 +0000 (18:38 +0000)]
docs: Update the API reference
Add the new symbols for InputDevice and DeviceManager
Emmanuele Bassi [Tue, 24 Nov 2009 17:54:02 +0000 (17:54 +0000)]
Do not pick when motion event delivery is disabled
The device manager does not need to update the state of the devices
when the user has disabled the delivery of motion events to actors:
the events will always be delivered as they are to the stage.
Emmanuele Bassi [Tue, 24 Nov 2009 16:33:03 +0000 (16:33 +0000)]
Rework the emission of LEAVE/ENTER event pairs
The LEAVE/ENTER event pairs should be queued during the InputDevice
update process, when we change the actor under the device pointer.
This commit cleans up the event emission code inside clutter-main.c
and the logic of the event processing.
Emmanuele Bassi [Tue, 24 Nov 2009 16:31:14 +0000 (16:31 +0000)]
tests: Clean up test-events
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.
Emmanuele Bassi [Tue, 24 Nov 2009 16:22:44 +0000 (16:22 +0000)]
Add docs and licensing notices
Emmanuele Bassi [Fri, 8 Jan 2010 17:51:00 +0000 (17:51 +0000)]
Move all picking-related operations inside InputDevice
The InputDevice objects stores pointer coordinates, state, stage and
the actor under the cursor, so if the current backend provides us with
one attached to the Event structure then we want the InputDevice itself
to update its state and give us the ClutterActor underneath the
pointer's cursor.
Emmanuele Bassi [Tue, 24 Nov 2009 12:53:57 +0000 (12:53 +0000)]
actor: Add :has-pointer property
ClutterActor should be able to tell whether a pointer is within
its area or not.
Emmanuele Bassi [Mon, 23 Nov 2009 16:07:16 +0000 (16:07 +0000)]
device: Make InputDevice an object and subclass it for X11
ClutterInputDevice should be a type that we can subclass per-backend
to add functionality.
Emmanuele Bassi [Fri, 20 Nov 2009 16:37:58 +0000 (16:37 +0000)]
tests: Update the devices test
Use the DeviceManager API instead of the X11 specific API.
Emmanuele Bassi [Fri, 20 Nov 2009 16:24:16 +0000 (16:24 +0000)]
x11: Always assign a device to pointer and key events
Even when we are not using XInput we now have fallback devices; the
X11 backend should always assign the default devices when translating
the X events to Clutter events.
Emmanuele Bassi [Fri, 20 Nov 2009 15:43:50 +0000 (15:43 +0000)]
Add :is-default flag to InputDevice
Emmanuele Bassi [Fri, 20 Nov 2009 15:36:43 +0000 (15:36 +0000)]
Port the X11 backend to the Device Manager
Use the device manager to store the input devices. Also, provide
two fallback devices when initializing the X11 backend: device 0
for the pointer and device 1 for the keyboard.
Emmanuele Bassi [Fri, 20 Nov 2009 15:35:40 +0000 (15:35 +0000)]
Add ClutterDeviceManager
The ClutterDeviceManager is a singleton object that behaves like the
StageManager: it holds all input devices and notifies on addition and
removal.
Neil Roberts [Fri, 15 Jan 2010 22:56:37 +0000 (22:56 +0000)]
win32: Use an invisible cursor when cursor-visible is FALSE
The win32 backend now handles the WM_SETCURSOR message and sets a
fully transparent cursor if the cursor-visible property has been
cleared on the stage. The icon is stored in the library via a resource
file. The instance handle for the DLL is needed to load the resource
so there is now a DllMain function to grab the handle.
Neil Roberts [Mon, 18 Jan 2010 17:33:08 +0000 (17:33 +0000)]
Post-release version bump to 1.1.7
Neil Roberts [Mon, 18 Jan 2010 15:44:58 +0000 (15:44 +0000)]
Release Clutter 1.1.6
Neil Roberts [Mon, 18 Jan 2010 15:43:25 +0000 (15:43 +0000)]
README: Clarify the required OpenGL version
Cogl will not allow OpenGL 1.2 if it doesn't have the multitexturing
extension so we should make this clear in the README.
Neil Roberts [Mon, 18 Jan 2010 13:56:56 +0000 (13:56 +0000)]
Add build/mingw/{README,mingw-cross-compile.sh} to the dist tarball
It's quite difficult to get git working on Windows so it makes sense
to put the build instructions somewhere accessible.
Neil Roberts [Mon, 18 Jan 2010 12:42:20 +0000 (12:42 +0000)]
test-texture-fbo: Disconnect the paint handler for the stage
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.
Neil Roberts [Mon, 18 Jan 2010 12:35:05 +0000 (12:35 +0000)]
clutter-group: Use g_list_foreach in clutter_group_real_foreach
g_list_foreach has better protection against the current node being
removed. This will happen for example if someone calls
clutter_container_foreach(container, clutter_actor_destroy). This was
causing valgrind errors for the conformance tests which do just that.
Samuel Degrande [Fri, 27 Nov 2009 15:53:50 +0000 (16:53 +0100)]
win32: Fix computation of the fullscreen size during stage realization
http://bugzilla.openedhand.com/show_bug.cgi?id=1905
Signed-off-by: Neil Roberts <neil@linux.intel.com>
Emmanuele Bassi [Fri, 15 Jan 2010 17:32:46 +0000 (17:32 +0000)]
docs: Clarify usage of UTF-8 or ASCII art in commit messages
Emmanuele Bassi [Fri, 15 Jan 2010 17:06:56 +0000 (17:06 +0000)]
docs: Display the features section
The features section of the API reference is built but not used, and it
has some copy-and-paste errors.
Emmanuele Bassi [Fri, 15 Jan 2010 14:50:06 +0000 (14:50 +0000)]
Add test-cogl-texture-mipmaps to the Git ignore file
Emmanuele Bassi [Fri, 15 Jan 2010 14:48:42 +0000 (14:48 +0000)]
x11: Fix typo in clutter_x11_set_use_argb_visual() declaration
The function should have a lowercase x11, not an uppercase X11 in its
name.
Emmanuele Bassi [Fri, 15 Jan 2010 14:47:20 +0000 (14:47 +0000)]
docs: Ignore clutter-profile.h
Neil Roberts [Fri, 15 Jan 2010 12:02:09 +0000 (12:02 +0000)]
tests: Add a simple conformance test for texture mipmaps
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.
Emmanuele Bassi [Thu, 14 Jan 2010 15:23:41 +0000 (15:23 +0000)]
Add a notice of deprecation in the pre-Git ChangeLog
Neil Roberts [Tue, 12 Jan 2010 21:44:40 +0000 (21:44 +0000)]
cogl-framebuffer: Return gboolean from try_creating_fbo
When try_creating_fbo fails it returns 0 to report the error and if it
succeeds it returns ‘flags’. However cogl_offscreen_new_to_texture
also passes in 0 for the flags as the last fallback to create the fbo
with nothing but the color buffer. In that case it will return 0
regardless of whether it succeeded so the last fallback will always be
considered a failure.
To fix this it now just returns a gboolean to indicate whether it
succeeded and the flags used for each attempt is assigned when passing
the argument rather than from the return value of the function.
Also if the only configuration that succeeded was with flags==0 then
it would always try all combinations because last_working_flags would
also be zero. To avoid this it now uses a separate gboolean to mark
whether we found a successful set of flags.
http://bugzilla.openedhand.com/show_bug.cgi?id=1873
Emmanuele Bassi [Thu, 14 Jan 2010 14:07:04 +0000 (14:07 +0000)]
conform: Add operators tests for ClutterColor
The clutter_color_add() and clutter_color_subtract() functions are
lacking unit testing to catch eventual regressions.
Emmanuele Bassi [Thu, 14 Jan 2010 12:28:07 +0000 (12:28 +0000)]
master-clock: Add profiling timers
Use the newly-added profiling timers inside the master clock dispatch
function to see how much time we spend:
• in the whole function
• in the event processing for each stage
• in the timeline advancement
Emmanuele Bassi [Wed, 13 Jan 2010 17:31:13 +0000 (17:31 +0000)]
units: Improve coverage of clutter_units_from_string()
Add a unit for an empty string as well as units for the missing unit
types like cm, mm and px.
Emmanuele Bassi [Wed, 13 Jan 2010 16:57:55 +0000 (16:57 +0000)]
Add test-cogl-multitexture to the Git ignore file
Emmanuele Bassi [Wed, 13 Jan 2010 16:35:53 +0000 (16:35 +0000)]
build: Add a script to format gcov report lines
Instead of using echo let's try Perl and the format() built-in.
Emmanuele Bassi [Mon, 4 Jan 2010 14:53:03 +0000 (14:53 +0000)]
Add gcov support to the build
Using gcov it's possible to get a coverage report, that is a break down
of how much the exposed API is exercised by the conformance test suite.
Emmanuele Bassi [Wed, 13 Jan 2010 15:40:36 +0000 (15:40 +0000)]
build: Clean up COGL build flags
Damien Lespiau [Mon, 2 Nov 2009 17:08:55 +0000 (17:08 +0000)]
texture: Remove reading the texture data back in ::unrealize()
Reading back the texture data in unrealize does not seem like a
desirable feature any more, clutter has evolved a lot since it was
implemented.
What's wrong with it now:
* It takes *a lot* of time to read the data back with glReadPixel(),
* When several textures share the same CoglTexture, the same data can
be read back multiple times,
* If the underlying material uses multiple texture units, only the
first one was copied back,
* In ClutterCairoTexture, we end up having two separate copies of the
data,
* GL actually manages texture memory accross system/video memory
for us!
For all the reasons above, let's get rid of the glReadPixel() in
Texture::unrealize()
Fixes: OHB#1842
Neil Roberts [Tue, 12 Jan 2010 14:49:55 +0000 (14:49 +0000)]
cogl-framebuffer: Add some missing GL defines
Since
755cce33a7 the framebuffer code is using the GL enums
GL_DEPTH_ATTACHMENT and GL_DEPTH_COMPONENT16. These aren't available
directly under GLES except with the OES suffix so we need to define
them manually as we do with the other framebuffer constants.
Neil Roberts [Tue, 12 Jan 2010 14:43:36 +0000 (14:43 +0000)]
cogl: Remove the CGL_* defines
These macros used to define Cogl wrappers for the GLenum values. There are
now Cogl enums everywhere in the API where these were required so we
shouldn't need them anymore. They were in the public headers but as
they are not neccessary and were not in the API docs for Clutter 1.0
it should be safe to remove them.
Emmanuele Bassi [Tue, 12 Jan 2010 15:44:28 +0000 (15:44 +0000)]
stage: Add the delete-event signal
Using the ::event signal to match the CLUTTER_DELETE event type (and
block the stage destruction) can be costly, since it means checking
every single event.
The ::delete-event signal is similar in spirit to any other specialized
signal handler dealing with events, and retains the same semantics.
Robert Bragg [Tue, 12 Jan 2010 11:02:09 +0000 (11:02 +0000)]
journal: Fixes logging of multiple sets of texture coordinates
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.
Emmanuele Bassi [Mon, 11 Jan 2010 17:08:42 +0000 (17:08 +0000)]
text: Zero out the cursor_pos member
Do not trust the zero-ing done by GObject on the private data structure,
and use memset() instead to zero the ClutterGeometry structure.
Emmanuele Bassi [Mon, 11 Jan 2010 17:06:52 +0000 (17:06 +0000)]
Remove obsolete code from test-text
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.
Robert Bragg [Mon, 30 Nov 2009 20:04:41 +0000 (20:04 +0000)]
cogl: Support multiple fallbacks in cogl_offscreen_new_to_texture()
The Intel drivers in Mesa 7.6 (and possibly earlier versions) don't
support creating FBOs with a stencil buffer but without a depth
buffer. This reworks framebuffer allocation so that we try a number
of fallback options before failing.
The options we try in order are:
- the same options that were sucessful last time if available
- combined depth and stencil
- separate depth and stencil
- just stencil, no depth
- just depth, no stencil
- neither depth or stencil
Damien Lespiau [Wed, 6 Jan 2010 11:48:46 +0000 (11:48 +0000)]
media: Add an API to specify which font should be used for subtitles
Allow the user of the ClutterMedia interface to specify a Pango font
description to display subtitles. Even if the underlying implementation
of the interface does not natively use Pange, it must be capable of
parsing the grammar that pango_font_description_from_string() accepts.
Emmanuele Bassi [Sun, 10 Jan 2010 11:35:26 +0000 (11:35 +0000)]
build: Clean up private header/source files
Some source files should not be passed through the introspection parser,
as they are fully private and do not expose any valuable API.
Also the clutter-profile.h header is private and should not be
installed.
Robert Bragg [Wed, 25 Nov 2009 14:26:32 +0000 (14:26 +0000)]
framebuffers: cogl_offscreen_new_to_texture should take a ref on the texture
We weren't taking a reference on the texture to be used as the color buffer
for offscreen rendering, so it was possible to free the texture leaving the
framebuffer in an inconsistent state.
Robert Bragg [Fri, 3 Jul 2009 15:22:35 +0000 (16:22 +0100)]
profiling: Adds initial UProf accounting to Cogl
This adds gives Cogl a dedicated UProf context which will be linked together
with Clutter's context during clutter_init_real().
Initial timers cover _cogl_journal_flush and _cogl_journal_log_quad
You can explicitly ask for a report of Cogl statistics by exporting
COGL_PROFILE_OUTPUT_REPORT=1 but since the context is linked with Clutter's
the statisitcs will also be shown in the automatic Clutter reports.
Robert Bragg [Fri, 17 Apr 2009 11:15:56 +0000 (12:15 +0100)]
profiling: Allow limiting statisics just to picking
This suspends and resumes all uprof timers and counters except while dealing
with picking, so as to give more focused statistics.
Be aware that there are still some issues with this profile option since
there are a few special case counters and timers that shouldn't be
suspended; noteably the frame counters are incorrect so the per frame stats
can't be trusted.
Robert Bragg [Wed, 6 Jan 2010 18:15:13 +0000 (18:15 +0000)]
profiling: Parse --clutter-profile and CLUTTER_PROFILE= options
As we have for debugging, this adds the ability to control profiling flags
either via the command line or an environment variable.
The first option added is CLUTTER_PROFILE=disable-report
This also changes the reporting to be opt-out so you don't need to export
CLUTTER_PROFILE_OUTPUT_REPORT=1 to see a report but you can use
CLUTTER_PROFILE=disable-report to disable it if desired.
Robert Bragg [Mon, 30 Mar 2009 15:41:02 +0000 (16:41 +0100)]
profiling: Adds initial UProf support across clutter
UProf is a small library that aims to help applications/libraries provide
domain specific reports about performance. It currently provides high
precision timer primitives (rdtsc on x86) and simple counters, the ability
to link statistics between optional components at runtime and makes report
generation easy.
This adds initial accounting for:
- Total mainloop time
- Painting
- Picking
- Layouting
- Idle time
The timing done by uprof is of wall clock time. It's not based on stochastic
samples we simply sample a counter at the start and end. When dealing with
the complexities of GPU drivers and with various kinds of IO this form of
profiling can be quite enlightening as it will be able to represent where
your application is blocking unlike tools such as sysprof.
To enable uprof accounting you must configure Clutter with --enable-profile
and have uprof-0.2 installed from git://git.moblin.org/uprof
If you want to see a report of statistics when Clutter applications exit you
should export CLUTTER_PROFILE_OUTPUT_REPORT=1 before running them.
Just a final word of caution; this stuff is new and the manual nature of
adding uprof instrumentation means it is prone to some errors when modifying
code. This just means that when you question strange results don't rule out
a mistake in the instrumentation. Obviously though we hope the benfits out
weigh e.g. by focusing on very key stats and by having automatic reporting.
Robert Bragg [Tue, 17 Mar 2009 13:07:46 +0000 (13:07 +0000)]
Adds a --enable-profile option to configure.ac
There is nothing else hooked up to this option so far
Emmanuele Bassi [Fri, 8 Jan 2010 15:04:56 +0000 (15:04 +0000)]
x11: Switch back to RGB visuals by default
Since asking for ARGB by default is still somewhat experimental on X11
and not every toolkit or complex widgets (like WebKit) still do not like
dealing with ARGB visuals, we should switch back to RGB by default - now
that at least we know it works.
For applications (and toolkit integration libraries) that want to enable
the ClutterStage:use-alpha property there is a new function:
void clutter_x11_set_use_argb_visual (gboolean use_argb);
which needs to be called before clutter_init().
The CLUTTER_DISABLE_ARGB_VISUAL environment variable can still be used
to force this value off at run-time.
Damien Lespiau [Wed, 6 Jan 2010 00:44:24 +0000 (00:44 +0000)]
doc: Fix media::{get,set}_subtitle_uri() symbol names
At first, those symbols were called {get,set}_subtitles_uri() but were
renamed to {get,set}_subtitle_uri() without updating the
clutter-section.txt file.
This fix makes gtk-doc document those symbols again.
Emmanuele Bassi [Thu, 7 Jan 2010 11:08:52 +0000 (11:08 +0000)]
actor: Just emit a relayout cycle warning
Currently, ClutterActor detects a relayout cycle (an actor causing a
relayout to be queued from within an allocate() function) and aborts
after printing out a warning. This might be a little bit too anal
retentive, and it currently breaks GTK+ embedding inside clutter-gtk
so we should probably relax the behaviour a bit. Now we just emit the
warning but we still go ahead with the relayout.
Neil Roberts [Thu, 7 Jan 2010 15:58:53 +0000 (15:58 +0000)]
Don't set the GLX_TRANSPARENT_TYPE attribute to choose an FBConfig
When Clutter tries to pick an ARGB visual it tried to set the
GLX_TRANSPARENT_TYPE attribute of the FBConfig to
GLX_TRANSPARENT_RGB. However the code to do this was broken so that it
was actually trying to set the non-existant attribute number 0x8008
instead. Mesa silently ignored this so it appeared as if it was
working but the Nvidia drivers do not like it.
It appears that the TRANSPARENT_TYPE attribute is not neccessary for
getting an ARGB visual anyway and instead it is intended to support
color-key transparency. Therefore we can just remove it and get all of
the FBConfigs. Then if we need an ARGB visual we can just walk the
list to look for one with depth == 32.
The fbconfig is now stored in a single variable instead of having a
separate variable for the rgb and rgba configs because the old code
only ever retrieved one of them anyway.
Emmanuele Bassi [Tue, 5 Jan 2010 18:02:29 +0000 (18:02 +0000)]
Covert stb_image.c to Unix format
The file is still in DOS format (CRLF instead of LF) and this confuses
the hell out of some versions of Git.
Emmanuele Bassi [Tue, 5 Jan 2010 17:54:45 +0000 (17:54 +0000)]
Include cogl-defines.h before using GL types
If we are using GL* types we should also be including cogl-defines.h, as
that will include the right GL header.
Emmanuele Bassi [Tue, 5 Jan 2010 16:11:45 +0000 (16:11 +0000)]
cogl: Fix array annotations
The arrays in the cogl_program_set_uniform_* API should be marked as
such, and have their length arguments specified.
Neil Roberts [Tue, 5 Jan 2010 11:58:12 +0000 (11:58 +0000)]
text: Store the markup attributes separately
Previously when the markup property is set it would generate an
attribute list from the markup and then merge it with the attributes
from the attribute property and store it as the effective
attributes. The markup attributes and the marked up text would then be
forgotten. This breaks if the application then later changes the
attributes property because it would try to regenerate the effective
attributes from the markup text but the stored text no longer contains
any markup. If the original markup text happened to contain entities
like '<' they would end up causing parse errors because they would
be converted to the actual symbols.
To fix this the attributes from the markup are now stored
independently from the effective attributes. The effective attributes
are now regenerated if either set of attributes changes right before a
layout is created.
http://bugzilla.openedhand.com/show_bug.cgi?id=1940
Neil Roberts [Tue, 5 Jan 2010 11:44:17 +0000 (11:44 +0000)]
text: Free the Pango attribute list resources
The ClutterText owns three PangoAttrList resources which were not
being unref'd. This adds the unref calls to the finalize method.
Emmanuele Bassi [Tue, 5 Jan 2010 14:10:19 +0000 (14:10 +0000)]
x11 tfp: Plug a leak
Destroy the dummy XImage we create even on success.
http://bugzilla.openedhand.com/show_bug.cgi?id=1918
Based on a patch by: Carlos Martín Nieto <carlos@cmartin.tk>
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Tue, 5 Jan 2010 11:04:50 +0000 (11:04 +0000)]
Merge branch 'matrix-mode'
* matrix-mode:
build: Move CoglMatrixMode to cogl-matrix-stack.h
Emmanuele Bassi [Tue, 5 Jan 2010 11:02:39 +0000 (11:02 +0000)]
Remove trailing comma from test UI definition
The animation definition test has a trailing comma at the end of an
array item.
Emmanuele Bassi [Tue, 5 Jan 2010 10:55:28 +0000 (10:55 +0000)]
script: Copy the JSON node in PropertyInfo
PropertyInfo should store a copy of the JsonNodes it references, so
that property_info_free() can safely dispose them, and we can reference
values across different UI definition data.
The implicit timeline parsing code is not copying the JsonNode; this
leads to a double free in some cases, which is masked by the GSlice
allocator and produces a heap corruption later on.
Damien Lespiau [Mon, 28 Dec 2009 16:52:43 +0000 (17:52 +0100)]
[media] Add an API to play a subtitle file along with the media
Allow the user of the ClutterMedia interface to specify an external (as
in not multiplexed with the audio/video streams) location of a subtitle
stream.
Emmanuele Bassi [Mon, 4 Jan 2010 12:03:47 +0000 (12:03 +0000)]
text: Use G_SIGNAL_ACTION for ::insert-text and ::delete-text
Both the ::insert-text and ::delete-text are "action" signals, that is
signals that are safe to (and should) be emitted using g_signal_emit()
directly.
Alejandro Piñeiro [Fri, 20 Nov 2009 14:17:41 +0000 (15:17 +0100)]
Added ClutterText::insert-text and ClutterText::delete-text signals
* clutter/clutter-marshal.list: added new marshaller
* clutter/clutter-text.c
(clutter_text_class_init): added insert-text and delete-text signals
(clutter_text_insert_unichar): emits insert-text signal
(clutter_text_insert_text): emits insert-text signal
(clutter_text_delete_text): emits delete-text signal
(clutter_text_delete_chars): emits delete-text signal
(clutter_text_set_markup_internal): emits delete-text and insert-text signals
(clutter_text_set_text): emits delete-text and insert-text signals
http://bugzilla.openedhand.com/show_bug.cgi?id=1894
Emmanuele Bassi [Mon, 4 Jan 2010 11:58:32 +0000 (11:58 +0000)]
build: Move CoglMatrixMode to cogl-matrix-stack.h
This avoids a redeclaration of _cogl_matrix_stack_flush_to_gl() from
using GLenum to CoglMatrixMode.
http://bugzilla.openedhand.com/show_bug.cgi?id=1928
Halton Huo [Mon, 4 Jan 2010 11:49:50 +0000 (11:49 +0000)]
cogl-texture: Remove return in void functions
http://bugzilla.o-hand.com/show_bug.cgi?id=1929
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Emmanuele Bassi [Mon, 4 Jan 2010 11:49:13 +0000 (11:49 +0000)]
build: Maintainer cflags go in the _CFLAGS target
The maintainer compiler flags are not pre-processor flags.
Emmanuele Bassi [Mon, 4 Jan 2010 11:43:00 +0000 (11:43 +0000)]
cogl: Const-ify vertices in cogl_polygon()
The CoglTextureVertex array passed to cogl_polygon() is a pure
in-argument and should be const-ified.
http://bugzilla.openedhand.com/show_bug.cgi?id=1917
Emmanuele Bassi [Wed, 11 Nov 2009 11:00:29 +0000 (11:00 +0000)]
master-clock: Take a reference before advancing timelines
A timeline advancement might cause another timeline to be
destroyed, which will likely lead to a segmentation fault.
Before advancing the timelines we should take a reference
on them - just like we do for the stages before doing
event processing. This will prevent dispose() from running
until the end of the advancement.
http://bugzilla.openedhand.com/show_bug.cgi?id=1854
Emmanuele Bassi [Sun, 3 Jan 2010 20:41:17 +0000 (20:41 +0000)]
Post-release version bump to 1.1.5
Emmanuele Bassi [Sun, 3 Jan 2010 20:11:43 +0000 (20:11 +0000)]
Release Clutter 1.1.4
Emmanuele Bassi [Sun, 3 Jan 2010 20:24:39 +0000 (20:24 +0000)]
build: Remove dist rule for non-existing image files
Emmanuele Bassi [Sun, 3 Jan 2010 20:12:49 +0000 (20:12 +0000)]
Disable g_set_prgname()
Apparently, calling g_set_prgname() multiple times is not allowed
anymore, and hence clutter_init_* calls should not do that. Though this
is really GLib's fault - and a massive nuisance for us - we should
prolly comply to avoid the test suite dying on us.
Emmanuele Bassi [Wed, 23 Dec 2009 10:38:02 +0000 (10:38 +0000)]
Merge branch 'animate-layout-manager' into ebassi-next
* 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
Emmanuele Bassi [Wed, 23 Dec 2009 10:35:16 +0000 (10:35 +0000)]
layout-manager: Document the animation support
Add a section inside the LayoutManager class API reference documenting,
with examples, how to implement animation support inside a layout
manager sub-class.
Emmanuele Bassi [Wed, 23 Dec 2009 08:39:16 +0000 (08:39 +0000)]
layout-manager: Rewind the timeline in begin_animation()
If the default implementation begin_animation() is called twice then we
should rewind the timeline, as well as updating its duration and the
easing mode of the alpha.
Emmanuele Bassi [Wed, 23 Dec 2009 08:34:08 +0000 (08:34 +0000)]
box-layout: Remove the allocations hash table
The BoxLayout uses a HashTable to map the latest stable allocation of
each child, in order to use that as the initial value during an
animation; this in spite of already having a perfectly valid per-child
storage as part of the layout manager: ClutterBoxChild.
The last stable allocation should be stored inside the ClutterBoxChild
instead of having it in the private data for ClutterBoxLayout. The
access remains O(1), since there is a 1:1 mapping between child and
BoxChild instances, but we save a little bit of memory and we avoid
keeping aroud allocations for old children.
Emmanuele Bassi [Tue, 22 Dec 2009 18:10:39 +0000 (18:10 +0000)]
docs: Clean up the README file
Emmanuele Bassi [Sun, 20 Dec 2009 17:39:12 +0000 (17:39 +0000)]
Merge branch 'stage-use-alpha' into ebassi-next
* 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
Emmanuele Bassi [Sun, 20 Dec 2009 17:33:51 +0000 (17:33 +0000)]
Merge branch 'internal-flag' into ebassi-next
* internal-flag:
conform: Add test unit for the destruction of Containers
actor: Add internal child flag
Clean up whitespace, indentation and comments
Emmanuele Bassi [Fri, 18 Dec 2009 23:29:11 +0000 (23:29 +0000)]
conform: Add test unit for the destruction of Containers
Verify that internal children do not go through the remove()
implementation, and that non-internal children do.
Emmanuele Bassi [Fri, 18 Dec 2009 23:20:04 +0000 (23:20 +0000)]
actor: Add internal child flag
ClutterActor checks, when destroying and reparenting, if the parent
actor implements the Container interface, and automatically calls the
remove() method to perform a clean removal.
Actors implementing Container, though, might have internal children;
that is, children that are not added through the Container API. It is
already possible to iterate through them using the Container API to
avoid breaking invariants - but calling clutter_actor_destroy() on
these children (even from the Container implementation, and thus outside
of Clutter's control) will either lead to leaks or to segmentation
faults.
Clutter needs a way to distinguish a clutter_actor_set_parent() done on
an internal child from one done on a "public" child; for this reason, a
push/pop pair of functions should be available to Actor implementations
to mark the section where they wish to add internal children:
➔ clutter_actor_push_internal ();
...
clutter_actor_set_parent (child1, parent);
clutter_actor_set_parent (child2, parent);
...
➔ clutter_actor_pop_internal ();
The set_parent() call will automatically set the newly added
INTERNAL_CHILD private flag on each child, and both
clutter_actor_destroy() and clutter_actor_unparent() will check for the
flag before deciding whether to call the Container's remove method.
Emmanuele Bassi [Sun, 13 Dec 2009 01:23:54 +0000 (01:23 +0000)]
layout: Let begin_animation() return the Alpha
When beginning a new animation for a LayoutManager, the implementation
should return the ClutterAlpha used. This allows controlling the
timeline and/or modifying the animation parameters on the fly.