Compare commits

...

375 Commits

Author SHA1 Message Date
162d6d45a0 cogl/egl: Use EGL_IMG_context_priority
As long as the context_priority extension is available request a high
priority context, to help the compositor look fluid despite heavy GPU usage
from other applications at a regular priority.

This becomes sort of pointless if/when unredirection applies, should still
help with overview/workspace switch animations, or if the application is
not fullscreen.

Based on a similar patch by Daniel Stone to Weston.
2019-01-21 16:33:44 +01:00
ff507273d2 startup-notification: Silence warning
Warning in question:

../src/core/startup-notification.c:646:16: error: unused variable ‘display’ [-Werror=unused-variable]
2019-01-18 18:18:57 +01:00
f033d0e846 core: Add MetaLaunchContext
This is a GAppLaunchContext subclass meant to replace usage of
GdkAppLaunchContext in gnome-shell.

Launch contexts get created from the MetaStartupNotification as
they are closely related. The messaging underneath depends on
the availability of a X11 display, if there is one we go through
it (and libsn). If there is none, we still create startup sequences
manually for wayland clients.
2019-01-18 17:03:57 +00:00
ca67d52cac x11: Add method to launch applications, using SnLauncher
The method spawns a launch request that will get caught by the
SnMonitor we have in place to handle X11 startup notification
messages.
2019-01-18 17:03:57 +00:00
60d22b7cd0 wayland: Accept NULL primary data source
A NULL argument is expected here in order to unset the selection,
meta_wayland_data_device_set_primary() accepts a NULL source, but
gtk_primary_selection_device.set_selection was not handling a
NULL wl_resource.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/335
2019-01-18 13:52:05 +00:00
e9778eba18 build: Pass --quiet to glib-genmarshal
We don't need to know it read the input file really.
2019-01-17 20:42:10 +00:00
56d260cfb3 screen-cast-monitor-stream-src: Only send cursor bitmap when it changes
To avoid unnecessary pixel copying, only send the cursor bitmap when it
changes. This also allows the receiver to know when the cursor bitmap
actually changed.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
c45d5f53ff cursor-tracker: Emit cursor-changed after renderer was updated
Otherwise the cursor retrieved via meta_cursor_renderer_get_cursor() is
out of date.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
4e402b3972 screen-cast: Add 'cursor-mode' to allow decoupled cursor updates
The 'cursor-mode', which currently is limited to RecordMonitor(), allows
the user to either do screen casts where the cursor is hidden, embedded
in the framebuffer, or sent as PipeWire stream metadata.

The latter allows the user to get cursor updates sent, including the
cursor sprite, without requiring a stage paint each frame. Currently
this is done by using the cursor sprite texture, and either reading
directly from, or drawing to an offscreen framebuffer which is read from
instead, in case the texture is scaled.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
79d99cbe3f cursor-renderer: Add API to allow inhibiting HW cursor
There may be reasons to temporarly inhibit the HW cursor under certain
circumstances. Allow adding such inhibitations by adding API to the
cursor renderer to allow API users to add generic inhibitors with
whatever logic is deemed necessary.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
328eff7352 screen-cast/monitor-stream-src: Copy content before cursor is drawn
To get a consistent behaviour no matter whether HW cursors are in use or
not, make sure to copy the framebuffer content before the stage overlays
(cursor sprite textures) are painted.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
ed5c1f433b backends/stage: Emit signal between painting actors and overlays
Will be used by screen casting for embedding the cursor separately, or
not including at all.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
7ac2083134 backends/stage: Fix minor style issue
https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
bd97b11414 renderer: Add API to get view from logical monitor
Will be used to get the view scale for a logical monitor, which is
necessary for passing cursor sprites via PipeWire.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
0da0207eed screen-cast: Add getters to fetch object owners
MetaBackend owns MetaScreenCast which owns MetaScreenCastSession which
owns MetaScreenCastStream. Make it possible to fetch objects in the
oppositev direction too.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
08229a6f5d screen-cast-monitor-stream: Don't pass monitor manager when creating
It can be fetched indirectly from the monitor already.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
50071303af clutter/stage: Add clutter_stage_is_redraw_queued() API
This will be used by the screen casting code to check whether it should
wait for a frame before reading cursor state, or send only the cursor
update, if no redraw is queued.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
2b2d77dc3e cursor-tracker: Add 'cursor-moved' signal
https://gitlab.gnome.org/GNOME/mutter/merge_requests/357
2019-01-16 17:09:51 +00:00
a0909c3440 constraints: Fix titlebars going off the bottom
The "current" rect includes the frame, so in order to keep the
titlebar on screen, window movement must be restricted to at
most (height - titlebar_height) past the work area bottom.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/391
2019-01-16 01:19:32 +01:00
22f865122c renderer/native: Prefer hardware rendering for primary GPU
Mutter prefers platform devices over anything else as the primary GPU.
This will not work too well, when a platform device does not actually
have a rendering GPU but is a display-only device. An example of this
are DisplayLink devices with the proprietary driver stack, which exposes
a DRM KMS platform device but without any rendering driver.

Mutter cannot rely on EGL init failing on such devices either, because
nowadays Mesa supports software renderers on GBM, so the initialization
may well succeed.

The hardware rendering capability is recognized by matching the GL
renderer string to the known Mesa software renderers. At this time,
there is no better alternative to detecting this.

The secondary GPU data is abused for the GL renderer, as the Cogl
context may not have been created yet.  Also, the Cogl context would
only be created on the primary GPU, but at this point the primary GPU
has not been chosen yet. Hence, GPU copy path GL context is used as a
proxy and predictor of what the Cogl context might be if it was created.
Mind, that even the GL flavour are not the same between Cogl and
secondary contexts, so this is stretch but it should be just enough.

The logic to choose the primary GPU is changed to always prefer hardware
rendering devices while also maintaining the old order of preferring
platform over boot_vga devices.

Co-authored by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>

https://gitlab.gnome.org/GNOME/mutter/merge_requests/271
2019-01-13 10:30:44 +00:00
60ac2838b5 renderer/native: Move primary GPU choosing later
Moves the primary GPU choosing to after all secondary gpu data has been
created.

This makes it possible for a future patch to start looking at secondary
gpu data in choose_primary_gpu () to determine if it is using a hardware
driver or a software renderer.

Co-authored by: Pekka Paalanen <pekka.paalanen@collabora.com>

https://gitlab.gnome.org/GNOME/mutter/merge_requests/271
2019-01-13 10:30:44 +00:00
dfde2f59da renderer/native: Secondary gpu data for all
Initialize the secondary GPU data for all GPUs, even the primary one. By
not looking at the primary_gpu_kms member, a future patch is allowed to
postpone choosing the primary GPU.

A future patch will use the secondary GPU data to decide which GPU will
become the primary GPU.

Co-authored by: Pekka Paalanen <pekka.paalanen@collabora.com>

https://gitlab.gnome.org/GNOME/mutter/merge_requests/271
2019-01-13 10:30:44 +00:00
3d2ca9a67f renderer/native: Count devices on EGLDevice check
create_renderer_gpu_data_egl_device () relied on the primary GPU being
already chosen for the "EGLDevice currently only works with single GPU
systems" error message. A future patch will choose the primary GPU after
this, not before, so this check needs to be rewritten before the
initialization order is changed.

The new check is implemented exactly as the error message says: there
must be exactly one GPU, otherwise fail.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/271
2019-01-13 10:30:44 +00:00
9182c8b801 backends/native: Move primary_gpu into MetaRendererNative
Make the choosing and identity of the primary GPU an internal detail to
the native renderer. MonitorManagerKms did not need it for anything.

The primary GPU logic remains unchanged.

This allows follow-up patches to change how the renderer chooses the
primary GPU. It will be easier for the renderer to use private
information for choosing.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/271
2019-01-13 10:30:44 +00:00
1def099047 backends/native: Re-order primary GPU choosing logic
This is a step towards moving the primary GPU logic into the native
renderer exclusively. In the future the renderer will have one more
criterion on choosing the primary GPU than MetaMonitorManagerKms should
know about: does a GPU offer hardware rendering.

The choosing of primary GPU is separated from the discovery of GPUs.
When GPUs are discovered and added to the list, the MetaGpuKmsFlag is
now populated correctly and used in choosing.

Choosing the primary GPU is done after all GPUs have been found and is
slightly different from before:

- Skipping devices that do not belong to our seat now works instead of
becoming the primary GPU.

- Fall back to any non-platform, non-boot_vga device if neither kind is
found.

The old preference of platform over boot_vga device is kept.

The hotplug path will continue creating a gpu_kms without flags, because
at that point the primary GPU has already been chosen and the flags are
irrelevant.

Co-authored by: Pekka Paalanen <pekka.paalanen@collabora.com>

https://gitlab.gnome.org/GNOME/mutter/merge_requests/271
2019-01-13 10:30:44 +00:00
ddb0ef1e8d backends/native: Add flags to MetaGpuKms
Add a flags field to MetaGpuKms. In following commits, the flags defined
here will be set and used for choosing the primary GPU.

Co-authored by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>

https://gitlab.gnome.org/GNOME/mutter/merge_requests/271
2019-01-13 10:30:44 +00:00
a56a59feee Remove po/ChangeLog
Ain’t nobody need ChangeLogs for a while now.
2019-01-12 14:53:13 +01:00
174df4eaeb Remove po/Makevars
Follow-up to 763ae36cee
2019-01-12 14:51:46 +01:00
e3e933c47a clutter/x11: Implement keycode remap to keysyms on virtual key devices
Keycode lookup can fail for serveral reasons, e.g. if there is no combination of
modifiers and keycodes that can produce the target keysym with the current
keyboard layout.

In case the keycode lookup fails, remap temporarily the keysym to an unused
keycodes.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/109
2019-01-11 17:29:27 +01:00
fda2e798bb Bump version to 3.31.4
Update NEWS.
2019-01-10 20:07:55 +01:00
fb38738fe9 Remove obsolete .cvsignore files
We moved to git 11 years ago, it's about time.
2019-01-10 11:50:54 -02:00
5eb749d690 project: Update gitignore 2019-01-10 11:50:54 -02:00
763ae36cee Drop Autotools
I saw Meson fade from the sky
On the wind I heard a sigh
As snowflakes cover fallen Makefiles
I will say this last goodbye

Meson is now coming
So ends Autotools days
Future is now coming
And we must away
Over Python and without Bashisms
Through lands where never Meson touched
By silver streams that run down to the Sea

Under parsers, beneath old legacy
Over snow one winter’s morn
I turned at last to paths that lead home
And though where the road then takes me
I cannot tell
We came all this way
But now comes the day
To bid you farewell

Many places I have been
Many sorrows I have seen
But I don’t regret
Nor will I forget
All Makefiles that took that road with me

I bid you all a very fond farewell.
2019-01-10 11:50:54 -02:00
582b67a2f1 window: Handle maximize when headless
When for some reason a window is maximized while the compositor is
headless, `window->monitor` will be NULL, so check for a NULL monitor
to avoid a NULL-pointer dereference.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/58

https://gitlab.gnome.org/GNOME/mutter/merge_requests/383
2019-01-09 15:19:20 +01:00
f740e8ed79 core: Fix compiler warning in MetaSoundPlayer 2019-01-09 03:42:43 +00:00
d360b25b81 build: Install .pc files in correct location
If a library is provided in the positional arguments, then meson
defaults to installing the .pc file in a 'pkgconfig' subdirectory
in the library's install location. We want the files in the regular
$libdir/pkgconfig rather than $libdir/mutter-$api/pkgconfig, so
specify the location explicitly in the parameters.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/382
2019-01-08 22:36:20 +01:00
3693f6f630 build: Use plain libcanberra instead of libcanberra-gtk3
We no longer use the gtk-aware ca_context, the dependency can be lowered
now.
2019-01-08 16:14:17 +01:00
ebfc6184b2 workspace: Port to MetaSoundPlayer
Use MetaSoundPlayer to play workspace switch sounds, instead of using
libcanberra directly.
2019-01-08 16:14:17 +01:00
8715f7481b core: Make MetaBell use MetaSoundPlayer to play the bell sound
Instead of using libcanberra/gtk+.
2019-01-08 16:14:17 +01:00
12f8325cbc core: Add MetaSoundPlayer abstraction
This is a simple libcanberra abstraction object, so we are able
to play file/theme sounds without poking into GTK+/X11. Play
requests are delegated to a separate thread, so we don't block
UI on cards that are slow to wake up from power saving.
2019-01-08 16:14:17 +01:00
956ab4bd58 build: Make libcanberra no longer optional
This is not the case anymore with MetaSoundPlayer in place, and also
important to get keyboard bell right.
2019-01-08 15:58:11 +01:00
58b5dee869 clutter: remove deprecated ClutterMedia.
It isn't used by GNOME Shell, so it should be safe to remove.
2019-01-08 14:18:07 +00:00
b448ced8e4 backends: Silence a couple of gtk-doc warnings
A lot of fancy gtk-doc documentation was added, but they had a couple of
issues: invalid return value annotations and wrong documented function
name.
2019-01-08 09:06:11 +01:00
73ddd7cd48 build: Pass library as first argument to pkg.generate()
Dependencies are added automatically, and we no longer get warnings
like:

clutter/clutter/meson.build:628: DEPRECATION: Library mutter-clutter-4
was passed to the "libraries" keyword argument of a previous call to
generate() method instead of first positional argument. Adding
mutter-clutter-4 to "Requires" field, but this is a deprecated behaviour
that will change in a future version of Meson. Please report the issue
if this warning cannot be avoided in your case.
2019-01-08 09:05:08 +01:00
e7fb45364a compositor: Fix maybe-uninitialized warning
Introduced in 54febd1419

https://gitlab.gnome.org/GNOME/mutter/merge_requests/374
2019-01-07 16:13:32 +00:00
0478c225b7 Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
93c29318b2 clutter-stage: Don't emit "after-paint" when picking 2019-01-06 12:36:56 +00:00
51e4fe7fef shaped-texture: Indentation fix in update_area()
https://gitlab.gnome.org/GNOME/mutter/merge_requests/366
2019-01-05 14:18:31 +01:00
d52081bed4 shaped-texture: Invert transform of damage in update_area()
Transformed textures need to transform back the damage area, which
is given in buffer coordinates, with the inverted transform.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/419

https://gitlab.gnome.org/GNOME/mutter/merge_requests/366
2019-01-05 14:18:28 +01:00
686b7f8baa boxes: Add API to transform a MetaRectangle
To be used if not a whole region needs to get transformed.
It also has an argument for reverse-transforms.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/366
2019-01-05 14:18:25 +01:00
b7a9c7e7d3 monitor-transform: Add helper function transform_invert()
It returns the inverted transform, which is always the same as the
input, besides for TRANSFORM_90 and TRANSFORM_270.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/366
2019-01-05 14:18:02 +01:00
676a8da005 monitor-transform: Move helper functions into their own file
The existing ones are statically inlined, so there is no .c file
right now.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/366
2019-01-05 14:15:23 +01:00
490f27efcb shaped-texture: Use actual texture if tower returned NULL
The texture tower can return no texture e.g. if the calculated level is
negative. This was handled before, but regressed with
e1370ee209. This fixes a potential crash
observed occasionally when starting Firefox nightly using the Wayland
backend in overview mode.
2019-01-05 09:36:46 +00:00
173867c12b renderer/native: Use shadow fb on software GL if preferred
If a KMS device has the DRM_CAP_DUMB_PREFER_SHADOW and a software based
GL driver is used, always use a shadow fb. This will speed up read backs
in the llvmpipe OpenGL implementation, making blend operations faster.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/106
2019-01-04 20:59:00 +00:00
df1384a856 window-actor: Turn into an abstract class
Now that everything is settled, from the initialization
process to the subclasses to moving code to the compositor,
MetaWindowActor can be a proper abstract class that cannot
be instantiated.

Thus, make MetaWindowActor an abstract class.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
2019-01-04 11:58:03 -02:00
5fbeecaac6 window-actor: Remove post_init() vfunc
This vfunc was added as a was to work around the convoluted
initialization process. Now that we figured it out and moved
the MetaWindowActor-specific initialization to constructed(),
we can override that.

Remove post_init() and use GObject.constructed() entirely.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
2019-01-04 11:58:02 -02:00
54febd1419 window-actor: Move window actor creation to MetaCompositor
MetaWindowActor breaks layering isolation by accessing
and injecting itself into compositor->windows. This is
a bad practice, and effecticely makes returning the
new actor useless, since we doesn't even use the return
value.

Move window actor creation to under MetaCompositor and
stop violating (too badly) the resposabilities of each
component. This moves meta_window_actor_new() into
meta_compositor_add_window().

Also, move the remaining initialization code to the
GObject.constructed vfunc.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
2019-01-04 11:58:02 -02:00
7952808469 Document window and surface actors
Document the roles of MetaSurfaceActor and MetaWindowActor,
and when their subclasses are used.

(And this is actually the first real documentation under
src/compositor/README!)

https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
2019-01-04 09:32:58 -02:00
0442fc8ddc window-actor: Cleanup includes
https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
2019-01-04 09:32:58 -02:00
80e3c1de57 window-actor: Move X11-specific code to MetaWindowActorX11
MetaWindowActor handles sending _NET_WM_FRAME_* X atoms to
clients - even pure Wayland clients.

Now that we have Wayland- and X11-specific implementations of
MetaWindowActor, we can delegate this to MetaWindowActorX11,
and allow pure Wayland apps to not even connect to
MetaSurfaceActor:repaint-scheduled.

Do that by moving all the X11-specific code to the X11-specific
MetaWindowActorX11 class. Add vfuncs to MetaWindowActorClass
that are necessary for the move, namely:

 * pre_paint() and post_paint()
 * post_init()
 * frame_complete()
 * set_surface_actor()
 * queue_frame_drawn()

https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
2019-01-04 09:32:58 -02:00
ac2f8cad0c window-actor: Select X11 or Wayland actor based on client type
X11 clients now have a MetaWindowActorX11 on the surface. Next
commits will move the X11-specific code to MetaWindowActorX11.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
2019-01-04 09:32:51 -02:00
7e8fc13504 Add MetaWindowActorX11 and MetaWindowActorWayland
Those are stub specialized classes for MetaWindowActor. This will
help ensuring that we do not execute X11-specific code paths on
pure Wayland clients.

The relationship between the window actor and the surface is the
following:

 * Wayland: MetaWindowActorWayland + MetaSurfaceActorWayland
 * X11: MetaWindowActorX11 + MetaSurfaceActorX11
 * Xwayland: MetaWindowActorX11 + MetaSurfaceActorWayland

It is not possible to have MetaWindowActorWayland backed by a
MetaSurfaceActorX11 surface.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
2019-01-04 09:32:51 -02:00
60f7ff3a69 window-actor: Turn into a derivable class
We will introduce specialized MetaWindowActors for X11
and Wayland in the future, so it needs to be derivable.

Make it a derivable class, and introduce a private field.
The MetaWindowActorClass definition is in the private
header in order to prevent external consumers of Mutter
to create MetaWindowActor implementations of their own.
That is, MetaWindowActor is only internally derivable.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
2019-01-04 09:32:51 -02:00
2fe05d7c35 x11-display: Add back _GTK_EDGE_CONSTRAINTS as supported hints
It was dropped by accident in 1530f27513,
so lets add it back.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/423
2019-01-03 17:57:06 +01:00
012691bebf shaped-texture: Draw external textures via offscreen
EGLStream textures are imported as GL_TEXTURE_EXTERNAL_OES and reading
pixels directly from them is not supported. To make it possible to get
pixels, create an offscreen framebuffer and paint the actor to it, then
read pixels from the framebuffer instead of the texture directly.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
c84d7ebc6d shaped-texture: Get transformed textures pixels via offscreen
When a texture is transformed in any way (e.g. Wayland buffer
transforms), we cannot just fetch the pixels from the texture directly
and be done with it, as that will result in getting the untransformed
pixels.

To properly get the pixels in their right form, first draw to an
offscreen framebuffer, using the same method as when painting on the
stage, then read from the framebuffer into a cairo image surface.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/408
2019-01-03 10:26:13 +00:00
f9118fb99b shaped-texture: Don't change the callers clip rect
We intersected the callers clip rect. That is probably not a good idea,
and easily avoided, so lets avoid it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
d3301d6b53 shaped-texture: Stop using gdk rect helper
We have our own version, just use that.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
1755a8b8de shaped-texture: Fix include order
https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
36b46af92f boxes: Add helper to scale rectangles by a double
And change the similar region scaling helper to use this one.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
e1370ee209 shaped-texture: Put actual texture painting in helper
This is so that it can be reused later by meta_shaped_texture_get_image() for
drawing via an offscreen framebuffer.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
37e36e8208 compositor: Make meta_actor_painting_untransformed take a framebuffer
Stop using the cogl draw framebuffer implicitly.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
eac18647c3 cogl/texture: Add API to check whether _get_data() will work
Currently, GL_TEXTURE_EXTERNAL_OES textures doesn't support getting pixel data.
Make it possible for texture users to know this.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
c681ccef3c cogl/texture-2d-gl: Bind correct target when getting data
While for normal textures, GL_TEXTURE_2D should be used, when it's an external
texture, binding it using GL_TEXTURE_2D results in an error.

Reading the specification for GL_TEXTURE_EXTERNAL_OES it is unclear whether
getting pixel data from a texture is possible, and tests show it doesn't result
in any data, but in case it would eventually start working, at least bind the
correct target for now.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
b329256113 cogl/texture-2d-gl: Try to determine format for external textures
Don't just set the internal format to the dummy format "any", as that causes
code intended to be unreachable code to be reached. It's not possible to
actually know the internal format of an external texture, however, so it might
not actually correspond to the real format.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
177d0c2d63 gpu/kms: Use correct DRM event context version
DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
whatever version of libdrm is present. Mutter was blindly asserting it
supported whatever version that may be, even if it actually didn't.

With libdrm 2.4.78, setting a higher context version than 2 will attempt
to call the page_flip_handler2 vfunc if it was non-NULL, which being a
random chunk of stack memory, it might well have been.

Set the version as 2, which should be bumped only with the appropriate
version checks.

https://bugzilla.gnome.org/show_bug.cgi?id=781034
2019-01-02 15:44:52 +01:00
f7d4a727a8 build: Always pass --quiet to g-ir-scanner
This makes the build less verbose, as all .gir generation except for
clutters didn't pass --quiet to g-ir-scanner, making it output long
linking commands. Do this by adding a common introspection_args
variable.

While at it, put -U_GNU_SOURCE in there too, as it was always passed
everywhere as without it the scanner would log warnings.
2018-12-22 11:31:10 +01:00
d539fe28d5 Use G_DECLARE_DERIVABLE/FINAL_TYPE on some types
This is only for types in the `Meta` namespace.

* Clears up a lot of boilerplate
* We get `g_autoptr` support for free
2018-12-21 19:48:50 +00:00
7759adf8e9 meson.build: Print correct value of EGLStream support
Fixes a minor mistake in 7a75692e.
2018-12-21 13:48:54 +08:00
7a75692e11 meson: Print some configure flags
Just an additional touch after adding installed tests,
outputting those flags helped not losing track of them.
2018-12-20 13:52:35 -02:00
9bd427a74c meta/tests: Remove commented lines
Leftovers from the initial landing of Meson files.
2018-12-20 13:52:35 -02:00
ebb6c56f67 Add Meson support for installed tests
This is the last remaining feature necessary to achieve
parity with the Autotools build.

A few changes were made to the install locations of the
tests, in order to better acomodate them in Meson:

 * Tests are now installed under a versioned folder (e.g.
   /usr/share/installed-tests/mutter-4)

 * The mutter-cogl.test file is now generated from an .in
   file, instead of a series of $(echo)s from within Makefile.

Notice that those tests need very controlled environments
to run correctly. Mutter installed tests, for example, will
failed when running under a regular session due to D-Bus
failing to acquire the ScreenCast and/or RemoteScreen names.
2018-12-20 13:52:35 -02:00
dcb525397c build: Move libmutter_name to toplevel Meson file
The libmutter name will be reused by other Meson files,
so it makes sense to share it instead of rebuilding this
string every time.
2018-12-20 12:44:15 -02:00
05ab8eebe8 cogl/tests: Use tmp file to dump test results
When running installed tests, the working directory for Cogl
tests is /usr/libexec/installed-tests/mutter-cogl-4/conform,
which isn't writable by normal users.

To avoid the adding stray hidden files to the current directory,
adapt the runner script to fallback to $(mktemp) - which is
available on all platform we care about - and avoid adding
hidden files everywhere.
2018-12-20 11:30:40 -02:00
981b045459 cogl: Pick glReadPixels format by target, not source
Presumably glReadPixels itself can be more performant with pixel format
conversions than doing a fix-up conversion on the CPU afterwards. Hence,
pick required_format based on the destination rather than the source, so
that it has a better chance to avoid the fix-up conversion.

With CoglOnscreen objects, CoglFramebuffer::internal_format (the source
format) is also wrong. It is left to a default value and never set to
reflect the reality. In other words, read-pixels had an arbitrary
intermediate pixel format that was used in glReadPixels and then fix-up
conversion made it work for the destination.

The render buffers (GBM surface) are allocated as DRM_FORMAT_XRGB8888.
If the destination buffer is allocated as the same format, the Cogl
read-pixels first converts with glReadPixels XRGB -> ABGR because of the
above default format, and then the fix-up conversion does ABGR -> XRGB.
This case was observed with DisplayLink outputs, where the native
renderer must use the CPU copy path to fill the "secondary GPU"
framebuffers.

This patch stops using internal_format and uses the desired destination
format instead.

_cogl_framebuffer_gl_read_pixels_into_bitmap() will still use
internal_format to determine alpha premultiplication state and multiply
or un-multiply as needed. Luckily all the formats involved in the
DisplayLink use case are always _PRE and so is the default
internal_format too, so things work in practise.

Furthermore, the GL texture_swizzle extension can never apply to
glReadPixels. Not even with FBOs, as found in this discussion:
https://gitlab.gnome.org/GNOME/mutter/issues/72
Therefore the target_format argument is hardcoded to something that can
never match anything, which will prevent the swizzle from being assumed.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/313
2018-12-19 19:21:51 +00:00
6502735f01 cogl: Remove mesa_46631_slow_read_pixels_workaround
This function gets hit even today on relatively modern Intel systems (I
have a Haswell Desktop with Mesa 18.2.4) if the pixel format is right.
Presumably it makes things slower for no longer a reason.

According to cb146dc515, this
functionality was refactored into a workaround path in 2012. The commit
message mentions the problem existing before Mesa 8.0.2. The number
refers to https://bugs.freedesktop.org/show_bug.cgi?id=46631 .

The use case where I hit this is when improving support for DisplayLink
video outputs. These are used through a "secondary GPU", and since
DisplayLink does not have a GPU, Mutter uses the CPU copy path with Cogl
read-pixels[1]. If the DisplayLink framebuffer was allocated as
DRM_FORMAT_XRGB8888 (the only format it currently handles correctly),
mesa_46631_slow_read_pixels_workaround would get hit. The render buffer is
the same format as the framebuffer, yet doing the copy XRGB -> XRGB ends
up being slower than XRGB -> XBGR which makes no sense.

This patch is not sufficient to fix the XRGB -> XRGB copy performance,
but it is required.

This patch reverts CoglGpuInfoDriverBug into what it was before
cb146dc515.

[1] This is not actually true until
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/278 is
    merged.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/313
2018-12-19 19:21:51 +00:00
1d73533f78 tests: Don't check pixels outside actor allocation
The actor-shader-effect test actors are 50px wide, but we check the 51st
pixel. This went along undetected until "clutter: Avoid rounding
compensation when invalidating 2D actors" because the paint volumes were
made slightly bigger and the shaders paint all over them (I guess nobody
noticed those actors being actually ~52px wide).

Update the test to check the middle of the opposite edge, so we keep neatly
rounded numbers.
2018-12-18 13:54:09 +01:00
697aeae2ad clutter/tests: Update expectations in actor-anchors test
The test does a clutter_actor_set_scale_full() call that only updates
the scale center (i.e. no changes to scale-x/y), but expects to receive
notifications of actor scale changes.

Since "Revert "Revert "ClutterActor: Optimize away idempotent
scale/position updates"" these are optimized away, so just drop the
assumption.
2018-12-18 13:51:44 +01:00
2e79d05e04 Revert "Revert "ClutterActor: Optimize away idempotent scale/position updates""
This reverts commit 4d2647cdbc.

A proper fix is now in GTK+, let's reintroduce this optimization.

Related: gtk#844, gtk!294
2018-12-18 12:51:28 +01:00
4139907a7e cogl: Ensure to only clear the depth buffer if depth testing is enabled
The depth buffer is marked as invalid when 1) the framebuffer is just created,
and 2) whenever GL_DEPTH_TEST is enabled on it. This will ensure the
framebuffers attached depth buffer (if any) is properly cleared before it's
actually used, while saving needless clears while depth testing is disabled
(the default).

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2018-12-18 12:51:28 +01:00
3c6a518d40 compositor: Avoid changing pipeline/source if shadow is not being painted
Avoids some context invalidations in cogl.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2018-12-18 12:51:28 +01:00
a7df459416 clutter: Avoid rounding compensation when invalidating 2D actors
This allows the redraw clip to be more constrained, so MetaCullable doesn't
end up rendering portions of window shadows, frame and background when a
window invalidates (part of) its contents.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
2018-12-18 12:51:28 +01:00
9f3d321bf2 input-settings: treat a serial of 1 as serial of 0
The Wacom Xorg driver assigns a serial number of 1 for any pad that doesn't
have a serial. libinput assigns 0. Just treat 1 as 0 here, there are no pens
with a real serial 1 anyway.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/414
2018-12-17 16:12:50 +10:00
49c2be40bb Replace Bugzilla by Gitlab URL in DOAP file 2018-12-15 23:50:01 +01:00
781ec74fd2 window: Fix introspection warnings
(transfer none) was added for fundamental types, which can't be
transfered.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/356
2018-12-14 15:57:36 +01:00
7a5e0c7824 window: Expose the client type in the API
We already have the enum exposed, but no accessor function.

Add `meta_window_get_client_type()` which returns the
`MetaWindowClientType` of a window.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
2018-12-14 13:26:16 +01:00
c786b6c13c screen-cast-session: Add window-id support
Use the "window-id" property to select the window to cast using
RecordWindow.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
2018-12-14 13:26:16 +01:00
bbcb66ddf4 window: Add window id
Generate a unique 64bit window-id which is unrelated to any windowing
backend.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
2018-12-14 13:26:16 +01:00
ec25f3a6b7 screen-cast-session: Add support for RecordWindow
Add support for the RecordWindow screencast method, casting the
currently focused window.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
2018-12-14 13:26:16 +01:00
dbe7279c7f screen-cast-session: Add screen-cast window mode
Window mode will cast the content of a single window using the
`MetaScreenCastWindow` interface.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
2018-12-14 13:26:16 +01:00
931934511c window-actor: Implement MetaScreenCastWindow interface
Implements the `MetaScreenCastWindow` interface for screen-cast
`RecordWindow` mode.

`meta_window_actor_capture_into()` implementation is still pretty crude
and doesn't take into account subsurfaces and O-R windows so menus,
popups and other tooltips won't show in the capture.

This is left as a future improvement for now.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
2018-12-14 13:26:16 +01:00
20c9ca25c0 screen-cast: Add screen-cast-window interface
Typically, to stream the content of a window, we need a way to copy the
content of its window-actor into a buffer, transform relative input
coordinates to relative position within the window-actor and a mean to
get the window bounds within the buffer.

For this purpose, add a new GType interface `MetaScreenCastWindow` with
the methods needed for screen-cast window mode:

 * meta_screen_cast_window_get_buffer_bounds()
 * meta_screen_cast_window_get_frame_bounds()
 * meta_screen_cast_window_transform_relative_position()
 * meta_screen_cast_window_capture_into()

This interface is meant to be implemented by `MetaWindowActor` which has
access to all the necessary bits to implement them.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
2018-12-14 13:26:16 +01:00
f64eba57ce screen-cast-src: Add VideoCrop support
To be able to cast windows, which by definition can change in size
dynamically, we need a way to specify the video crop meta to adjust to
the window size whenever it changes.

Add VideoCrop support with a new optional hook `get_videocrop()` in the
`ScreenCastStreamSrcClass` which, if defined, can let the child specify
a rectangle for the video cropping area.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
2018-12-14 13:26:16 +01:00
149e4d6934 monitor-manager: Don't use switch-config when ensuring configuration
Switch-configs are only to be used in certain circumstances (see
meta_monitor_manager_can_switch_config()) so when ensuring
configuration and attempting to create a linear configuration, use the
linear configuration constructor function directly without going via the
switch config method, otherwise we might incorrectly fall back to the
fallback configuration (only enable primary monitor).

This is a regression introduced by 6267732bec.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/342
2018-12-13 12:40:27 +00:00
8d514095cb cursor-renderer-native: Floor the cursor position instead of rounding
Which eliminates the 1px jitter that was visible when dragging windows,
and eliminates the flickering that was visible when pushing the cursor
against the right/bottom edges of the screen.
2018-12-13 17:12:28 +08:00
bdf8d0f1c3 compositor: improve vignette on background actor
The shader used for computing a vignette currently has two
problems:

 * The math is wrong such that the vignette isn't stretched
   across the whole actor and so ends abruptly
 * There is noticeable banding in its gradient

This commit corrects both problems by fixing the computing
and introducing noise dithering.
2018-12-12 09:31:24 -02:00
8e9184b62e background: Mipmap wallpaper when shrinking
So as to minimize jaggies for wallpaper that is >= double the resolution
of the screen.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/254
2018-12-12 12:30:10 +08:00
b34bb773a4 tests: Don't show 'core dumped' messages 2018-12-11 12:53:31 -02:00
efd9f86efe Dockerfile: Install gsettings-desktop-schemas rpm built from git
We depend on a newer version than packaged, so install a custom one from
https://copr.fedorainfracloud.org/coprs/jadahl/mutter-ci/build/836095/
2018-12-11 11:05:29 +01:00
7a9805554c build: Depend on gsettings-desktop-schemas >= 3.31.0
This is necessary for MetaInputMapper. This version is unreleased
yet but version was bumped in git.
2018-12-06 18:30:13 +01:00
ffca9b999d backends: Update to new "output" setting for tablets/touchscreens 2018-12-06 14:44:46 +00:00
d30301c00a backends: Turn builtin touchscreen on/off together with DPMS
This takes over gsd-power code, that would disable touchscreens
on DPMS off.

https://bugzilla.gnome.org/show_bug.cgi?id=742598
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/29
2018-12-06 14:44:46 +00:00
faf89ff35f backends: Add MetaInputMapper method to lookup devices from outputs
So we may know the device of a certain ClutterInputDeviceType that is
mapped to the given output.
2018-12-06 14:44:46 +00:00
87858a4e01 backends: Delegate on MetaInputMapper for unmapped display devices
If a display device (touchscreen, tablet with libwacom integration flags)
does not receive a monitor through settings. Delegate on the
MetaInputMapper so it receives a mapping through heuristics.
2018-12-06 14:44:46 +00:00
08a5e660d3 backends: Add MetaInputMapper
This object takes care of mapping absolute devices to monitors,
to do so it uses 3 heuristics, in this order of preference:
- If a device is known to be builtin, it's assigned to the
  builtin monitor.
- If input device and monitor match sizes (with an error margin
  of 5%)
- If input device name and monitor vendor/product in EDID match
  somehow (from "full", through "partial", to just "vendor")

The most favorable outputs are then assigned to each device, making
sure not to assign two devices of the same kind to the same output.

This object replaces (and is mostly 1:1 with) GsdDeviceMapper in
g-s-d. That object would perform these same heuristics, and let
mutter indirectly know through settings changes. This object allows
doing the same in-process.
2018-12-06 14:44:46 +00:00
df48b94889 clutter: Add API to retrieve the physical size of absolute devices
This will be used in upper layers to match abs input devices (touchscreens,
tablets) to the corresponding output.
2018-12-06 14:44:46 +00:00
2b938ce795 clutter: minor documentation update
Just better wording for swap throttled.
2018-12-06 14:29:34 +00:00
df284f9c9d clutter: Rename SYNC_TO_VBLANK to SWAP_THROTTLE
This is to reflect what this flag is actually about.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/191
2018-12-06 14:29:34 +00:00
7d20101198 cogl-framebuffer: Remove swap_throttled config
Since now we don't set the swap throttled value based
on sync-to-vblank, we can effectively remove it from
Cogl. Throttling swap buffers in Cogl is as much a
historical artifact as sync-to-vblank. Furthermore,
it doesn't make sense to disable it on a compositor,
which is the case with the embedded Cogl.

In addition to that, the winsys vfunc for updating
whenever swap throttling changes could also be removed,
since swap throttling is always enabled now.

Removing it means less code, less branches when running,
and one less config option to deal with.

This also removes the micro-perf test, since it doesn't
make sense for the case where Cogl is embedded into the
compositor.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/191
2018-12-06 14:29:34 +00:00
ae4d3bc27d clutter: Remove ability to externally set sync-to-vblank
Externally setting the sync-to-vblank setting was a feature
added as a workaround to old Intel and ATI graphic cards, and
is not needed anymore. Furthermore, it doesn't make sense to
change it on a compositor whatsoever.

This commit removes all the ways to externally change this
setting, as well as the now unused API.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/191
2018-12-06 14:29:34 +00:00
fe0a394e69 build: check for cvt only when building the native backend
Also error out properly when cvt is not found on Autotools.
2018-12-06 10:16:51 -02:00
1f3e9176fc clutter/x11: detect tablet type from the Wacom property
The xf86-input-wacom driver exports a property with the tool type as known by
the driver. This is a more reliable choice than guessing based on the device
name.

In the touchscreen case, we simply use is_touch_device() to guess which one of
the two options it is. Note that this code should never be hit anyway as we
would've succeeded earlier with a previous is_touch_device() call.
2018-12-06 11:46:44 +00:00
ffaec917e5 clutter: Only redraw affected portions on parent widget on show/hide
If we are lucky enough and the parent actor has the CLUTTER_ACTOR_NO_LAYOUT
flag, we would skip the relayout, but still redraw the parent actor in its
entirety.

In these cases, we can at least just redraw the area affected by the actor
being shown/hidden.
2018-12-06 02:45:11 +00:00
bf4ccd21c1 clutter: Avoid relayouts when raising/lowering children
These calls don't actually affect the layout, but the paint order.
It seems safe to skip the full relayout/repaint of the parent actor,
and redraw only the area occupied by the affected child.
2018-12-06 02:45:11 +00:00
9a843857b3 clutter: Make paint volume argument const on queue_redraw*()
The given paint volume is actually unmodified, there is no need to
require non-const arguments when some getters actually give const
paint volumes.
2018-12-06 02:45:11 +00:00
9004253c4e cogl: remove CoglFuncPtr, use GCallback instead
They literally mean the same thing, so we shouldn't reinvent the wheel.
2018-12-05 13:20:43 +00:00
c5471e5b8b renderer-x11-nested: Use rounded width/heights for fb size
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2018-12-05 10:34:22 +00:00
eacf2f2187 backends/x11/nested: Draw the stage view CRTCs with the correct size
The nested stage tries to emulate how CRTCs are drawn, but fails to do
this when a stage view is scaled as it didn't adapt the viewport size
according to the stage view scale.

https://bugzilla.gnome.org/show_bug.cgi?id=786663
2018-12-05 10:34:22 +00:00
7821256f5c monitor-manager-dummy: Allow to pass extra monitor specs via env
Add MUTTER_DEBUG_DUMMY_MONITORS_SPECS env variable support so that you can define
a ':' separated list of monitor specs in the form of WWWxHHH@RR that will be
available for configuring the nested mutter.
2018-12-05 10:34:22 +00:00
4baefe46b3 clutter/stage: Round viewport coordinates before setting
cogl_(fromebuffer)_set_viewport will implicitly cast away the fraction
of a floating point number, meaning if a coordinate calculation
resulted in just below the integer (which for example ~1.75 scaling on
a 1920x1080 did), we'd set a one pixel too narrow viewport. Fix this by
always rounding the floating point to the closest int before passing,
avoiding the precision loss.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2018-12-05 10:34:22 +00:00
c388a8fc9d display: Ceil pointer cursor theme scale when fractional
The fraction of the scale was accidentally casted away, lets ceil it
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2018-12-05 10:34:22 +00:00
e4a2d15171 display: Code cleanups
Compare integers with integer literals, and update docs

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2018-12-05 10:34:22 +00:00
4786cc85bd monitor-config-manager: Round layout size after scaling
When calculating the logical monitor layout size given a scale, don't
risk precision loss by float to int casting, which could result in a too
small layout.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2018-12-05 10:34:22 +00:00
666bef7af9 stack: Don't place Wayland popups in o-r layer
Placing persistant Wayland popups (e.g. not menus etc) in the o-r layer
breaks stacking order with other window trees (e.g. other client
windows), as the menu would get stuck in the o-r layer, i.e. on top,
even if the parent of the popup got lowered.

Fix this by placing the popups in the normal layer, relying on
transient-ness to keep stacking correct.
2018-12-04 14:33:01 +00:00
19e3c21667 wayland/surface: Don't make destoryed actor reactive
When destructing a xdg_toplevel, we'll disassociate the actor from the
MetaWaylandSurface, to allow it to animate out. After having done this,
avoid trying to set it as unreactive when unsetting the window.

This fixes the runtime warning:

clutter_actor_set_reactive: assertion 'CLUTTER_IS_ACTOR (actor)' failed
2018-12-04 14:20:45 +00:00
da5a2d3cb8 wayland/surface: Intersect buffer damage with buffer rect
Before processing the buffer damage region, intersect it with the buffer
rectangle to avoid trying to damage content outside the surface.

This fixes the runtime warning "GL error (1281): Invalid value"
happening when a client posts too large buffer damage larger.
2018-12-04 14:20:45 +00:00
7226c5c7bf backend/native: Remove leftover stage view checks
We haven't supported disabling stage views in the native backend since

commit 70edc7dda4
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Mon Jul 24 12:31:32 2017 +0800

    backends/native: Stop supporting stage views being disabled

There were still some left over checks; lets remove them.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/343
2018-12-04 15:04:50 +01:00
acacd3dd64 clutter/stage-cogl: Disable buffer age when painting red damage
This is to ensure we're rendering a red damage area that actually
represents what is being damaged.

Fixes an always-fullscreen red damage on bare metal Wayland and
GNOME Shell.
2018-12-04 12:50:51 +00:00
20b271fa49 clutter/stage-cogl: Add option to visualize damaged regions
This is useful to visualize which parts of the screen are being
damaged.

Add a new 'damage-region' value for CLUTTER_PAINT and paint the
damaged regions accordingly.
2018-12-04 12:50:51 +00:00
e4de9ed580 wayland/surface: Add support for buffer transforms
This adds the required bits to wayland surfaces and ties them up
to the compositor parts.

The central part here is to recalculate the surface size accordingly
and to translate surface damage into buffer damage.

The choosen approach additionally lays groundwork for wp_viewporter
support, which is closely related in its nature.

A further explanation of buffer transforms from the specification:
> The purpose of this request is to allow clients to render content
> according to the output transform, thus permitting the compositor
> to use certain optimizations even if the display is rotated.
> Using hardware overlays and scanning out a client buffer for
> fullscreen surfaces are examples of such optimizations.
2018-12-03 19:13:51 +01:00
452ef4d5bb region-utils: Add API to transform an integer region
The added API requires additional width and height arguments
to calculate transformed coordinates.
2018-12-03 18:58:17 +01:00
1467b6b02a shaped-texture: Add support for texture transform
This adds the necessary bits to support Wayland buffer transforms.
The main part here is to properly setup the Cogl pipeline
and to recalculate the size of the painted area accordingly,
so culling etc. still works.

The choosen approach additionally lays groundwork for Wayland
wp_viewporter support.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/322
2018-12-03 18:57:59 +01:00
9ca6c74267 autogen.sh: Don't run intltoolize
Mutter hasn't depended on intltool for a long time.

This completes 3248c685

Related: https://gitlab.gnome.org/GNOME/gnome-build-meta/issues/104
2018-12-03 11:36:45 +00:00
319500e4f3 tests: Fix warnings reported by shellcheck
This commit includes following fixes for a few shell scripts:

1. Follow the best practice of quoting variables everywhere unless they
   are used in places where word-splitting and globbing can never happen.

2. Replace `command` with $(command) because the latter is easier to use
   and read.

3. Don't use "$@" in places expecting a string because it is an array
   of strings instead of a single string.
2018-12-01 13:07:29 +00:00
b2e75b5da0 build: Don't hardcode the path of bash
Bash is not always installed in /bin and we should not hardcode the path
of it in source code which is expected to be built on many operating
systems and distributions.

Since most scripts using #!/bin/bash here doesn't have any bashism,
they can be converted to #!/bin/sh instead of using /usr/bin/env trick.
2018-12-01 12:56:12 +00:00
365ea2fd56 build: Don't check for Xwayland when Wayland is disabled 2018-12-01 12:56:12 +00:00
88f8228425 wayland: Fix DnD actor set up
Commit 70036429bd mixed drag_origin and drag_surface, leading to warnings
and invisible drag icon. Fix this up so we correctly set up the feedback
actor. This will correctly display the DnD icon alongside the pointer.
2018-12-01 09:42:48 +00:00
f8cd1e55a4 wayland: Make DnD role inherit from MetaWaylandActorSurface
It is meant to hold surfaces that require a ClutterActor, just like wl/xdg
shell surfaces and subsurfaces. Make it inherit from MetaWaylandActorSurface
so it gets that for free.

The type declaration is also made completely private, in order to avoid
cyclic dependency between meta-wayland-surface.h and
meta-wayland-actor-surface.h. We just require the GType fro assign_role()
anyway.
2018-12-01 09:42:48 +00:00
f6f188dad4 renderer-native: Advertise COGL_FEATURE_ID_PRESENTATION_TIME
Since it's now implemented (e9e4b2b72e). Fortunately forgetting to
advertise it didn't matter because there isn't any code yet that
checks for it.
2018-11-30 14:31:03 +00:00
262a3ecbd6 backends/x11: Flush connection after ungrab
Modal ungrabs may be followed by other clients trying to grab themselves,
flush the connection so we ensure the right order of events on the Xserver
side.

An example of this is js/ui/modalDialog.js in gnome-shell, as the alt-F2
dialog may launch X11 clients trying to grab themselves, commit a40daa3c22
in gnome-shell handled the case and added a gdk_display_sync() call to
ensure no grab existed at the time of executing.

This commit aims to achieve the same built in MetaBackend. A full sync
seems excessive though, as we just need to make sure the server got the
messages queued before the other side tries to grab, a XFlush seems
sufficient for this.
2018-11-30 13:58:36 +00:00
231aadd3f0 tools: Remove obsolete ppa-magic.py 2018-11-30 11:12:12 +08:00
c8db8bbe22 backend/x11/nested: Always claim the lid is open
The nested backend used the value from udev, meaning that one couldn't
configure the fake monitor if the laptop panel of the host was closed.
Avoid this annoyance by always having the nested backend claiming the
lid is open.
2018-11-29 11:37:45 +01:00
f67e1a55ee meta: Silence a couple of introspection warnings
We could just avoid introspecting `meta-startup-notification.h`, but
that'd mean splitting up the header list. Just silence the warning
instead.
2018-11-27 17:13:48 +01:00
169022cbb0 meson: Add mutter_built_sources to libmutter declared dependency
If meson tries to get ahead and generate object files for tests
at the same time than building libmutter, those may randomly fail
if meson did not create the libmutter generated headers yet.

Add those to the declared dependency, so the files are ensured to
be created before anything gets to use it.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/404
2018-11-27 15:51:38 +00:00
0d29609aec wayland/gtk-shell: Emit new capabilities event when changed
The capabilities may change during the compositors lifetime, so make
gtk-shell emit the capabilities event when capabilities change.

https://gitlab.gnome.org/GNOME/mutter/issues/276
2018-11-27 15:34:13 +01:00
00619f3a1c wayland: Add MetaWaylandGtkShell object
To be used to store state.

https://gitlab.gnome.org/GNOME/mutter/issues/276
2018-11-27 15:34:13 +01:00
bc5e76c76f wayland: Make MetaWaylandCompositor a GObject
This makes it possible to use GObject features such as data attachments.

https://gitlab.gnome.org/GNOME/mutter/issues/276
2018-11-27 15:17:00 +01:00
557b2a0e8c clutter: Remove erroneous "fixed point" comment
The function `clutter_actor_transform_stage_point` actually operates
almost entirely in floating point.
2018-11-26 15:57:41 +00:00
49cb691bb5 monitor-manager: remove get_edid_file() vfunc
It wasn't implemented by any subclass, it's not provided by DRM either.
And even if a subclass were to have only a file available, it could read
it into a GBytes as well and just use `read_edid()`.

Found this while working on !269.
2018-11-26 14:37:54 +01:00
6e1b14b26b x11: Remove hide-titlebar-when-maximized support
It's a UI pattern that has been superseded by client-side decorations,
apps that used to set the hint have generally moved on to headerbars.
Given that and the limitation to server-side decorated X11 windows,
GTK4 removed the client-side API for setting the hint, it's time to
follow suite and retire the feature.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/221
2018-11-26 13:12:18 +00:00
ca7c5c1223 meta/plugin: Use G_DECLARE_DERIVABLE_TYPE
It cuts out some of the GObject boilerplate, and gives us g_autoptr()
support for free.

Since this changes the ABI, we also need to bump the libmutter API
version.
2018-11-23 14:28:37 +00:00
e11ee44236 core: Refactor/simplify display startup sequence handling
Makes the caller function easier to read.
2018-11-23 12:27:13 +00:00
6b7bd91610 x11: Complete X11 startup sequence on SN_MONITOR_EVENT_COMPLETED 2018-11-23 12:27:13 +00:00
92349a4668 wayland: Complete the startup sequence as given from gtk-shell 2018-11-23 12:27:13 +00:00
7635d0631b core: Drop MetaDisplay startup sequence API
We now have MetaStartupNotification/Sequence in place
2018-11-23 12:27:13 +00:00
ec6a536d36 core: Use MetaStartupSequence internally
Replace code in MetaDisplay so it uses MetaStartupSequence
2018-11-23 12:27:13 +00:00
4d92979b43 core: Make MetaStartupSequence/Notification public
This will be preferred over SnStartupNotification, as exposed
through MetaDisplay.
2018-11-23 12:27:13 +00:00
4a69a0d7f7 core: Shuffle startup notification object creation
Hook properly to MetaDisplay, instead of having it be a singleton.
2018-11-23 12:27:13 +00:00
8a10196382 x11: Set all MetaStartupSequence properties for libsn sequences 2018-11-23 12:27:13 +00:00
91ce24d4b4 core: Add extra properties to MetaStartupSequence
Those that we use from SnStartupSequence over the place...
2018-11-23 12:27:13 +00:00
26fbd56a95 x11: Refactor the X11 startup notification bits into src/x11
Only one little bit left in MetaDisplay, because SnStartupSequence
is exposed in API there. These bits will be removed in future
commits.
2018-11-23 12:27:13 +00:00
576cd08088 core: Rename MetaStartupNotificationSequence to MetaStartupSequence
The name was excruciatingly long and not that much more descriptive.
2018-11-23 12:27:13 +00:00
e8c27603dd renderer-native: Advertise _FEATURE_SWAP_THROTTLE
Because it is implemented and always on. By advertising this fact
the master clock is able to sync to the native refresh rate instead
of always using the fallback of 60.00Hz.

https://bugzilla.gnome.org/show_bug.cgi?id=781296
2018-11-23 11:01:30 +00:00
e9e4b2b72e renderer-native: Add hardware presentation timing
Add support for getting hardware presentation times from KMS (Wayland
sessions). Also implement cogl_get_clock_time which is required to compare
and judge the age of presentation timestamps.

For single monitor systems this is straightforward. For multi-monitor
systems though we have to choose a display to sync to. The compositor
already partially solves this for us in the case of only one display
updating because it will only use the subset of monitors that are
changing. In the case of multiple monitors consuming the same frame
concurrently however, we choose the fastest one (in use at the time).
Note however that we also need !73 to land in order to fully realize
multiple monitors running at full speed.
2018-11-23 11:01:30 +00:00
6834bedb95 cogl: remove COGL_GNUC_NULL_TERMINATED
This is already defined for us in GLib, so prefer that instead.
2018-11-23 08:55:43 +01:00
bf8a3b1c1c cogl: Remove unused macro COGL_GNUC_DEPRECATED
This is also already defined in GLib as G_GNUC_DEPRECATED.

(Note that it is also something different than COGL_DEPRECATED)
2018-11-23 08:55:43 +01:00
3a4a858ce3 cogl: use G_BEGIN_DECLS instead of COGL_BEGIN_DECLS
This macro was introduced so as to be able to be built without GLib.
However, this feature was long ago removed, and in Mutter we depend on
it anyway, so let's get rid of it in favor of more consistency.
2018-11-23 08:55:43 +01:00
0a178a01b3 xwayland: Invert running-as-gdm check
It was accidentally inverted previously. Lets change it back.
2018-11-22 17:37:32 +00:00
332360be7c gitlab-ci.yml: Increase test timeout multiplier further
Twice the time was not enough, so pass -t 10 instead.
2018-11-22 18:20:58 +01:00
718ddc9c96 gitlab-ci.yml: Stop creating meson-logs artifact
The logs were useless, as the complete test suite log was printed to
stdout.
2018-11-22 17:48:00 +01:00
f795725aaf gitlab-ci.yml: Allow for tests taking longer time
Test runners might be slow, so use the test time multiplier 2 to avoid
unnecessary pipeline failures.
2018-11-22 17:48:00 +01:00
70741a051b gitlab-ci.yml: Wrap tests with catchsegv
To be able to see why tests failed, if they crashed due to a SIGSEGV,
wrap the execution with catchsegv.
2018-11-22 17:48:00 +01:00
ad7d6e4a37 backends/native: React to GPU hotplug
If a GPU is added at runtime, we should connect to it and manage
its outputs.
2018-11-21 14:33:00 +01:00
a6178990cd monitor-manager/kms: Use non-pci secondary cards
We may have secondary non-PCI devices, and we should drive their
outputs.
2018-11-21 14:26:02 +01:00
081842bac6 cogl/object: add cogl_clear_object utility function
This is based on `g_clear_object`, so it will be a bit more consistent
to write (and prevents the headaches from accidentally forgetting a NULL
check).
2018-11-20 15:25:24 +01:00
63a6ead7d9 wayland-dma-buf: doc the odd format mapping
This format mapping looks wrong at first hand, so explain why it is like
it is.

See also https://gitlab.gnome.org/GNOME/mutter/issues/323
2018-11-19 22:53:13 +00:00
1c044a8fa0 renderer/native: remove meta_renderer_native_gles3_read_pixels
It is unused.
2018-11-19 22:53:13 +00:00
d4bea60e1a renderer/native: use cogl for CPU copy path
Use cogl_framebuffer_read_pixels_into_bitmap () instead of
glReadPixels () for the CPU copy path in multi-GPU support.

The cogl function employs several tricks to make the read-pixels as fast
as possible and does the y-flip as necessary. This should make the copy
more performant over all kinds of hardware.

This is expected to be used on virtual outputs (e.g. DisplayLink USB
docks and monitors) foremost, where the dumb buffer memory is just
regular system memory. If the dumb buffer memory is somehow slow, like
residing in discrete VRAM or having an unexpected caching mode, it may
be possible for the cogl function perform worse because it might do the
y-flip in-place in the dumb buffer. Hopefully that does not happen in
any practical scenario.

Calling meta_renderer_native_gles3_read_pixels () here was conceptually
wrong to begin with because it was done with the Cogl GL context of the
primary GPU, not on the GL ES 3 context of a secondary GPU. However,
due eglBindAPI being a no-op in Mesa and the glReadPixels () arguments
being compatible, it worked.

This patch adds a pixel format conversion table between DRM and Cogl
formats. It contains more formats than absolutely necessary and the
texture components field which is currently unused for completeness. See
Mutter issue #323. Making the table more complete documents better how
the pixel formats actually map so that posterity should be less likely
to be confused. This table could be shared with
shm_buffer_get_cogl_pixel_format () as well, but not with
meta_wayland_dma_buf_buffer_attach ().

On HP ProBook 4520s laptop (Mesa DRI Intel(R) Ironlake Mobile, Mesa
18.0.5), without this patch copy_shared_framebuffer_cpu () for a
DisplayLink output takes 5 seconds with a 1080p frame.  Obviously that
makes Mutter and gnome-shell completely unusable.  With this patch, that
function takes 13-18 ms which makes it usable if not fluent.

On Intel i7-4790 (Mesa DRI Intel(R) Haswell Desktop) machine, this patch
makes no significant difference (the copy takes 4-5 ms).
2018-11-19 22:53:13 +00:00
8c4743ee2a renderer/native: store dumb FB format
The format will be needed in a following commit in the CPU copy path
which stops hardcoding another format and starts using the format the
dumb FB was created with.
2018-11-19 22:53:13 +00:00
cbbd6d71bf renderer/native: use DRM formats for dumb buffers
Change the callers of init_dumb_fb () to use DRM format codes. DRM and
GBM format codes are identical, but since this is about dumb buffers,
DRM formats fit better.

The header /usr/include/gbm.h installed by Mesa says:

 * The FourCC format codes are taken from the drm_fourcc.h definition, and
 * re-namespaced. New GBM formats must not be added, unless they are
 * identical ports from drm_fourcc.

That refers to the GBM_FORMAT_* codes.
2018-11-19 22:53:13 +00:00
4aa1e221e4 remote-desktop: Do not leak the virtual touchscreen
Virtual keyboard and pointer are freed on session close, but the
virtual touchscreen isn't.

Avoid a leak by freeing the virtual touchscreen along with the rest of
virtual devices.
2018-11-19 15:41:43 +00:00
ac6039bd2a clutter: Keep a device reference with events
If a device (virtual or real) is removed while there are remaining
events queued for that device, the event loop may try to access the
event freed memory.

To avoid the issue, add a reference to the device when the event is
created or copied, and remove the reference once the device is freed.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/393
2018-11-19 15:41:43 +00:00
97230a2b64 clutter/evdev: Use clutter_event_set_device()
Use the relevant clutter device API `clutter_event_set_device()` instead
of setting the device directly in the event field.
2018-11-19 15:41:43 +00:00
791bec3cf7 display: Make lack of required X extensions a fatal error
https://gitlab.gnome.org/GNOME/mutter/issues/272  


Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-19 15:17:51 +00:00
fb8dc91893 output/kms: Make winsys_id unique
We were using the connector_id for the winsys_id, but different
devices could have connectors with the same id. Since we use
winsys_id to uniquely identify outputs, use both the connector
id and the device id to avoid having outputs with the same id.
2018-11-19 14:58:48 +00:00
5e005316ef output: Turn winsys_id into a uint64_t
We need a 64 bit field to combine the device id and connector
id into the output id (winsys_id).
2018-11-19 14:58:48 +00:00
4bc6a64d47 backends/native: Use the connector_id rather than winsys_id
winsys_id needs to be a unique output identifier so it will have
to stop being the connector id.
2018-11-19 14:58:48 +00:00
91d4f30ebd gpu/kms: Add identifier
We need a device unique id in order to uniquely identify an output,
which will use a (device, connector) pair.
2018-11-19 14:58:48 +00:00
c585b214b8 gpu: Drop unused declaration 2018-11-19 14:58:48 +00:00
0304433b20 clutter-rectangle: Remove cogl_rectangle()
A pretty regular removal.
2018-11-18 20:28:39 -02:00
fcd1ff9c56 clutter-texture: Remove cogl_rectangle_with_texture_coords()
Mostly as expected, this port is also trivial. A small cleanup
accompanies this patch, making gen_texcoords_and_draw_cogl_rectangle()
receive the framebuffer that it should draw into.
2018-11-18 20:28:39 -02:00
a227e4078b clutter-wayland-surface: Remove cogl_rectangle()
This is a very straightforward port too: simply replacing
cogl_rectangle() by cogl_framebuffer_draw_rectangle().
2018-11-18 20:28:39 -02:00
cabcad1856 clutter-text: Replace cogl_rectangle()
Because ClutterText has a somewhat convoluted drawing routine,
replacing cogl_rectangle() here isn't as straightfoward as the
effects were.

A new CoglPipeline is now part of the ClutterText struct, and
is used to set the color of the  background or the selection.

Another change is paint_selection() now receives a framebuffer
to draw into. The check for NULL framebuffer does not make
sense here, since there is always a draw framebuffer set
when in the drawing function. Because of that, the check is
now gone.
2018-11-18 20:28:39 -02:00
4c3d9fccc1 clutter-*-effect: Remove cogl_rectangle()
All those effects have the same basic pattern of setting a
color of a pipeline, then drawing a rect with cogl_rectangle().

Thus, replacing those was as easy as retrieving the draw
framebuffer and calling cogl_framebuffer_draw_rectangle() on it.
2018-11-18 20:28:38 -02:00
203725bfd3 clutter-actor: Remove cogl_rectangle from pick()
The default implementation of ClutterActor.pick() uses
cogl_rectangle() to draw the rectangle with the color
for picking.

Replace that by cogl_framebuffer_draw_rectangle(). A
static color pipeline had to be created in order to
hold the pick color.
2018-11-18 20:28:38 -02:00
c1b6184e0a clutter-stage: Pass framebuffer to read pixels from
Instead of using cogl_read_pixels(), which is deprecated and
uses the implicit framebuffer, pass the current CoglFramebuffer
and use cogl_framebuffer_read_pixels().
2018-11-18 20:28:38 -02:00
dd82fbebf6 clutter-stage: Replace cogl_clear by cogl_framebuffer_clear
Another case of a simple and direct API translation. Instead of
using the deprecated cogl_clear() function, replace it by the
non-deprecated cogl_framebuffer_clear().
2018-11-18 20:28:37 -02:00
605f35dd25 shadow-factory: Receive CoglFramebuffer
Following up last commit, this commit adds a CoglFramebuffer
argument to meta_shadow_paint(), and stops using the draw
framebuffer internally.

The only consumer of this API, MetaWindowActor, still passes
the draw framebuffer though.
2018-11-18 20:28:37 -02:00
aecf588d8d shadow-factory: Replace implicit API by explicit counterparts
MetaShadow.paint() uses Cogl implicit APIs (cogl_rectangle* ones, in
this case) to paint shadows with the shadow pipeline.

Replace those calls by cogl_framebuffer_draw_textured_rectangle()
calls, that achieve the exact same result but with the non-deprecated
API.
2018-11-18 20:28:34 -02:00
740c2298c6 build: Don't hardcode the path of python3
Python is not guaranteed to be installed in /usr/bin. This is especially
true for *BSD systems which don't consider Python as an integral part of
their systems.
2018-11-18 14:25:35 +08:00
787bb4316d x11/window: Minor cleanup
Limit the scope of the 'monitor_rect' variable and break up a long line.

https://bugzilla.gnome.org/show_bug.cgi?id=790207
2018-11-14 16:04:10 +01:00
563c5b0612 monitor-unit-tests: Try resizing clients while headless
Prior to 6dcce19932 this test would crash.

https://bugzilla.gnome.org/show_bug.cgi?id=790207
2018-11-14 16:04:10 +01:00
c8a4e37e0c tests/test-client: Add "resize" command
The "resize" command resizes a window.

https://bugzilla.gnome.org/show_bug.cgi?id=790207
2018-11-14 16:04:10 +01:00
1266c20d4c monitor-unit-tests: Also run a X11 client while testing
We already ran a Wayland client to test various Wayland paths. What was
missing to also run a X11 client was to hook in the X11 async waiter
wires, so do that and run both types of clients.

https://bugzilla.gnome.org/show_bug.cgi?id=790207
2018-11-14 16:04:10 +01:00
76760bfd79 tests: Make all alarm filters use the same type
That'll make them more interchangable, would so ever be needed.

https://bugzilla.gnome.org/show_bug.cgi?id=790207
2018-11-14 16:04:10 +01:00
18c1d9672a gitlab-ci: Add test stage
The test stage runs the whole meson test suite inside Xvfb inside a dbus
session. Running inside Xvfb is required as the cogl, clutter and mutter
tests require to run on top of X11; the dbus session is required to make
mutter succeed in owning names on the bus.

This also updates the Dockerfile to include packages needed for running
tests.

https://gitlab.gnome.org/GNOME/mutter/issues/193
2018-11-14 15:56:16 +01:00
bd624e4dfb tests: Override X11 display number
As with the Wayland display name, to avoid clashes with already an
running Xwayland or Xorg instance, override the X11 display name to
something less likely to cause a clash.

https://gitlab.gnome.org/GNOME/mutter/issues/193
2018-11-14 15:55:45 +01:00
fe1d9fb4a7 tests: Override Wayland display name in test_init()
It's overridden by all test cases, but they all also call test_init() so
do it there instead.

https://gitlab.gnome.org/GNOME/mutter/issues/193
2018-11-14 15:55:45 +01:00
e2cd9abf46 Dockerfile: Align comment with command 2018-11-14 15:55:45 +01:00
a892e7a6aa clutter/tests: Remove events-touch test
The events-touch test tested that clutter could properly process evdev
touch events. It used uinput to post evdev touch events, thus only ran
when runnig the test as root. Running as non-root it'd just silently
pass. As Clutter doesn't process evdev touch events anymore,
libinput does, so the test is fairly pointless, so remove it.
2018-11-14 15:55:45 +01:00
5b3e439c5d cogl/tests: Increase the conform test timeout to 120 s
Running it on CI runners can take bit more time, so let it be for a bit
more until bailing out.
2018-11-14 15:55:45 +01:00
626c3745e2 clutter/master-clock: Destroy source when paused
Pausing the master clock didn't actually pause it if there was already a
scheduled frame in progress. This is problematic if one actually expects
to see no new frame scheduling to happen after pausing, for example it
caused actor 'pre-paint' to be signalled on actors, but nothing was ever
painted.

Avoid this by destroying the master clock source when pausing, and then
recreating it when resuming.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/309
2018-11-14 14:37:04 +01:00
bda9c359af wayland/output: Rotate physical dimensions as well
For Wayland outputs, we do not expose the actual transformation because
mutter does not support wl_surface.set_buffer_transform yet, instead we
swap the logical width and height when the output is rotated.

However, a client wishing to use the physical size would get confused,
so if the output is rotated, rotate the physical dimensions as well for
consistency.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/369
2018-11-14 12:10:47 +01:00
6c5baf89ed keybindings: Limit corner move to current monitor
Moving windows using `move-to-side-X` and `move-corner-XX` keybindings
should keep windows within the confines of current screen.

`move-to-monitor-XXX` keybindings can be used to move windows to other
monitors.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/320
2018-11-14 10:32:07 +02:00
9a12befd22 Bump version to 3.31.2
Update NEWS.
2018-11-14 02:01:25 +01:00
9f79cf8a60 Revert "clutter: Avoid redundant margin changes"
This reverts commit 59acb38951.
2018-11-14 01:56:47 +01:00
59acb38951 clutter: Avoid redundant margin changes
When profiling gnome-shell it was found that one of the main triggers
of `clutter_actor_queue_relayout` during animations was
`clutter_actor_set_margin_internal` continuously setting the same
zero margins. That's obviously pointless but also expensive since it
incurs full stage relayouts and reallocation. So just avoid redundant
margin changes.

Helps to further improve:
https://gitlab.gnome.org/GNOME/mutter/issues/233,
https://gitlab.gnome.org/GNOME/gnome-shell/issues/349
2018-11-13 14:21:31 +00:00
fa495286a1 window: Really force update monitor on hot plugs
Commit 8d3e05305 ("window: Force update monitor on hot plugs") added the
flag `META_WINDOW_UPDATE_MONITOR_FLAGS_FORCE` passed to
`update_monitor()` from `update_for_monitors_changed()`.

However, `update_for_monitors_changed()` may choose to call another code
path to `move_between_rects()` and `meta_window_move_resize_internal()`
eventually.

As `meta_window_move_resize_internal()` does not use the "force" flag,
we may still end up in case where the window->monitor is left unchanged.

To avoid that problem, add a new `MetaMoveResizeFlags` that
`update_for_monitors_changed()` can use to force the monitor update from
`meta_window_move_resize_internal()`.

Fixes: 8d3e05305 ("window: Force update monitor on hot plugs")
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/189
2018-11-13 10:10:30 +01:00
0b9404dcbe clutter/device-manager/evdev: Fix constraint cb
As pointed out by @jadahl, this shouldn't matter too much, as the
`constraint_callback` should always be set when initializing the mutter
backend.
2018-11-12 15:38:04 +01:00
9fb46cca55 clutter/keyframe-transition: Properly compare keys 2018-11-12 15:36:29 +01:00
2a4f1be81b clutter/actor: Don't forget va_end if using varargs 2018-11-12 15:36:27 +01:00
1dff74e71c build: Fix libs and cflags in autotools .pc file
Similar to b86d87453d
2018-11-10 16:20:46 +00:00
25c53b2fb2 backend: Freeze frame clock when headless
Don't schedule redraws when being headless; there is nothing to draw so
don't attempt to draw. This also makes a flaky test become non-flaky, as
it previously spuriously got warnings due to windows being "painted"
when headless but lacking frame timings, as nothing was actually
painted.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/170
2018-11-09 11:16:30 +01:00
213ed80284 backends: Move clutter frame clock freeze/thaw API to ClutterSTage
It had nothing to do with EGL or the eglnative backend, and will be used
by non-native backends, so move it to a common place.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/170
2018-11-09 11:16:30 +01:00
9adf8826d2 backends/stage: Remove unused function declaration
https://gitlab.gnome.org/GNOME/mutter/merge_requests/170
2018-11-09 11:16:30 +01:00
19930c6577 backends/stage: Remove MetaStagePrivate
The empty MetaStage was in meta-stage-private.h for no reason, so lets
move it to the C file. This makes it pointless to have a private
instance struct, so just move the fields to the private struct
_MetaStage.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/170
2018-11-09 11:16:30 +01:00
80d5f326e8 clutter: Assume XGE is available at build time
Almost a decade old, lets just assume it's there. This makes the button
on cally-atktext-example work again when building with meson, and
probably other things too.
2018-11-08 18:40:53 +00:00
15732851bc clutter-shader: Don't include unistd.h
It isn't needed.
2018-11-08 18:40:53 +00:00
996949806a cogl: Silence some introspection warnings
Mostly skipping functions of non-introspected types, but also added a
missing callback scope.
2018-11-08 16:20:19 -02:00
c5ac3d6217 theme: Drop gtk_css_provider_get_default()
Instead of using gtk_css_provider_get_default(), add a
static GtkCssProvider and fetch it instead. Creating
GtkCssProviders consume a bit more memory, so keeping
a single one alive is slightly more memory saving.
2018-11-08 16:20:19 -02:00
3d23ecc456 clutter: Drop g_object_newv from ClutterScriptParser
Build an additional set of (GStrv, GValue[]) and pass it
to the non-deprecated g_object_new_with_properties().
2018-11-08 16:20:19 -02:00
cbf6e74915 tests: Remove deprecated ATK functions 2018-11-08 18:08:57 +00:00
b5c4437287 tests: Remove extra const 2018-11-08 18:08:57 +00:00
426d7f3bdf tests: Enumerate all possible events 2018-11-08 18:08:57 +00:00
3483be8566 tests: Remove unused variables 2018-11-08 18:08:57 +00:00
4a7a803c34 README: Mention usage by Gala 2018-11-08 17:11:27 +01:00
4673eeaf5f wayland/xdg-shell: Add toplevel tile state support
The second version of xdg_wm_base added toplevel tile states (top,
right, bottom, left), so lets communicate that.
2018-11-08 13:21:53 +01:00
4f3de88b3d wayland/legacy-xdg-shell: Use helper to fill state array 2018-11-08 13:21:53 +01:00
180bb02fa5 wayland/gtk-shell: Use helper to fill state array 2018-11-08 13:21:53 +01:00
d59cf98690 wayland/gtk-shell: Fix signedness of resource version variable
wl_resource_get_version() returns an int, not an unsigned int.
2018-11-08 13:21:49 +01:00
27fee69ca4 wayland/xdg-shell: Add helper for adding state enum values 2018-11-08 13:21:21 +01:00
640a04d0e4 window: Make edge constraint code more readable
It relied on indices in arrays determining tile direction and
non-obvious bitmask logic to translate to _GTK_EDGE_CONSTRAINTS. Change
this to explicitly named edge constraints, and clear translation methods
that converts between mutters and GTK+s edge constraint formats.
2018-11-08 13:21:21 +01:00
5fc07fcc23 window: Store tile mode as MetaTileMode
An unnecessary memory optimization, storing the tile mode as a 2 bit
unsigned integer, was used. While saving a few bytes, it made debugging
harder. Remove the useless byte packing.
2018-11-08 13:21:21 +01:00
f31cf0c3ef clutter-offscreen-effect: Disable if no texture
If texture allocation fails (e.g. on an old GPU with size limit 2048)
then `update_fbo` would return `FALSE` but leaves `priv->offscreen`
as non-NULL. So the next paint will try to use the offscreen with a
`NULL` texture and crashes. The solution is simply to ensure that
`priv->offscreen` is NULL if there is no `priv->texture`, so the default
(non-offscreen) paint path gets used instead.

Bug reported and fix provided by Gert van de Kraats.

https://launchpad.net/bugs/1795774
2018-11-08 10:18:25 +00:00
d21478b0f0 cogl-auto-texture: Avoid a double-free crash
If texture allocation fails (e.g. on an old GPU with size limit 2048)
then `cogl_texture_new_with_size` was trying to use the same CoglError
twice. The second time was after it had already been freed.

Bug reported and fix provided by Gert van de Kraats.

https://launchpad.net/bugs/1790525
2018-11-08 10:18:25 +00:00
b86d87453d build: Fix include and lib paths in autotools .pc files
Some hadn't been updated after lib/mutter/ changed to lib/mutter-N/.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/382
2018-11-07 14:29:30 +01:00
cf7c39e2c1 build: Add soversion to shared libraries
It's easier to add it now, then adding it later would so be needed.
2018-11-07 13:00:47 +00:00
7c774ab53e build: Also build mutter-restart-helper executable
Was left out by mistake. Lets add it.
2018-11-07 13:00:47 +00:00
c03a401f4c clutter: Install x11 related header files when using autotools again
clutter-x11.h and x11/clutter-x11-texture-pixmap.h were not installed
any longer. Fix that.
2018-11-07 12:54:41 +00:00
c7e6cd4e27 plugins/Makefile.am: Install libdefault.so in plugin directory
It was incorrectly installed directly in $(libdir)/mutter-N/ while it
should be installed in $(libdir)/mutter-N/plugins/
2018-11-07 12:54:41 +00:00
fc5b94e077 clutter: Install cally headers again when using autotools
The install step was accidentally removed.
2018-11-07 12:54:41 +00:00
4ce4a2b134 cogl: Expose more headers for introspection
This will allow CoglFramebuffer and its implementations to be exposed
to GJS and other language bindings. This is a necessary part of the
bigger work to make framebuffer management explicit.
2018-11-07 11:27:51 +00:00
93e20cf21c cogl/framebuffer: Mark CoglOffscreen as a CoglFramebuffer implementation
CoglOffscreen is effectively a CoglFramebuffer, but it isn't being marked as
such by the GType machinery. This makes it impossible for introspection to
correctly set this class up.

Fix that by adding a COGL_GTYPE_IMPLEMENT_INTERFACE() code into the declaration
of CoglOffscreen. This does not have any functional changes though.
2018-11-07 11:27:51 +00:00
a8e9f46ed8 Add .gitlab-ci.yml for build testing
This adds compilation testing using meson on the gitlab instance. It
uses a prebuild image built, described in .gitlab-ci/Dockerfile, based
on Fedora 29.

The image is build and published by running:

  cd .gitlab-ci/
  docker build -t registry.gitlab.gnome.org/gnome/mutter/master:v1 .
  docker push registry.gitlab.gnome.org/gnome/mutter/master:v1

Resolves: https://gitlab.gnome.org/GNOME/mutter/merge_requests/132
2018-11-07 11:24:28 +00:00
fe78467815 build: Make libmutter-cogl-path a dependency for test-journal
Otherwise, it might trigger the actual race condition that Continuous
is running into, and access the generated enum headers before they're
created.
2018-11-06 19:15:24 -02:00
d1c4c46281 build: Prefer dependencies instead of link_with
Meson uses the 'dependencies' field to determine and
parallelize build steps, but that isn't entirely true
with 'link_with'; this might cause a race condition
when generating header files while trying to build
them.

Fix that by only using 'dependencies' instead of 'link_with'.
2018-11-06 17:50:24 -02:00
d3dc7d6f49 gudev: Require 232
gudev and libudev might have different versions, and
since 361bf847 we require gudev >= 232 to be able to
use g_autoptr with gudev types.

Since the previous commit, however, the meson build
was using the same version for libudev and gudev.

Fix that by requiring different versions for gudev
(>= 232) and libudev (>= 228).
2018-11-06 17:04:12 -02:00
b607d35aad build: Make minimum udev version as 228
Continuous' latest udev version is 228, and that is
not going to change too soon. Since we do not depend
on udev 232 specific features or bugfixes, just lower
the minimum version and make Continouos happy.
2018-11-06 16:48:47 -02:00
ef85d1a643 Add meson build support
This commit adds meson build support to mutter. It takes a step away
from the three separate code bases with three different autotools setups
into a single meson build system. There are still places that can be
unified better, for example by removing various "config.h" style files
from cogl and clutter, centralizing debug C flags and other configurable
macros, and similar artifacts that are there only because they were once
separate code bases.

There are some differences between the autotools setup and the new
meson. Here are a few:

The meson setup doesn't generate wrapper scripts for various cogl and
clutter test cases. What these tests did was more or less generate a
tiny script that called an executable with a test name as the argument.
To run particular tests, just run the test executable with the name of
the test as the argument.

The meson setup doesn't install test files anymore. The autotools test
suite was designed towards working with installed tests, but it didn't
really still, and now with meson, it doesn't install anything at all,
but instead makes sure that everything runs with the uninstalled input
files, binaries and libraries when running the test suite. Installable
tests may come later.

Tests from cogl, clutter and mutter are run on 'meson test'. In
autotools, only cogl and clutter tests were run on 'make check'.
2018-11-06 18:51:44 +01:00
417c00b8fa wayland/eglstream: Don't build skeleton when disabled
Instead of calling no-op functions when EGLStream support isn't enabled,
make it clear at the call site that EGLStream support is optional.
2018-11-06 17:17:36 +01:00
6192e944b8 wayland/touch: Only handle touch when using the native backend
The touch handling code uses evdev API, thus will not work on other
backends. Thus, put touch handling code behind runtime backend checks
and only include the code when native backend support is enabled.
2018-11-06 17:17:36 +01:00
8f2680c612 wayland/tablet: Fix warnings when native backend is disabled 2018-11-06 17:17:36 +01:00
d686dc9f46 Fix compiler errors when Wayland support is disabled 2018-11-06 17:17:36 +01:00
f139360569 Make it possible to build without GLX support 2018-11-06 17:17:36 +01:00
bf42b54faa Make it possible to build without EGL support
This will avoid building anything related to EGL. For meson, this will
mean that both the native backend an the Wayland support must also be
disabled.
2018-11-06 17:17:36 +01:00
d48d56f831 autotools: Make install directories paths more consistent
Install include files in
$prefix/include/mutter-$apiversion/[clutter,cogl,...,meta]/, and
datafiles in /usr/share/mutter-$apiversion/.... We still would conflict
e.g. given that our gettext name is "mutter", and how keybindings are
installed, but it's a step in the right direction.
2018-11-06 17:17:36 +01:00
32f3bb02e1 tests: Move out test client path init into helper function
Makes the common test init function simpler to read.
2018-11-06 17:17:36 +01:00
d21022f562 tests/headless-start-test: Use common test init function
Outsource the initialization of GTest to the same function used by the
other tests.
2018-11-06 17:17:36 +01:00
2af229fe98 tests: Call g_test_init() in test-runner too
This makes the log handler that breaks test redundant, as GTest already
does this.
2018-11-06 17:17:36 +01:00
c65617cb5a Fix some of introspection comment issues
Missing colon and incorrect type reference in descriptions.
2018-11-06 17:17:36 +01:00
c663f4ae84 tests: Add env var to override plugin used for tests
This is so that the test suite can point at the non-installed version.
2018-11-06 17:17:36 +01:00
0afaf5262b plugin: Rename the .so file from plugin.so to libplugin.so
This is the filename convention you get when you define a shared module
in meson, and since there is no particular reason to not include the
"lib" prefix, lets make it easier to port it over. While at it,
de-duplicate the retrieval of the plugin name.
2018-11-06 17:17:36 +01:00
85fbf66179 Move meta-enum-type.*.in into meta/
It'll be installed in the meta/ directory, so put the template files in
the corresponding directory in the tarball. This will also simplify the
port to meson.
2018-11-06 17:17:36 +01:00
a97cc84b81 Fix warnings when building without verbose mode 2018-11-06 17:17:36 +01:00
bc32655c28 Pass -D_GNU_SOURCE instead of defining it in source 2018-11-06 17:17:36 +01:00
176e6fcded x11: Require XInput 2.3 at build time
The needed libXi version was released 5 years ago, so should be fine.
2018-11-06 17:17:36 +01:00
ecec99eedb x11: Require xrandr 1.5 at build time
While leaving the runtime checks in place, requiring xrandr 1.5 at build
time allows us to remove some seemingly unnecessary conditional
inclusion of functionality.
2018-11-06 17:17:36 +01:00
2f4a68c8c3 Clean up include macros mess
The order and way include macros were structured was chaotic, with no
real common thread between files. Try to tidy up the mess with some
common scheme, to make things look less messy.
2018-11-06 17:17:36 +01:00
92f4ffc0dd tests: Make testboxes an actual test
testboxes was a binary that did unit testing, but it wasn't integrated
to the test system, so in effect, it was never run. Instead integrate it
into the other mutter unit tests. This includes changing a few of
meta_warning()s into g_warning()s so that the GTest framework can handle
them.
2018-11-06 17:17:36 +01:00
8a03f1ad02 Always generate meta-default-modes.h
This adds a hard requirement on having cvt installed, which in the past
was soft, where the generated file was added to the repository.
2018-11-06 17:17:36 +01:00
e0727aba5f clutter/tests/micro-bench: Don't define unused macro
TESTS_DATA_DIR was not used by any of the tests, so no use defining it.
2018-11-06 17:17:36 +01:00
14be04a630 clutter/tests: Unconditionally include tests using gdk-pixbuf
We already have gdk-pixbuf as a dependency, so there is no reason to
make it conditional here.
2018-11-06 17:17:36 +01:00
0067f78155 clutter: Unconditionalize a few X11 extensions
We now require xcomposite, xkb, xi 2.2, at least at compile time.
2018-11-06 17:17:36 +01:00
3e03d1e38e clutter/configure.ac: Remove left-over gbm and drm dependencies
The gbm and drm facing code has since long been moved into mutter.
2018-11-06 17:17:36 +01:00
fe7a67f0e7 clutter/configure.ac: Remove unused gdk dependency 2018-11-06 17:17:36 +01:00
db77e2e187 clutter: Assume compiler supports visibility flag and attributes
Unconditionally pass -fvisibility=hidden to compiler and define
_CLUTTER_EXTERN to __attribute__((visibility("default"))) extern.
2018-11-06 17:17:36 +01:00
e3c6e3b84d clutter: Fix a couple of guard macros
Use #ifdef instead of #if in a couple of places.
2018-11-06 17:17:36 +01:00
0d9391e282 clutter: Remove examples
Running clutter apps standalone using mutters fork is not something
worth supporting.
2018-11-06 17:17:36 +01:00
1e2610e4f4 clutter: Remove useless OS_LINUX macro
It was unconditionally set to 1.
2018-11-06 17:17:36 +01:00
0095c2e340 clutter: Require full relative path when including 2018-11-06 17:17:36 +01:00
c90e63a91d clutter: Stop defining some unused macros 2018-11-06 17:17:36 +01:00
8c0e13ca7a clutter: Remove clutter specific version
Use the mutter version when something is still needed.
2018-11-06 17:17:36 +01:00
8894ec462a cogl: Pass unit-tests file to run-tests.sh
There are different unit-tests file generated containing lists of tests
the test-runner.sh should run. Running run-tests.sh read the unit-tests
in the current directory, which is inconvenient to do when using meson.
2018-11-06 17:17:36 +01:00
331e830cf6 cogl: Fix HAVE_COGL_GL guard
Macro was only defined when defined to 1.
2018-11-06 17:17:36 +01:00
d68fcbc887 cogl: Make cogl-config.h include check explicit
Don't rely on some combination of macros, but an explicit definition to
check whether cogl-config.h was included.
2018-11-06 17:17:36 +01:00
9dbdf6b724 cogl: Require relative full paths when including
I.e. including a OpenGL driver file, the path "driver/gl/..." must be
specified when including.
2018-11-06 17:17:36 +01:00
530861b24d cogl: Remove left-over WebGL paths 2018-11-06 17:17:36 +01:00
11f8b12a9d clutter: Unconditionally include clutter-build-config.h 2018-11-06 17:17:36 +01:00
0163a0b0cd cogl: Unconditionally include cogl-config.h 2018-11-06 17:17:36 +01:00
12171e413b cogl: Unconditionally depend on cairo 2018-11-06 17:17:36 +01:00
99fb79f4cb cogl: Unconditionally include "strings.h" 2018-11-06 17:17:36 +01:00
24d8d40deb cogl/tests: Mark failing test as known failure
This allows us to enable running the tests again. Not fixing the
failure is at least better than not running the tests at all.
2018-11-06 17:17:36 +01:00
97004e6114 cogl: Remove ARBfp pipeline support
As with fixed pipelines, we require the use of the GLSL pipeline in
mutter, and no point in supporting ARBfp anyway.
2018-11-06 17:17:36 +01:00
8f58ad02fb cogl: Remove fixed pipeline support
We require being able to use shaders so stop supporting a pipeline that
wouldn't work to begin with.
2018-11-06 17:17:36 +01:00
98af9bb251 cogl: Remove notion of a "cogl" version
Mutters copy of cogl isn't a separate library with its own version, so
remove the old version macros.
2018-11-06 17:17:36 +01:00
7b2eaa76a4 cogl: Remove support for GLESv1
We have no need for it in mutters cogl variant.
2018-11-06 17:17:36 +01:00
00a5523667 cogl: Remove some left over KMS backend stuff 2018-11-06 17:17:36 +01:00
f30cef3046 cogl: Always build CoglPango support 2018-11-06 17:17:36 +01:00
fba7d8c79c cogl: Always build CoglPath support 2018-11-06 17:17:36 +01:00
46942c24a3 cogl: Make various functions non-optional
Remove fallback implementations of some functions available in
gcc/clang and Linux/BSDs.
2018-11-06 17:17:36 +01:00
9846a4d812 cogl: Make _Static_assert non-optional 2018-11-06 17:17:36 +01:00
da741ead25 cogl-gles2/Makefile.am: Add cogl/ includedir
Otherwise cogl-egl-defines.h isn't found when building out-of-tree.
2018-11-06 17:17:36 +01:00
31f525d566 x11: close display in an idle function
Closing a GdkDisplay during an event handler is not currently supported by Gdk
and it will result in a crash when doing e.g. 'mutter --replace'. Using an idle
function will close it safely in a subsequent main loop iteration.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/595
2018-11-05 12:04:01 +00:00
92cccf53df workspace-manager: Allow workspace layout to be overridden
meta_workspace_manager_override_workspace_layout is implemented by
calling meta_workspace_manager_update_workspace_layout which
respects the workspace_layout_overridden flag.  After the first call
to meta_workspace_manager_override_workspace_layout all subsequent
calls fail silently.

Reset workspace_layout_overridden to FALSE before calling
meta_workspace_manager_update_workspace_layout.

https://gitlab.gnome.org/GNOME/mutter/issues/270
2018-10-30 10:54:57 +01:00
4282067e24 gpu-kms: assert on invalid flip attempts
drmModePageFlip() is guaranteed to fail for the invalid FB id 0.
Therefore it never makes sense to call this function with such argument.
Disabling a CRTC must be done with SetCrtc instead, for example.

Trying to flip to FB 0 not only fails, but it also causes Mutter to
never try page flip on this output again, using drmModeSetCrtc()
instead.
2018-10-25 09:57:39 +00:00
85e9784a22 renderer/native: fix next_fb_id race on CPU copy path
There was a race in setting next_fb_id when a secondary GPU was using
the CPU copy path. Losing this race caused the attempt to
drmModePageFlip () to FB ID 0 which is invalid and always fails. Failing
to flip causes Mutter to fall back to drmModeSetCrtc () permanently.

In meta_onscreen_native_swap_buffers_with_damage ():
- update_secondary_gpu_state_pre_swap_buffers ()
  - copy_shared_framebuffer_cpu () but only on the CPU copy path
    - secondary_gpu_state->gbm.next_fb_id is set
- wait_for_pending_flips ()
  - Waits for any remaining page flip events and executes and destroys
    the related page flip closures.
    - on_crtc_flipped ()
      - meta_onscreen_native_swap_drm_fb ()
        - swap_secondary_drm_fb ()
	  - secondary_gpu_state->gbm.next_fb_id = 0;
- meta_onscreen_native_flip_crtcs ()
  - meta_onscreen_native_flip_crtc ()
    - meta_gpu_kms_flip_crtc () gets called with fb_id = 0

This race was observed lost when running 'mutter --wayland' on a machine
with two outputs on Intel and one output on DisplayLink USB dock, and
wiggling around a weston-terminal window between the Intel and
DisplayLink outputs. It took from a second to a minute to trigger. For
testing with DisplayLink outputs Mutter also needed a patch to take the
DisplayLink output into use, as it would have otherwise been ignored
being a platform device rather than a PCI device.

Fix this race by first waiting for pending flips and only then
proceeding with the swap operations. This should be safe, because the
pending flips could have completed already before entering
meta_onscreen_native_swap_buffers_with_damage ().
2018-10-25 09:57:39 +00:00
49fea735aa wayland/text-input: Ignore text-input state commit when not focused
We might unset focus, or already be out of focus (e.g. an X11 client or
clutter text entry is focused) when a text-input state is committed by
the client. We handled this before, except when text input was
explicitly disabled by the client, the Wayland text-input was in focus
by the input method, and it focused itself out.

Simplify the logic a bit by just dropping the state on the floor in all
cases where after any potential focus changes were done, we are not
focused.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/353
2018-10-23 14:13:33 +02:00
8200995fdb shaped-texture: Clean up texture regions
We allocated texture regions, but didn't free them when finished,
causing a leak.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/653
2018-10-20 15:47:50 +02:00
71a62bb18f constraints: Make current placement rule stack allocated
We're not going to keep it past the function scope, so no reason to put
it on the heap. We also didn't free it, so this'll fix a memory leak.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/653
2018-10-20 15:46:37 +02:00
76abe87090 xprops: Make sure text_property_to_utf8() returns UTF8
Commit 840378ae68 changed the code to use XmbTextPropertyToTextList()
instead of gdk_text_property_to_utf8_list_for_display(), but didn't
take into account that the replacement returns text in the current
locale's encoding, while any callers (rightfully) expect UTF8.

Fix this by converting the text if necessary.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/227
2018-10-12 15:01:36 +02:00
62775d1913 x11/window-props: Do not convert WM_NAME
The WM_NAME property is of type TEXT_PROPERTY, which is supposed to be
returned as UTF-8. Commit 840378ae68 broke that assumption, resulting
in crashes with non-UTF8 locales; however the "fix" of converting from
LATIN1 to UTF8 is wrong as well, as the conversion will spit out garbage
when the input encoding isn't actually LATIN1.

Now that the original issue in text_property_to_utf8() has been fixed,
we can simply revert the relevant bits of commit d62491f46e.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/227
2018-10-12 15:01:29 +02:00
e24947a460 Revert "Characters of window title bar garbled"
For some reason Gitlab pushed the wrong commits when merging
https://gitlab.gnome.org/GNOME/mutter/merge_requests/227. Correct that.

This reverts commit d387aa428a.
2018-10-12 15:00:02 +02:00
d387aa428a Characters of window title bar garbled 2018-10-11 07:15:22 +00:00
3faaa9ce14 Bump version to 3.30.1
Update NEWS.
2018-10-08 20:55:50 +02:00
f19260bfde common: Replace left-over screen reference 2018-10-08 19:00:56 +02:00
df94a18791 clutter: Add clutter_input_method_forward_key() method.
This allows input methods to inject key events with specific keyval/keycode,
those events will be flagged with CLUTTER_EVENT_FLAG_INPUT_METHOD so they
won't be processed by the IM again.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/531
2018-10-08 16:30:04 +00:00
2e18f6d793 wayland: Relax requirements for evdev events to have a evcode
There may be emulated events that don't contain those, it's fine to
go through the fallback paths for these.
2018-10-08 16:30:04 +00:00
67aab7c138 clutter: Do not latch modifiers on modifier keys
If the user maps eg. Alt+F2 to a pad button, the MetaInputSettings will
send the full Alt press, F2 press, F2 release, Alt release sequence.
However the keycode corresponding to Alt is found in level 1, so the
Shift modifier gets unintendedly latched in addition to the Alt key
press/release pair.

We could probably improve keycode lookup heuristics so level=0 (and
no modifier latching) is preferred, but we can do without it altogether
for modifier keys.
2018-10-08 16:24:11 +00:00
fa1add2ee6 window: Remember relative position after constraining with custom rule
In order to allow a window with a custom rule placement to be moved
together with its parent, the final rule used derived from the
constraining were used for subsequent constraints. This was not enough
as some constraining cannot be translated into a rule, such as sliding
across some axis.

Instead, make it a bit simpler and just remember the position relative
to the parent window, and use that the next time.

This is a rework of 5376c31a33 which
caused the unwanted side effects.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/332
2018-10-08 16:17:50 +00:00
6267732bec monitor-manager: use MonitorsConfig to track switch_config
When constructing MetaMonitorsConfig objects, store which type
of switch_config they are for (or UNKNOWN if it is not such
type of config).

Stop unconditionally setting current_switch_config to UNKNOWN when
handling monitors changed events. Instead, set it to the switch_config
type stored in the MonitorsConfig in the codepath that updates logical
state. In addition to being called in the hotplug case along the same
code flow that generates monitors changed events, this is also called
in the coldplug case where a secondary monitor was connected before
mutter was started.

When creating the default linear display config, create it as a
switch_config so that internal state gets updated to represent
linear mode when this config is used.

The previous behaviour of unconditionally resetting current_switch_config
to UNKNOWN was breaking the internal state machine for display config
switching, causing misbehaviour in gnome-shell's switchMonitor UI when
using display switch hotkeys. The lack of internal tracking when the
displays are already in the default "Join Displays" linear mode was
then causing the first display switch hotkey press to do nothing
(it would attempt to select "Join Displays" mode, but that was already
active).

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/281
https://gitlab.gnome.org/GNOME/mutter/merge_requests/213
2018-10-08 15:53:45 +08:00
95649fd2bc wayland/data-device: Focus out when focus surface destroyed
When repicking after a surface was destroyed, if the destroyed surface
was the drag focus, we'd try to focus-out from it after it was
destroyed, causing a NULL pointer dereference.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/336
2018-10-07 18:12:18 +00:00
49780245f4 window/wayland: Don't initialize a window as showing
With Wayland, a window is not showing until it's shown. Until this
patch, the initial state of MetaWindow, on the other hand, was that a
window is initialized as showing. This means that for a window to
actually be classified as shown (MetaWindow::hidden set to FALSE),
something would first have to hide it.

Normally, this wasn't an issue, as normally we'd first create a window,
determine it shouldn't be visible (due to missing buffer), hide it
before the next paint, then eventually show it. This doesn't work if
mutter isn't drawing any frames at the moment (e.g. the user switched
VT), as we'd miss the hiding before showing as e result of a buffer
being attached. The most visible side effect is that a window can't be
moved as the window actor remains frozen.

This commit fixes this issue by correctly classifying a newly created
Wayland window as "hidden".

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/331
2018-10-05 17:50:22 +02:00
ff08e19f52 shaped-texture: Transform clip and opaque region to texture space
The clip and opaque region are both in a translated stage coordinate
space, where the origin is in the top left corner of the painted
texture. The painting, however, is in the texture coordinate space,
so when the texture is scaled, the coordinate spaces differ.

Handle this by transforming the clip and opaque region to texture
coordinate space before computing the blend region and the opaque region
to paint.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/300
2018-10-04 15:06:10 +02:00
9c77e52ad3 region-utils: Add API to scale an integer region with a double
The added API lets the caller decide whether to shrink or grow the
rectangles if there are rounding issues.

Related: https://gitlab.gnome.org/GNOME/mutter/issues/300
2018-10-04 15:06:10 +02:00
0ae7ef4bc4 region-utils: Some whitespace fixes
Related: https://gitlab.gnome.org/GNOME/mutter/issues/300
2018-10-04 15:06:10 +02:00
556ed7b937 shaped-texture: Move variable declaration on top
Related: https://gitlab.gnome.org/GNOME/mutter/issues/300
2018-10-04 15:06:10 +02:00
b5a0068091 shaped-texture: Use ints for sizes
They were int before entering MetaShapedTexture, used as ints in the
cairo regions and rectangles, so there is no reason they should be
stored as unsigned.

Related: https://gitlab.gnome.org/GNOME/mutter/issues/300
2018-10-04 15:06:10 +02:00
a3d826c54b renderer/native: honour dumb buffer stride
meta_renderer_native_gles3_read_pixels() was assuming that the target
buffer stride == width * 4. This is not generally true. When a DRM
driver allocates a dumb buffer, it is free to choose a stride so that
the buffer can actually work on the hardware.

Record the driver chosen stride in MetaDumbBuffer, and use it in the CPU
copy path. This should fix any possible stride issues in
meta_renderer_native_gles3_read_pixels().
2018-10-04 11:57:35 +03:00
72e236106f renderer/native: assert dumb buffer size on CPU copy
Track the allocated dumb buffer size in MetaDumbBuffer. Assert that the
size is as expected in copy_shared_framebuffer_cpu().

This is just to ensure that Cogl and the real size match. The size from
Cogl was used in the copy, so getting that wrong might have written
beyond the allocation.

This is a safety measure and has not been observed to happen yet.
2018-10-04 11:57:35 +03:00
3e1ca62782 renderer/native: check format for drmModeAddFB fallback
If drmModeAddFB2() does not work, the fallback to drmModeAddFB() can
only handle a single specific format. Make sure the requested format is
that one format, and fail the operation otherwise.

This should at least makes the failure mode obvious on such old systems
where the kernel does not support AddFB2, rather than producing wrong
colors.
2018-10-04 11:57:35 +03:00
c71f6a18ad Updated Czech translation 2018-10-01 17:39:07 +02:00
f7c1f418ba Updated Czech translation 2018-10-01 17:36:18 +02:00
0210b95109 Update Serbian translation 2018-09-29 10:05:53 +00:00
68ec9ac017 wayland: No xdg-output events without a logical monitor
To avoid a known race condition in the wl_output protocol documented in
https://phabricator.freedesktop.org/T7722, mutter delays the `wl_output`
destruction but nullify the `logical_monitor` associated with the
`wl_output` and the binding routine `bind_output()` makes sure not to
send wl_output events if the `logical_monitor` is `NULL` (see commit
1923db97).

The binding routine for `xdg_output` however does not check for such a
condition, hence if the output configuration changes while a client is
binding to xdg-output (typically Xwayland at startup), mutter would
crash while trying to access the `logical_monitor` which was nullified
by the change in configuration.

Just like `bind_output()` does for wl_output, do not send xdg-output
events if there is no `logical_monitor` yet.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/194
2018-09-25 15:14:18 +02:00
8dcac664fa core: Preserve focus across decoration changes
Changes in window decoration result in the window being reparented
in and out its frame. This in turn causes unmap/map events, and
XI_FocusOut if the window happened to be focused.

In order to preserve the focused window across the decoration change,
add a flag so that the focus may be restored on MapNotify.

Closes: #273
2018-09-24 13:44:53 +00:00
2fb3db7659 compositor: Skip windows not visible to the compositor
The compositor will automatically unredirect the top most window which
is fully visible on screen. When unredirecting windows, it also shapes
the compositor overlay window (COW) so that other redirected windows
still shows correctly.

The function `get_top_visible_window_actor()` however will simply walks
down the window list, so if a window is placed on a layer above and
unredirected, then iconified by the client, it will still be picked up
by `get_top_visible_window_actor()` and he compositor will reckon it's
still unredirected while not in a visible state anymore, thus leaving a
black area on screen.

Make sure we skip the windows not known to the compositor while picking
the top visible window actor to avoid this issue.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/306
2018-09-21 18:50:06 +02:00
7d82cdeea3 window/wayland: Freeze updates until shown
Not until the window is shown do we know what monitor it's on, thus the
size, so freeze updates (shape etc) until the window is shown.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/229
2018-09-19 15:39:54 +00:00
e2e7296612 window: Move out 'updates frozen' state into implementations
Implementation of said state was just related to X11, so move it into
window-x11.c. The Wayland path always fell back on the returning TRUE,
so just do that for now.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/229
2018-09-19 15:39:54 +00:00
8685de9607 input-settings: detect trackball using udev ID_INPUT_TRACKBALL
Previously, trackballs were detected based on the presence of the
substring "trackball" in the device name. This had the downside of
missing devices, such as the Kensington Expert Mouse, which don't have
"trackball" in their names.

Rather than depending on the device name, use the ID_INPUT_TRACKBALL
property from udev to determine whether or not to treat a device as a
trackball.

This adds a new function, `is_trackball_device`, to MetaInputEvents, and
eliminates the `meta_input_device_is_trackball` function.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/258
2018-09-19 08:48:27 +00:00
a8a3c1017f actor: Also recompute paint volume if we recently dropped effects
Otherwise we'll be stuck with the same paint volume on the last
frame of the given effect, which could be wrong.
2018-09-18 19:39:12 +00:00
5d19aee23a actor: Always use get_paint_volume override for active effects
If an effect is active and it overrides the paint volume, we should
always recompute the paint volume when requested and not use the
cache, since the paint volume override can change from call to
call depending on what phase of painting we are in. For instance,
if we are part way through painting effects and request the
paint volume, the paint volume should only go up to the current
effect, but in a later call to compute repaint regions, the
paint volume needs to expand to accomadate the effect.

This still involves a lot of recomputation in the case of effects -
in a later clutter version it would be worth adding an API to
allow effects to explicitly recompute and return a new the paint
volume up to the current effect as opposed to recomputing
the cached one.
2018-09-18 19:39:12 +00:00
4270eef16e actor: Fix logic error in determining terminal effect for paint volume
Previously we were checking l->data != NULL || (l->data != NULL &&
l->data != priv->current_effect). This would continue the loop even
if l->data == priv->current_effect, since l->data != NULL, which was
not the intention of that loop.

We also don't need to check that l->data != NULL before checking if
it does not match the current_effect, since we already checked
that current_effect was non-NULL before entering the loop.
2018-09-18 19:39:12 +00:00
b443bd42ac window: unmanage dialog when clearing transient_for
On Wayland, xdg-foreign would leave a modal dialog managed even after
the imported surface is destroyed.

This is sub-optimal and this breaks the atomic relationship one would
expect between the parent and its modal dialog.

Make sure we unmanage the dialog if transient_for is unset even for
Wayland native windows.

Related: https://gitlab.gnome.org/GNOME/mutter/issues/174
Related: https://gitlab.gnome.org/GNOME/mutter/issues/221
2018-09-14 11:11:31 +02:00
267503b5f3 build: Fix non-wayland builds 2018-09-11 16:19:19 +00:00
a3d9f987c8 input-settings-x11: Push error trap
Pops are lonely without push, so add one for a happy error trap.

https://gitlab.gnome.org/GNOME/mutter/issues/294
2018-09-07 19:42:37 +02:00
9cfd185316 clutter: Handle grabs from CLUTTER_TABLET_DEVICE devices
Those would result in warnings. Actually, these should be dealt
similarly to pointers, as they get their own standalone pointer
cursor in Wayland.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/issues/540
2018-09-07 15:17:36 +02:00
176117c5f7 device-manager-evdev: handle tablet axis motion before button and tip events
Some tablets have a noticable pointer jump on tip down/up, causing unintended
lines during drawing. Likewise, a button event may have an axis update that we
currently ignore. libinput provides tablet axis events only if no other state
changes, the client must instead get the current axis data from the tip/button
event. So let's do this, process the event axis data during tip/button as
well.

A libinput recording to reproduce is the 'dots.yml' in
https://gitlab.freedesktop.org/libinput/libinput/issues/128

Fixes #289
2018-09-07 19:54:06 +10:00
8083065579 Update Belarusian translation 2018-09-06 15:48:19 +00:00
34f5be726d Bump version to 3.30.0
Update NEWS.
2018-09-04 00:05:51 +02:00
b53707f8c4 Update Croatian translation 2018-09-02 16:40:57 +00:00
d9294e4eb0 Updated Danish translation 2018-09-01 18:46:09 +02:00
94f8acc8fe Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2018-09-01 08:30:06 +07:00
4841c1b13e Update Latvian translation 2018-08-31 17:56:20 +00:00
1e00cd290d Update Hungarian translation 2018-08-31 13:05:10 +00:00
3daa2d2751 Update Galician translation 2018-08-29 22:24:03 +00:00
1003 changed files with 19181 additions and 31443 deletions

30
.gitignore vendored
View File

@ -1,25 +1,9 @@
Makefile
Makefile.in
Makefile.in.in
aclocal.m4
autom4te.cache
build-aux
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
intltool-extract.in
intltool-merge.in
libtool
ltmain.sh
missing
.deps
50-mutter-navigation.xml
50-mutter-system.xml
50-mutter-windows.xml
@ -33,15 +17,11 @@ mutter-wayland.desktop
*.swp
*.gir
*.typelib
stamp-h1
*.gmo
*.make
*.log
*.trs
*~
stamp-it
.intltool-merge-cache
ABOUT-NLS
POTFILES
Makevars.template
po/*.header
@ -64,9 +44,7 @@ org.gnome.mutter.wayland.gschema.xml
testasyncgetprop
testboxes
testgradient
m4/*
INSTALL
mkinstalldirs
meta-enum-types.[ch]
src/stamp-meta-enum-types.h
src/meta-dbus-display-config.[ch]
@ -122,12 +100,6 @@ doc/reference/meta-undocumented.txt
doc/reference/meta-unused.txt
doc/reference/meta-docs.sgml
doc/reference/meta.types
gtk-doc.m4
intltool.m4
libtool.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
.dirstamp
**/tags.*
build/

20
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,20 @@
image: registry.gitlab.gnome.org/gnome/mutter/master:v1
stages:
- build
- test
build-mutter:
stage: build
script:
- meson . build -Degl_device=true -Dwayland_eglstream=true
- ninja -C build
- ninja -C build install
test-mutter:
stage: test
script:
- meson . build -Degl_device=true -Dwayland_eglstream=true
- ninja -C build
- glib-compile-schemas $PWD/build/data
- env XDG_RUNTIME_DIR=/tmp/ GSETTINGS_SCHEMA_DIR=$PWD/build/data dbus-run-session -- xvfb-run -s '+iglx -noreset' meson test -C build -t 10 --verbose --no-stdsplit --wrap catchsegv

20
.gitlab-ci/Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM fedora:29
RUN dnf -y update && dnf -y upgrade && \
dnf install -y 'dnf-command(builddep)' && \
dnf builddep -y mutter && \
# Until Fedora catches up with meson build-deps
dnf install -y meson xorg-x11-server-Xorg gnome-settings-daemon-devel egl-wayland-devel xorg-x11-server-Xwayland && \
# For running unit tests
dnf install -y xorg-x11-server-Xvfb mesa-dri-drivers dbus dbus-x11 && \
# Unpackaged versions
dnf install -y https://copr-be.cloud.fedoraproject.org/results/jadahl/mutter-ci/fedora-29-x86_64/00836095-gsettings-desktop-schemas/gsettings-desktop-schemas-3.30.1-1.20181206git918efdd69be53.fc29.x86_64.rpm https://copr-be.cloud.fedoraproject.org/results/jadahl/mutter-ci/fedora-29-x86_64/00836095-gsettings-desktop-schemas/gsettings-desktop-schemas-devel-3.30.1-1.20181206git918efdd69be53.fc29.x86_64.rpm && \
# Packages not yet in stable
dnf install -y https://kojipkgs.fedoraproject.org//packages/pipewire/0.2.5/1.fc29/x86_64/pipewire-0.2.5-1.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/pipewire/0.2.5/1.fc29/x86_64/pipewire-devel-0.2.5-1.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/pipewire/0.2.5/1.fc29/x86_64/pipewire-libs-0.2.5-1.fc29.x86_64.rpm && \
dnf install -y intltool redhat-rpm-config make && \
dnf clean all

View File

@ -1,11 +0,0 @@
SUBDIRS = cogl clutter data src po doc
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update \
po/stamp-it \
po/.intltool-merge-cache

71
NEWS
View File

@ -1,3 +1,74 @@
3.31.4
======
* keybindings: Limit corner move to current monitor [Jānis; #320]
* xdg-output: Report rotated physical dimensions [Olivier; #369]
* Add continuous integration pipeline [Jonas; #193]
* Improve performance on secondary GPUs [Pekka; #323, !313]
* Use the actual hardware refresh rate [Daniel; #781296]
* Remove hide-titlebar-when-maximized support [Florian; !221]
* wayland: Implement buffer transforms [Robert; !322]
* Remove ability to externally set sync-to-vblank [Georges; !191]
* Turn off touchscreens together with DPMS [Carlos; gnome-settings-daemon#29]
* Mipmap the wallpaper when shrinking [Daniel; gnome-shell#254]
* Implement RecordWindow method for screen-casts [Olivier; !306]
* Fix EGLStream texture downloading [Jonas; !362]
* Split out display-server-specific code from MetaWindowActor [Georges; !368]
* Improve render performance on some KMS devices with software GL [Jonas; #106]
* Fix damage area of transformed surfaces [Robert; !366]
* Remove autotools support [George]
* Misc. bug fixes and cleanups [Jonas, Alan, Olivier, Carlos, Javier, Peter,
Daniel, Robert, Florian; !309, #790207, #272, #393, #276, #404, #104, !343,
#765011, #786663, #342, !356, #414, #782344, #781034, #423, !374, !382, !383]
Contributors:
Jonas Ådahl, Nikita Churaev, Alan Coopersmith, Jānis Džeriņš, Olivier Fourdan,
Carlos Garnacho, Niels De Graef, Peter Hutterer, Javier Jardón,
Abderrahim Kitouni, Andre Klapper, Ting-Wei Lan, Robert Mader,
Emilio Pozuelo Monfort, Florian Müllner, Georges Basile Stavracas Neto,
Pekka Paalanen, Daniel Stone, Marco Trevisan (Treviño), Daniel van Vugt
3.31.2
======
* Fix handling of non-UTF8 encodings [Florian; !227]
* Fix memory leaks introduced in 3.30.1 [Jonas; #653]
* Fix regression when overriding workspace layout [Ron; #270]
* Fix crash when restarting window manager [Andrea; gnome-shell#595]
* Add meson build support [Jonas; !167]
* Freeze clock when headless [Jonas; !170]
* Fix crash on monitor hotplug [Olivier; #189]
* Misc. bug fixes [Jonas; #353, !132, #382]
Contributors:
Jonas Ådahl, Andrea Azzarone, Olivier Fourdan, Niels De Graef,
Alexander Mikhaylenko, Florian Müllner, Akira Nakajima,
Georges Basile Stavracas Neto, Pekka Paalanen, Peter Uithoven,
Daniel van Vugt, Ron Yorston
3.30.1
======
* Improve trackball detection [Tony; #258]
* Fix clipping of scaled surfaces [Jonas; #300]
* Improve tracking of monitor switch configuration [Daniel; !213]
* Fix parent-relative positioning of constrained windows [Jonas; #332]
* Add clutter_input_method_forward_key() method [Carlos; gnome-shell#531]
* Various crash fixes [Olivier, Jonas; #194, #336]
* Misc. bug fixes [Carlos, Florian, Olivier, Jonas; gnome-shell#540, #294,
#221, !229, #30, #331]
Contributors:
Jonas Ådahl, Daniel Drake, Olivier Fourdan, Carlos Garnacho, Peter Hutterer,
Ting-Wei Lan, Florian Müllner, Tony Novak, Pekka Paalanen, Sam Spilsbury
Translators:
Yuras Shumovich [be], Марко Костић [sr], Marek Cernocky [cs]
3.30.0
======
Translators:
Fran Dieguez [gl], Balázs Meskó [hu], Rūdolfs Mazurs [lv],
Trần Ngọc Quân [vi], Ask Hjorth Larsen [da], gogo [hr]
3.29.92
=======
* Avoid crash when a cursor is not found [Sebastian; #254]

View File

@ -17,9 +17,10 @@ Internally it uses a fork of Cogl, a hardware acceleration abstraction library
used to simplify usage of OpenGL pipelines, as well as a fork af Clutter, a
scene graph and user interface toolkit.
Mutter is used by GNOME Shell, the GNOME core user interface. It can also be run
standalone, using the command "mutter", but just running plain mutter is only
intended for debugging purposes.
Mutter is used by, for example, GNOME Shell, the GNOME core user interface, and
by Gala, elementary OS's window manager. It can also be run standalone, using
the command "mutter", but just running plain mutter is only intended for
debugging purposes.
## License

View File

@ -1,28 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.11
olddir="$(pwd)"
cd "${srcdir}"
(test -f configure.ac \
&& test -d src) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level mutter directory"
exit 1
}
aclocal --install || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install || exit 1
cd "${olddir}"
if [ "$NOCONFIGURE" = "" ]; then
"${srcdir}/configure" "$@" || exit 1
fi

1
clutter/.gitignore vendored
View File

@ -23,7 +23,6 @@ clutter-build-config.h.in
clutter-config.h
clutter-enum-types.[ch]
clutter-marshal.[ch]
clutter-version.h
gcov-report.txt
clutter-json.h
clutter-lcov.info

View File

@ -1,53 +0,0 @@
NULL =
SUBDIRS = build clutter tests
if BUILD_EXAMPLES
SUBDIRS += examples
endif
DIST_SUBDIRS = clutter tests examples build
# XXX - this is a massive hack to make autoreconf honour the ACLOCAL_FLAGS
# that jhbuild sets while still retaining build/autotools as the authoritative
# source for m4 macros
ACLOCAL_AMFLAGS = -I build/autotools ${ACLOCAL_FLAGS}
CLEANFILES = $(pcfiles)
DISTCLEANFILES =
DISTCHECK_CONFIGURE_FLAGS = --enable-maintainer-flags
# proxy rules for tests
test-report full-report:
$(MAKE) -C tests/conform $(@)
perf-report:
$(MAKE) -C tests/performance $(@)
if ENABLE_GCOV
# use recursive makes in order to ignore errors during check/perf
lcov:
-$(MAKE) $(AM_MAKEFLAGS) -C clutter check
-$(MAKE) $(AM_MAKEFLAGS) -C tests/conform test
$(MAKE) $(AM_MAKEFLAGS) genlcov
# we have to massage the lcov.info file slightly to hide the effect of libtool
# placing the objects files in the .libs/ directory separate from the *.c
genlcov:
$(LTP) --directory $(top_builddir) --capture --output-file clutter-lcov.info --test-name CLUTTER_TEST --no-checksum
$(SED) -e 's#.libs/##' < clutter-lcov.info > clutter-lcov.info.tmp
LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory clutter-lcov --title "Clutter Code Coverage" --show-details clutter-lcov.info.tmp
rm -f clutter-lcov.info.tmp
lcov-clean:
-$(LTP) --directory $(top_builddir) -z
-$(RM) -rf clutter-lcov.info clutter-lcov
else
lcov genlcov lcov-clean:
@echo You need to configure Clutter with support for gcov enabled.
@echo e.g., ./configure --enable-gcov
endif
.PHONY: test-report full-report perf-report lcov genlcov lcov-clean

View File

@ -1 +0,0 @@
SUBDIRS = autotools

View File

@ -1,8 +0,0 @@
gtk-doc.m4
libtool.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
shave
shave-libtool

View File

@ -1,10 +0,0 @@
NULL =
EXTRA_DIST = \
introspection.m4 \
as-compiler-flag.m4 \
glibtests.m4 \
glib-tap.mk \
tap-driver.sh \
tap-test \
$(NULL)

View File

@ -1,62 +0,0 @@
dnl as-compiler-flag.m4 0.1.0
dnl autostars m4 macro for detection of compiler flags
dnl David Schleef <ds@schleef.org>
dnl $Id: as-compiler-flag.m4,v 1.1 2005/12/15 23:35:19 ds Exp $
dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
dnl Tries to compile with the given CFLAGS.
dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
dnl and ACTION-IF-NOT-ACCEPTED otherwise.
AC_DEFUN([AS_COMPILER_FLAG],
[
AC_MSG_CHECKING([to see if compiler understands $1])
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
CFLAGS="$save_CFLAGS"
if test "X$flag_ok" = Xyes ; then
m4_ifvaln([$2],[$2])
true
else
m4_ifvaln([$3],[$3])
true
fi
AC_MSG_RESULT([$flag_ok])
])
dnl AS_COMPILER_FLAGS(VAR, FLAGS)
dnl Tries to compile with the given CFLAGS.
AC_DEFUN([AS_COMPILER_FLAGS],
[
list=$2
flags_supported=""
flags_unsupported=""
AC_MSG_CHECKING([for supported compiler flags])
for each in $list
do
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $each"
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
CFLAGS="$save_CFLAGS"
if test "X$flag_ok" = Xyes ; then
flags_supported="$flags_supported $each"
else
flags_unsupported="$flags_unsupported $each"
fi
done
AC_MSG_RESULT([$flags_supported])
if test "X$flags_unsupported" != X ; then
AC_MSG_WARN([unsupported compiler flags: $flags_unsupported])
fi
$1="$$1 $flags_supported"
])

View File

@ -1,134 +0,0 @@
# GLIB - Library of useful C routines
TESTS_ENVIRONMENT= \
G_TEST_SRCDIR="$(abs_srcdir)" \
G_TEST_BUILDDIR="$(abs_builddir)" \
G_DEBUG=gc-friendly \
MALLOC_CHECK_=2 \
MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build/autotools/tap-driver.sh
LOG_COMPILER = $(top_srcdir)/build/autotools/tap-test
NULL =
# initialize variables for unconditional += appending
BUILT_SOURCES =
BUILT_EXTRA_DIST =
CLEANFILES = *.log *.trs
DISTCLEANFILES =
MAINTAINERCLEANFILES =
EXTRA_DIST =
TESTS =
installed_test_LTLIBRARIES =
installed_test_PROGRAMS =
installed_test_SCRIPTS =
nobase_installed_test_DATA =
noinst_LTLIBRARIES =
noinst_PROGRAMS =
noinst_SCRIPTS =
noinst_DATA =
check_LTLIBRARIES =
check_PROGRAMS =
check_SCRIPTS =
check_DATA =
# We support a fairly large range of possible variables. It is expected that all types of files in a test suite
# will belong in exactly one of the following variables.
#
# First, we support the usual automake suffixes, but in lowercase, with the customary meaning:
#
# test_programs, test_scripts, test_data, test_ltlibraries
#
# The above are used to list files that are involved in both uninstalled and installed testing. The
# test_programs and test_scripts are taken to be actual testcases and will be run as part of the test suite.
# Note that _data is always used with the nobase_ automake variable name to ensure that installed test data is
# installed in the same way as it appears in the package layout.
#
# In order to mark a particular file as being only for one type of testing, use 'installed' or 'uninstalled',
# like so:
#
# installed_test_programs, uninstalled_test_programs
# installed_test_scripts, uninstalled_test_scripts
# installed_test_data, uninstalled_test_data
# installed_test_ltlibraries, uninstalled_test_ltlibraries
#
# Additionally, we support 'extra' infixes for programs and scripts. This is used for support programs/scripts
# that should not themselves be run as testcases (but exist to be used from other testcases):
#
# test_extra_programs, installed_test_extra_programs, uninstalled_test_extra_programs
# test_extra_scripts, installed_test_extra_scripts, uninstalled_test_extra_scripts
#
# Additionally, for _scripts and _data, we support the customary dist_ prefix so that the named script or data
# file automatically end up in the tarball.
#
# dist_test_scripts, dist_test_data, dist_test_extra_scripts
# dist_installed_test_scripts, dist_installed_test_data, dist_installed_test_extra_scripts
# dist_uninstalled_test_scripts, dist_uninstalled_test_data, dist_uninstalled_test_extra_scripts
#
# Note that no file is automatically disted unless it appears in one of the dist_ variables. This follows the
# standard automake convention of not disting programs scripts or data by default.
#
# test_programs, test_scripts, uninstalled_test_programs and uninstalled_test_scripts (as well as their disted
# variants) will be run as part of the in-tree 'make check'. These are all assumed to be runnable under
# gtester. That's a bit strange for scripts, but it's possible.
TESTS += $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \
$(dist_test_scripts) $(dist_uninstalled_test_scripts)
# Note: build even the installed-only targets during 'make check' to ensure that they still work.
# We need to do a bit of trickery here and manage disting via EXTRA_DIST instead of using dist_ prefixes to
# prevent automake from mistreating gmake functions like $(wildcard ...) and $(addprefix ...) as if they were
# filenames, including removing duplicate instances of the opening part before the space, eg. '$(addprefix'.
all_test_programs = $(test_programs) $(uninstalled_test_programs) $(installed_test_programs) \
$(test_extra_programs) $(uninstalled_test_extra_programs) $(installed_test_extra_programs)
all_test_scripts = $(test_scripts) $(uninstalled_test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(uninstalled_test_extra_scripts) $(installed_test_extra_scripts)
all_dist_test_scripts = $(dist_test_scripts) $(dist_uninstalled_test_scripts) $(dist_installed_test_scripts) \
$(dist_test_extra_scripts) $(dist_uninstalled_test_extra_scripts) $(dist_installed_test_extra_scripts)
all_test_scripts += $(all_dist_test_scripts)
EXTRA_DIST += $(all_dist_test_scripts)
all_test_data = $(test_data) $(uninstalled_test_data) $(installed_test_data)
all_dist_test_data = $(dist_test_data) $(dist_uninstalled_test_data) $(dist_installed_test_data)
all_test_data += $(all_dist_test_data)
EXTRA_DIST += $(all_dist_test_data)
all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installed_test_ltlibraries)
if ENABLE_ALWAYS_BUILD_TESTS
noinst_LTLIBRARIES += $(all_test_ltlibs)
noinst_PROGRAMS += $(all_test_programs)
noinst_SCRIPTS += $(all_test_scripts)
noinst_DATA += $(all_test_data)
else
check_LTLIBRARIES += $(all_test_ltlibs)
check_PROGRAMS += $(all_test_programs)
check_SCRIPTS += $(all_test_scripts)
check_DATA += $(all_test_data)
endif
if ENABLE_INSTALLED_TESTS
installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \
$(test_extra_programs) $(installed_test_extra_programs)
installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(test_installed_extra_scripts)
installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \
$(dist_installed_test_scripts) $(dist_installed_test_extra_scripts)
nobase_installed_test_DATA += $(test_data) $(installed_test_data)
nobase_installed_test_DATA += $(dist_test_data) $(dist_installed_test_data)
installed_test_LTLIBRARIES += $(test_ltlibraries) $(installed_test_ltlibraries)
installed_testcases = $(test_programs) $(installed_test_programs) \
$(test_scripts) $(installed_test_scripts) \
$(dist_test_scripts) $(dist_installed_test_scripts)
installed_test_meta_DATA = $(installed_testcases:=.test)
%.test: %$(EXEEXT) Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Exec=env G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0 $(installed_testdir)/$<' >> $@.tmp; \
mv $@.tmp $@)
CLEANFILES += $(installed_test_meta_DATA)
endif

View File

@ -1,28 +0,0 @@
dnl GLIB_TESTS
dnl
AC_DEFUN([GLIB_TESTS],
[
AC_ARG_ENABLE(installed-tests,
AS_HELP_STRING([--enable-installed-tests],
[Enable installation of some test cases]),
[case ${enableval} in
yes) ENABLE_INSTALLED_TESTS="1" ;;
no) ENABLE_INSTALLED_TESTS="" ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
esac])
AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1")
AC_ARG_ENABLE(always-build-tests,
AS_HELP_STRING([--enable-always-build-tests],
[Enable always building tests during 'make all']),
[case ${enableval} in
yes) ENABLE_ALWAYS_BUILD_TESTS="1" ;;
no) ENABLE_ALWAYS_BUILD_TESTS="" ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
esac])
AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1")
if test "$ENABLE_INSTALLED_TESTS" = "1"; then
AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
fi
])

View File

@ -1,96 +0,0 @@
dnl -*- mode: autoconf -*-
dnl Copyright 2009 Johan Dahlin
dnl
dnl This file is free software; the author(s) gives unlimited
dnl permission to copy and/or distribute it, with or without
dnl modifications, as long as this notice is preserved.
dnl
# serial 1
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
[
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
dnl enable/disable introspection
m4_if([$2], [require],
[dnl
enable_introspection=yes
],[dnl
AC_ARG_ENABLE(introspection,
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
[Enable introspection for this build]),,
[enable_introspection=auto])
])dnl
AC_MSG_CHECKING([for gobject-introspection])
dnl presence/version checking
AS_CASE([$enable_introspection],
[no], [dnl
found_introspection="no (disabled, use --enable-introspection to enable)"
],dnl
[yes],[dnl
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
found_introspection=yes,
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
],dnl
[auto],[dnl
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
dnl Canonicalize enable_introspection
enable_introspection=$found_introspection
],dnl
[dnl
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
])dnl
AC_MSG_RESULT([$found_introspection])
INTROSPECTION_SCANNER=
INTROSPECTION_COMPILER=
INTROSPECTION_GENERATE=
INTROSPECTION_GIRDIR=
INTROSPECTION_TYPELIBDIR=
if test "x$found_introspection" = "xyes"; then
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
fi
AC_SUBST(INTROSPECTION_SCANNER)
AC_SUBST(INTROSPECTION_COMPILER)
AC_SUBST(INTROSPECTION_GENERATE)
AC_SUBST(INTROSPECTION_GIRDIR)
AC_SUBST(INTROSPECTION_TYPELIBDIR)
AC_SUBST(INTROSPECTION_CFLAGS)
AC_SUBST(INTROSPECTION_LIBS)
AC_SUBST(INTROSPECTION_MAKEFILE)
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
])
dnl Usage:
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
[
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
])
dnl Usage:
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
[
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
])

View File

@ -1,652 +0,0 @@
#! /bin/sh
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
scriptversion=2011-12-27.17; # UTC
# Make unconditional expansion of undefined variables an error. This
# helps a lot in preventing typo-related bugs.
set -u
me=tap-driver.sh
fatal ()
{
echo "$me: fatal: $*" >&2
exit 1
}
usage_error ()
{
echo "$me: $*" >&2
print_usage >&2
exit 2
}
print_usage ()
{
cat <<END
Usage:
tap-driver.sh --test-name=NAME --log-file=PATH --trs-file=PATH
[--expect-failure={yes|no}] [--color-tests={yes|no}]
[--enable-hard-errors={yes|no}] [--ignore-exit]
[--diagnostic-string=STRING] [--merge|--no-merge]
[--comments|--no-comments] [--] TEST-COMMAND
The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
END
}
# TODO: better error handling in option parsing (in particular, ensure
# TODO: $log_file, $trs_file and $test_name are defined).
test_name= # Used for reporting.
log_file= # Where to save the result and output of the test script.
trs_file= # Where to save the metadata of the test run.
expect_failure=0
color_tests=0
merge=0
ignore_exit=0
comments=0
diag_string='#'
while test $# -gt 0; do
case $1 in
--help) print_usage; exit $?;;
--version) echo "$me $scriptversion"; exit $?;;
--test-name) test_name=$2; shift;;
--log-file) log_file=$2; shift;;
--trs-file) trs_file=$2; shift;;
--color-tests) color_tests=$2; shift;;
--expect-failure) expect_failure=$2; shift;;
--enable-hard-errors) shift;; # No-op.
--merge) merge=1;;
--no-merge) merge=0;;
--ignore-exit) ignore_exit=1;;
--comments) comments=1;;
--no-comments) comments=0;;
--diagnostic-string) diag_string=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
esac
shift
done
test $# -gt 0 || usage_error "missing test command"
case $expect_failure in
yes) expect_failure=1;;
*) expect_failure=0;;
esac
if test $color_tests = yes; then
init_colors='
color_map["red"]="" # Red.
color_map["grn"]="" # Green.
color_map["lgn"]="" # Light green.
color_map["blu"]="" # Blue.
color_map["mgn"]="" # Magenta.
color_map["std"]="" # No color.
color_for_result["ERROR"] = "mgn"
color_for_result["PASS"] = "grn"
color_for_result["XPASS"] = "red"
color_for_result["FAIL"] = "red"
color_for_result["XFAIL"] = "lgn"
color_for_result["SKIP"] = "blu"'
else
init_colors=''
fi
# :; is there to work around a bug in bash 3.2 (and earlier) which
# does not always set '$?' properly on redirection failure.
# See the Autoconf manual for more details.
:;{
(
# Ignore common signals (in this subshell only!), to avoid potential
# problems with Korn shells. Some Korn shells are known to propagate
# to themselves signals that have killed a child process they were
# waiting for; this is done at least for SIGINT (and usually only for
# it, in truth). Without the `trap' below, such a behaviour could
# cause a premature exit in the current subshell, e.g., in case the
# test command it runs gets terminated by a SIGINT. Thus, the awk
# script we are piping into would never seen the exit status it
# expects on its last input line (which is displayed below by the
# last `echo $?' statement), and would thus die reporting an internal
# error.
# For more information, see the Autoconf manual and the threads:
# <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
# <http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/004121.html>
trap : 1 3 2 13 15
if test $merge -gt 0; then
exec 2>&1
else
exec 2>&3
fi
"$@"
echo $?
) | LC_ALL=C ${AM_TAP_AWK-awk} \
-v me="$me" \
-v test_script_name="$test_name" \
-v log_file="$log_file" \
-v trs_file="$trs_file" \
-v expect_failure="$expect_failure" \
-v merge="$merge" \
-v ignore_exit="$ignore_exit" \
-v comments="$comments" \
-v diag_string="$diag_string" \
'
# FIXME: the usages of "cat >&3" below could be optimized when using
# FIXME: GNU awk, and/on on systems that supports /dev/fd/.
# Implementation note: in what follows, `result_obj` will be an
# associative array that (partly) simulates a TAP result object
# from the `TAP::Parser` perl module.
## ----------- ##
## FUNCTIONS ##
## ----------- ##
function fatal(msg)
{
print me ": " msg | "cat >&2"
exit 1
}
function abort(where)
{
fatal("internal error " where)
}
# Convert a boolean to a "yes"/"no" string.
function yn(bool)
{
return bool ? "yes" : "no";
}
function add_test_result(result)
{
if (!test_results_index)
test_results_index = 0
test_results_list[test_results_index] = result
test_results_index += 1
test_results_seen[result] = 1;
}
# Whether the test script should be re-run by "make recheck".
function must_recheck()
{
for (k in test_results_seen)
if (k != "XFAIL" && k != "PASS" && k != "SKIP")
return 1
return 0
}
# Whether the content of the log file associated to this test should
# be copied into the "global" test-suite.log.
function copy_in_global_log()
{
for (k in test_results_seen)
if (k != "PASS")
return 1
return 0
}
# FIXME: this can certainly be improved ...
function get_global_test_result()
{
if ("ERROR" in test_results_seen)
return "ERROR"
if ("FAIL" in test_results_seen || "XPASS" in test_results_seen)
return "FAIL"
all_skipped = 1
for (k in test_results_seen)
if (k != "SKIP")
all_skipped = 0
if (all_skipped)
return "SKIP"
return "PASS";
}
function stringify_result_obj(result_obj)
{
if (result_obj["is_unplanned"] || result_obj["number"] != testno)
return "ERROR"
if (plan_seen == LATE_PLAN)
return "ERROR"
if (result_obj["directive"] == "TODO")
return result_obj["is_ok"] ? "XPASS" : "XFAIL"
if (result_obj["directive"] == "SKIP")
return result_obj["is_ok"] ? "SKIP" : COOKED_FAIL;
if (length(result_obj["directive"]))
abort("in function stringify_result_obj()")
return result_obj["is_ok"] ? COOKED_PASS : COOKED_FAIL
}
function decorate_result(result)
{
color_name = color_for_result[result]
if (color_name)
return color_map[color_name] "" result "" color_map["std"]
# If we are not using colorized output, or if we do not know how
# to colorize the given result, we should return it unchanged.
return result
}
function report(result, details)
{
if (result ~ /^(X?(PASS|FAIL)|SKIP|ERROR)/)
{
msg = ": " test_script_name
add_test_result(result)
}
else if (result == "#")
{
msg = " " test_script_name ":"
}
else
{
abort("in function report()")
}
if (length(details))
msg = msg " " details
# Output on console might be colorized.
print decorate_result(result) msg
# Log the result in the log file too, to help debugging (this is
# especially true when said result is a TAP error or "Bail out!").
print result msg | "cat >&3";
}
function testsuite_error(error_message)
{
report("ERROR", "- " error_message)
}
function handle_tap_result()
{
details = result_obj["number"];
if (length(result_obj["description"]))
details = details " " result_obj["description"]
if (plan_seen == LATE_PLAN)
{
details = details " # AFTER LATE PLAN";
}
else if (result_obj["is_unplanned"])
{
details = details " # UNPLANNED";
}
else if (result_obj["number"] != testno)
{
details = sprintf("%s # OUT-OF-ORDER (expecting %d)",
details, testno);
}
else if (result_obj["directive"])
{
details = details " # " result_obj["directive"];
if (length(result_obj["explanation"]))
details = details " " result_obj["explanation"]
}
report(stringify_result_obj(result_obj), details)
}
# `skip_reason` should be empty whenever planned > 0.
function handle_tap_plan(planned, skip_reason)
{
planned += 0 # Avoid getting confused if, say, `planned` is "00"
if (length(skip_reason) && planned > 0)
abort("in function handle_tap_plan()")
if (plan_seen)
{
# Error, only one plan per stream is acceptable.
testsuite_error("multiple test plans")
return;
}
planned_tests = planned
# The TAP plan can come before or after *all* the TAP results; we speak
# respectively of an "early" or a "late" plan. If we see the plan line
# after at least one TAP result has been seen, assume we have a late
# plan; in this case, any further test result seen after the plan will
# be flagged as an error.
plan_seen = (testno >= 1 ? LATE_PLAN : EARLY_PLAN)
# If testno > 0, we have an error ("too many tests run") that will be
# automatically dealt with later, so do not worry about it here. If
# $plan_seen is true, we have an error due to a repeated plan, and that
# has already been dealt with above. Otherwise, we have a valid "plan
# with SKIP" specification, and should report it as a particular kind
# of SKIP result.
if (planned == 0 && testno == 0)
{
if (length(skip_reason))
skip_reason = "- " skip_reason;
report("SKIP", skip_reason);
}
}
function extract_tap_comment(line)
{
if (index(line, diag_string) == 1)
{
# Strip leading `diag_string` from `line`.
line = substr(line, length(diag_string) + 1)
# And strip any leading and trailing whitespace left.
sub("^[ \t]*", "", line)
sub("[ \t]*$", "", line)
# Return what is left (if any).
return line;
}
return "";
}
# When this function is called, we know that line is a TAP result line,
# so that it matches the (perl) RE "^(not )?ok\b".
function setup_result_obj(line)
{
# Get the result, and remove it from the line.
result_obj["is_ok"] = (substr(line, 1, 2) == "ok" ? 1 : 0)
sub("^(not )?ok[ \t]*", "", line)
# If the result has an explicit number, get it and strip it; otherwise,
# automatically assing the next progresive number to it.
if (line ~ /^[0-9]+$/ || line ~ /^[0-9]+[^a-zA-Z0-9_]/)
{
match(line, "^[0-9]+")
# The final `+ 0` is to normalize numbers with leading zeros.
result_obj["number"] = substr(line, 1, RLENGTH) + 0
line = substr(line, RLENGTH + 1)
}
else
{
result_obj["number"] = testno
}
if (plan_seen == LATE_PLAN)
# No further test results are acceptable after a "late" TAP plan
# has been seen.
result_obj["is_unplanned"] = 1
else if (plan_seen && testno > planned_tests)
result_obj["is_unplanned"] = 1
else
result_obj["is_unplanned"] = 0
# Strip trailing and leading whitespace.
sub("^[ \t]*", "", line)
sub("[ \t]*$", "", line)
# This will have to be corrected if we have a "TODO"/"SKIP" directive.
result_obj["description"] = line
result_obj["directive"] = ""
result_obj["explanation"] = ""
if (index(line, "#") == 0)
return # No possible directive, nothing more to do.
# Directives are case-insensitive.
rx = "[ \t]*#[ \t]*([tT][oO][dD][oO]|[sS][kK][iI][pP])[ \t]*"
# See whether we have the directive, and if yes, where.
pos = match(line, rx "$")
if (!pos)
pos = match(line, rx "[^a-zA-Z0-9_]")
# If there was no TAP directive, we have nothing more to do.
if (!pos)
return
# Let`s now see if the TAP directive has been escaped. For example:
# escaped: ok \# SKIP
# not escaped: ok \\# SKIP
# escaped: ok \\\\\# SKIP
# not escaped: ok \ # SKIP
if (substr(line, pos, 1) == "#")
{
bslash_count = 0
for (i = pos; i > 1 && substr(line, i - 1, 1) == "\\"; i--)
bslash_count += 1
if (bslash_count % 2)
return # Directive was escaped.
}
# Strip the directive and its explanation (if any) from the test
# description.
result_obj["description"] = substr(line, 1, pos - 1)
# Now remove the test description from the line, that has been dealt
# with already.
line = substr(line, pos)
# Strip the directive, and save its value (normalized to upper case).
sub("^[ \t]*#[ \t]*", "", line)
result_obj["directive"] = toupper(substr(line, 1, 4))
line = substr(line, 5)
# Now get the explanation for the directive (if any), with leading
# and trailing whitespace removed.
sub("^[ \t]*", "", line)
sub("[ \t]*$", "", line)
result_obj["explanation"] = line
}
function get_test_exit_message(status)
{
if (status == 0)
return ""
if (status !~ /^[1-9][0-9]*$/)
abort("getting exit status")
if (status < 127)
exit_details = ""
else if (status == 127)
exit_details = " (command not found?)"
else if (status >= 128 && status <= 255)
exit_details = sprintf(" (terminated by signal %d?)", status - 128)
else if (status > 256 && status <= 384)
# We used to report an "abnormal termination" here, but some Korn
# shells, when a child process die due to signal number n, can leave
# in $? an exit status of 256+n instead of the more standard 128+n.
# Apparently, both behaviours are allowed by POSIX (2008), so be
# prepared to handle them both. See also Austing Group report ID
# 0000051 <http://www.austingroupbugs.net/view.php?id=51>
exit_details = sprintf(" (terminated by signal %d?)", status - 256)
else
# Never seen in practice.
exit_details = " (abnormal termination)"
return sprintf("exited with status %d%s", status, exit_details)
}
function write_test_results()
{
print ":global-test-result: " get_global_test_result() > trs_file
print ":recheck: " yn(must_recheck()) > trs_file
print ":copy-in-global-log: " yn(copy_in_global_log()) > trs_file
for (i = 0; i < test_results_index; i += 1)
print ":test-result: " test_results_list[i] > trs_file
close(trs_file);
}
BEGIN {
## ------- ##
## SETUP ##
## ------- ##
'"$init_colors"'
# Properly initialized once the TAP plan is seen.
planned_tests = 0
COOKED_PASS = expect_failure ? "XPASS": "PASS";
COOKED_FAIL = expect_failure ? "XFAIL": "FAIL";
# Enumeration-like constants to remember which kind of plan (if any)
# has been seen. It is important that NO_PLAN evaluates "false" as
# a boolean.
NO_PLAN = 0
EARLY_PLAN = 1
LATE_PLAN = 2
testno = 0 # Number of test results seen so far.
bailed_out = 0 # Whether a "Bail out!" directive has been seen.
# Whether the TAP plan has been seen or not, and if yes, which kind
# it is ("early" is seen before any test result, "late" otherwise).
plan_seen = NO_PLAN
## --------- ##
## PARSING ##
## --------- ##
is_first_read = 1
while (1)
{
# Involutions required so that we are able to read the exit status
# from the last input line.
st = getline
if (st < 0) # I/O error.
fatal("I/O error while reading from input stream")
else if (st == 0) # End-of-input
{
if (is_first_read)
abort("in input loop: only one input line")
break
}
if (is_first_read)
{
is_first_read = 0
nextline = $0
continue
}
else
{
curline = nextline
nextline = $0
$0 = curline
}
# Copy any input line verbatim into the log file.
print | "cat >&3"
# Parsing of TAP input should stop after a "Bail out!" directive.
if (bailed_out)
continue
# TAP test result.
if ($0 ~ /^(not )?ok$/ || $0 ~ /^(not )?ok[^a-zA-Z0-9_]/)
{
testno += 1
setup_result_obj($0)
handle_tap_result()
}
# TAP plan (normal or "SKIP" without explanation).
else if ($0 ~ /^1\.\.[0-9]+[ \t]*$/)
{
# The next two lines will put the number of planned tests in $0.
sub("^1\\.\\.", "")
sub("[^0-9]*$", "")
handle_tap_plan($0, "")
continue
}
# TAP "SKIP" plan, with an explanation.
else if ($0 ~ /^1\.\.0+[ \t]*#/)
{
# The next lines will put the skip explanation in $0, stripping
# any leading and trailing whitespace. This is a little more
# tricky in truth, since we want to also strip a potential leading
# "SKIP" string from the message.
sub("^[^#]*#[ \t]*(SKIP[: \t][ \t]*)?", "")
sub("[ \t]*$", "");
handle_tap_plan(0, $0)
}
# "Bail out!" magic.
# Older versions of prove and TAP::Harness (e.g., 3.17) did not
# recognize a "Bail out!" directive when preceded by leading
# whitespace, but more modern versions (e.g., 3.23) do. So we
# emulate the latter, "more modern" behaviour.
else if ($0 ~ /^[ \t]*Bail out!/)
{
bailed_out = 1
# Get the bailout message (if any), with leading and trailing
# whitespace stripped. The message remains stored in `$0`.
sub("^[ \t]*Bail out![ \t]*", "");
sub("[ \t]*$", "");
# Format the error message for the
bailout_message = "Bail out!"
if (length($0))
bailout_message = bailout_message " " $0
testsuite_error(bailout_message)
}
# Maybe we have too look for dianogtic comments too.
else if (comments != 0)
{
comment = extract_tap_comment($0);
if (length(comment))
report("#", comment);
}
}
## -------- ##
## FINISH ##
## -------- ##
# A "Bail out!" directive should cause us to ignore any following TAP
# error, as well as a non-zero exit status from the TAP producer.
if (!bailed_out)
{
if (!plan_seen)
{
testsuite_error("missing test plan")
}
else if (planned_tests != testno)
{
bad_amount = testno > planned_tests ? "many" : "few"
testsuite_error(sprintf("too %s tests run (expected %d, got %d)",
bad_amount, planned_tests, testno))
}
if (!ignore_exit)
{
# Fetch exit status from the last line.
exit_message = get_test_exit_message(nextline)
if (exit_message)
testsuite_error(exit_message)
}
}
write_test_results()
exit 0
} # End of "BEGIN" block.
'
# TODO: document that we consume the file descriptor 3 :-(
} 3>"$log_file"
test $? -eq 0 || fatal "I/O or internal error"
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@ -1,5 +0,0 @@
#! /bin/sh
# run a GTest in tap mode. The test binary is passed as $1
$1 -k --tap

View File

@ -1,727 +0,0 @@
AUTOMAKE_OPTIONS = subdir-objects
# preamble
NULL =
# common definitions
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
BUILT_SOURCES =
AM_CPPFLAGS = \
-DCLUTTER_PREFIX=\""$(prefix)"\" \
-DCLUTTER_LIBDIR=\""$(libdir)"\" \
-DCLUTTER_DATADIR=\""$(datadir)"\" \
-DCLUTTER_LOCALEDIR=\""$(localedir)"\" \
-DCLUTTER_SYSCONFDIR=\""$(sysconfdir)"\" \
-DCLUTTER_COMPILATION=1 \
-DCOGL_DISABLE_DEPRECATION_WARNINGS \
-DG_LOG_DOMAIN=\"Clutter\" \
-I$(top_srcdir) \
-I$(top_srcdir)/clutter \
-I$(top_srcdir)/clutter/cally \
-I$(top_builddir) \
-I$(top_builddir)/clutter \
-I$(top_srcdir)/../cogl \
-I$(top_builddir)/../cogl \
-I$(top_builddir)/../cogl/cogl \
$(CLUTTER_DEPRECATED_CFLAGS) \
$(CLUTTER_DEBUG_CFLAGS) \
$(CLUTTER_HIDDEN_VISIBILITY_CFLAGS) \
$(NULL)
AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
# these are the gir files we generate using g-ir-scanner
INTROSPECTION_GIRS =
# the base include path for headers
clutter_base_includedir = $(includedir)/mutter/clutter-$(LIBMUTTER_API_VERSION)
clutter_includedir = $(clutter_base_includedir)/clutter
clutter_deprecateddir = $(clutter_base_includedir)/clutter/deprecated
# pkg-config files
pc_files =
# common sources - please, keep these sorted alphabetically
source_h = \
clutter-action.h \
clutter-actor-meta.h \
clutter-actor.h \
clutter-align-constraint.h \
clutter-animatable.h \
clutter-backend.h \
clutter-bind-constraint.h \
clutter-binding-pool.h \
clutter-bin-layout.h \
clutter-blur-effect.h \
clutter-box-layout.h \
clutter-brightness-contrast-effect.h \
clutter-cairo.h \
clutter-canvas.h \
clutter-child-meta.h \
clutter-click-action.h \
clutter-clone.h \
clutter-color-static.h \
clutter-color.h \
clutter-colorize-effect.h \
clutter-constraint.h \
clutter-container.h \
clutter-content.h \
clutter-deform-effect.h \
clutter-deprecated.h \
clutter-desaturate-effect.h \
clutter-device-manager.h \
clutter-drag-action.h \
clutter-drop-action.h \
clutter-effect.h \
clutter-enums.h \
clutter-event.h \
clutter-feature.h \
clutter-fixed-layout.h \
clutter-flow-layout.h \
clutter-gesture-action.h \
clutter-grid-layout.h \
clutter-group.h \
clutter-image.h \
clutter-input-device.h \
clutter-input-device-tool.h \
clutter-input-focus.h \
clutter-input-method.h \
clutter-interval.h \
clutter-keyframe-transition.h \
clutter-keysyms.h \
clutter-layout-manager.h \
clutter-layout-meta.h \
clutter-macros.h \
clutter-main.h \
clutter-offscreen-effect.h \
clutter-page-turn-effect.h \
clutter-paint-nodes.h \
clutter-paint-node.h \
clutter-pan-action.h \
clutter-path-constraint.h \
clutter-path.h \
clutter-property-transition.h \
clutter-rotate-action.h \
clutter-script.h \
clutter-scriptable.h \
clutter-scroll-actor.h \
clutter-settings.h \
clutter-shader-effect.h \
clutter-shader-types.h \
clutter-swipe-action.h \
clutter-snap-constraint.h \
clutter-stage.h \
clutter-stage-manager.h \
clutter-tap-action.h \
clutter-test-utils.h \
clutter-texture.h \
clutter-text.h \
clutter-text-buffer.h \
clutter-timeline.h \
clutter-transition-group.h \
clutter-transition.h \
clutter-types.h \
clutter-units.h \
clutter-virtual-input-device.h \
clutter-zoom-action.h \
$(NULL)
source_c = \
clutter-action.c \
clutter-actor-box.c \
clutter-actor-meta.c \
clutter-actor.c \
clutter-align-constraint.c \
clutter-animatable.c \
clutter-backend.c \
clutter-base-types.c \
clutter-bezier.c \
clutter-bind-constraint.c \
clutter-binding-pool.c \
clutter-bin-layout.c \
clutter-blur-effect.c \
clutter-box-layout.c \
clutter-brightness-contrast-effect.c \
clutter-cairo.c \
clutter-canvas.c \
clutter-child-meta.c \
clutter-click-action.c \
clutter-clone.c \
clutter-color.c \
clutter-colorize-effect.c \
clutter-constraint.c \
clutter-container.c \
clutter-content.c \
clutter-deform-effect.c \
clutter-desaturate-effect.c \
clutter-device-manager.c \
clutter-drag-action.c \
clutter-drop-action.c \
clutter-effect.c \
clutter-event.c \
clutter-feature.c \
clutter-fixed-layout.c \
clutter-flatten-effect.c \
clutter-flow-layout.c \
clutter-gesture-action.c \
clutter-grid-layout.c \
clutter-image.c \
clutter-input-device.c \
clutter-input-device-tool.c \
clutter-input-focus.c \
clutter-input-method.c \
clutter-virtual-input-device.c \
clutter-interval.c \
clutter-keyframe-transition.c \
clutter-keysyms-table.c \
clutter-layout-manager.c \
clutter-layout-meta.c \
clutter-main.c \
clutter-master-clock.c \
clutter-master-clock-default.c \
clutter-offscreen-effect.c \
clutter-page-turn-effect.c \
clutter-paint-nodes.c \
clutter-paint-node.c \
clutter-pan-action.c \
clutter-path-constraint.c \
clutter-path.c \
clutter-property-transition.c \
clutter-rotate-action.c \
clutter-script.c \
clutter-script-parser.c \
clutter-scriptable.c \
clutter-scroll-actor.c \
clutter-settings.c \
clutter-shader-effect.c \
clutter-shader-types.c \
clutter-swipe-action.c \
clutter-snap-constraint.c \
clutter-stage.c \
clutter-stage-manager.c \
clutter-stage-window.c \
clutter-tap-action.c \
clutter-test-utils.c \
clutter-text.c \
clutter-text-buffer.c \
clutter-transition-group.c \
clutter-transition.c \
clutter-timeline.c \
clutter-units.c \
clutter-util.c \
clutter-paint-volume.c \
clutter-zoom-action.c \
$(NULL)
# private headers; these should not be distributed or introspected
source_h_priv = \
clutter-actor-meta-private.h \
clutter-actor-private.h \
clutter-backend-private.h \
clutter-bezier.h \
clutter-constraint-private.h \
clutter-content-private.h \
clutter-debug.h \
clutter-device-manager-private.h \
clutter-easing.h \
clutter-effect-private.h \
clutter-event-translator.h \
clutter-event-private.h \
clutter-flatten-effect.h \
clutter-gesture-action-private.h \
clutter-id-pool.h \
clutter-input-focus-private.h \
clutter-input-method-private.h \
clutter-master-clock.h \
clutter-master-clock-default.h \
clutter-offscreen-effect-private.h \
clutter-paint-node-private.h \
clutter-paint-volume-private.h \
clutter-private.h \
clutter-script-private.h \
clutter-settings-private.h \
clutter-stage-manager-private.h \
clutter-stage-private.h \
clutter-stage-view.h \
clutter-stage-window.h \
$(NULL)
# private source code; these should not be introspected
source_c_priv = \
clutter-easing.c \
clutter-event-translator.c \
clutter-id-pool.c \
clutter-stage-view.c \
$(NULL)
# deprecated installed headers
deprecated_h = \
deprecated/clutter-actor.h \
deprecated/clutter-alpha.h \
deprecated/clutter-animatable.h \
deprecated/clutter-animation.h \
deprecated/clutter-animator.h \
deprecated/clutter-backend.h \
deprecated/clutter-behaviour.h \
deprecated/clutter-behaviour-depth.h \
deprecated/clutter-behaviour-ellipse.h \
deprecated/clutter-behaviour-opacity.h \
deprecated/clutter-behaviour-path.h \
deprecated/clutter-behaviour-rotate.h \
deprecated/clutter-behaviour-scale.h \
deprecated/clutter-bin-layout.h \
deprecated/clutter-box.h \
deprecated/clutter-cairo-texture.h \
deprecated/clutter-container.h \
deprecated/clutter-frame-source.h \
deprecated/clutter-group.h \
deprecated/clutter-input-device.h \
deprecated/clutter-keysyms.h \
deprecated/clutter-list-model.h \
deprecated/clutter-main.h \
deprecated/clutter-media.h \
deprecated/clutter-model.h \
deprecated/clutter-rectangle.h \
deprecated/clutter-score.h \
deprecated/clutter-shader.h \
deprecated/clutter-stage-manager.h \
deprecated/clutter-stage.h \
deprecated/clutter-state.h \
deprecated/clutter-table-layout.h \
deprecated/clutter-texture.h \
deprecated/clutter-timeline.h \
deprecated/clutter-timeout-pool.h \
deprecated/clutter-util.h \
$(NULL)
# deprecated source code
deprecated_c = \
deprecated/clutter-actor-deprecated.c \
deprecated/clutter-alpha.c \
deprecated/clutter-animation.c \
deprecated/clutter-animator.c \
deprecated/clutter-behaviour.c \
deprecated/clutter-behaviour-depth.c \
deprecated/clutter-behaviour-ellipse.c \
deprecated/clutter-behaviour-opacity.c \
deprecated/clutter-behaviour-path.c \
deprecated/clutter-behaviour-rotate.c \
deprecated/clutter-behaviour-scale.c \
deprecated/clutter-box.c \
deprecated/clutter-cairo-texture.c \
deprecated/clutter-frame-source.c \
deprecated/clutter-group.c \
deprecated/clutter-input-device-deprecated.c \
deprecated/clutter-layout-manager-deprecated.c \
deprecated/clutter-list-model.c \
deprecated/clutter-media.c \
deprecated/clutter-model.c \
deprecated/clutter-rectangle.c \
deprecated/clutter-score.c \
deprecated/clutter-shader.c \
deprecated/clutter-state.c \
deprecated/clutter-table-layout.c \
deprecated/clutter-texture.c \
deprecated/clutter-timeout-pool.c \
$(NULL)
# deprecated private headers; these should not be installed
deprecated_h_priv = \
deprecated/clutter-model-private.h \
deprecated/clutter-timeout-interval.h \
$(NULL)
# deprecated private source code; these should not be introspected
deprecated_c_priv = \
deprecated/clutter-timeout-interval.c \
$(NULL)
# built sources
built_source_c = \
clutter-enum-types.c \
clutter-marshal.c \
$(NULL)
# built headers
built_source_h = \
clutter-enum-types.h \
clutter-marshal.h \
$(NULL)
# config header
DISTCLEANFILES += clutter-config.h
EXTRA_DIST += clutter-config.h.in
# version header
DISTCLEANFILES += clutter-version.h
EXTRA_DIST += clutter-version.h.in clutter-version.h
# key symbol update script
EXTRA_DIST += clutter-keysyms-update.pl
pc_files += mutter-clutter-$(LIBMUTTER_API_VERSION).pc
# in order to be compatible with Clutter < 1.10, when we shipped a single
# shared library whose name was determined by the single backend it
# supported, we need to install symbolic links so that existing applications
# using Clutter won't break in the Brave New World of multi-backend support
# in the same shared object.
compat_libs =
# backends source listings
#
# backend_source_c := source code
# backend_source_h := installed public headers
# backend_source_c_priv := source that should not be scanned by g-i
# backend_source_h_priv := private headers
# backend_source_built := built sources
#
backend_source_c =
backend_source_h =
backend_source_c_priv =
backend_source_h_priv =
backend_source_built =
# X11 backend rules
x11_source_c = \
x11/clutter-backend-x11.c \
x11/clutter-device-manager-core-x11.c \
x11/clutter-event-x11.c \
x11/clutter-input-device-core-x11.c \
x11/clutter-keymap-x11.c \
x11/clutter-stage-x11.c \
x11/clutter-x11-texture-pixmap.c \
x11/clutter-xkb-a11y-x11.c \
$(NULL)
x11_source_h = \
x11/clutter-x11.h \
x11/clutter-x11-texture-pixmap.h \
$(NULL)
x11_source_h_priv = \
x11/clutter-backend-x11.h \
x11/clutter-device-manager-core-x11.h \
x11/clutter-input-device-core-x11.h \
x11/clutter-keymap-x11.h \
x11/clutter-settings-x11.h \
x11/clutter-stage-x11.h \
x11/clutter-xkb-a11y-x11.h \
$(NULL)
x11_source_c_priv = \
x11/xsettings/xsettings-client.c \
x11/xsettings/xsettings-client.h \
x11/xsettings/xsettings-common.c \
x11/xsettings/xsettings-common.h \
$(NULL)
x11_source_c += \
x11/clutter-device-manager-xi2.c \
x11/clutter-input-device-xi2.c \
x11/clutter-input-device-tool-xi2.c \
$(NULL)
x11_source_h_priv += \
x11/clutter-device-manager-xi2.h \
x11/clutter-input-device-xi2.h \
x11/clutter-input-device-tool-xi2.h \
$(NULL)
x11_source_c += \
x11/clutter-virtual-input-device-x11.c \
$(NULL)
x11_source_h_priv += \
x11/clutter-virtual-input-device-x11.h \
$(NULL)
backend_source_h += $(x11_source_h)
backend_source_c += $(x11_source_c)
backend_source_h_priv += $(x11_source_h_priv)
backend_source_c_priv += $(x11_source_c_priv)
# the list of files we want to introspect on X11
x11_introspection = $(x11_source_c) $(x11_source_h)
clutterx11_includedir = $(clutter_includedir)/x11
clutterx11_include_HEADERS = $(x11_source_h)
mutter-clutter-x11-@LIBMUTTER_API_VERSION@.pc: mutter-clutter-$(LIBMUTTER_API_VERSION).pc
$(QUIET_GEN)cp -f $< $(@F)
pc_files += mutter-clutter-x11-$(LIBMUTTER_API_VERSION).pc
# Shared cogl backend files
cogl_source_h =
cogl_source_c = \
cogl/clutter-stage-cogl.c \
$(NULL)
cogl_source_h_priv = \
cogl/clutter-stage-cogl.h \
$(NULL)
cogl_source_c_priv =
backend_source_h += $(cogl_source_h)
backend_source_c += $(cogl_source_c)
backend_source_h_priv += $(cogl_source_h_priv)
backend_source_c_priv += $(cogl_source_c_priv)
backend_source_h += $(glx_source_h)
backend_source_c += $(glx_source_c)
evdev_c_priv = \
evdev/clutter-device-manager-evdev.c \
evdev/clutter-input-device-evdev.c \
evdev/clutter-seat-evdev.c \
evdev/clutter-virtual-input-device-evdev.c \
evdev/clutter-event-evdev.c \
evdev/clutter-input-device-tool-evdev.c \
$(NULL)
evdev_h_priv = \
evdev/clutter-device-manager-evdev.h \
evdev/clutter-input-device-evdev.h \
evdev/clutter-seat-evdev.h \
evdev/clutter-input-device-tool-evdev.h \
evdev/clutter-virtual-input-device-evdev.h \
$(NULL)
evdev_h = evdev/clutter-evdev.h
if SUPPORT_WAYLAND
backend_source_c_priv += $(evdev_c_priv)
backend_source_h_priv += $(evdev_h_priv)
backend_source_h += $(evdev_h)
clutterevdev_includedir = $(clutter_includedir)/evdev
clutterevdev_include_HEADERS = $(evdev_h)
backend_source_c += evdev/clutter-xkb-utils.c
backend_source_h_priv += evdev/clutter-xkb-utils.h
# EGL backend rules
egl_source_h = \
egl/clutter-egl-headers.h \
egl/clutter-egl.h \
$(NULL)
egl_source_h_priv = egl/clutter-backend-eglnative.h
egl_source_c = egl/clutter-backend-eglnative.c
wayland_compositor_source_h = \
wayland/clutter-wayland-compositor.h \
wayland/clutter-wayland-surface.h
backend_source_h += $(wayland_compositor_source_h)
backend_source_c += \
wayland/clutter-wayland-surface.c
wayland_compositor_includedir = $(clutter_includedir)/wayland
wayland_compositor_include_HEADERS = $(wayland_compositor_source_h)
backend_source_h += $(egl_source_h)
backend_source_c += $(egl_source_c)
backend_source_h_priv += $(egl_source_h_priv)
clutteregl_includedir = $(clutter_includedir)/egl
clutteregl_include_HEADERS = $(egl_source_h)
endif # SUPPORT_WAYLAND
# cally
cally_sources_h = \
cally/cally-actor.h \
cally/cally-clone.h \
cally/cally-factory.h \
cally/cally-group.h \
cally/cally.h \
cally/cally-main.h \
cally/cally-rectangle.h \
cally/cally-root.h \
cally/cally-stage.h \
cally/cally-text.h \
cally/cally-texture.h \
cally/cally-util.h \
$(NULL)
cally_sources_c = \
cally/cally-actor.c \
cally/cally.c \
cally/cally-clone.c \
cally/cally-group.c \
cally/cally-rectangle.c \
cally/cally-root.c \
cally/cally-stage.c \
cally/cally-text.c \
cally/cally-texture.c \
cally/cally-util.c \
$(NULL)
cally_sources_private = \
cally/cally-actor-private.h \
$(NULL)
cally_includedir = $(clutter_base_includedir)/cally
cally_include_HEADERS = $(cally_sources_h)
# general build rules:
# you should not need to modify anything below this point
# glib-genmarshal rules
glib_marshal_list = clutter-marshal.list
glib_marshal_prefix = _clutter_marshal
include $(srcdir)/Makefile.am.marshal
# glib-mkenums rules
glib_enum_h = clutter-enum-types.h
glib_enum_c = clutter-enum-types.c
glib_enum_headers = $(source_h) $(deprecated_h)
include $(srcdir)/Makefile.am.enums
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
DISTCLEANFILES += $(pc_files)
clutter_include_HEADERS = $(source_h) clutter.h clutter-version.h clutter-autocleanups.h clutter-mutter.h
nodist_clutter_include_HEADERS = clutter-config.h $(built_source_h)
clutter_deprecated_HEADERS = $(deprecated_h)
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_LIBADD = \
$(LIBM) \
$(CLUTTER_LIBS) \
$(top_builddir)/../cogl/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
$(top_builddir)/../cogl/cogl-pango/libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la \
$(top_builddir)/../cogl/cogl-path/libmutter-cogl-path-$(LIBMUTTER_API_VERSION).la \
$(NULL)
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
$(backend_source_c) \
$(backend_source_h) \
$(backend_source_c_priv) \
$(backend_source_h_priv) \
$(source_c) \
$(source_h) \
$(source_c_priv) \
$(source_h_priv) \
$(deprecated_c) \
$(deprecated_h) \
$(deprecated_c_priv) \
$(deprecated_h_priv) \
$(cally_sources_c) \
$(cally_sources_h) \
$(cally_sources_private) \
$(NULL)
nodist_libmutter_clutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
$(backend_source_built) \
$(built_source_c) \
$(built_source_h)
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
$(CLUTTER_LINK_FLAGS) \
$(CLUTTER_LT_LDFLAGS) \
-export-dynamic \
-rpath $(mutterlibdir) \
$(NULL)
install-exec-local:
test -z "$(mutterlibdir)" || $(MKDIR_P) "$(DESTDIR)$(mutterlibdir)"
for lib in `echo $(compat_libs)`; do \
(cd $(DESTDIR)$(mutterlibdir) && \
rm -f $$lib.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION); \
) ; \
(cd $(DESTDIR)$(mutterlibdir) && \
{ ln -s -f libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0 || \
{ rm -f $$lib.0 && ln -s libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0; }; \
} \
) ; \
(cd $(DESTDIR)$(mutterlibdir) && \
{ ln -s -f libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib || \
{ rm -f $$lib && ln -s libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib; }; \
} \
) ; \
done
# gobject-introspection rules
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_SCANNER_ARGS = \
--add-include-path=$(top_builddir)/../cogl/cogl \
--add-include-path=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(top_builddir)/../cogl/cogl \
--includedir=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_SCANNER_ENV = \
PKG_CONFIG_PATH=$(top_builddir)/../cogl/cogl/:$(top_builddir)/../cogl/cogl-pango/:$${PKG_CONFIG_PATH}
Clutter-@LIBMUTTER_API_VERSION@.gir: libmutter-clutter-@LIBMUTTER_API_VERSION@.la Makefile
Clutter_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Clutter
Clutter_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
Clutter_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
Clutter_@LIBMUTTER_API_VERSION@_gir_FILES = \
$(clutter_include_HEADERS) \
$(clutter_deprecated_HEADERS) \
$(nodist_clutter_include_HEADERS) \
$(source_c) \
$(deprecated_c) \
$(built_source_c)
Clutter_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Clutter_@LIBMUTTER_API_VERSION@_gir_INCLUDES = GL-1.0 GObject-2.0 cairo-1.0 Cogl-@LIBMUTTER_API_VERSION@ CoglPango-@LIBMUTTER_API_VERSION@ Atk-1.0 Json-1.0
Clutter_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--c-include='clutter/clutter.h' \
--pkg-export=mutter-clutter-@LIBMUTTER_API_VERSION@
INTROSPECTION_GIRS += Clutter-@LIBMUTTER_API_VERSION@.gir
Cally-@LIBMUTTER_API_VERSION@.gir: Makefile Clutter-@LIBMUTTER_API_VERSION@.gir
Cally_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Cally
Cally_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
Cally_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
Cally_@LIBMUTTER_API_VERSION@_gir_FILES = $(cally_sources_h) $(cally_sources_c)
Cally_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Cally_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--c-include='cally/cally.h' \
--pkg-export=mutter-clutter-@LIBMUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@LIBMUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += Cally-@LIBMUTTER_API_VERSION@.gir
ClutterX11-@LIBMUTTER_API_VERSION@.gir: Makefile Clutter-@LIBMUTTER_API_VERSION@.gir
ClutterX11_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = ClutterX11
ClutterX11_@LIBMUTTER_API_VERSION@_gir_INCLUDES = xlib-2.0
ClutterX11_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
ClutterX11_@LIBMUTTER_API_VERSION@_gir_FILES = $(x11_introspection)
ClutterX11_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
ClutterX11_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--c-include='clutter/x11/clutter-x11.h' \
--pkg-export=mutter-clutter-x11-@LIBMUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@LIBMUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += ClutterX11-@LIBMUTTER_API_VERSION@.gir
# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
# install anything - we need to install inside our prefix.
girdir = $(mutterlibdir)
gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(mutterlibdir)
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
EXTRA_DIST += \
Makefile.am.marshal \
Makefile.am.enums
CLEANFILES += $(gir_DATA) $(typelib_DATA)

View File

@ -1,52 +0,0 @@
# Rules for generating enumeration types using glib-mkenums
#
# Define:
# glib_enum_h = header template file
# glib_enum_c = source template file
# glib_enum_headers = list of headers to parse
#
# before including Makefile.am.enums. You will also need to have
# the following targets already defined:
#
# CLEANFILES
# DISTCLEANFILES
# BUILT_SOURCES
# EXTRA_DIST
#
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
# Basic sanity checks
$(if $(GLIB_MKENUMS),,$(error Need to define GLIB_MKENUMS))
$(if $(or $(glib_enum_h), \
$(glib_enum_c)),, \
$(error Need to define glib_enum_h and glib_enum_c))
$(if $(glib_enum_headers),,$(error Need to define glib_enum_headers))
enum_tmpl_h=$(addprefix $(srcdir)/, $(glib_enum_h:.h=.h.in))
enum_tmpl_c=$(addprefix $(srcdir)/, $(glib_enum_c:.c=.c.in))
enum_headers=$(addprefix $(srcdir)/, $(glib_enum_headers))
CLEANFILES += stamp-enum-types
DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c)
BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c)
EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c)
stamp-enum-types: $(enum_headers) $(enum_tmpl_h)
$(AM_V_GEN)$(GLIB_MKENUMS) \
--template $(enum_tmpl_h) \
$(enum_headers) > xgen-eh \
&& (cmp -s xgen-eh $(glib_enum_h) || cp -f xgen-eh $(glib_enum_h)) \
&& rm -f xgen-eh \
&& echo timestamp > $(@F)
$(glib_enum_h): stamp-enum-types
@true
$(glib_enum_c): $(enum_headers) $(enum_tmpl_h) $(enum_tmpl_c)
$(AM_V_GEN)$(GLIB_MKENUMS) \
--template $(enum_tmpl_c) \
$(enum_headers) > xgen-ec \
&& cp -f xgen-ec $(glib_enum_c) \
&& rm -f xgen-ec

View File

@ -1,54 +0,0 @@
# Rules for generating marshal files using glib-genmarshal
#
# Define:
# glib_marshal_list = marshal list file
# glib_marshal_prefix = prefix for marshal functions
#
# before including Makefile.am.marshal. You will also need to have
# the following targets already defined:
#
# CLEANFILES
# DISTCLEANFILES
# BUILT_SOURCES
# EXTRA_DIST
#
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
# Basic sanity checks
$(if $(GLIB_GENMARSHAL),,$(error Need to define GLIB_GENMARSHAL))
$(if $(or $(glib_marshal_list), \
$(glib_marshal_prefix)),, \
$(error Need to define glib_marshal_list and glib_marshal_prefix))
marshal_h = $(glib_marshal_list:.list=.h)
marshal_c = $(glib_marshal_list:.list=.c)
marshal_list = $(addprefix $(srcdir)/, $(glib_marshal_list))
CLEANFILES += stamp-marshal
DISTCLEANFILES += $(marshal_h) $(marshal_c)
BUILT_SOURCES += $(marshal_h) $(marshal_c)
EXTRA_DIST += $(marshal_list)
stamp-marshal: $(marshal_list)
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
--prefix=$(glib_marshal_prefix) \
--header \
--valist-marshallers \
$(marshal_list) > xgen-mh \
&& (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
&& rm -f xgen-mh \
&& echo timestamp > $(@F)
$(marshal_h): stamp-marshal
@true
$(marshal_c): $(marshal_h)
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
--prefix=$(glib_marshal_prefix) \
--body \
--valist-marshallers \
--prototypes \
$(marshal_list) > xgen-mc \
&& (cmp -s xgen-mc $(marshal_c) || cp -f xgen-mc $(marshal_c)) \
&& rm -f xgen-mc

View File

@ -67,9 +67,7 @@
*
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <glib.h>
#include <clutter/clutter.h>

View File

@ -126,19 +126,19 @@ struct _CallyActorClass
gpointer _padding_dummy[32];
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType cally_actor_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
AtkObject* cally_actor_new (ClutterActor *actor);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
guint cally_actor_add_action (CallyActor *cally_actor,
const gchar *action_name,
const gchar *action_description,
const gchar *action_keybinding,
CallyActionFunc action_func);
CLUTTER_AVAILABLE_IN_1_6
CLUTTER_EXPORT
guint cally_actor_add_action_full (CallyActor *cally_actor,
const gchar *action_name,
const gchar *action_description,
@ -147,11 +147,11 @@ guint cally_actor_add_action_full (CallyActor *cally_actor,
gpointer user_data,
GDestroyNotify notify);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
gboolean cally_actor_remove_action (CallyActor *cally_actor,
gint action_id);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
gboolean cally_actor_remove_action_by_name (CallyActor *cally_actor,
const gchar *action_name);

View File

@ -74,9 +74,9 @@ struct _CallyCloneClass
gpointer _padding_dummy[8];
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType cally_clone_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
AtkObject *cally_clone_new (ClutterActor *actor);
G_END_DECLS

View File

@ -77,9 +77,9 @@ struct _CallyGroupClass
gpointer _padding_dummy[8];
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType cally_group_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
AtkObject* cally_group_new (ClutterActor *actor);
G_END_DECLS

View File

@ -34,9 +34,9 @@
G_BEGIN_DECLS
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
gboolean cally_get_cally_initialized (void);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
gboolean cally_accessibility_init (void);
G_END_DECLS

View File

@ -74,9 +74,9 @@ struct _CallyRectangleClass
gpointer _padding_dummy[8];
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType cally_rectangle_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
AtkObject* cally_rectangle_new (ClutterActor *actor);
G_END_DECLS

View File

@ -74,9 +74,9 @@ struct _CallyRootClass
gpointer _padding_dummy[16];
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType cally_root_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
AtkObject *cally_root_new (void);
G_END_DECLS

View File

@ -74,9 +74,9 @@ struct _CallyStageClass
gpointer _padding_dummy[16];
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType cally_stage_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
AtkObject *cally_stage_new (ClutterActor *actor);
G_END_DECLS

View File

@ -39,9 +39,7 @@
*
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "cally-text.h"
#include "cally-actor-private.h"

View File

@ -74,9 +74,9 @@ struct _CallyTextClass
gpointer _padding_dummy[8];
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType cally_text_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
AtkObject* cally_text_new (ClutterActor *actor);
G_END_DECLS

View File

@ -74,9 +74,9 @@ struct _CallyTextureClass
gpointer _padding_dummy[8];
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType cally_texture_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
AtkObject *cally_texture_new (ClutterActor *actor);
G_END_DECLS

View File

@ -38,9 +38,7 @@
* available any accessible object.
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <stdlib.h>
#include <string.h>
@ -144,7 +142,7 @@ cally_util_get_toolkit_name (void)
static const gchar *
cally_util_get_toolkit_version (void)
{
return CLUTTER_VERSION_S;
return MUTTER_VERSION;
}
static guint

View File

@ -74,7 +74,7 @@ struct _CallyUtilClass
gpointer _padding_dummy[8];
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType cally_util_get_type (void) G_GNUC_CONST;
void _cally_util_override_atk_util (void);

View File

@ -29,9 +29,7 @@
*
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS

View File

@ -41,9 +41,7 @@
* #ClutterAction is available since Clutter 1.4
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-action.h"

View File

@ -78,32 +78,32 @@ struct _ClutterActionClass
void (* _clutter_action8) (void);
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_action_get_type (void) G_GNUC_CONST;
/* ClutterActor API */
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_add_action (ClutterActor *self,
ClutterAction *action);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_add_action_with_name (ClutterActor *self,
const gchar *name,
ClutterAction *action);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_remove_action (ClutterActor *self,
ClutterAction *action);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_remove_action_by_name (ClutterActor *self,
const gchar *name);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterAction *clutter_actor_get_action (ClutterActor *self,
const gchar *name);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GList * clutter_actor_get_actions (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_clear_actions (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gboolean clutter_actor_has_actions (ClutterActor *self);
G_END_DECLS

View File

@ -1,6 +1,4 @@
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <math.h>

View File

@ -41,9 +41,7 @@
* #ClutterActorMeta is available since Clutter 1.4
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-actor-meta-private.h"

View File

@ -97,21 +97,21 @@ struct _ClutterActorMetaClass
void (* _clutter_meta7) (void);
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_actor_meta_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_meta_set_name (ClutterActorMeta *meta,
const gchar *name);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
const gchar * clutter_actor_meta_get_name (ClutterActorMeta *meta);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_meta_set_enabled (ClutterActorMeta *meta,
gboolean is_enabled);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
gboolean clutter_actor_meta_get_enabled (ClutterActorMeta *meta);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterActor * clutter_actor_meta_get_actor (ClutterActorMeta *meta);
G_END_DECLS

View File

@ -275,13 +275,13 @@ void _clutter_actor_set_enable_paint_unmapped
void _clutter_actor_set_has_pointer (ClutterActor *self,
gboolean has_pointer);
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *clip_volume);
void _clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *volume,
ClutterEffect *effect);
void _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
const ClutterPaintVolume *clip_volume);
void _clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
const ClutterPaintVolume *volume,
ClutterEffect *effect);
ClutterPaintVolume * _clutter_actor_get_queue_redraw_clip (ClutterActor *self);
void _clutter_actor_set_queue_redraw_clip (ClutterActor *self,

View File

@ -841,6 +841,7 @@ struct _ClutterActorPrivate
guint needs_x_expand : 1;
guint needs_y_expand : 1;
guint needs_paint_volume_update : 1;
guint had_effects_on_last_paint_volume_update : 1;
};
enum
@ -1721,6 +1722,22 @@ set_show_on_set_parent (ClutterActor *self,
}
}
static void
clutter_actor_queue_redraw_on_parent (ClutterActor *self)
{
const ClutterPaintVolume *pv;
if (!self->priv->parent)
return;
/* A relayout/redraw is underway */
if (self->priv->needs_allocation)
return;
pv = clutter_actor_get_transformed_paint_volume (self, self->priv->parent);
_clutter_actor_queue_redraw_with_clip (self->priv->parent, 0, pv);
}
/**
* clutter_actor_show:
* @self: A #ClutterActor
@ -1776,7 +1793,7 @@ clutter_actor_show (ClutterActor *self)
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]);
if (priv->parent != NULL)
clutter_actor_queue_redraw (priv->parent);
clutter_actor_queue_redraw (self);
g_object_thaw_notify (G_OBJECT (self));
}
@ -1901,8 +1918,10 @@ clutter_actor_hide (ClutterActor *self)
g_signal_emit (self, actor_signals[HIDE], 0);
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]);
if (priv->parent != NULL)
if (priv->parent != NULL && priv->needs_allocation)
clutter_actor_queue_redraw (priv->parent);
else
clutter_actor_queue_redraw_on_parent (self);
g_object_thaw_notify (G_OBJECT (self));
}
@ -2226,25 +2245,46 @@ static void
clutter_actor_real_pick (ClutterActor *self,
const ClutterColor *color)
{
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
/* the default implementation is just to paint a rectangle
* with the same size of the actor using the passed color
*/
if (clutter_actor_should_pick_paint (self))
{
static CoglPipeline *default_pick_pipeline = NULL;
ClutterActorBox box = { 0, };
CoglPipeline *pick_pipeline;
float width, height;
if (G_UNLIKELY (default_pick_pipeline == NULL))
{
CoglContext *ctx =
clutter_backend_get_cogl_context (clutter_get_default_backend ());
default_pick_pipeline = cogl_pipeline_new (ctx);
}
g_assert (default_pick_pipeline != NULL);
pick_pipeline = cogl_pipeline_copy (default_pick_pipeline);
clutter_actor_get_allocation_box (self, &box);
width = box.x2 - box.x1;
height = box.y2 - box.y1;
cogl_set_source_color4ub (color->red,
color->green,
color->blue,
color->alpha);
cogl_pipeline_set_color4ub (pick_pipeline,
color->red,
color->green,
color->blue,
color->alpha);
cogl_rectangle (0, 0, width, height);
cogl_framebuffer_draw_rectangle (framebuffer,
pick_pipeline,
0, 0,
width, height);
cogl_object_unref (pick_pipeline);
}
/* XXX - this thoroughly sucks, but we need to maintain compatibility
@ -4840,7 +4880,8 @@ clutter_actor_set_scale_factor (ClutterActor *self,
g_assert (pspec != NULL);
g_assert (scale_p != NULL);
_clutter_actor_create_transition (self, pspec, *scale_p, factor);
if (*scale_p != factor)
_clutter_actor_create_transition (self, pspec, *scale_p, factor);
}
static inline void
@ -8722,15 +8763,14 @@ _clutter_actor_get_allocation_clip (ClutterActor *self,
}
void
_clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *volume,
ClutterEffect *effect)
_clutter_actor_queue_redraw_full (ClutterActor *self,
ClutterRedrawFlags flags,
const ClutterPaintVolume *volume,
ClutterEffect *effect)
{
ClutterActorPrivate *priv = self->priv;
ClutterPaintVolume allocation_pv;
ClutterPaintVolume *pv;
gboolean should_free_pv;
ClutterPaintVolume *pv = NULL;
ClutterActor *stage;
/* Here's an outline of the actor queue redraw mechanism:
@ -8872,21 +8912,15 @@ _clutter_actor_queue_redraw_full (ClutterActor *self,
clutter_paint_volume_set_height (pv,
allocation_clip.y2 -
allocation_clip.y1);
should_free_pv = TRUE;
}
else
{
pv = volume;
should_free_pv = FALSE;
}
self->priv->queue_redraw_entry =
_clutter_stage_queue_actor_redraw (CLUTTER_STAGE (stage),
priv->queue_redraw_entry,
self,
pv);
pv ? pv : volume);
if (should_free_pv)
if (pv)
clutter_paint_volume_free (pv);
/* If this is the first redraw queued then we can directly use the
@ -9000,9 +9034,9 @@ clutter_actor_queue_redraw (ClutterActor *self)
* picking of your actor.
*/
void
_clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
ClutterPaintVolume *volume)
_clutter_actor_queue_redraw_with_clip (ClutterActor *self,
ClutterRedrawFlags flags,
const ClutterPaintVolume *volume)
{
_clutter_actor_queue_redraw_full (self,
flags, /* flags */
@ -9023,7 +9057,7 @@ _clutter_actor_queue_only_relayout (ClutterActor *self)
priv->needs_allocation)
return; /* save some cpu cycles */
#if CLUTTER_ENABLE_DEBUG
#ifdef CLUTTER_ENABLE_DEBUG
if (!CLUTTER_ACTOR_IS_TOPLEVEL (self) && CLUTTER_ACTOR_IN_RELAYOUT (self))
{
g_warning ("The actor '%s' is currently inside an allocation "
@ -10279,9 +10313,10 @@ clutter_actor_set_position (ClutterActor *self,
cur_position.x = clutter_actor_get_x (self);
cur_position.y = clutter_actor_get_y (self);
_clutter_actor_create_transition (self, obj_props[PROP_POSITION],
&cur_position,
&new_position);
if (!clutter_point_equals (&cur_position, &new_position))
_clutter_actor_create_transition (self, obj_props[PROP_POSITION],
&cur_position,
&new_position);
}
/**
@ -13640,7 +13675,7 @@ clutter_actor_set_child_above_sibling (ClutterActor *self,
sibling);
g_object_unref(child);
clutter_actor_queue_relayout (self);
clutter_actor_queue_redraw_on_parent (child);
}
/**
@ -13687,7 +13722,7 @@ clutter_actor_set_child_below_sibling (ClutterActor *self,
sibling);
g_object_unref(child);
clutter_actor_queue_relayout (self);
clutter_actor_queue_redraw_on_parent (child);
}
/**
@ -15189,9 +15224,8 @@ clutter_actor_transform_stage_point (ClutterActor *self,
* http://www.cs.cmu.edu/~ph/src/texfund/
*
* Our texture is a rectangle with origin [0, 0], so we are mapping from
* quad to rectangle only, which significantly simplifies things; the
* function calls have been unrolled, and most of the math is done in fixed
* point.
* quad to rectangle only, which significantly simplifies things.
* Function calls have been unrolled.
*/
clutter_actor_get_abs_allocation_vertices (self, v);
@ -17485,7 +17519,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
*/
effects = _clutter_meta_group_peek_metas (priv->effects);
for (l = effects;
l != NULL || (l != NULL && l->data != priv->current_effect);
l != NULL && l->data != priv->current_effect;
l = l->next)
{
if (!_clutter_effect_get_paint_volume (l->data, pv))
@ -17521,6 +17555,32 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
return TRUE;
}
static gboolean
_clutter_actor_has_active_paint_volume_override_effects (ClutterActor *self)
{
const GList *l;
if (self->priv->effects == NULL)
return FALSE;
/* We just need to all effects current effect to see
* if anyone wants to override the paint volume. If so, then
* we need to recompute, since the paint volume returned can
* change from call to call. */
for (l = _clutter_meta_group_peek_metas (self->priv->effects);
l != NULL;
l = l->next)
{
ClutterEffect *effect = l->data;
if (clutter_actor_meta_get_enabled (CLUTTER_ACTOR_META (effect)) &&
_clutter_effect_has_custom_paint_volume (effect))
return TRUE;
}
return FALSE;
}
/* The public clutter_actor_get_paint_volume API returns a const
* pointer since we return a pointer directly to the cached
* PaintVolume associated with the actor and don't want the user to
@ -17531,17 +17591,33 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
static ClutterPaintVolume *
_clutter_actor_get_paint_volume_mutable (ClutterActor *self)
{
gboolean has_paint_volume_override_effects;
ClutterActorPrivate *priv;
priv = self->priv;
has_paint_volume_override_effects = _clutter_actor_has_active_paint_volume_override_effects (self);
if (priv->paint_volume_valid)
{
if (!priv->needs_paint_volume_update)
/* If effects are applied, the actor paint volume
* needs to be recomputed on each paint, since those
* paint volumes could change over the duration of the
* effect.
*
* We also need to update the paint volume if we went
* from having effects to not having effects on the last
* paint volume update. */
if (!priv->needs_paint_volume_update &&
priv->current_effect == NULL &&
!has_paint_volume_override_effects &&
!priv->had_effects_on_last_paint_volume_update)
return &priv->paint_volume;
clutter_paint_volume_free (&priv->paint_volume);
}
priv->had_effects_on_last_paint_volume_update = has_paint_volume_override_effects;
if (_clutter_actor_get_paint_volume_real (self, &priv->paint_volume))
{
priv->paint_volume_valid = TRUE;
@ -21113,6 +21189,7 @@ clutter_actor_bind_model_with_properties (ClutterActor *self,
model_property = va_arg (args, char *);
}
va_end (args);
clutter_actor_bind_model (self, model, bind_child_with_properties, clos, bind_closure_free);
}

View File

@ -61,7 +61,7 @@ G_BEGIN_DECLS
* internal state.
*/
#define CLUTTER_ACTOR_SET_FLAGS(a,f) \
CLUTTER_MACRO_DEPRECATED_IN_1_24 \
CLUTTER_MACRO_DEPRECATED \
(((ClutterActor*)(a))->flags |= (f))
/**
@ -76,23 +76,23 @@ G_BEGIN_DECLS
* internal state.
*/
#define CLUTTER_ACTOR_UNSET_FLAGS(a,f) \
CLUTTER_MACRO_DEPRECATED_IN_1_24 \
CLUTTER_MACRO_DEPRECATED \
(((ClutterActor*)(a))->flags &= ~(f))
#define CLUTTER_ACTOR_IS_MAPPED(a) \
CLUTTER_MACRO_DEPRECATED_IN_1_24_FOR ("Deprecated macro. Use clutter_actor_is_mapped instead") \
CLUTTER_MACRO_DEPRECATED_FOR ("Deprecated macro. Use clutter_actor_is_mapped instead") \
((((ClutterActor*)(a))->flags & CLUTTER_ACTOR_MAPPED) != FALSE)
#define CLUTTER_ACTOR_IS_REALIZED(a) \
CLUTTER_MACRO_DEPRECATED_IN_1_24_FOR ("Deprecated macro. Use clutter_actor_is_realized instead") \
CLUTTER_MACRO_DEPRECATED_FOR ("Deprecated macro. Use clutter_actor_is_realized instead") \
((((ClutterActor*)(a))->flags & CLUTTER_ACTOR_REALIZED) != FALSE)
#define CLUTTER_ACTOR_IS_VISIBLE(a) \
CLUTTER_MACRO_DEPRECATED_IN_1_24_FOR ("Deprecated macro. Use clutter_actor_is_visible instead") \
CLUTTER_MACRO_DEPRECATED_FOR ("Deprecated macro. Use clutter_actor_is_visible instead") \
((((ClutterActor*)(a))->flags & CLUTTER_ACTOR_VISIBLE) != FALSE)
#define CLUTTER_ACTOR_IS_REACTIVE(a) \
CLUTTER_MACRO_DEPRECATED_IN_1_24_FOR ("Deprecated macro. Use clutter_actor_get_reactive instead") \
CLUTTER_MACRO_DEPRECATED_FOR ("Deprecated macro. Use clutter_actor_get_reactive instead") \
((((ClutterActor*)(a))->flags & CLUTTER_ACTOR_REACTIVE) != FALSE)
typedef struct _ClutterActorClass ClutterActorClass;
@ -322,97 +322,97 @@ struct _ClutterActorIter
gpointer CLUTTER_PRIVATE_FIELD (dummy5);
};
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
GType clutter_actor_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterActor * clutter_actor_new (void);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_flags (ClutterActor *self,
ClutterActorFlags flags);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_unset_flags (ClutterActor *self,
ClutterActorFlags flags);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterActorFlags clutter_actor_get_flags (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_show (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_hide (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_realize (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_unrealize (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_map (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_unmap (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_paint (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_continue_paint (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_queue_redraw (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_queue_redraw_with_clip (ClutterActor *self,
const cairo_rectangle_int_t *clip);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_queue_relayout (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_destroy (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_name (ClutterActor *self,
const gchar *name);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
const gchar * clutter_actor_get_name (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
AtkObject * clutter_actor_get_accessible (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_24
CLUTTER_EXPORT
gboolean clutter_actor_is_visible (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_24
CLUTTER_EXPORT
gboolean clutter_actor_is_mapped (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_24
CLUTTER_EXPORT
gboolean clutter_actor_is_realized (ClutterActor *self);
/* Size negotiation */
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_request_mode (ClutterActor *self,
ClutterRequestMode mode);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterRequestMode clutter_actor_get_request_mode (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_preferred_width (ClutterActor *self,
gfloat for_height,
gfloat *min_width_p,
gfloat *natural_width_p);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_preferred_height (ClutterActor *self,
gfloat for_width,
gfloat *min_height_p,
gfloat *natural_height_p);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_preferred_size (ClutterActor *self,
gfloat *min_width_p,
gfloat *min_height_p,
gfloat *natural_width_p,
gfloat *natural_height_p);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_allocate (ClutterActor *self,
const ClutterActorBox *box,
ClutterAllocationFlags flags);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_allocate_preferred_size (ClutterActor *self,
ClutterAllocationFlags flags);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_allocate_available_size (ClutterActor *self,
gfloat x,
gfloat y,
gfloat available_width,
gfloat available_height,
ClutterAllocationFlags flags);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_allocate_align_fill (ClutterActor *self,
const ClutterActorBox *box,
gdouble x_align,
@ -420,448 +420,448 @@ void clutter_actor_allocate_align_fill
gboolean x_fill,
gboolean y_fill,
ClutterAllocationFlags flags);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_allocation (ClutterActor *self,
const ClutterActorBox *box,
ClutterAllocationFlags flags);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_allocation_box (ClutterActor *self,
ClutterActorBox *box);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_allocation_vertices (ClutterActor *self,
ClutterActor *ancestor,
ClutterVertex verts[]);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_has_allocation (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_size (ClutterActor *self,
gfloat width,
gfloat height);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_size (ClutterActor *self,
gfloat *width,
gfloat *height);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_position (ClutterActor *self,
gfloat x,
gfloat y);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_position (ClutterActor *self,
gfloat *x,
gfloat *y);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_get_fixed_position_set (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_fixed_position_set (ClutterActor *self,
gboolean is_set);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_move_by (ClutterActor *self,
gfloat dx,
gfloat dy);
/* Actor geometry */
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gfloat clutter_actor_get_width (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gfloat clutter_actor_get_height (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_width (ClutterActor *self,
gfloat width);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_height (ClutterActor *self,
gfloat height);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gfloat clutter_actor_get_x (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gfloat clutter_actor_get_y (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_x (ClutterActor *self,
gfloat x);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_y (ClutterActor *self,
gfloat y);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_z_position (ClutterActor *self,
gfloat z_position);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
gfloat clutter_actor_get_z_position (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_layout_manager (ClutterActor *self,
ClutterLayoutManager *manager);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterLayoutManager * clutter_actor_get_layout_manager (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_x_align (ClutterActor *self,
ClutterActorAlign x_align);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterActorAlign clutter_actor_get_x_align (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_y_align (ClutterActor *self,
ClutterActorAlign y_align);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterActorAlign clutter_actor_get_y_align (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_margin_top (ClutterActor *self,
gfloat margin);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gfloat clutter_actor_get_margin_top (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_margin_bottom (ClutterActor *self,
gfloat margin);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gfloat clutter_actor_get_margin_bottom (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_margin_left (ClutterActor *self,
gfloat margin);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gfloat clutter_actor_get_margin_left (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_margin_right (ClutterActor *self,
gfloat margin);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gfloat clutter_actor_get_margin_right (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_margin (ClutterActor *self,
const ClutterMargin *margin);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_get_margin (ClutterActor *self,
ClutterMargin *margin);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_x_expand (ClutterActor *self,
gboolean expand);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
gboolean clutter_actor_get_x_expand (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_y_expand (ClutterActor *self,
gboolean expand);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
gboolean clutter_actor_get_y_expand (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
gboolean clutter_actor_needs_expand (ClutterActor *self,
ClutterOrientation orientation);
/* Paint */
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_clip (ClutterActor *self,
gfloat xoff,
gfloat yoff,
gfloat width,
gfloat height);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_remove_clip (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_has_clip (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_clip (ClutterActor *self,
gfloat *xoff,
gfloat *yoff,
gfloat *width,
gfloat *height);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_clip_to_allocation (ClutterActor *self,
gboolean clip_set);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_get_clip_to_allocation (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_opacity (ClutterActor *self,
guint8 opacity);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
guint8 clutter_actor_get_opacity (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
guint8 clutter_actor_get_paint_opacity (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_get_paint_visibility (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_8
CLUTTER_EXPORT
void clutter_actor_set_offscreen_redirect (ClutterActor *self,
ClutterOffscreenRedirect redirect);
CLUTTER_AVAILABLE_IN_1_8
CLUTTER_EXPORT
ClutterOffscreenRedirect clutter_actor_get_offscreen_redirect (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_should_pick_paint (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_is_in_clone_paint (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_get_paint_box (ClutterActor *self,
ClutterActorBox *box);
CLUTTER_AVAILABLE_IN_1_8
CLUTTER_EXPORT
gboolean clutter_actor_has_overlaps (ClutterActor *self);
/* Content */
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_content (ClutterActor *self,
ClutterContent *content);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterContent * clutter_actor_get_content (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_content_gravity (ClutterActor *self,
ClutterContentGravity gravity);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterContentGravity clutter_actor_get_content_gravity (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_content_scaling_filters (ClutterActor *self,
ClutterScalingFilter min_filter,
ClutterScalingFilter mag_filter);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_get_content_scaling_filters (ClutterActor *self,
ClutterScalingFilter *min_filter,
ClutterScalingFilter *mag_filter);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_content_repeat (ClutterActor *self,
ClutterContentRepeat repeat);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
ClutterContentRepeat clutter_actor_get_content_repeat (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_get_content_box (ClutterActor *self,
ClutterActorBox *box);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_background_color (ClutterActor *self,
const ClutterColor *color);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_get_background_color (ClutterActor *self,
ClutterColor *color);
CLUTTER_AVAILABLE_IN_1_6
CLUTTER_EXPORT
const ClutterPaintVolume * clutter_actor_get_paint_volume (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_6
CLUTTER_EXPORT
const ClutterPaintVolume * clutter_actor_get_transformed_paint_volume (ClutterActor *self,
ClutterActor *relative_to_ancestor);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
const ClutterPaintVolume * clutter_actor_get_default_paint_volume (ClutterActor *self);
/* Events */
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_reactive (ClutterActor *actor,
gboolean reactive);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_get_reactive (ClutterActor *actor);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_has_key_focus (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_grab_key_focus (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_event (ClutterActor *actor,
const ClutterEvent *event,
gboolean capture);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_has_pointer (ClutterActor *self);
/* Text */
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
PangoContext * clutter_actor_get_pango_context (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
PangoContext * clutter_actor_create_pango_context (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
PangoLayout * clutter_actor_create_pango_layout (ClutterActor *self,
const gchar *text);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_text_direction (ClutterActor *self,
ClutterTextDirection text_dir);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterTextDirection clutter_actor_get_text_direction (ClutterActor *self);
/* Actor hierarchy */
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_add_child (ClutterActor *self,
ClutterActor *child);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_insert_child_at_index (ClutterActor *self,
ClutterActor *child,
gint index_);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_insert_child_above (ClutterActor *self,
ClutterActor *child,
ClutterActor *sibling);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_insert_child_below (ClutterActor *self,
ClutterActor *child,
ClutterActor *sibling);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_replace_child (ClutterActor *self,
ClutterActor *old_child,
ClutterActor *new_child);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_remove_child (ClutterActor *self,
ClutterActor *child);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_remove_all_children (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_destroy_all_children (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
GList * clutter_actor_get_children (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gint clutter_actor_get_n_children (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterActor * clutter_actor_get_child_at_index (ClutterActor *self,
gint index_);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterActor * clutter_actor_get_previous_sibling (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterActor * clutter_actor_get_next_sibling (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterActor * clutter_actor_get_first_child (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterActor * clutter_actor_get_last_child (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterActor * clutter_actor_get_parent (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
gboolean clutter_actor_contains (ClutterActor *self,
ClutterActor *descendant);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterActor* clutter_actor_get_stage (ClutterActor *actor);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_child_below_sibling (ClutterActor *self,
ClutterActor *child,
ClutterActor *sibling);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_child_above_sibling (ClutterActor *self,
ClutterActor *child,
ClutterActor *sibling);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_child_at_index (ClutterActor *self,
ClutterActor *child,
gint index_);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_iter_init (ClutterActorIter *iter,
ClutterActor *root);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gboolean clutter_actor_iter_next (ClutterActorIter *iter,
ClutterActor **child);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gboolean clutter_actor_iter_prev (ClutterActorIter *iter,
ClutterActor **child);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_iter_remove (ClutterActorIter *iter);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_iter_destroy (ClutterActorIter *iter);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
gboolean clutter_actor_iter_is_valid (const ClutterActorIter *iter);
/* Transformations */
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_is_rotated (ClutterActor *self);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_is_scaled (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_pivot_point (ClutterActor *self,
gfloat pivot_x,
gfloat pivot_y);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_get_pivot_point (ClutterActor *self,
gfloat *pivot_x,
gfloat *pivot_y);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_pivot_point_z (ClutterActor *self,
gfloat pivot_z);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
gfloat clutter_actor_get_pivot_point_z (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_rotation_angle (ClutterActor *self,
ClutterRotateAxis axis,
gdouble angle);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
gdouble clutter_actor_get_rotation_angle (ClutterActor *self,
ClutterRotateAxis axis);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_set_scale (ClutterActor *self,
gdouble scale_x,
gdouble scale_y);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_scale (ClutterActor *self,
gdouble *scale_x,
gdouble *scale_y);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_scale_z (ClutterActor *self,
gdouble scale_z);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
gdouble clutter_actor_get_scale_z (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_translation (ClutterActor *self,
gfloat translate_x,
gfloat translate_y,
gfloat translate_z);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_get_translation (ClutterActor *self,
gfloat *translate_x,
gfloat *translate_y,
gfloat *translate_z);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_transform (ClutterActor *self,
const ClutterMatrix *transform);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_get_transform (ClutterActor *self,
ClutterMatrix *transform);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_set_child_transform (ClutterActor *self,
const ClutterMatrix *transform);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_actor_get_child_transform (ClutterActor *self,
ClutterMatrix *transform);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_transformed_position (ClutterActor *self,
gfloat *x,
gfloat *y);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_transformed_size (ClutterActor *self,
gfloat *width,
gfloat *height);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_actor_transform_stage_point (ClutterActor *self,
gfloat x,
gfloat y,
gfloat *x_out,
gfloat *y_out);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
ClutterVertex verts[]);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_apply_transform_to_point (ClutterActor *self,
const ClutterVertex *point,
ClutterVertex *vertex);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_actor_apply_relative_transform_to_point (ClutterActor *self,
ClutterActor *ancestor,
const ClutterVertex *point,
ClutterVertex *vertex);
/* Implicit animations */
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_save_easing_state (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_restore_easing_state (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_easing_mode (ClutterActor *self,
ClutterAnimationMode mode);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterAnimationMode clutter_actor_get_easing_mode (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_easing_duration (ClutterActor *self,
guint msecs);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
guint clutter_actor_get_easing_duration (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_set_easing_delay (ClutterActor *self,
guint msecs);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
guint clutter_actor_get_easing_delay (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterTransition * clutter_actor_get_transition (ClutterActor *self,
const char *name);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_add_transition (ClutterActor *self,
const char *name,
ClutterTransition *transition);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_remove_transition (ClutterActor *self,
const char *name);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_actor_remove_all_transitions (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_16
CLUTTER_EXPORT
gboolean clutter_actor_has_mapped_clones (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_22
CLUTTER_EXPORT
void clutter_actor_set_opacity_override (ClutterActor *self,
gint opacity);
CLUTTER_AVAILABLE_IN_1_22
CLUTTER_EXPORT
gint clutter_actor_get_opacity_override (ClutterActor *self);
/**
@ -883,13 +883,13 @@ gint clutter_actor_get_opacity_override
typedef ClutterActor * (* ClutterActorCreateChildFunc) (gpointer item,
gpointer user_data);
CLUTTER_AVAILABLE_IN_1_24
CLUTTER_EXPORT
void clutter_actor_bind_model (ClutterActor *self,
GListModel *model,
ClutterActorCreateChildFunc create_child_func,
gpointer user_data,
GDestroyNotify notify);
CLUTTER_AVAILABLE_IN_1_24
CLUTTER_EXPORT
void clutter_actor_bind_model_with_properties (ClutterActor *self,
GListModel *model,
GType child_type,

View File

@ -34,9 +34,7 @@
* #ClutterAlignConstraint is available since Clutter 1.4
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-align-constraint.h"

View File

@ -48,28 +48,28 @@ G_BEGIN_DECLS
typedef struct _ClutterAlignConstraint ClutterAlignConstraint;
typedef struct _ClutterAlignConstraintClass ClutterAlignConstraintClass;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_align_constraint_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterConstraint *clutter_align_constraint_new (ClutterActor *source,
ClutterAlignAxis axis,
gfloat factor);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_align_constraint_set_source (ClutterAlignConstraint *align,
ClutterActor *source);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterActor * clutter_align_constraint_get_source (ClutterAlignConstraint *align);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_align_constraint_set_align_axis (ClutterAlignConstraint *align,
ClutterAlignAxis axis);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterAlignAxis clutter_align_constraint_get_align_axis (ClutterAlignConstraint *align);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_align_constraint_set_factor (ClutterAlignConstraint *align,
gfloat factor);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
gfloat clutter_align_constraint_get_factor (ClutterAlignConstraint *align);
G_END_DECLS

View File

@ -45,9 +45,7 @@
* #ClutterAnimatable is available since Clutter 1.0
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS

View File

@ -95,21 +95,21 @@ struct _ClutterAnimatableIface
GValue *value);
};
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
GType clutter_animatable_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
GParamSpec *clutter_animatable_find_property (ClutterAnimatable *animatable,
const gchar *property_name);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_animatable_get_initial_state (ClutterAnimatable *animatable,
const gchar *property_name,
GValue *value);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_animatable_set_final_state (ClutterAnimatable *animatable,
const gchar *property_name,
const GValue *value);
CLUTTER_AVAILABLE_IN_1_8
CLUTTER_EXPORT
gboolean clutter_animatable_interpolate_value (ClutterAnimatable *animatable,
const gchar *property_name,
ClutterInterval *interval,

View File

@ -135,7 +135,7 @@ gboolean _clutter_backend_translate_event (Clutter
gpointer native,
ClutterEvent *event);
CLUTTER_AVAILABLE_IN_MUTTER
CLUTTER_EXPORT
void _clutter_backend_add_event_translator (ClutterBackend *backend,
ClutterEventTranslator *translator);
@ -150,7 +150,7 @@ gint32 _clutter_backend_get_units_serial (Clutter
PangoDirection _clutter_backend_get_keymap_direction (ClutterBackend *backend);
CLUTTER_AVAILABLE_IN_MUTTER
CLUTTER_EXPORT
void _clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend);
void clutter_set_allowed_drivers (const char *drivers);

View File

@ -38,9 +38,7 @@
* #ClutterBackend is available since Clutter 0.4
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
@ -53,7 +51,6 @@
#include "clutter-stage-manager-private.h"
#include "clutter-stage-private.h"
#include "clutter-stage-window.h"
#include "clutter-version.h"
#include "clutter-device-manager-private.h"
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
@ -433,7 +430,7 @@ clutter_backend_real_get_features (ClutterBackend *backend)
if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_THROTTLE))
{
CLUTTER_NOTE (BACKEND, "Cogl supports swap buffers throttling");
flags |= CLUTTER_FEATURE_SYNC_TO_VBLANK;
flags |= CLUTTER_FEATURE_SWAP_THROTTLE;
}
else
CLUTTER_NOTE (BACKEND, "Cogl doesn't support swap buffers throttling");

View File

@ -53,34 +53,34 @@ G_BEGIN_DECLS
typedef struct _ClutterBackend ClutterBackend;
typedef struct _ClutterBackendClass ClutterBackendClass;
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
GType clutter_backend_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterBackend * clutter_get_default_backend (void);
CLUTTER_AVAILABLE_IN_1_16
CLUTTER_EXPORT
void clutter_set_windowing_backend (const char *backend_type);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gdouble clutter_backend_get_resolution (ClutterBackend *backend);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_backend_set_font_options (ClutterBackend *backend,
const cairo_font_options_t *options);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
const cairo_font_options_t * clutter_backend_get_font_options (ClutterBackend *backend);
CLUTTER_AVAILABLE_IN_1_8
CLUTTER_EXPORT
CoglContext * clutter_backend_get_cogl_context (ClutterBackend *backend);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_backend_bell_notify (ClutterBackend *backend);
CLUTTER_AVAILABLE_IN_MUTTER
CLUTTER_EXPORT
ClutterInputMethod * clutter_backend_get_input_method (ClutterBackend *backend);
CLUTTER_AVAILABLE_IN_MUTTER
CLUTTER_EXPORT
void clutter_backend_set_input_method (ClutterBackend *backend,
ClutterInputMethod *method);
G_END_DECLS

View File

@ -30,9 +30,7 @@
* across the whole API.
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-types.h"
#include "clutter-private.h"

View File

@ -43,9 +43,7 @@
* #ClutterBinLayout is available since Clutter 1.2
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <math.h>

View File

@ -74,10 +74,10 @@ struct _ClutterBinLayoutClass
ClutterLayoutManagerClass parent_class;
};
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
GType clutter_bin_layout_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
ClutterLayoutManager * clutter_bin_layout_new (ClutterBinAlignment x_align,
ClutterBinAlignment y_align);

View File

@ -80,9 +80,7 @@
* #ClutterBindConstraint is available since Clutter 1.4
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <math.h>

View File

@ -48,28 +48,28 @@ G_BEGIN_DECLS
typedef struct _ClutterBindConstraint ClutterBindConstraint;
typedef struct _ClutterBindConstraintClass ClutterBindConstraintClass;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_bind_constraint_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterConstraint * clutter_bind_constraint_new (ClutterActor *source,
ClutterBindCoordinate coordinate,
gfloat offset);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_bind_constraint_set_source (ClutterBindConstraint *constraint,
ClutterActor *source);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterActor * clutter_bind_constraint_get_source (ClutterBindConstraint *constraint);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_bind_constraint_set_coordinate (ClutterBindConstraint *constraint,
ClutterBindCoordinate coordinate);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterBindCoordinate clutter_bind_constraint_get_coordinate (ClutterBindConstraint *constraint);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_bind_constraint_set_offset (ClutterBindConstraint *constraint,
gfloat offset);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
gfloat clutter_bind_constraint_get_offset (ClutterBindConstraint *constraint);
G_END_DECLS

View File

@ -94,9 +94,7 @@
* #ClutterBindingPool is available since Clutter 1.0
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-binding-pool.h"
#include "clutter-debug.h"

View File

@ -71,17 +71,17 @@ typedef gboolean (* ClutterBindingActionFunc) (GObject *gobject,
ClutterModifierType modifiers,
gpointer user_data);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
GType clutter_binding_pool_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
ClutterBindingPool * clutter_binding_pool_new (const gchar *name);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
ClutterBindingPool * clutter_binding_pool_get_for_class (gpointer klass);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
ClutterBindingPool * clutter_binding_pool_find (const gchar *name);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_binding_pool_install_action (ClutterBindingPool *pool,
const gchar *action_name,
guint key_val,
@ -89,44 +89,44 @@ void clutter_binding_pool_install_action (ClutterBindingPool
GCallback callback,
gpointer data,
GDestroyNotify notify);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_binding_pool_install_closure (ClutterBindingPool *pool,
const gchar *action_name,
guint key_val,
ClutterModifierType modifiers,
GClosure *closure);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_binding_pool_override_action (ClutterBindingPool *pool,
guint key_val,
ClutterModifierType modifiers,
GCallback callback,
gpointer data,
GDestroyNotify notify);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_binding_pool_override_closure (ClutterBindingPool *pool,
guint key_val,
ClutterModifierType modifiers,
GClosure *closure);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
const gchar * clutter_binding_pool_find_action (ClutterBindingPool *pool,
guint key_val,
ClutterModifierType modifiers);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_binding_pool_remove_action (ClutterBindingPool *pool,
guint key_val,
ClutterModifierType modifiers);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
gboolean clutter_binding_pool_activate (ClutterBindingPool *pool,
guint key_val,
ClutterModifierType modifiers,
GObject *gobject);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_binding_pool_block_action (ClutterBindingPool *pool,
const gchar *action_name);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_binding_pool_unblock_action (ClutterBindingPool *pool,
const gchar *action_name);

View File

@ -37,9 +37,7 @@
#define CLUTTER_IS_BLUR_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BLUR_EFFECT))
#define CLUTTER_BLUR_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BLUR_EFFECT, ClutterBlurEffectClass))
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
@ -162,6 +160,7 @@ static void
clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect)
{
ClutterBlurEffect *self = CLUTTER_BLUR_EFFECT (effect);
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
guint8 paint_opacity;
paint_opacity = clutter_actor_get_paint_opacity (self->actor);
@ -171,11 +170,11 @@ clutter_blur_effect_paint_target (ClutterOffscreenEffect *effect)
paint_opacity,
paint_opacity,
paint_opacity);
cogl_push_source (self->pipeline);
cogl_rectangle (0, 0, self->tex_width, self->tex_height);
cogl_pop_source ();
cogl_framebuffer_draw_rectangle (framebuffer,
self->pipeline,
0, 0,
self->tex_width, self->tex_height);
}
static gboolean

View File

@ -48,10 +48,10 @@ G_BEGIN_DECLS
typedef struct _ClutterBlurEffect ClutterBlurEffect;
typedef struct _ClutterBlurEffectClass ClutterBlurEffectClass;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_blur_effect_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterEffect *clutter_blur_effect_new (void);
G_END_DECLS

View File

@ -48,9 +48,7 @@
* #ClutterBoxLayout is available since Clutter 1.2
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <math.h>

View File

@ -77,41 +77,41 @@ struct _ClutterBoxLayoutClass
ClutterLayoutManagerClass parent_class;
};
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
GType clutter_box_layout_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
ClutterLayoutManager * clutter_box_layout_new (void);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_box_layout_set_orientation (ClutterBoxLayout *layout,
ClutterOrientation orientation);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
ClutterOrientation clutter_box_layout_get_orientation (ClutterBoxLayout *layout);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
void clutter_box_layout_set_spacing (ClutterBoxLayout *layout,
guint spacing);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
guint clutter_box_layout_get_spacing (ClutterBoxLayout *layout);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
void clutter_box_layout_set_homogeneous (ClutterBoxLayout *layout,
gboolean homogeneous);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
gboolean clutter_box_layout_get_homogeneous (ClutterBoxLayout *layout);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
void clutter_box_layout_set_pack_start (ClutterBoxLayout *layout,
gboolean pack_start);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
gboolean clutter_box_layout_get_pack_start (ClutterBoxLayout *layout);
CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_box_layout_set_orientation)
CLUTTER_DEPRECATED_FOR(clutter_box_layout_set_orientation)
void clutter_box_layout_set_vertical (ClutterBoxLayout *layout,
gboolean vertical);
CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_box_layout_get_orientation)
CLUTTER_DEPRECATED_FOR(clutter_box_layout_get_orientation)
gboolean clutter_box_layout_get_vertical (ClutterBoxLayout *layout);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
void clutter_box_layout_pack (ClutterBoxLayout *layout,
ClutterActor *actor,
gboolean expand,
@ -119,48 +119,48 @@ void clutter_box_layout_pack (ClutterBoxLayou
gboolean y_fill,
ClutterBoxAlignment x_align,
ClutterBoxAlignment y_align);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
void clutter_box_layout_set_alignment (ClutterBoxLayout *layout,
ClutterActor *actor,
ClutterBoxAlignment x_align,
ClutterBoxAlignment y_align);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
void clutter_box_layout_get_alignment (ClutterBoxLayout *layout,
ClutterActor *actor,
ClutterBoxAlignment *x_align,
ClutterBoxAlignment *y_align);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
void clutter_box_layout_set_fill (ClutterBoxLayout *layout,
ClutterActor *actor,
gboolean x_fill,
gboolean y_fill);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
void clutter_box_layout_get_fill (ClutterBoxLayout *layout,
ClutterActor *actor,
gboolean *x_fill,
gboolean *y_fill);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
void clutter_box_layout_set_expand (ClutterBoxLayout *layout,
ClutterActor *actor,
gboolean expand);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
gboolean clutter_box_layout_get_expand (ClutterBoxLayout *layout,
ClutterActor *actor);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
void clutter_box_layout_set_use_animations (ClutterBoxLayout *layout,
gboolean animate);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
gboolean clutter_box_layout_get_use_animations (ClutterBoxLayout *layout);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
void clutter_box_layout_set_easing_mode (ClutterBoxLayout *layout,
gulong mode);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
gulong clutter_box_layout_get_easing_mode (ClutterBoxLayout *layout);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
void clutter_box_layout_set_easing_duration (ClutterBoxLayout *layout,
guint msecs);
CLUTTER_DEPRECATED_IN_1_12
CLUTTER_DEPRECATED
guint clutter_box_layout_get_easing_duration (ClutterBoxLayout *layout);
G_END_DECLS

View File

@ -37,9 +37,7 @@
#define CLUTTER_IS_BRIGHTNESS_CONTRAST_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BRIGHTNESS_CONTRAST_EFFECT))
#define CLUTTER_BRIGHTNESS_CONTRAST_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BRIGHTNESS_CONTRAST_EFFECT, ClutterBrightnessContrastEffectClass))
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <math.h>
@ -180,6 +178,7 @@ static void
clutter_brightness_contrast_effect_paint_target (ClutterOffscreenEffect *effect)
{
ClutterBrightnessContrastEffect *self = CLUTTER_BRIGHTNESS_CONTRAST_EFFECT (effect);
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
ClutterActor *actor;
guint8 paint_opacity;
@ -191,11 +190,11 @@ clutter_brightness_contrast_effect_paint_target (ClutterOffscreenEffect *effect)
paint_opacity,
paint_opacity,
paint_opacity);
cogl_push_source (self->pipeline);
cogl_rectangle (0, 0, self->tex_width, self->tex_height);
cogl_pop_source ();
cogl_framebuffer_draw_rectangle (framebuffer,
self->pipeline,
0, 0,
self->tex_width, self->tex_height);
}
static void

View File

@ -49,35 +49,35 @@ G_BEGIN_DECLS
typedef struct _ClutterBrightnessContrastEffect ClutterBrightnessContrastEffect;
typedef struct _ClutterBrightnessContrastEffectClass ClutterBrightnessContrastEffectClass;
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
GType clutter_brightness_contrast_effect_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterEffect * clutter_brightness_contrast_effect_new (void);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_brightness_contrast_effect_set_brightness_full (ClutterBrightnessContrastEffect *effect,
float red,
float green,
float blue);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_brightness_contrast_effect_set_brightness (ClutterBrightnessContrastEffect *effect,
float brightness);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_brightness_contrast_effect_get_brightness (ClutterBrightnessContrastEffect *effect,
float *red,
float *green,
float *blue);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_brightness_contrast_effect_set_contrast_full (ClutterBrightnessContrastEffect *effect,
float red,
float green,
float blue);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_brightness_contrast_effect_set_contrast (ClutterBrightnessContrastEffect *effect,
float contrast);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_brightness_contrast_effect_get_contrast (ClutterBrightnessContrastEffect *effect,
float *red,
float *green,

View File

@ -0,0 +1,14 @@
/* Mutter version */
#mesondefine MUTTER_VERSION
/* List of Cogl drivers */
#mesondefine CLUTTER_DRIVERS
/* Have evdev support for input handling */
#mesondefine HAVE_EVDEV
/* Building with libwacom for advanced tablet management */
#mesondefine HAVE_LIBWACOM
/* Supports PangoFt2 */
#mesondefine HAVE_PANGO_FT2

View File

@ -27,9 +27,7 @@
* Clutter provides some utility functions for using Cairo.
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-cairo.h"
#include "clutter-color.h"

View File

@ -50,9 +50,9 @@ G_BEGIN_DECLS
#define CLUTTER_CAIRO_FORMAT_ARGB32 (COGL_PIXEL_FORMAT_ARGB_8888_PRE)
#endif
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_cairo_clear (cairo_t *cr);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_cairo_set_source_color (cairo_t *cr,
const ClutterColor *color);

View File

@ -42,9 +42,7 @@
* #ClutterCanvas is available since Clutter 1.10.
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <cogl/cogl.h>
#include <cairo-gobject.h>

View File

@ -85,20 +85,20 @@ struct _ClutterCanvasClass
gpointer _padding[16];
};
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
GType clutter_canvas_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
ClutterContent * clutter_canvas_new (void);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gboolean clutter_canvas_set_size (ClutterCanvas *canvas,
int width,
int height);
CLUTTER_AVAILABLE_IN_1_18
CLUTTER_EXPORT
void clutter_canvas_set_scale_factor (ClutterCanvas *canvas,
int scale);
CLUTTER_AVAILABLE_IN_1_18
CLUTTER_EXPORT
int clutter_canvas_get_scale_factor (ClutterCanvas *canvas);
G_END_DECLS

View File

@ -36,9 +36,8 @@
*
* #ClutterChildMeta is available since Clutter 0.8
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-child-meta.h"
#include "clutter-container.h"

View File

@ -109,12 +109,12 @@ struct _ClutterChildMetaClass
GObjectClass parent_class;
};
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
GType clutter_child_meta_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterContainer * clutter_child_meta_get_container (ClutterChildMeta *data);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterActor * clutter_child_meta_get_actor (ClutterChildMeta *data);
G_END_DECLS

View File

@ -92,9 +92,7 @@
* #ClutterClickAction is available since Clutter 1.4
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-click-action.h"

View File

@ -97,22 +97,22 @@ struct _ClutterClickActionClass
void (* _clutter_click_action7) (void);
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_click_action_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterAction * clutter_click_action_new (void);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
guint clutter_click_action_get_button (ClutterClickAction *action);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterModifierType clutter_click_action_get_state (ClutterClickAction *action);
CLUTTER_AVAILABLE_IN_1_8
CLUTTER_EXPORT
void clutter_click_action_get_coords (ClutterClickAction *action,
gfloat *press_x,
gfloat *press_y);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_click_action_release (ClutterClickAction *action);
G_END_DECLS

View File

@ -37,9 +37,7 @@
* #ClutterClone is available since Clutter 1.0
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#include "clutter-actor-private.h"

View File

@ -78,15 +78,15 @@ struct _ClutterCloneClass
void (*_clutter_actor_clone4) (void);
};
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
GType clutter_clone_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
ClutterActor * clutter_clone_new (ClutterActor *source);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_clone_set_source (ClutterClone *self,
ClutterActor *source);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
ClutterActor * clutter_clone_get_source (ClutterClone *self);
G_END_DECLS

View File

@ -33,9 +33,7 @@
* The alpha channel is fully opaque at 255 and fully transparent at 0.
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <math.h>

View File

@ -68,76 +68,76 @@ struct _ClutterColor
*/
#define CLUTTER_COLOR_INIT(r,g,b,a) { (r), (g), (b), (a) }
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
GType clutter_color_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterColor *clutter_color_new (guint8 red,
guint8 green,
guint8 blue,
guint8 alpha);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
ClutterColor *clutter_color_alloc (void);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
ClutterColor *clutter_color_init (ClutterColor *color,
guint8 red,
guint8 green,
guint8 blue,
guint8 alpha);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterColor *clutter_color_copy (const ClutterColor *color);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_color_free (ClutterColor *color);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_color_add (const ClutterColor *a,
const ClutterColor *b,
ClutterColor *result);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_color_subtract (const ClutterColor *a,
const ClutterColor *b,
ClutterColor *result);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_color_lighten (const ClutterColor *color,
ClutterColor *result);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_color_darken (const ClutterColor *color,
ClutterColor *result);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_color_shade (const ClutterColor *color,
gdouble factor,
ClutterColor *result);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gchar * clutter_color_to_string (const ClutterColor *color);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
gboolean clutter_color_from_string (ClutterColor *color,
const gchar *str);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_color_to_hls (const ClutterColor *color,
gfloat *hue,
gfloat *luminance,
gfloat *saturation);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_color_from_hls (ClutterColor *color,
gfloat hue,
gfloat luminance,
gfloat saturation);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
guint32 clutter_color_to_pixel (const ClutterColor *color);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_color_from_pixel (ClutterColor *color,
guint32 pixel);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
guint clutter_color_hash (gconstpointer v);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
gboolean clutter_color_equal (gconstpointer v1,
gconstpointer v2);
CLUTTER_AVAILABLE_IN_1_6
CLUTTER_EXPORT
void clutter_color_interpolate (const ClutterColor *initial,
const ClutterColor *final,
gdouble progress,
@ -177,22 +177,22 @@ struct _ClutterParamSpecColor
ClutterColor *default_value;
};
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
void clutter_value_set_color (GValue *value,
const ClutterColor *color);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
const ClutterColor * clutter_value_get_color (const GValue *value);
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
GType clutter_param_color_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_0
CLUTTER_EXPORT
GParamSpec * clutter_param_spec_color (const gchar *name,
const gchar *nick,
const gchar *blurb,
const ClutterColor *default_value,
GParamFlags flags);
CLUTTER_AVAILABLE_IN_1_6
CLUTTER_EXPORT
const ClutterColor *clutter_color_get_static (ClutterStaticColor color);
G_END_DECLS

View File

@ -37,9 +37,7 @@
#define CLUTTER_IS_COLORIZE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_COLORIZE_EFFECT))
#define CLUTTER_COLORIZE_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_COLORIZE_EFFECT, ClutterColorizeEffectClass))
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
@ -150,6 +148,7 @@ static void
clutter_colorize_effect_paint_target (ClutterOffscreenEffect *effect)
{
ClutterColorizeEffect *self = CLUTTER_COLORIZE_EFFECT (effect);
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
ClutterActor *actor;
guint8 paint_opacity;
@ -161,11 +160,11 @@ clutter_colorize_effect_paint_target (ClutterOffscreenEffect *effect)
paint_opacity,
paint_opacity,
paint_opacity);
cogl_push_source (self->pipeline);
cogl_rectangle (0, 0, self->tex_width, self->tex_height);
cogl_pop_source ();
cogl_framebuffer_draw_rectangle (framebuffer,
self->pipeline,
0, 0,
self->tex_width, self->tex_height);
}
static void

View File

@ -49,16 +49,16 @@ G_BEGIN_DECLS
typedef struct _ClutterColorizeEffect ClutterColorizeEffect;
typedef struct _ClutterColorizeEffectClass ClutterColorizeEffectClass;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_colorize_effect_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterEffect *clutter_colorize_effect_new (const ClutterColor *tint);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_colorize_effect_set_tint (ClutterColorizeEffect *effect,
const ClutterColor *tint);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_colorize_effect_get_tint (ClutterColorizeEffect *effect,
ClutterColor *tint);

View File

@ -128,9 +128,7 @@
* can be recovered at any point using clutter_actor_meta_get_actor().
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <string.h>

View File

@ -96,32 +96,32 @@ struct _ClutterConstraintClass
void (* _clutter_constraint7) (void);
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_constraint_get_type (void) G_GNUC_CONST;
/* ClutterActor API */
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_add_constraint (ClutterActor *self,
ClutterConstraint *constraint);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_add_constraint_with_name (ClutterActor *self,
const gchar *name,
ClutterConstraint *constraint);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_remove_constraint (ClutterActor *self,
ClutterConstraint *constraint);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_remove_constraint_by_name (ClutterActor *self,
const gchar *name);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GList * clutter_actor_get_constraints (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterConstraint *clutter_actor_get_constraint (ClutterActor *self,
const gchar *name);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_clear_constraints (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gboolean clutter_actor_has_constraints (ClutterActor *self);
G_END_DECLS

View File

@ -26,9 +26,7 @@
* Author: Emmanuele Bassi <ebassi@openedhand.com>
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <stdarg.h>
#include <glib-object.h>

View File

@ -141,52 +141,52 @@ struct _ClutterContainerIface
GParamSpec *pspec);
};
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
GType clutter_container_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterActor * clutter_container_find_child_by_name (ClutterContainer *container,
const gchar *child_name);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
GParamSpec * clutter_container_class_find_child_property (GObjectClass *klass,
const gchar *property_name);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
GParamSpec ** clutter_container_class_list_child_properties (GObjectClass *klass,
guint *n_properties);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_container_create_child_meta (ClutterContainer *container,
ClutterActor *actor);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_container_destroy_child_meta (ClutterContainer *container,
ClutterActor *actor);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterChildMeta * clutter_container_get_child_meta (ClutterContainer *container,
ClutterActor *actor);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_container_child_set_property (ClutterContainer *container,
ClutterActor *child,
const gchar * property,
const GValue *value);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_container_child_get_property (ClutterContainer *container,
ClutterActor *child,
const gchar *property,
GValue *value);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_container_child_set (ClutterContainer *container,
ClutterActor *actor,
const gchar *first_prop,
...) G_GNUC_NULL_TERMINATED;
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_container_child_get (ClutterContainer *container,
ClutterActor *actor,
const gchar *first_prop,
...) G_GNUC_NULL_TERMINATED;
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_container_child_notify (ClutterContainer *container,
ClutterActor *child,
GParamSpec *pspec);

View File

@ -36,9 +36,7 @@
* #ClutterContent is available since Clutter 1.10.
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-content-private.h"

View File

@ -88,14 +88,14 @@ struct _ClutterContentIface
void (* invalidate) (ClutterContent *content);
};
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
GType clutter_content_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gboolean clutter_content_get_preferred_size (ClutterContent *content,
gfloat *width,
gfloat *height);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
void clutter_content_invalidate (ClutterContent *content);
G_END_DECLS

View File

@ -39,7 +39,8 @@ typedef enum {
CLUTTER_DEBUG_DISABLE_CULLING = 1 << 4,
CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT = 1 << 5,
CLUTTER_DEBUG_CONTINUOUS_REDRAW = 1 << 6,
CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7
CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7,
CLUTTER_DEBUG_PAINT_DAMAGE_REGION = 1 << 8,
} ClutterDrawDebugFlag;
#ifdef CLUTTER_ENABLE_DEBUG

View File

@ -51,9 +51,7 @@
* deformation algorithm.
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#include "clutter-deform-effect.h"

View File

@ -92,24 +92,24 @@ struct _ClutterDeformEffectClass
void (*_clutter_deform7) (void);
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_deform_effect_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_deform_effect_set_back_material (ClutterDeformEffect *effect,
CoglHandle material);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
CoglHandle clutter_deform_effect_get_back_material (ClutterDeformEffect *effect);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_deform_effect_set_n_tiles (ClutterDeformEffect *effect,
guint x_tiles,
guint y_tiles);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_deform_effect_get_n_tiles (ClutterDeformEffect *effect,
guint *x_tiles,
guint *y_tiles);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_deform_effect_invalidate (ClutterDeformEffect *effect);
G_END_DECLS

View File

@ -26,7 +26,6 @@
#include "deprecated/clutter-keysyms.h"
#include "deprecated/clutter-list-model.h"
#include "deprecated/clutter-main.h"
#include "deprecated/clutter-media.h"
#include "deprecated/clutter-model.h"
#include "deprecated/clutter-rectangle.h"
#include "deprecated/clutter-score.h"

View File

@ -39,9 +39,7 @@
#define CLUTTER_IS_DESATURATE_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_DESATURATE_EFFECT))
#define CLUTTER_DESATURATE_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_DESATURATE_EFFECT, ClutterDesaturateEffectClass))
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
@ -157,6 +155,7 @@ static void
clutter_desaturate_effect_paint_target (ClutterOffscreenEffect *effect)
{
ClutterDesaturateEffect *self = CLUTTER_DESATURATE_EFFECT (effect);
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
ClutterActor *actor;
CoglHandle texture;
guint8 paint_opacity;
@ -172,13 +171,12 @@ clutter_desaturate_effect_paint_target (ClutterOffscreenEffect *effect)
paint_opacity,
paint_opacity,
paint_opacity);
cogl_push_source (self->pipeline);
cogl_rectangle (0, 0,
cogl_texture_get_width (texture),
cogl_texture_get_height (texture));
cogl_pop_source ();
cogl_framebuffer_draw_rectangle (framebuffer,
self->pipeline,
0, 0,
cogl_texture_get_width (texture),
cogl_texture_get_height (texture));
}
static void

View File

@ -48,16 +48,16 @@ G_BEGIN_DECLS
typedef struct _ClutterDesaturateEffect ClutterDesaturateEffect;
typedef struct _ClutterDesaturateEffectClass ClutterDesaturateEffectClass;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_desaturate_effect_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterEffect *clutter_desaturate_effect_new (gdouble factor);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_desaturate_effect_set_factor (ClutterDesaturateEffect *effect,
gdouble factor);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
gdouble clutter_desaturate_effect_get_factor (ClutterDesaturateEffect *effect);
G_END_DECLS

View File

@ -167,6 +167,10 @@ struct _ClutterInputDeviceClass
gboolean (* is_grouped) (ClutterInputDevice *device,
ClutterInputDevice *other_device);
gboolean (* get_physical_size) (ClutterInputDevice *device,
gdouble *width,
gdouble *height);
/* Keyboard accessbility */
void (* process_kbd_a11y_event) (ClutterEvent *event,
ClutterInputDevice *device,

View File

@ -36,9 +36,7 @@
* #ClutterDeviceManager is available since Clutter 1.2
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-backend-private.h"
#include "clutter-debug.h"

View File

@ -125,34 +125,34 @@ struct _ClutterDeviceManagerClass
gpointer _padding[6];
};
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
GType clutter_device_manager_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
ClutterDeviceManager *clutter_device_manager_get_default (void);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
GSList * clutter_device_manager_list_devices (ClutterDeviceManager *device_manager);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
const GSList * clutter_device_manager_peek_devices (ClutterDeviceManager *device_manager);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
ClutterInputDevice * clutter_device_manager_get_device (ClutterDeviceManager *device_manager,
gint device_id);
CLUTTER_AVAILABLE_IN_1_2
CLUTTER_EXPORT
ClutterInputDevice * clutter_device_manager_get_core_device (ClutterDeviceManager *device_manager,
ClutterInputDeviceType device_type);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterVirtualInputDevice *clutter_device_manager_create_virtual_device (ClutterDeviceManager *device_manager,
ClutterInputDeviceType device_type);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
ClutterVirtualDeviceType clutter_device_manager_get_supported_virtual_device_types (ClutterDeviceManager *device_manager);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_device_manager_set_kbd_a11y_settings (ClutterDeviceManager *device_manager,
ClutterKbdA11ySettings *settings);
CLUTTER_AVAILABLE_IN_ALL
CLUTTER_EXPORT
void clutter_device_manager_get_kbd_a11y_settings (ClutterDeviceManager *device_manager,
ClutterKbdA11ySettings *settings);

View File

@ -63,9 +63,7 @@
* #ClutterDragAction is available since Clutter 1.4
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-drag-action.h"

View File

@ -105,45 +105,45 @@ struct _ClutterDragActionClass
void (* _clutter_drag_action4) (void);
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_drag_action_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterAction * clutter_drag_action_new (void);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_drag_action_set_drag_threshold (ClutterDragAction *action,
gint x_threshold,
gint y_threshold);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_drag_action_get_drag_threshold (ClutterDragAction *action,
guint *x_threshold,
guint *y_threshold);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_drag_action_set_drag_handle (ClutterDragAction *action,
ClutterActor *handle);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterActor * clutter_drag_action_get_drag_handle (ClutterDragAction *action);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_drag_action_set_drag_axis (ClutterDragAction *action,
ClutterDragAxis axis);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterDragAxis clutter_drag_action_get_drag_axis (ClutterDragAction *action);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_drag_action_get_press_coords (ClutterDragAction *action,
gfloat *press_x,
gfloat *press_y);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_drag_action_get_motion_coords (ClutterDragAction *action,
gfloat *motion_x,
gfloat *motion_y);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
gboolean clutter_drag_action_get_drag_area (ClutterDragAction *action,
ClutterRect *drag_area);
CLUTTER_AVAILABLE_IN_1_12
CLUTTER_EXPORT
void clutter_drag_action_set_drag_area (ClutterDragAction *action,
const ClutterRect *drag_area);

View File

@ -58,9 +58,7 @@
* #ClutterDropAction is available since Clutter 1.8
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-drop-action.h"

View File

@ -104,10 +104,10 @@ struct _ClutterDropActionClass
void (*_clutter_drop_action8) (void);
};
CLUTTER_AVAILABLE_IN_1_8
CLUTTER_EXPORT
GType clutter_drop_action_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_8
CLUTTER_EXPORT
ClutterAction * clutter_drop_action_new (void);
G_END_DECLS

View File

@ -9,6 +9,7 @@ gboolean _clutter_effect_pre_paint (ClutterEffect
void _clutter_effect_post_paint (ClutterEffect *effect);
gboolean _clutter_effect_get_paint_volume (ClutterEffect *effect,
ClutterPaintVolume *volume);
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
void _clutter_effect_paint (ClutterEffect *effect,
ClutterEffectPaintFlags flags);
void _clutter_effect_pick (ClutterEffect *effect,

View File

@ -160,9 +160,7 @@
* #ClutterEffect is available since Clutter 1.4
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include "clutter-effect.h"
@ -308,6 +306,14 @@ _clutter_effect_get_paint_volume (ClutterEffect *effect,
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume (effect, volume);
}
gboolean
_clutter_effect_has_custom_paint_volume (ClutterEffect *effect)
{
g_return_val_if_fail (CLUTTER_IS_EFFECT (effect), FALSE);
return CLUTTER_EFFECT_GET_CLASS (effect)->get_paint_volume != clutter_effect_real_get_paint_volume;
}
/**
* clutter_effect_queue_repaint:
* @effect: A #ClutterEffect which needs redrawing

View File

@ -91,38 +91,38 @@ struct _ClutterEffectClass
void (* _clutter_effect6) (void);
};
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GType clutter_effect_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_1_8
CLUTTER_EXPORT
void clutter_effect_queue_repaint (ClutterEffect *effect);
/*
* ClutterActor API
*/
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_add_effect (ClutterActor *self,
ClutterEffect *effect);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_add_effect_with_name (ClutterActor *self,
const gchar *name,
ClutterEffect *effect);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_remove_effect (ClutterActor *self,
ClutterEffect *effect);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_remove_effect_by_name (ClutterActor *self,
const gchar *name);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
GList * clutter_actor_get_effects (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
ClutterEffect *clutter_actor_get_effect (ClutterActor *self,
const gchar *name);
CLUTTER_AVAILABLE_IN_1_4
CLUTTER_EXPORT
void clutter_actor_clear_effects (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_10
CLUTTER_EXPORT
gboolean clutter_actor_has_effects (ClutterActor *self);
G_END_DECLS

Some files were not shown because too many files have changed in this diff Show More