Commit Graph

5203 Commits

Author SHA1 Message Date
Emmanuele Bassi
1e3debbd9e drag-action: Use the motion event when passing the drag threshold
This avoids a critical warning, but it also makes the dragging more
fluid in case of threshold crossing.

https://bugzilla.gnome.org/show_bug.cgi?id=670402
2012-02-23 10:51:08 +00:00
Robert Bragg
a8e631543e Reduce our internal dependence on the Cogl 1.x api
Since Cogl has started restricting what cogl 1.x api is exposed when
COGL_ENABLE_EXPERIMENTAL_2_0_API is defined and since we build all
Clutter internals with COGL_ENABLE_EXPERIMENTAL_2_0_API defined this
patch makes a first pass at reducing our internal use of the Cogl 1.x
api.

The most notable api that's no longer exposed to us internally is
the cogl_material_ api so this switches all Clutter internals to use the
cogl_pipeline_ api instead. This patch also makes quite a bit of
progress removing internal uses of CoglHandle although there is still
more to go.
2012-02-21 17:46:11 +00:00
Robert Bragg
eff95eba4a Pass context to cogl_texture_pixmap_x11_new() api
The experimental cogl_texture_pixmap_x11_new() api was recently changed
to take an explicit context argument and return a GError on failures.
This updates Clutter's use of the api accordingly.
2012-02-21 17:46:11 +00:00
Robert Bragg
66cc330c0b Loosen the guard around clutter_backend_get_cogl_context
We were only exposing clutter_backend_get_cogl_context() if
COGL_ENABLE_EXPERIMENTAL_2_0_API had been defined but the CoglContext
api is also available if COGL_ENABLE_EXPERIMENTAL_API has been defined.

As it was it meant that code opting into the experimental Cogl api
but not limiting to the 2.0 only api would have to #define
COGL_ENABLE_EXPERIMENTAL_2_0_API before including clutter.h but make
sure it wasn't defined when including cogl.h which was particularly
awkward.
2012-02-21 17:46:11 +00:00
Robert Bragg
671ead6681 Rename cogl_framebuffer_swap_* apis to cogl_onscreen_swap_*
Recently the cogl_framebuffer_swap_* apis were moved into the
cogl_onscreen_* namespace since only CoglOnscreen framebuffers can be
double buffered. This renames all uses of the cogl_framebuffer_swap_*
apis in Clutter.
2012-02-21 17:46:11 +00:00
Robert Bragg
fbf94310fc Pass a CoglContext when calling cogl_pipeline_new
The experimental cogl_pipeline_new() api was recently changed so it
explicitly takes a CoglContext. This updates all calls to
cogl_pipeline_new() in clutter accordingly.
2012-02-21 17:46:11 +00:00
Stefano Facchini
4e345f6edc clutter-drop-action: annotation fixes for some signals
https://bugzilla.gnome.org/show_bug.cgi?id=670433
2012-02-20 13:26:15 +01:00
Alejandro Piñeiro
493461e798 a11y: remove Container explanation
That explanation is outdated after the last changes on clutter
2012-02-15 19:10:24 +01:00
Alejandro Piñeiro
c1d43b70c5 a11y: proper ATK role for ClutterStage
ATK_ROLE_CANVAS is not a suitable role, as the user (in general) can't
draw on the Stage. CallyStage implements AtkWindow, so the proper role
is ATK_ROLE_WINDOW
2012-02-15 19:10:24 +01:00
Alejandro Piñeiro
cc126f55eb a11y: redoing focus stuff
Removing atkcomponent, focus_tracker, etc. Emitting focus state change
from the stage. Now things are more simple, and stop to use some
of the soon-to-be-deprecated signals on ATK.
2012-02-15 19:09:44 +01:00
Emmanuele Bassi
5b4d29bc4a docs: Note when new ClutterBindCoordinate values were added
The shorthands for position and size were added in 1.6.
2012-02-15 17:43:31 +00:00
Adel Gadllah
851d2a42c4 ClutterBindConstraint: Add CLUTTER_BIND_ALL coordinate
Add a CLUTTER_BIND_ALL that binds both size and position.
2012-02-15 17:57:18 +01:00
Emmanuele Bassi
b8e5603a85 x11/stage: Allow setting fullscreen hint before realize
It should be possible to do:

  clutter_stage_set_fullscreen (stage, TRUE);
  clutter_actor_show (stage);

and have the stage be full screen as soon as it is shown.

Currently, we need to call clutter_actor_realize() prior to calling
set_fullscreen(), otherwise the backing X window will not be set,
and ClutterStageX11 will silently discard the change.

If set_fullscreen() was called prior to realization, ClutterStageX11
should delay setting the fullscreen hint until the realize() chain
has been successfully executed.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2515
2012-02-15 14:20:59 +00:00
Lionel Landwerlin
d31bd6fe92 x11: adjust size to minimal size when realizing
If you execute the following sequence :

stage = clutter_stage_new ();
clutter_actor_set_size (stage, 1280, 800);
clutter_actor_realize (stage);

Then you end up creating an onscreen buffer of size 1280x800 but
ClutterStageX11 storing the stage size at 640x480.

This patch resync the 2 implementation by using the ClutterStage's
size in both classes when realizing.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=667540
2012-02-15 11:32:41 +00:00
Emmanuele Bassi
b1ff53d980 effects: Delay the creation of the base pipeline
Unconditionally creating CoglPipeline and CoglSnippets inside the class
initialization functions does not seem to be enough when dealing with
headless builds.

Our last resort is to lazily create the base pipeline the first time we
try to copy it, during the instance initialization.
2012-02-15 09:34:27 +00:00
Jasper St. Pierre
84632d9c1d actor: Correct get_paint_volume for an actor with no children and no clip
We do not need to repaint the entire stage if an actor has no children
and no clip.
2012-02-14 16:20:24 -05:00
Jasper St. Pierre
114250e329 clutter.symbols: Fix up symbols 2012-02-14 16:19:33 -05:00
Emmanuele Bassi
c1a57e537b Do not check for features inside class initialization
The class initialization function may be called when Clutter hasn't been
fully initialized — for instance, when scanning the source with gtk-doc
or with the introspection scanner.
2012-02-14 17:14:25 +00:00
Emmanuele Bassi
f854619bc9 box-layout: Fix allocation brain farts
The allocation code for BoxLayout contains a sequence of brain farts
that make it barely working since the synchronization of the layout
algorithm to the one in GtkBox.

The origin of the layout is inverted, and it doesn't take into
consideration a modified allocation origin (for actors the provide
padding or margin).

The pack-start property is broken, and it only works because we walk the
children list backwards; this horribly breaks when a child changes
visibility. Plus, we count invisible children, which leads to
allocations getting insane origins (either close to -MAX_FLOAT or
MAX_FLOAT).

Finally, the allocation is applied twice even for non-animated cases.

https://bugzilla.gnome.org/show_bug.cgi?id=669291
2012-02-14 16:01:21 +00:00
Alejandro Piñeiro
dbd603c504 ClutterStage: notify "key-focus" change on clutter_stage_emit_key_focus_event 2012-02-14 16:53:54 +01:00
Jasper St. Pierre
0f5ddb6d6c actor: Add freeze/thaw when changing the first/last child
This should improve performance when adding/removing lots
of children.
2012-02-14 10:40:36 -05:00
Rob Bradford
cf735b54df wayland: Add accessor API to permit access to underlying Wayland structures
* clutter_wayland_input_device_get_wl_input_device for the input device
* clutter_wayland_stage_get_wl_surface for the Wayland surface
* clutter_wayland_stage_get_wl_shell_surface for the shell surface
2012-02-14 13:54:15 +00:00
Rob Bradford
84362a8257 build: Install a clutter-wayland pkg-config file 2012-02-14 13:54:15 +00:00
Neil Roberts
3218cd6865 Convert all of the internal shader-based effects to use snippets
This converts the blur, colorize and desaturate effects to use
snippets instead of CoglPrograms. Cogl can handle the snippets much
more efficiently than programs so this should be a performance win. It
also fixes the problem that Cogl would end up recompiling the program
for every instance of the effects because Clutter was not reusing the
same program.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-14 12:09:32 +00:00
Neil Roberts
b4887c3699 blur-effect: Use the texture size to work out the x/y step
The blur effect needs to pass a uniform to the GLSL shader so that it
can know the texture coordinate offset from one texel to another. To
calculate this the blur effect was previously using the allocation
size of the actor rounded up to the next power of two. Presumably the
assumption was that Cogl would round up the size of the texture to the
next power of two when allocating the texture. However this is not be
true if the driver supports NPOT textures. Also it doesn't take into
account the paint volume of the actor which may cause the texture to
be a completely different size. This patch just changes to directly
use the size of the texture.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-14 12:09:31 +00:00
Neil Roberts
041ac40056 offscreen-effect: Add clutter_offscreen_effect_get_texture
Sometimes a subclass of ClutterOffscreenEffect wants to paint with a
completely custom material. In that case it is awkward to modify the
material returned owned by ClutterOffscreenEffect so it makes more
sense to just get the texture and manage its own material.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-14 12:09:18 +00:00
Neil Roberts
0e542aa306 clutter-texture: Don't create a dummy texture
All of the pipelines used for ClutterTexture actors share a common
pipeline ancestor created with cogl_pipeline_copy. Previously this
ancestor had a dummy 1x1 texture attached to it so that it would end
up with the same state as the child pipelines that will render with a
texture. Cogl now has a mechanism to specify that a texture will be
used with a pipeline layer without having to create an actual texture.
This patch makes it use that to avoid having an unused texture.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-14 12:09:18 +00:00
Jasper St. Pierre
e315122895 actor: Allow insert_child_at_index to add a child at the end with an index
If we have N children and the user passes N (or a number beyond N) to
clutter_actor_insert_child_at_index, we should respond by adding the
child at the end, not silently doing nothing.
2012-02-13 17:54:38 -05:00
Emmanuele Bassi
bbb7da03ac Add a note on the paint volume origin
This should avoid trying to fix the origin of a paint volume set from
the allocation's origin, and thus breaking everything.

A PaintVolume for an actor is defined to be relative to the actor's
modelview unless specifically modified by internal functions; the origin
of an actor's allocation is, on the other hand, parent-relative.
2012-02-13 18:21:11 +00:00
Jasper St. Pierre
8512dd2336 actor: Only care about a child's paint volume when clip_to_allocation isn't set
If we're clipping to the allocation, then the child can paint wherever it
wants, and we don't care. The paint volume is the allocation here.
2012-02-13 18:04:12 +00:00
Emmanuele Bassi
b5aa666dcd actor: Remove stray cogl_object_unref()
The outline primitive is static, so unref'ing it makes Clutter crash.
2012-02-13 17:56:12 +00:00
Emmanuele Bassi
3996ae4348 actor: Add destroy_all_children()
There are times when we don't want to remove all children and count of
the reference count to drop to 0 to ensure destruction; there are cases,
such as managed environments, where it's preferable to ensure that the
children of an actor get actually destroyed.
2012-02-13 17:42:07 +00:00
Emmanuele Bassi
bc7959069b Deprecate ClutterStage:color
ClutterActor has a background-color property, now; we should use it for
the Stage, re-implement the color property in terms of background-color.
and deprecate the Stage property.
2012-02-13 17:30:22 +00:00
Emmanuele Bassi
cf9c4e651d timeline: Move deprecated methods into a separate header 2012-02-13 17:30:22 +00:00
Emmanuele Bassi
cf1abda709 animation: Do not use deprecated timeline methods 2012-02-13 17:30:22 +00:00
Emmanuele Bassi
97feb06a6f timeline: Add repeat-count
Being able to easily set the number of repeats has been a request for
the animation framework for some time now. The usual way to implement
this is: connect to the ::completed signal, use a static counter, and
stop the timeline when the counter hits a specific spot.

In the same light as the :auto-reverse property, we can make it easier
to implement this common functionality by adding a :repeat-count
property that, when set, limits the amount of loops that a Timeline can
perform before stopping itself.

In fact, we can implement the :loop property in terms of the
:repeat-count property just by using a sentinel value mapping to
"infinity", and map loop=FALSE to repeat-count=0, and loop=TRUE to
repeat-count=-1.
2012-02-13 17:30:22 +00:00
Emmanuele Bassi
4277468928 timeline: Deprecate the clone() method
The clutter_timeline_clone() method was a pretty dumb idea when it was
introduced, back when we still had the ClutterEffectTemplate and the
clutter_effect_* animation API. It has since become an API wart: we
cannot change or add new properties to be cloned without the risk of
breaking existing code. All in all, cloning a GObject is just a matter
of calling g_object_new() with the wanted properties.

Let's deprecate this throwback of the Olden Days™, so that we can remove
it for good once we break for 2.0.
2012-02-13 17:29:45 +00:00
Emmanuele Bassi
bc2e4ac6c2 Clean up clutter-timeline.h
Re-align everything to allow expansion, and move the only "protected"
function to the clutter-master-clock.h private header.
2012-02-13 13:39:47 +00:00
Jasper St. Pierre
aec65c9198 actor-meta: Correct annotations for vfuncs
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-13 12:00:44 +00:00
Jasper St. Pierre
96031a4f6f actor: Fix some broken annotations
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-02-13 12:00:38 +00:00
Emmanuele Bassi
d8a51726e1 actor: Implement remove_all_children using ActorIter
The remove_all_children() method is an ideal candidate for using the
ActorIter API; the end result is more compact and easy to follow.
2012-02-13 08:59:09 +00:00
Emmanuele Bassi
8f6da170bc input-device: Do not use weak references with actors
Use the ClutterActor::destroy signal.
2012-02-13 08:52:08 +00:00
Emmanuele Bassi
f024b852f9 stage: Do not use weak refs with actors
ClutterActor provides a signal for notifying destruction: using weak
references is neither indicated nor recommended.
2012-02-13 08:45:22 +00:00
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
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
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
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
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
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
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
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
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
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
bb2d807d2a docs: Add an image for the XIncluded code 2012-01-31 16:46:03 +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
Emmanuele Bassi
842ff82d77 docs: Mention the DELEGATE_LAYOUT flag in set_allocation()
With code examples.
2012-01-27 17:07:33 +00:00
Emmanuele Bassi
534ec4ac7a group: Set the NO_LAYOUT flag
Since FixedLayout won't do that for us any more, and we have Group users
and Group subclasses that may be relying on it.
2012-01-27 15:48:46 +00:00
Emmanuele Bassi
31341986b1 fixed-layout: Remove the NO_LAYOUT flag set
ClutterFixedLayout is the default layout manager for ClutterActor.

Existing subclasses of ClutterActor will get a fixed layout manager
regardless of whether they are going to use it, but since it sets the
CLUTTER_ACTOR_NO_LAYOUT flag, it will introduce regressions on actors
that perform their own layout management.

The CLUTTER_ACTOR_NO_LAYOUT flag was a bit of a mistake in the first
place, as it was introduced as a last minute workaround in the 1.0
process to deal with broken stuff in Moblin. It's going to be a target
for deprecation towards a removal when we start the 2.0 process.
2012-01-27 15:45:11 +00:00
Emmanuele Bassi
5c9c5d24b2 box: Use the ActorIter API
And remove a useless override of the pick() virtual function while we're
at it.

https://bugzilla.gnome.org/show_bug.cgi?id=668669
2012-01-27 11:55:39 +00:00
Emmanuele Bassi
c6e1491474 stage: Use the iterator API instead of the DOM one
Whenever we're iterating over the children of the Stage we can now use
the ClutterActorIter API.

https://bugzilla.gnome.org/show_bug.cgi?id=668669
2012-01-27 11:55:39 +00:00
Emmanuele Bassi
58ffcfb10e actor: Add ClutterActorIter
Iterating over children and ancestors of an actor is a relatively common
operation. Currently, you only have one option: start a for() loop, get
the first child of the actor, and advance to the next sibling for the
list of children; or start a for() loop and advance to the parent of the
actor.

These operations can be easily done through the ClutterActor API, but
they all require going through the public API, and performing multiple
type checks on the arguments.

Along with the DOM API, it would be nice to have an ancillary, utility
API that uses an iterator structure to hold the state, and can be
advanced in a loop.

https://bugzilla.gnome.org/show_bug.cgi?id=668669
2012-01-27 11:55:39 +00:00
Emmanuele Bassi
fa856e3f5e box: Restore the ::destroy handler
During the gutting of ClutterBox, the destroy and dispose implementation
were removed. The former, especially, destroyed all children - which
usually meant that the redraw queues for the childre was cleared as
well. The removal introduced crashes when a Box was destroyed while its
children were still queueing redraws.
2012-01-27 11:48:14 +00:00
Emmanuele Bassi
12a79a66d8 drag-action: Use the symbolic constants for the button
https://bugzilla.gnome.org/show_bug.cgi?id=668692
2012-01-27 09:46:10 +00:00
Emmanuele Bassi
60cddbd28e event: Add symbolic names for left, middle, and right buttons
Symbolic names are better than magic numbers, even if they are
well-established and won't likely change.

This maps to a commit in GTK+ that introduced the same names; it
was decided to go for PRIMARY, MIDDLE, and SECONDARY because of
the confusion that may arise when the button order gets flipped
in left-handed configurations - the "left" button (i.e. 1) becomes
the right-most button, and the "right" button (i.e. 3) becomes
the left-most button.

https://bugzilla.gnome.org/show_bug.cgi?id=668692
2012-01-27 09:43:06 +00:00
Emmanuele Bassi
bacd4dd6a0 Remove unused variable 2012-01-26 18:11:49 +00:00
Rob Bradford
78533cfd1a wayland: Correctly support fullscreening before the stage is realized
Rather than just call into wl_shell_surface_set_fullscreen we must repeat all
the steps to correctly fullscreen the surface.
2012-01-26 15:39:16 +00:00
Rob Bradford
797336762e wayland: Force a redraw of the stage to get the new sized buffer attached 2012-01-26 14:41:27 +00:00
Rob Bradford
65e27a830b wayland: Use new stage state manipulation functions 2012-01-26 14:40:29 +00:00
Rob Bradford
0094350467 wayland: Refine fullscreen/unfullscreen to emit the state change events
Also update the code to set the size of the stage to set it to the size of the
output. In future versions of the Wayland protocol we'll get a configure
message advising of us of the size we can be to achieve fullscreen.
2012-01-26 14:14:13 +00:00
Rob Bradford
dd64ad1e42 wayland: Support programmatically resizing the stage
This will call into Cogl and ask it to resize the framebuffer which will then
update the underlying EGL surface.
2012-01-26 14:14:13 +00:00
Rob Bradford
838fc6276f wayland: Support setting fullscreen before the stage is realized 2012-01-26 14:14:13 +00:00
Rob Bradford
da19c3dfca wayland: Implement set_fullscreen vfunc in ClutterStageWayland 2012-01-26 14:14:13 +00:00
Rob Bradford
cb4b9d758f wayland: Include the Wayland surface and shell surface in ClutterStageWayland 2012-01-26 14:14:13 +00:00
Rob Bradford
737c5e1045 wayland: Save the output mode so that it can be used to fullscreen windows 2012-01-26 14:13:23 +00:00
Emmanuele Bassi
3780e3e4f0 x11: Unbreak the build
The stage wrapper is on the ClutterStageCogl instance.
2012-01-26 10:29:50 +00:00
Emmanuele Bassi
fdf89a9e06 Merge branch 'stage-state'
* stage-state:
  docs: Update ClutterStageState flags
  wayland: Use the Stage state tracking
  gdk: Use the Stage state tracking
  win32: Use the Stage state tracking
  x11: Use the Stage state tracking
  osx: Use the Stage state tracking
  stage: Add state tracking
2012-01-26 08:42:00 +00:00
Emmanuele Bassi
9dab33401f docs: Update ClutterStageState flags 2012-01-26 08:33:45 +00:00
Emmanuele Bassi
2b547442a3 wayland: Use the Stage state tracking 2012-01-26 08:31:11 +00:00
Emmanuele Bassi
8c184f53cb gdk: Use the Stage state tracking 2012-01-26 08:31:11 +00:00