Commit Graph

7044 Commits

Author SHA1 Message Date
Emmanuele Bassi bcd156e652 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-26 18:12:32 +00:00
Emmanuele Bassi 28a9203ee9 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-26 18:12:32 +00:00
Emmanuele Bassi 289766c7af 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-26 18:12:32 +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
Emmanuele Bassi e73c2bf4ea win32: Use the Stage state tracking 2012-01-26 08:31:10 +00:00
Emmanuele Bassi 12e4f300a7 x11: Use the Stage state tracking 2012-01-26 08:31:10 +00:00
Emmanuele Bassi 2c9a693c14 osx: Use the Stage state tracking 2012-01-26 08:30:58 +00:00
Emmanuele Bassi 19ff11ac93 stage: Add state tracking
State changes on the Stage are currently deferred to the windowing
system backends, but the code is generally the same, and it should
be abstracted neatly inside the Stage class itself.

There's also the extra caveat for backends that state changes on a
Stage must also emit a ClutterEvent of type CLUTTER_STAGE_STATE, a
requirement that needlessly complicates the backend code.
2012-01-26 08:30:47 +00:00
Emmanuele Bassi 9206bd7627 tests/*: Use symbolic constants for sources and events
And make sure to use clutter_threads_add_* instead of the bare
g_*_add().
2012-01-25 23:20:25 +00:00
Emmanuele Bassi b2bf2dbb08 docs: Use symbolic constants for sources and events 2012-01-25 23:20:24 +00:00
Emmanuele Bassi 71323b8bfc x11/stage: Use symbolic constants for source function
And make sure to use the clutter_threads_add_timeout(), so that the
function is called under the Clutter lock.
2012-01-25 23:20:24 +00:00
Emmanuele Bassi a4d571aaf9 Post-release version bump to 1.9.9 2012-01-24 15:42:20 +00:00
Emmanuele Bassi 7179bd44c8 Release Clutter 1.9.8 (snapshot) 2012-01-24 15:20:35 +00:00
Emmanuele Bassi 18ec12a3b7 cookbook: Start migrating to the new API
Drop mentions of deprecated classes and API, and update the inline
example code.

Still some way to go, and the cookbook would probably benefit from
having a recipe on how to use ClutterActor to build a scene.
2012-01-24 15:12:41 +00:00
Emmanuele Bassi 1c01554e6a cookbook: Begin porting examples to the new API
Start dropping the usage of deprecated classes and API.
2012-01-24 15:01:00 +00:00
Emmanuele Bassi 75549456fd actor: use paint opacity to paint the background color 2012-01-24 14:52:33 +00:00
Emmanuele Bassi 414f8c1a0f docs: Add missing function 2012-01-24 14:20:07 +00:00
Emmanuele Bassi 825e1e6242 docs: Inlined examples break enums gtk-doc 2012-01-24 14:13:53 +00:00
Emmanuele Bassi 8d8d4ae7e5 script: Add loading from a resource
GLib has gained support for compiling ancillary data files into the same
binary blob as a library or as an executable.

We should add this feature to ClutterScript, so that it's possible to
bundle UI definitions with an application.
2012-01-24 12:04:56 +00:00
Emmanuele Bassi 254ebd8765 actor: Remove unused function 2012-01-24 09:36:31 +00:00
Emmanuele Bassi 4330f45d05 Override Container inside ClutterStage
The only actor that results in a mix of the old Container API and the
new Actor API is ClutterStage. By inheritance, a Stage is a Group, but
we don't want it to behave like a Group - as it already overrides most
of the Actor API, and the reason why it was made as a Group in the
first place was convenience for adding/removing children.

Given that touching Group to make it aware of the new Actor API has
rapidly devolved into a struggle between a Demiurge that tries to
avoid breakage and a Chaos that finds new and interesting ways to
break ClutterGroup, let's declare API bankruptcy here and now.

ClutterStage should override ClutterContainer methods, and use the
layout management of ClutterFixedLayout as the proper class that it
was meant to be ages ago. Let ClutterGroup rot in pieces.
2012-01-23 20:54:07 +00:00
Emmanuele Bassi cfac97ffe1 Allow mixing old and new API without falling apart
Now that we reinstated Group to its "former glory", we need to ensure
that applications using the deprecated containers with the new DOM API
in ClutterActor can actually work - or, at least, not break horribly.

This actually means making sure that ClutterStage and ClutterGroup can
cope with the DOM, while retaining their old implementations, as well as
their bizarre idiosyncrasies and their utter, utter brokenness.
2012-01-23 20:54:06 +00:00
Emmanuele Bassi f5de10c05f interactive/actors: Update the venerable test-actors 2012-01-23 20:54:06 +00:00
Fran Diéguez c7d8c097ec Updated Galician translations 2012-01-23 00:34:20 +01:00
Emmanuele Bassi 29384c114f actor: NULL-ify sibling fields when removing
Let's try and avoid leaving around stale pointers.
2012-01-20 17:19:42 +00:00
Rob Bradford 27784de941 wayland: Update to changes in the SHM api
The enum value for the SHM formats has changed to be more explicit about the
format of the data.
2012-01-20 16:15:08 +00:00
Emmanuele Bassi 7d7d753a49 group: Restore previous implementation
Making Group just a proxy to Actor broke some behaviour that application
and toolkit code was relying on. Let's keep Group around to fight
another day.

This commit fixes gnome-shell as far as I can test it.
2012-01-20 16:01:13 +00:00
Emmanuele Bassi 3ff502fbb2 stage: Restore the chain up inside allocate()
Group does not have a custom allocate() any more, so it would end up
calling the default allocate() implementation provided by ClutterActor
anyway.
2012-01-20 14:55:57 +00:00
Emmanuele Bassi 8ebf46d74c actor: Remove default layout-manager
It's creating more issues than what it's trying to solve. At least for
the time being, let's not set one.
2012-01-20 14:55:13 +00:00
Emmanuele Bassi bd348625c7 group: Gut the implementation
A Group is a just a ClutterActor with the layout-manager property set at
instance initialization time. It doesn't need anything else from
ClutterActor's vtable, except the slightly custom show_all/hide_all
implementation, and a simplified get_paint_volume.
2012-01-20 14:53:41 +00:00
Emmanuele Bassi 1afd3827c7 actor: Move underallocation warning to diagnostic mode
This should keep down the warning messages — at least for the time
being.
2012-01-20 12:04:48 +00:00
Emmanuele Bassi c760657903 actor: Use internal add/remove child in reparent()
Do not use the public API; reparent() used to use unparent() and
set_parent(), so we need to maintain the old behaviour.
2012-01-20 12:02:49 +00:00
Emmanuele Bassi 683657cc30 Post-release version bump to 1.9.7 2012-01-19 14:01:20 +00:00
Emmanuele Bassi 75d97ffdc5 Release Clutter 1.9.6 (snapshot) 2012-01-19 13:44:38 +00:00
Emmanuele Bassi a222e75e33 build: Bump up the Cogl requirement
Clutter requires a new version of Cogl's API, but we never bumped the
requirement inside configure.ac.
2012-01-19 13:44:38 +00:00
Emmanuele Bassi 480514b721 stage: Use clutter_actor_set_allocation()
Instead of chaining up, given that we want to bypass chaining up and
just set the allocation. This also allows us to bail out of the
overridden allocate vfunc check, given that we want the default Actor
behaviour to apply - including eventual layout manager delegates.
2012-01-19 13:44:38 +00:00