Commit Graph

7106 Commits

Author SHA1 Message Date
Emmanuele Bassi
519da376f0 stage: Clean up
Remove some ifdeffed out dead code, and some duplication.
2012-02-13 08:44:40 +00:00
Emmanuele Bassi
cd118f0dc0 text: Fix regression
When the ClutterTextBuffer support inside ClutterText was merged, it
introduced a regression that was identified and fixed in bug 659116.

The optimization to not paint empty ClutterText actors is only valid
is the actor is not editable, or if the cursor is not visible.
2012-02-11 16:02:31 +00:00
Emmanuele Bassi
f770cce7a5 build: Fix platform_linux check
Missing * at the end.

As a side effect, this commit enables the ABI check when running make
check inside the clutter/ directory.
2012-02-10 12:26:43 +00:00
Chun-wei Fan
66451e75d3 Update config.h.win32(.in)
Make it more like the config.h(.in) in terms of the entries to check.
2012-02-10 16:15:06 +08:00
Chun-wei Fan
ca9b27615d Update Visual C++ property sheets
-Stop installing the cookbook items for now
-Reflect on newly added and deprecated public headers
2012-02-10 16:10:47 +08:00
Chun-wei Fan
5220d659e0 Update Clutter Visual C++ projects
Link also to GIO as the GResource APIs from GIO is now being used
2012-02-10 15:50:55 +08:00
Emmanuele Bassi
001e839401 Add abicheck.sh
Courtesy of GLib and GTK+. The abicheck.sh is a simple, Linux-only,
script to check that we're not leaking private symbols, or that the
clutter.symbols file hasn't been updated.

In theory, it should go inside the distcheck phase.
2012-02-09 18:42:27 +00:00
Emmanuele Bassi
de9efd98a7 symbols: Update
Add a bunch of missing public symbols, and remove some cruft.
2012-02-09 18:41:55 +00:00
Emmanuele Bassi
92f6b520cb build: Identify the Linux hosts
This gives us a nice conditional, like the one we have on Windows and
OSX.
2012-02-09 18:41:19 +00:00
Emmanuele Bassi
910b09d70a Mark internal symbol as private
A bunch of private symbols have escaped into the SO; let's rectify this
situation by using the '_' private prefix, or making them static as they
should have been.
2012-02-09 18:40:03 +00:00
Emmanuele Bassi
8ba0351c7a conform/actor: Add unit for the Container signals
ClutterActor should be emitting signals defined on the ClutterContainer
interface, as well as ensuring that manipulating the scene graph is
still possible from within them.

The new unit checks that we're emitting signals, by implementing
something similar to the Bin class available in toolkits like gtk, st,
and mx — i.e. a container that can only hold one child at any given
point.
2012-02-09 16:48:08 +00:00
Neil Roberts
fee53a2993 clutter-backend: Use the Cogl main loop mechanism
Cogl now requires that all applications integrate their main loop with
Cogl so that it can listen for events from winsys. This patch just
adds Cogl's GSource to the main loop.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-02-09 16:34:25 +00:00
Robert Bragg
bace07c0a0 Updates use of Cogl in line with api changes
Some of Cogl's experimental apis have changed so that the buffer apis
now need to be passed a context argument and some drawing apis have been
replaced with cogl_framebuffer_ drawing apis that take explicit
framebuffer and pipeline arguments.

These changes were made as part of Cogl moving towards a more stateless
api that doesn't rely on a global context.

This patch updates Clutter to work with the latest Cogl api and bumps
the required Cogl version to 1.9.5.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-02-09 16:34:25 +00:00
Emmanuele Bassi
d0e945fb70 actor: Add ClutterActorIter.destroy()
Similar to the clutter_actor_iter_remove(), but it'll call destroy()
instead of remove_child().

We can also reimplement the ::destroy default handler using it, and make
it more compact.
2012-02-09 15:49:30 +00:00
Emmanuele Bassi
59bb19a449 actor: Add a default handler for ::destroy
Now that ClutterActor can be instantiated, we need to do the right
thing, and destroy its children when it is destroyed.
2012-02-09 15:43:25 +00:00
Emmanuele Bassi
630e602eac docs: Update the Container interface documentation
The API reference should be more explicit about which parts of the
interface should be overridden, and which are deprecated.
2012-02-09 15:38:11 +00:00
Emmanuele Bassi
0c715d0026 conform/actor-graph: Add more cases
The actor-insert unit is not exercising the whole API and its allowed
arguments; this let sneak in the buglet found in bug 669730.
2012-02-09 14:22:31 +00:00
Florian Müllner
a023bb3412 actor: Fix add_child_at_index() for negative index
There is a typo in the check for a negative index: the index variable
should be index_, not index - unfortunately, the latter can still be
resolved to index(3), so compiler and linker are perfectly happy.

https://bugzilla.gnome.org/show_bug.cgi?id=669730
2012-02-09 09:29:13 +01:00
Мирослав Николић
74821f61c0 Updated Serbian translation 2012-02-08 21:40:54 +01:00
Emmanuele Bassi
e7511dd469 text: Avoid changing the contents when possible
An editable ClutterText will reset the selection and cursor whenever the
contents are changed — even if those contents are the same. As this may
confuse the user, we should check if we're setting the exact same string,
and bail out if necessary.
2012-02-07 11:36:27 +00:00
Emmanuele Bassi
d509455de0 text: Fix annotations
Both set_text() and set_markup() have relaxed their preconditions on a
non-NULL string as their argument, so we need to update the annotations.
2012-02-07 11:33:12 +00:00
Emmanuele Bassi
15441bb280 text: Style cleanups
Inline wrapper functions, and remove deep nested if's.
2012-02-07 11:31:28 +00:00
Emmanuele Bassi
1d55af9dfa interactive/text-field: Modernize 2012-02-07 11:30:43 +00:00
Emmanuele Bassi
7ba9774572 text: Add the coords_to_position() method
The reverse of position_to_coords().

While providing documentation on how to implement it using the
PangoLayout API, I realized that the verbosity of it all, plus the usage
of the Pango API, was not worth it, and decided to expose the method we
are using internally.
2012-02-06 18:27:58 +00:00
Emmanuele Bassi
3305105a8c docs: Fix up Since annotation
We only use stable releases for "since" tags.
2012-02-06 17:34:26 +00:00
Emmanuele Bassi
de64ccb451 Post-release version bump to 1.9.11 2012-02-06 16:45:15 +00:00
Emmanuele Bassi
0d7ec670f1 Release 1.9.10 (snapshot) 2012-02-06 16:40:00 +00:00
Emmanuele Bassi
8b904aa626 docs: Update release notes 2012-02-06 16:34:18 +00:00
Tristan Van Berkom
ad276865d2 Fixed clutter_state_remove_key_internal() to propagate the is_inert state
This was causing warnings when calling g_object_weak_unref on an
already finalized object.

https://bugzilla.gnome.org/show_bug.cgi?id=668951
2012-02-06 15:42:23 +00:00
Tristan Van Berkom
047f60b138 Fix Makefile to properly include clutter-backend-eglnative.h in the disted tarball
https://bugzilla.gnome.org/show_bug.cgi?id=669360
2012-02-06 15:40:15 +00:00
Emmanuele Bassi
ce9564e558 model: Drop GValueArray usage
We can use a plain C array of GValues when deserializing a ClutterModel
implementation from a ClutterScript description.
2012-02-06 15:34:13 +00:00
Emmanuele Bassi
d699328f7f list-model: Migrate from GValueArray
GValueArray is on its way to deprecation in GLib; as far as the
ListModel class is concerned, a plain C array of GValue is a perfectly
suitable replacement for the GValueArray usage. It actually is an
improvement, given that it's going to take less memory.
2012-02-06 15:32:27 +00:00
Emmanuele Bassi
bfe7129375 Clean up clutter-actor.h
It's time, we delayed far too long.
2012-02-05 08:47:17 +00:00
Emmanuele Bassi
ad62075378 interactive/actor: Show event and animation API 2012-02-02 14:07:38 +00:00
Emmanuele Bassi
9872d7eb1b docs: Clarify actor map and unmap methods
ClutterActor stopped requiring to override the map and unmap virtual
functions some time ago.

Now that ClutterActor implements the Container interface, overriding map
and unmap to control the MAPPED state of the children is pretty much
going to be a source of bugs and misunderstandings.

Plus, the ordering of the unmap, destroy, dispose, and finalize calls
should be be documented properly.

The documentation should clarify all that.
2012-02-02 11:18:00 +00:00
Emmanuele Bassi
242de47c03 docs: Update the actor invariants
• Clear up what's deprecated.
• Remove mentions of set_parent/unparent, and use add_child/remove_child
  instead.
• Clarify that reparent may not touch the MAPPED state.
2012-02-02 11:07:14 +00:00
Evan Nemerson
4b6156a57a introspection: add some missing annotations
https://bugzilla.gnome.org/show_bug.cgi?id=667840
2012-01-31 16:25:05 -08:00
Emmanuele Bassi
2475443a87 Clean up the clutter API reference Makefile.am 2012-01-31 17:03:14 +00:00
Emmanuele Bassi
bb2d807d2a docs: Add an image for the XIncluded code 2012-01-31 16:46:03 +00:00
Emmanuele Bassi
59f3488fa9 docs: Add private macro CLUTTER_PRIVATE_FIELD 2012-01-31 16:44:07 +00:00
Emmanuele Bassi
76c8b17144 docs: XInclude test-actor inside the Actor's description 2012-01-31 16:32:48 +00:00
Emmanuele Bassi
5974cfc97b docs: Add an example to the Actor description 2012-01-31 16:30:05 +00:00
Emmanuele Bassi
341faaa089 actor: Add diagnostic message for "behaviours" in ClutterScript
Behaviours have long since been deprecated; we should notify the user
that still uses behaviours in ClutterScript definitions.
2012-01-31 12:45:08 +00:00
Emmanuele Bassi
11239d8da6 actor: Do not unmap/unrealize twice on destruction
When calling clutter_actor_destroy(), ClutterActor calls
update_map_state() on itself to unset the REALIZED and MAPPED states,
prior to running the dispose() implementation.

The default dispose() will call remove_child() (either directly or
through the Container implementation), which will check for the MAPPED
state and then run update_map_state() again. We use the previously set
MAPPED state to decide whether or not the parent should queue for a
relayout/redraw when removing a visible children.

If the MAPPED flag was cleared prior to remove_child(), though, it'll
always be unset by the time we get to remove_child(), and this will
cause missing redraws/relayouts; we were ignoring this prior the
post-First Apocalypse changes because we were doing:

  if (was_mapped)
    clutter_actor_queue_relayout (parent);

  clutter_actor_queue_redraw (parent);

which is obviously wrong. Once I removed that glaring brain damage from
the remove_child() implementation, bugs started appearing — bugs that
were probably the reason why we introduced that brain damage in the
first place, instead of checking the source of those bugs.

The obvious fix is to avoid clearing up the actor's state on destroy()
until we remove the actor from its parent. This also reduces the amount
of work we do, and the code paths that can potentially go wrong.
2012-01-31 12:35:17 +00:00
Emmanuele Bassi
8ee6d10681 actor: Move ClutterShader-related code out of clutter-actor.c
Since the code dealing with ClutterShader is pretty self-contained, now,
we can safely move it outside of the main ClutterActor source file and
into its own. This will allow us to just drop a bunch of files when
branching for 2.0.
2012-01-31 11:56:59 +00:00
Emmanuele Bassi
2ed9e0d557 x11: Remove CLUTTER_DISABLE_DEPRECATED usage
Switch to CLUTTER_DEPRECATED and CLUTTER_DEPRECATED_FOR.
2012-01-31 10:34:45 +00:00
Emmanuele Bassi
1d84bf2b04 texture: Deprecate YUV setter
The YUV support depends on the driver support, and not only not many
drivers support YUV natively: the supported colorspaces are pretty much
useless.

The proper way to do YUV to RGB colorspace conversion on the GPU is to
use a fragment shader; for that, ClutterTexture and Cogl provide enough
API to achieve a good result - see the Clutter-GStreamer implementation,
for instance.
2012-01-31 10:28:04 +00:00
Emmanuele Bassi
c95b126571 texture: It's bytes per pixel, not bits
Clarify the error message when checking the bpp argument.
2012-01-31 10:23:48 +00:00
Emmanuele Bassi
986307f5e4 Use ClutterActorIter inside layout managers
Whenever it is possible, or convenient.
2012-01-30 11:09:59 +00:00
Chao-Hsiung Liao
8b47ddbce6 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-01-29 22:52:55 +08:00