Compare commits

...

255 Commits

Author SHA1 Message Date
cb16822780 backends/native: Expose all transform modes in CRTCs
We can only honor this properly in the MUTTER_STAGE_VIEWS=1 case. When using
the legacy view, software implemented transforms are only exposed if there is
only one output, as we can only transform the entire stage there.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 19:24:35 +02:00
06112b1b0f backends/native: Set offscreen on the transformed MetaRendererViews
The texture is only created if the view is transformed at the software level,
otherwise the texture is NULL, and rendering happens on the onscreen.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 19:24:35 +02:00
c7ff89bb01 backends/native: Refactor onscreen creation into separate function
And use the right size, regarless of view transform.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 19:24:35 +02:00
f36ae220c1 backends/native: Use framebuffer size on swap_buffers implementation
Instead of ClutterStageView layout, which may be affected by transformations.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 19:24:35 +02:00
8a50db5959 backends/native: Set transform on MetaRendererViews
Only do this if mutter uses the multiple stage views feature. This
is uneffective at the moment because no back texture is set yet.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 19:24:35 +02:00
8f05b0e020 backends: Add MetaStageView::transform property
This property updates the ClutterStageView pipeline, so the texture is applied
with the corresponding transform.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 19:24:35 +02:00
534f3aa5c9 clutter/cogl: Transform swap buffers regions into onscreen coordinates
Those are given in view coordinates, so we must transform into onscreen
coordinates in order to perform swap_buffers on the right damage regions.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 19:24:35 +02:00
f1a0985e3a clutter: Hook up ClutterStageView render-to-texture
"Blit" the result on the framebuffer after each view is painted.
This of course only applies if there is an offscreen buffer to
perform any blitting. Otherwise the onscreen framebuffer is rendered
to directly.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 19:24:35 +02:00
6302ffe8ac clutter: Add infrastructure to render ClutterStageViews to offscreen
The offscreen is given through the ::back-buffer property, the ClutterStageView
will set up the the CoglPipeline used to render it back to the "onscreen"
framebuffer.

The pipeline can be altered through the setup_pipeline() vfunc, so ClutterStageView
implementations can alter the default behavior of blitting from offscreen to
onscreen with no transformations.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 19:24:21 +02:00
acc2ad9658 backends/native: Refactor g_object_set() call
Makes sense to update ::layout inside meta_renderer_native_set_legacy_view_size().

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 18:16:54 +02:00
d58f94dd47 backends/native: Remove unneeded call
The call to _cogl_framebuffer_winsys_update_size() results in no-op here,
as the framebuffer has already the right size when rebuilding the views.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 18:16:54 +02:00
c63558dded backends/native: Split hw supported CRTC rotation modes
Those will need a separate treatment from the modes that we eventually
support through "software", so split those into a separate enum so we
can can do the right thing when applying the configuration.

Also, add a helper function that returns the transform that the software
fallbacks should perform, which should be "normal" if the rotation is
already handled via hw.

https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 18:16:49 +02:00
a53ca0d8cf backends: Mark MetaRendererView:info as G_PARAM_STATIC_STRINGS
https://bugzilla.gnome.org/show_bug.cgi?id=745079
2016-08-23 18:14:16 +02:00
913c32ee34 Fix build of clutter tests
Various clutter test directly use cogl symbols, so they should be linked
against mutter-cogl as well.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=769636
2016-08-23 13:45:05 +02:00
f31d8bab44 Updated Brazilian Portuguese translation 2016-08-22 21:05:52 +00:00
6f8e6864b2 wayland: Add support for the xdg-foreign protocol
This commits adds support for exporting xdg_surface handles via
xdg_exporter and importing them via xdg_importer.

This bumps the required wayland-protocols version to 1.6.

https://bugzilla.gnome.org/show_bug.cgi?id=769786
2016-08-22 21:03:41 +08:00
aea706230d MetaWaylandSurface: Add 'unmapped' signal
Meant to be used by users of MetaWaylandSurface's that need to know
when the surface was unmapped. So far only emitted by shell surfaces
(surfaces with MetaWindow's).

https://bugzilla.gnome.org/show_bug.cgi?id=769786
2016-08-22 21:03:41 +08:00
f49458ccd9 Updated Indonesian translation 2016-08-22 10:39:37 +00:00
9064b4f1f9 Updated German translation 2016-08-21 09:45:56 +00:00
c977ba197e backends: Update two-finger scrolling before edge scrolling
As whether edge scrolling is enabled depends on whether two-finger
scrolling is disabled, make sure to update two-finger scrolling first.

Note that this only fixes the problem on startup. Changing the
settings in GSettings directly might cause an inconsistent state, but
the main UI for this setting, gnome-control-center, makes sure to
update two-finger scrolling before edge scrolling.

https://bugzilla.gnome.org/show_bug.cgi?id=769276
2016-08-20 16:00:35 +02:00
f271c1b4ce Updated Polish translation 2016-08-20 10:15:16 +02:00
ea08ed7dc4 Bump version to 3.21.90
Update NEWS.
2016-08-19 12:41:06 +02:00
3248c6852c build: Say good-bye to intltool
intltool is unmaintained nowadays while upstream gettext gained
support for formats like GSettings schemas and .desktop files,
and offers a mechanism to teach it about other XML formats not
yet supported out of the box which we can use for the rest.
So there's nothing stopping us, just make the switch ...

https://bugzilla.gnome.org/show_bug.cgi?id=769073
2016-08-19 11:04:48 +02:00
5649734100 Updated Slovenian translation 2016-08-18 23:16:28 +02:00
c55943d753 cogl: Fix a few GISCAN warnings
We tried to resolve non-introspected types; lets skip those. We didn't
have a vfunc scope on a for-each loop; declared it synchronous.

https://bugzilla.gnome.org/show_bug.cgi?id=769800
2016-08-18 11:32:33 +08:00
19e02b3bbe Updated Czech translation 2016-08-17 13:15:56 +02:00
eb7f33265a META_PLUGIN_DECLARE: don't emit an old-style definition
An empty argument list means "unspecified arguments", and not
"no arguments" like it does in C++. If an implementer of Mutter
plugins uses gcc -Wold-style-definition, as configured by
AX_COMPILER_FLAGS_CFLAGS, they will get warnings about this.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Florian Müllner <fmuellner@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=769971
2016-08-16 13:01:17 +01:00
9f6f778589 MetaMonitorManagerKms: Set output scale when assigning crtc
The scale will have been set to 1 no matter what when initializing the
MetaOutput since it at the time didn't have an CRTC assigned to it.
Now, when we assign the CRTC to the output, we need to update the scale.

https://bugzilla.gnome.org/show_bug.cgi?id=769505
2016-08-12 14:58:39 +08:00
1f657d2c81 monitor-manager: Always set the monitor info scale
https://bugzilla.gnome.org/show_bug.cgi?id=769505
2016-08-12 14:58:39 +08:00
6940169f46 MetaMonitorManagerKms: Split up read_current() into logical chunks
Instead of reading all the different state in one huge function, split
it up into logical chunks, making it easier to read.

https://bugzilla.gnome.org/show_bug.cgi?id=769505
2016-08-12 14:58:39 +08:00
4678c24d83 Updated POTFILES.skip 2016-08-10 17:21:05 +02:00
1ca57e0923 backends: Prepare for virtual devices
Those have no backing libinput_device, and configuration does not
apply to those.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 11:36:42 +02:00
b53b94e6f2 clutter/evdev: Implement ClutterVirtualInputDevice::notify_keyval
This is somewhat gross at the moment, because we're after all mimicking
real keyboard events, we can only lookup keycodes that are available
in the current map, and the control of levels is rather limited.

Eventually, we want to implement the text_input protocol, handle these
events separately to MetaWaylandKeyboard, so event->key.keyval is
is guaranteed to be the final result. Until then, this is the farthest
we can get.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 11:36:42 +02:00
4abd31d863 clutter: Add ClutterVirtualInputDevice vmethod to notify keysyms
Evcodes don't cut it when we have something already specifying the
character to be printed, despite the current group/level. This API
allows some more control on the intended output.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 11:03:18 +02:00
3c8b1462bc clutter: Make ClutterVirtualInputDevice public
This includes adding documentation and introspection annotations,
and marking the functions as extern.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 11:03:18 +02:00
27a77fa115 clutter/evdev: Allow specifying the ClutterInputMode of virtual devices
The seat core keyboard/pointer will be "master", the ones created through
ClutterVirtualInputDevice will be "slaves".

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 11:03:18 +02:00
0992b5c53e ClutterVirtualInputDeviceEvdev: Forward button and key presses
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 11:03:18 +02:00
e928370bf0 ClutterSeatEvdev: Keep track of button count
libinput does it for us, but only for physical devices. When we add
virtual devices to the same seat, we need to track button press count
ourself.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 10:39:24 +02:00
d2b05f0305 ClutterVirtualInputDeviceEvdev: Forward motion events
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 10:39:24 +02:00
bd326d38ac ClutterVirtualInputDeviceEvdev: Create associated ClutterInputDevice
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 10:39:24 +02:00
8e335ce183 ClutterVirtualInputDeviceEvdev: Construct with a specific seat
We are still single seated, so until we are properly multi seated its
always the main seat.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 10:39:24 +02:00
364b184f41 ClutterVirtualInputDevice: Store the device type
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 10:39:24 +02:00
94016f7257 clutter/evdev: Move keyboard and pointer notification into seat
We notify per seat; so lets move the logic there. Touch and tablets to
follow later.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 10:39:24 +02:00
e38a8363e4 ClutterVirtualInputDevice: Keep track of the device manager
https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 10:39:24 +02:00
76eb27e786 ClutterDeviceManagerEvdev: Split out seat into a separate file
Split out ClutterSeatEvdev functionality into a separate file.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 10:39:24 +02:00
5db2be414b clutter: Add virtual input device API
Virtual input devices aim to enable injecting input events as if they
came from hardware events. This is useful for things such as remote
controlling, for example via a remote desktop session.

The API so far only consists of stumps.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 10:39:19 +02:00
61bfe04b7b Updated Friulian translation 2016-08-07 16:19:13 +00:00
1931d0ef51 Updated Hebrew translation 2016-08-07 15:13:49 +03:00
46f1dcaecc Updated Friulian translation 2016-08-07 10:39:25 +00:00
5c9a2c54c4 xwayland: Avoid late errno checks
We do some things when binding to a socket fails (closing the fd,
logging, unlinking files, ...) those might affect errno in some
or other way, so it might no longer be EADDRINUSE even if we later
try to make those non fatal.

It seems better to check errno soon after the failure, and don't
rely on it in any way at a later point. All error paths in
bind_to_abstract_socket() also have early logging, which also might
help figure out better the point of failure when the socket fails
to be created.

https://bugzilla.gnome.org/show_bug.cgi?id=769578
2016-08-06 17:14:52 +02:00
dd549604e2 xwayland: Fix typo
Check the unix_fd, which is the one just created, the abstract_fd
is already checked above.
2016-08-06 16:42:25 +02:00
8913cbb06d Updated Hungarian translation 2016-08-04 22:07:32 +00:00
96790276c5 Updated Friulian translation 2016-08-04 15:51:56 +00:00
84eeebe32f Updated Slovak translation 2016-08-04 13:28:48 +00:00
01f1de704d Updated Lithuanian translation 2016-08-03 22:15:56 +03:00
6894563667 MetaRendererView: Fix GObject parent
Set ClutterStageViewCogl as parent of MetaRendererView, since that is
the actual parent.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-08-03 11:20:55 +08:00
9b4e8695f3 MetaRendererX11: Allocate offscreen framebuffers up front
Allocate the offscreen stage view framebuffers up front; otherwise they
may get allocated after the viewport calculated by the stage is set,
which would cause the viewport to be incorrect until recalculated.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-08-03 11:20:55 +08:00
adcd0fe9b4 ClutterStageView: Initialize viewport/projection as dirty
Initially the viewport and projection is not calculated and should thus
be marked as dirty.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-08-03 11:20:55 +08:00
cc4a65fe94 x11/nested: Only paint monitor stage views when enabled
Only paint the per monitor stage views when enabled, otherwise bad
things happen.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-08-03 11:19:24 +08:00
53061c7005 MetaInputSettings: Initialize the accel-profile setting
Shouldn't just update them when they change; they also need to be
set when initializing.

https://bugzilla.gnome.org/show_bug.cgi?id=769179
2016-08-03 10:49:22 +08:00
53e3d0df64 MetaInputSettings: Don't initialize the same setting twice
Two settings were set twice on the same device. Now instead group the
generic update functions together, removing the redundant calls.

https://bugzilla.gnome.org/show_bug.cgi?id=769179
2016-08-03 10:49:22 +08:00
97d180ee59 build: Fix KMS backend summary printout
If have_native_backend is not set, we might end up with:
	Native (KMS) backend:
instead of:
	Native (KMS) backend:     no

in the configure summary

https://bugzilla.gnome.org/show_bug.cgi?id=769305
2016-07-29 16:48:29 +02:00
740748af3e clutter: Fix typo in assert 2016-07-29 11:35:31 +02:00
38d61f30dc monitor-config: add missing chain-up for finalize 2016-07-28 19:57:42 +03:00
23c4ac6c7f settings: Support mouse and trackball accel profile
Support changing the mouse and trackball acceleration profile. This
makes it possible to for example disable pointer acceleration by
choosing the 'flat' profile.

This adds an optional dependency on gudev. Gudev is used by the X11
backend to detect whether a device is a mouse or not. Without gudev
support, the accel profile settings has have effect for mouse devices.

Trackball still uses the "strstr" approach, since udev doesn't support
tagging devices as trackball devices yet.

https://bugzilla.gnome.org/show_bug.cgi?id=769179
2016-07-28 20:13:08 +08:00
cfe5d7429a backends/x11: Add enum for scroll methods
This way the "libinput Scroll Method Enabled" property manipulation
is made clearer.
2016-07-27 19:42:14 +02:00
36cd7177fd backends: Re-add support for edge scrolling with some touchpads
Add support for setting edge-scrolling separately from two-finger
scrolling. We now have 2 separate boolean settings for those, with the
Mouse panel in gnome-control-center allowing to set only one of those at
a time, but nothing precludes both being set in the configuration.

We need to handle:
- two-finger-scrolling-enabled and edge-scrolling-enabled settings both
  being set.
- those 2 settings being change out-of-order
- two-finger-scrolling being set on a device that doesn't support it
- edge-scrolling-enabled on a device that doesn't support it

And the combinations of one touchpad supporting just one of edge
scrolling and two-finger scrolling and another vice-versa.

https://bugzilla.gnome.org/show_bug.cgi?id=768245
2016-07-27 17:17:25 +02:00
2e4eb86340 configure: Require libinput 1.4
We use API recently added in that version.
2016-07-27 13:32:38 +02:00
337b833e23 Updated Spanish translation 2016-07-26 11:01:00 +00:00
d25af2a02a Add Language headers to po files
Future versions of gettext will fail if this header is missing.
2016-07-24 21:38:40 +02:00
820a6ab406 Gracefully exit with failure if backend creation failed
Instead of continuing eventually crashing with a segmentation fault due
to a missing renderer, make MetaBackend an GInitable, and gracefully
handle the failure to fully create the backend with an EXIT_FAILURE.

https://bugzilla.gnome.org/show_bug.cgi?id=769036
2016-07-23 21:21:31 +08:00
cd225c4e19 Always use the default screen
GDK doesn't support multiple screens, so effectively we don't either.
Lets stop pretending we do.

This fixes a few -Wdeprecated warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=769070
2016-07-23 10:55:02 +08:00
98cd8136ca MetaWindowWayland: Don't set X11 window attributes that'll get ignored
We only use a handful of the attributes set, so lets stop pretending
that things are initialized for a reason. Eventually we should stop
using XWindowAttributes in the generic MetaWindow creation path.

https://bugzilla.gnome.org/show_bug.cgi?id=769070
2016-07-23 10:55:02 +08:00
e6972924d0 configure: Lower minimum libwacom version
We don't need such a recent libwacom. The tablet descriptions in
newer libwacom versions are welcome, but is nothing mutter
directly relies on.
2016-07-22 23:47:06 +02:00
ead09bf6cc wayland: Shut up a compiler warning
If the compiler cannot figure out that the condition for setting
the dev variable is the same as the condition for accessing it,
it will complain about potential uninitialized use.
2016-07-22 23:21:30 +02:00
fe09a3c4e2 backends: Add missing guards to libwacom calls 2016-07-22 23:20:47 +02:00
ee6867611f configure: Bump gsettings-desktop-schemas/wayland-protocol versions
Those versions are required for tablet v2 protocol support.
2016-07-22 19:03:12 +02:00
207c11d1f7 Updated POTFILES.in 2016-07-22 15:03:16 +02:00
c6beb1cfc5 wayland: Emit wp_tablet_pad_group.buttons after focus changes
The buttons grabbed by the compositor might have changed in between,
so just broadcast the button array again.
2016-07-22 13:31:09 +02:00
b34fe72bb7 wayland: Check serial on wp_tablet_pad.set_feedback
We must lookup the mode switch serial for the group where the button
belongs to. Also, avoid the changes if the client requests setting
the feedback for buttons owned by the compositor.
2016-07-22 13:31:09 +02:00
18f301cec9 wayland: Export function to tell whether a button belongs to a pad group 2016-07-22 13:31:09 +02:00
406677e2a0 wayland: Check serial on wp_tablet_pad_strip.set_feedback 2016-07-22 13:31:09 +02:00
4f25057413 wayland: Check serial on wp_tablet_pad_ring.set_feedback 2016-07-22 13:31:09 +02:00
2f492c133c wayland: Fix label lookup on >1 strips/rings
We assumed that each group could only have 1 strip and/or ring, because
accounting is performed per group, so we could not assume the real
index for anything above 1. Get rid of this restriction, now that
MetaWaylandTabletPad does its own accounting of rings/strips, alongside
groups.
2016-07-22 13:31:09 +02:00
138a47b8f9 wayland: Move strips/rings management back to MetaWaylandTabletPad
This is best for 2 reasons:
- It's feels cleaner doing first creation of rings/strips and then
  the group assignment. The other option is making groups iterate
  other all rings/strips and selectively skip those not meant for
  it, which sounds somewhat redundant.
- Some minimal accounting of rings/strips without group restrictions
  is needed for meta_wayland_tablet_pad_get_label().

The rings/strips memory is now owned by MetaWaylandTabletPad instead
of groups, which is sort of meaningless since all are meant to go
at the same time.
2016-07-22 13:31:09 +02:00
62e4954c96 wayland: Add method to relate a pad strip to its group 2016-07-22 13:31:09 +02:00
062b696df2 wayland: Add method to relate a pad ring to its group 2016-07-22 13:31:09 +02:00
5effde59f6 backends: Implement the "show osd" pad action
Just call back into meta_display_request_show_osd().
2016-07-22 13:31:09 +02:00
76595af8af core: Add special case for the pad OSD in event handling
When it's active, we want wayland to stop handling (most notably key)
events.
2016-07-22 13:31:09 +02:00
21c8911254 core: Add meta_display_request_pad_osd() function
There may be external/compositor-specific reasons to trigger the
pad OSD. Expose this call so the pad OSD can be triggered looking
up the right settings, monitor, etc...
2016-07-22 13:31:09 +02:00
35554555e0 core: Add MetaDisplay:show-pad-osd signal
This is intended to be caught in the gnome-shell code, in order to
show the OSD with the pad action mapping.
2016-07-22 13:31:09 +02:00
e2ad8700a9 backends: Export function to query the mapped MetaMonitorInfo of a tablet
Or NULL if the tablet is mapped to the full desktop size.
2016-07-22 13:31:09 +02:00
323c608b0c backends: Export call to retrieve the base GSettings for a tablet 2016-07-22 13:31:09 +02:00
0efe076a0a backends: Implement "switch monitor" pad button action
This action remaps the tablet to each of the connected monitors,
or to the span of all monitors.
2016-07-22 13:31:09 +02:00
6f7f98540f core: Add public MetaDisplay functions to get action labels for pad buttons
This API will be used from the gnome-shell pad OSD implementation, in order
to show the actions that currently apply to every button/ring/strip in the
tablet.
2016-07-22 13:31:09 +02:00
56632d2ef7 backends: Add function to retrieve the label for a pad button action
As those are specified by settings.
2016-07-22 13:31:09 +02:00
6296d30e1a wayland: Add getters for the current feedback strings in MetaWaylandTabletPad
Each of the buttons/rings/strips may have one such feedback string, this API
makes is meant to make lookups consistent.
2016-07-22 13:31:09 +02:00
ed16b40c98 meta: Add MetaPadActionType enum
This will be used on lookups to the current action assigned to
any element in a tablet pad.
2016-07-22 13:31:09 +02:00
7bba20e536 wayland: Hook MetaWaylandTabletPad to pad button actions management
These are handled by the MetaInputSettings, so hook the events emitted
to it.
2016-07-22 13:31:09 +02:00
8e6244238d backends: Add API to trigger actions related to pad buttons
It does nothing at the moment, but can be hooked into MetaWaylandTabletPad
now. For X11, we need to trigger these for the pad events we receive from
the passive pad button grabs.
2016-07-22 13:31:09 +02:00
ba9ec00694 wayland: Add update() phase to MetaWaylandTabletPad
This will be needed to update internal state of pad groups.
2016-07-22 13:31:09 +02:00
08cda496f8 wayland: Apply pressure settings before sending wp_tablet_tool.pressure 2016-07-22 13:31:09 +02:00
f9552bb9c0 backends: Add function to apply pressure sensitivity to tablet tools
A bezier curve is created out of the 2 control points in settings, so
the pressure is made to follow the stablished curve between 0 and 1.
2016-07-22 13:31:09 +02:00
7e267e9b01 wayland: Implement stylus button actions
Those just send different BTN_ keycodes.
2016-07-22 13:31:09 +02:00
fbb4c0b831 backends: Add function to retrieve the action mapped to an stylus button
This function will be useful for the wayland implementation, because buttons
are mapped at the time of sending those through the wire.
As x11/wayland implementations differ here, this function will be useful for
the wayland implementation, as the action is handled lat
2016-07-22 13:31:09 +02:00
d7faab76e0 backends: Perform libwacom checks before applying settings
Some settings make no sense on external tablets, and others make
no sense in display/system-integrated tablets. Perform those checks
so we don't end up with possibly broken configuration.
2016-07-22 13:31:09 +02:00
b7892ba1c5 backends: Disable keep-aspect and output mapping on relative devices
Those settings make no sense there, so should be made ineffective.
2016-07-22 13:31:09 +02:00
ab2d2af176 backends: Implement set_tablet_mapping() in native backend
We can now just set the mapping through clutter_input_device_set_mapping()
2016-07-22 13:31:09 +02:00
80674fc9e4 clutter/evdev: Optionally report abs/rel motions for tablet tools
Depending on clutter_input_device_get_mapping(), or whether the current
tool is either cursor or lens (those don't make any sense in absolute
mode), relative motions will be reported.
2016-07-22 13:31:09 +02:00
9587a60da4 clutter: Add clutter_input_device_[gs]et_mapping()
This function call only applies to tablets, and thus will error
out unless it's called with CLUTTER_TABLET_DEVICEs. This will
allow setting absolute/relative mapping on those on the fly, as
this is optional.
2016-07-22 13:31:09 +02:00
73958aeb59 backends: Add private getter for the MetaInputSettings
We will need to fetch information from it at certain places.
2016-07-22 13:31:09 +02:00
77b33a86b8 backends: Fetch libwacom information for tablets in MetaInputSettings
Given that information defines largely how such devices are to be
configured, it makes sense to have that information at hand. A getter
has been also added for the places where it could be useful, although
it will require HAVE_LIBWACOM checks in callers too.
2016-07-22 13:31:09 +02:00
f3b94d9a78 wayland: Implement wp_tablet.path
Now that we have clutter_input_device_get_device_node(), it is trivial
to implement.
2016-07-22 13:31:09 +02:00
af8b938f92 clutter/x11: Set device node information in XI2 devices 2016-07-22 13:31:09 +02:00
1496a7ead3 clutter/evdev: Set device node information to evdev devices 2016-07-22 13:31:09 +02:00
e7e62ee4a4 clutter: Add clutter_input_device_get_device_node()
This function is meant to return the device node path (eg. /dev/input/...),
which will be useful to wire up a few things.
2016-07-22 13:31:09 +02:00
f6e471fca4 backends: Add function to lookup the mapping for a given tablet
At least for wayland, this needs implementing within mutter. So add
a function to look this setting up.
2016-07-22 13:31:09 +02:00
1dd121002f backends: Store mappable devices' info in the hashtable
Instead of as closure data. We will need to store (and query) more
per-device info, so access to this struct is necessary.
2016-07-22 13:31:09 +02:00
526fdca3fb backends: Map tablets/pads, and wire to configuration vfuncs
With this, the left-handed setting works. The other configuration
vfuncs remain empty stubs, but will be correctly applied when those
are handled.
2016-07-22 13:31:09 +02:00
220ac7c8f2 backends: Add empty stubs for tablet configuration
Those will be called when configuring tablets.
2016-07-22 13:31:09 +02:00
5ea39e0e77 wayland: Implement wp_tablet_tool.hardware_id_wacom
We can now fetch this info from the ClutterInputDeviceTool, so
use it to implement this event.
2016-07-22 13:31:09 +02:00
1c23d4bc51 clutter/evdev: Set tool IDs 2016-07-22 13:31:09 +02:00
2e6bfa8bae clutter: Add ClutterInputDeviceTool:id property 2016-07-22 13:31:09 +02:00
a59170c09f clutter: Fix ClutterInputDeviceTool:serial setter/getter
The argument is internally handled as a uint64, but only exposed in
API as guint.
2016-07-22 13:31:09 +02:00
aa9b2c5494 configure: Check for libwacom
It will be used for some advanced tablet features, which we can't
get solely from libinput.
2016-07-22 13:31:09 +02:00
c1d157e136 wayland: Add focus management to pads
All pads will share the same focus than the keyboard, so this means that:
- The focus changes in-sync for keyboard and all pad devices, and
- Newly plugged pads will be immediately focused on that same surface
2016-07-22 13:31:09 +02:00
2cd21f1b20 wayland: Add MetaWaylandTabletSeat API to correlate pads/tablets
All pads have one tablet, but a tablet may have multiple pads. Add
API to look things up from a MetaWaylandTablet(Pad).
2016-07-22 13:31:09 +02:00
5ccde659c1 wayland: Add pointer from MetaWaylandTabletSeat to MetaWaylandSeat
It will be useful to backreference to the MetaWaylandSeat from tablet
code.
2016-07-22 13:31:09 +02:00
fd62a1f6ce wayland: Wire up pad device event management
The tablet manager will now lookup the correct MetaWaylandTabletSeat,
and forward the events through it.
2016-07-22 13:31:09 +02:00
b8808ca24d wayland: Implement pad management in MetaWaylandTabletSeat
Now pads are looked up and notified upon, both on startup and
when plugging a tablet.
2016-07-22 13:31:09 +02:00
41ff0aaf60 wayland: Implement wp_tablet_pad
This object represents the collection of buttons, strips and rings
in a tablet pad. All the objects created (pad, strips and rings)
share a common focus surface and have the same lifetime.
2016-07-22 13:31:09 +02:00
c5d0791710 wayland: Implement wp_tablet_pad_group 2016-07-22 13:31:09 +02:00
828277f5e0 wayland: Implement wp_tablet_pad_strip
This represents pad sliders.
2016-07-22 13:31:09 +02:00
e56d6b06cf wayland: Implement wp_tablet_pad_ring
This object represents pad "wheels"
2016-07-22 13:31:09 +02:00
96aed5fd2e clutter: Handle pad button events in clutter_event_get_button() 2016-07-22 13:31:09 +02:00
88c510c38a clutter/evdev: Translate/emit libinput pad events 2016-07-22 13:31:09 +02:00
6bcff556b5 clutter/evdev: Handle management of pad devices 2016-07-22 13:31:09 +02:00
81736b1dea clutter: Add ::n-rings and ::n-strips property to ClutterInputDevice
This will only be practical for pads (and maybe generic buttonsets in
the future?), we just need to know the number as the events will also
contain a number as the identificator.
2016-07-22 13:31:09 +02:00
cc09ca8892 clutter: Add pad event types
And their management along the pipeline.
2016-07-22 13:31:09 +02:00
d76aa89be9 clutter: Add clutter_event_get_mode_group()
This event can be used on pad events to find out the group they
pertain to.
2016-07-22 13:31:09 +02:00
8cd4b0e11f clutter: Add pad event structs
Those map closely what we get from libinput. Button events have
been made its own separate struct, its semantics fall somewhere
in between of ClutterButtonEvent and ClutterKeyEvent, so is better
emitted as its own set.
2016-07-22 13:31:09 +02:00
6b08990dcc clutter: Add "pad" device type 2016-07-22 13:31:09 +02:00
8b769a3412 wayland: Set an specific role on surfaces passed in wp_tablet_tool.set_cursor
This is now separated from the generic cursor one. This means that wl_surfaces
can't be shared across wl_pointer and wp_tablet_tool. This is a change in
tablet protocol v2.
2016-07-22 13:31:09 +02:00
8d3ac8c3e9 wayland: Add MetaWaylandSurfaceRoleTabletCursor
This is a simple subclass of MetaWaylandSurfaceRoleCursor, mostly
so we can distinguish by GType, the methods in the parent class
still apply and are useful.
2016-07-22 13:31:09 +02:00
074b0d6b2a wayland: Make MetaWaylandSurfaceRoleCursor derivable 2016-07-22 13:31:09 +02:00
8e8cdf1873 wayland: Make additional data in MetaWaylandSurfaceRoleCursor private
This will help subclassing it.
2016-07-22 13:31:09 +02:00
72ee6b8b65 wayland: Use wl_fixed_t for angle arguments in wp_tablet_tool
This is a change in tablet protocol v2
2016-07-22 13:31:09 +02:00
3d9bb1cc09 wayland: Use tablet protocol v2
This commit merely updates the code generation from the v2 protocol
description.
2016-07-22 13:31:09 +02:00
4ed59a020d Throw an error in case of unsupported session type
When launching a GNOME session from a text-mode VT, the logind session
type is unlikely to be set to either "wayland" or "x11". We search for a
supported session type first with logind and then with
$XDG_SESSION_TYPE. As a fallback, we also test $DISPLAY in case of a
"tty" logind session to support starting through xinit. Ideally, such
setups should set XDG_SESSION_TYPE=x11.
If no supported session type is found, we throw an error.

https://bugzilla.gnome.org/show_bug.cgi?id=759388
2016-07-22 10:52:04 +08:00
b5e797f453 MetaSurfaceActorWayland: clean up var assigned to self
https://bugzilla.gnome.org/show_bug.cgi?id=769054
2016-07-22 10:44:19 +08:00
125cba7100 backend: simplify assert
We already checked that constraint is non-null.

https://bugzilla.gnome.org/show_bug.cgi?id=769054
2016-07-22 10:44:19 +08:00
720cbc5e5f cogl: fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=769054
2016-07-22 10:44:19 +08:00
ad7ec6b979 main: Fix compilation with wayland disabled
https://bugzilla.gnome.org/show_bug.cgi?id=769024
2016-07-21 20:34:28 +08:00
991f2d696a cogl-gles2: Don't leak gles2 types into mutter
On i686, the GLsizeiptr typedef in cogl-gles2.h conflicts with the
system GL headers, so make sure we don't include both.

https://bugzilla.gnome.org/show_bug.cgi?id=769014
2016-07-21 00:02:53 +02:00
76175a48d5 Bump version to 3.21.4
Update NEWS.
2016-07-20 21:14:43 +02:00
c8392e025f tests: Adjust to config.h removal
Commit bf71cb2e3c changed this to use different file names for the
cogl and clutter parts to avoid any confusion.
2016-07-20 21:14:43 +02:00
820ffa2781 tests: Drop test that uses removed CoglTexture API
Commit 21f2f52269 removed the API to get/set texture format and
rowstride, so drop the corresponding test.
2016-07-20 20:58:21 +02:00
51f7892600 tests: Drop tests that use cogl-1.0 path API
Commit d62d780a95 dropped the 1.0 version of that API as well
as the 2.0 compatibility layer.
2016-07-20 20:58:20 +02:00
de1464f88f renderer-native: Adjust to StageView memory handling changes
ClutterStageView now takes ownership of the :framebuffer property,
so we need to release our own reference.
2016-07-20 20:58:20 +02:00
aebd5ba6e0 stage-view: Fix memory handling of :framebuffer property
Currently the setter doesn't take ownership of the value, but dispose()
will unref it (and thus release someone else's reference). Fix this by
taking ownership of the property value in the setter.
2016-07-20 20:04:27 +02:00
a310ba7649 build: Dist cogl-mutter/cogl-clutter headers 2016-07-20 14:30:57 +02:00
daf5a112fb meta/boxes: typedef cairo_rectangle_int_t MetaRectangle
They are already effectively interchangeable so this should reduce
pointless casts.

Just like in GDK though, we need to keep the old definition for
instrospection to be able to include the struct's fields.
2016-07-20 14:11:25 +02:00
0745734ba5 clutter: Fix a compiler warning
There's no need for a cast for printing an object's type or address,
so we can remove variables that are unused when not building with
CLUTTER_ENABLE_DEBUG.
2016-07-20 13:03:48 +02:00
a75e2ace82 Revert "main: Add --x11 command line argument"
This reverts commit feb4c36659.
2016-07-20 17:45:18 +08:00
f18e2a8c31 Fix out-of-tree building
We included generated cogl headers and non-generated clutter headers
from mutter, while only having added include paths for the opposite.
2016-07-20 16:17:22 +08:00
ff6186f1ec clutter: Add capture API for reading stage pixels
clutter_stage_capture should be used instead of directly utilizing
cogl's read_pixels API's.

https://bugzilla.gnome.org/show_bug.cgi?id=768978
2016-07-20 14:23:48 +08:00
cd0f8e5cd1 cogl: Let the g-ir-scanner see the type structs typedefs
By only showing the g-ir-scanner void typedefs it will make it print
warnings. Lets please it by showing the actual typedef.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
75c3cf0589 cogl: Remove support for not building with glib/gtype support
https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
a40e4634a6 clutter: Remove clutter-build-config.h.in
This file is autogenerated.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
d62d780a95 Remove cogl-1.0 vs cogl-2.0 vs cogl experimental API split
Mutter (and libmutter users) are the only users of this version of
cogl, and will more or less only use the cogl-1.0, cogl-2.0 and cogl
experimental API variants, and having the possibility of having
different API versions of the same API depending on what file includes
it is error prone and confusing. Lets just remove the possibility of
having different versions of the same API.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
eed71654ba Don't pretend we don't have CoglShader
We bypass our build configuration to fetch API from a version which
isn't the one we actually use. Stop bypassing and just admit that the
1.0 API is still there, but still deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
835ded3f02 cogl: Remove deprecated CoglTexture functions
None were used; no reason to keep them.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
3450b51da1 cogl: Remove CoglClipState
We were not using it anywhere; lets get rid of it.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
1ca9d8ac02 cogl: Remove CoglFixed
We were no longer using anything from it; lets remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
aafdb6baaa clutter/evdev/clutter-xkb-utils.c: Include clutter-build-config.h
https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
2547a7cd9c ClutterBezier: Make a private copy of sqrti from cogl
We didn't include clutter-build-config.h, meaning we included a
different API of cogl than the rest of clutter. This API contains the
function cogl_sqrti which was the only thing used. Lets include the
build config file and stop depending on the API that is no longer
exposed to us.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
b4b13ac996 clutter: Remove ClutterFixed
We don't use it any more. Lets get rid of it.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
21f2f52269 ClutterTexture: Remove texture pixel format access
Deprecated, misleading and not used anywhere; lets get rid of it.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
ea64e0abfa cogl: Fix a bunch of GISCAN warnings
https://bugzilla.gnome.org/show_bug.cgi?id=768977
2016-07-20 14:23:48 +08:00
e891a8b628 renderer-native: Resize legacy onscreen before panting
By creating a pending gbm/EGL surface pair, only setting it on
swap-buffers, we would draw onto a buffer on the old surface, then swap
the buffer from the new surface, causing the first frame after a
hot-plug always having no content.

This was in the past not very noticable since some non-deterministic but
frequent side effect in gnome-shell caused hot-plugging to always render
two new frames, but after "Introduce regional stage rendering", this
side effect did not occur as often, thus making it more visible.

This commit updates the current gbm/EGL surface pair before painting a
frame, so that when the frame is painted, the surface with the correct
size is used and the buffer from correct surface is swapped.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
aecd98b847 backends/native: Support drawing onto multiple onscreen framebuffers
Add support for drawing the stage using multiple stage views, where
each stage view has its own onscreen framebuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
d7b87799c8 backend: Ensure the backend gets notified of monitor state having changed
Being a listener to a signal, it is inconvenient to enforce order of
execution between different signal listeners. If there are things in
the backend that should be updated before various other signal
handlers, make sure so is done by emitting the signal after having
explicitly notified the backend.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
28a898a22f Use signals instead of onscreen framebuffer frame callbacks
CoglFrameInfo is a frame info container associated with a single
onscreen framebuffer. The clutter stage will eventually support drawing
a stage frame with multiple onscreen framebuffers, thus needs its own
frame info container.

This patch introduces a new stage signal 'presented' and a accompaning
ClutterFrameInfo and adapts the stage windows and past onscreen frame
callbacks users to use the signal and new info container.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
92341e7c30 MetaRendererNative: Make cogl variables obvious via their names
Call a CoglContext "cogl_context", CoglDisplay "cogl_display" and
CoglRenderer "cogl_renderer" so that they won't be confused with
ClutterContext, MetaDisplay and MetaRenderer etc.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
2eb843268a renderer-native: Rename cogl vfunc implementations
Make the cogl vfunc functions have names that are globally
discoverable. Calling the same function in every backend the same name
causes code navigation tools to not function properly. Rename the
affected functions to closer correspond to the style mutter uses.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
44b163e39b renderer-native: Meta:ify a struct
Rename a struct from the old Cogl style to mutter style naming and
conventions.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
566c28bdaf Introduce regional stage rendering
Add support for drawing a stage using multiple framebuffers each making
up one part of the stage. This works by the stage backend
(ClutterStageWindow) providing a list of views which will be for
splitting up the stage in different regions.

A view layout, for now, is a set of rectangles. The stage window (i.e.
stage "backend" will use this information when drawing a frame, using
one framebuffer for each view. The scene graph is adapted to explictly
take a view when painting the stage. It will use this view, its
assigned framebuffer and layout to offset and clip the drawing
accordingly.

This effectively removes any notion of "stage framebuffer", since each
stage now may consist of multiple framebuffers. Therefore, API
involving this has been deprecated and made no-ops; namely
clutter_stage_ensure_context(). Callers are now assumed to either
always use a framebuffer reference explicitly, or push/pop the
framebuffer of a given view where the code has not yet changed to use
the explicit-buffer-using cogl API.

Currently only the nested X11 backend supports this mode fully, and the
per view framebuffers are all offscreen. Upon frame completion, it'll
blit each view's framebuffer onto the onscreen framebuffer before
swapping.

Other backends (X11 CM and native/KMS) are adapted to manage a
full-stage view. The X11 CM backend will continue to use this method,
while the native/KMS backend will be adopted to use multiple view
drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
749237a28e MetaWindowGroup: Only compensate for transforms when in clone paint
We were compensating for a clone paint viewport offset even when we
were not in clone paniting mode. This would break painting if we offset
the viewport for some other reason for example as in the future stage
view painting.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
c498bce9e4 cogl: Add API to get the texture from an offscreen
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
7f0e6b9b4b compositor: Don't access use the onscreen framebuffer directly
Instead of assuming there is a single onscreen framebuffer, use the
helper functions for setting the frame callback and getting the frame
counter.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
a465e4c5b8 compositor: Initiate cogl context field on creation
There will only ever be one context; just get it from clutter instead
of waiting for we interact with a framebuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
767e12125b ClutterStageCogl: Let the sub-classes handle the onscreen
In preperation for having allowing drawing onto multiple onscreen
framebuffers, move the onscreen framebuffer handling to the
corresponding winsys dependent backends.

Currently the onscreen framebuffer is still accessed, but, as can seen
by the usage of "legacy" in the accessor name, it should be considered
the legacy method. Eventually only the X11 Compositing Manager backend
will make use of the legacy single onscreen framebuffer API.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
df0805fb0a ClutterStageWindow: Remove dirty_back_buffer vfunc
It was dead code, so lets remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
14dbdfe483 Get rid of ClutterStageEglNative
The functionality from ClutterStageEglNative (one function returning
TRUE) was moved to MetaStageWindowNative.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
c3d2352a9e Explicitly create per backend stage windows
Split the stage window implementations into three separate objects: one
for X11 as a compositing manager, one for X11 running as a nested
Wayland compositor, and one for running with the native backend.

The new stage window implementations are only thin shells; this is in
preparation for making the stage windows behave more differently.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
55726e787b backends: Make clutter stage resizing more explicit
The stage resizing was placed in the generic backend, which was only
run on certain configurations (when running nested or using the native
backend). This commits makes the resizing more explicit thus more
obvious.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
085df1170e plugins/default: Make the background a vignette
Make the default plugin background a vignette in order to see that it
properly draws using the correct scale.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
f31d71ce63 ClutterStageX11: Remove dead code
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
2c439dec75 ClutterStageX11: Move macro to .c file
It was only used there, no need to expose it elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
942feadffd ClutterStageX11: Don't exposed unused function
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
8bebb8126c Let MetaMonitorManagerKms handle page flips
This commit completes the move of monitor logic to the monitor
mangager. The renderer now only deals with framebuffers, asking the
monitor manager to do the crtc flip tracking.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
12ef1a5e4b backends/native: Let the monitor manager manage KMS modes
Let MetaMonitorManagerKms manage KMS modes. This lets us pass less
state to MetaRendererNative. Instead let MetaMonitorManager tell the
monitor manager when it should set the mode and with what framebuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
ec1da588cf MetaRendererNative: glib:ify a couple of struct fields
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
44628bf224 MetaRendererNative: Absorb CoglDisplayKMS
Absorb the CoglDisplayKMS struct into MetaRendererNative. This makes
t so that all KMS interaction and fields are in the same place.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
27ac0b7f27 MetaRendererNative: Absorb CoglRendererKMS
Absorb the CoglRendererKMS struct into MetaRendererNative. The gbm
device initialization is moved earlier so that the renderer fails to
initialize if the gbm device creation failed.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
e420f386d2 Move cogl KMS winsys into the native backend
Move the KMS interaction from cogl into mutter, where most of the other
KMS interaction already takes place. This also removes dead code which
were only excercised when non-mutter callers used the cogl KMS backend.

The cogl KMS API was updated to pass via MetaRendererNative instead of
via the different cogl objects.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
2ceff4ee9b Create cogl renderer in MetaRenderer
Instead of passing around the KMS file descriptor via clutter to cogl,
just make our own clutter backend create the cogl renderer and set the
KSM fd.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
b2a62e6d5a native: Pass KMS fd to renderer
Will be used in a later commit.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
a54042e938 Introduce MetaRenderer
MetaRenderer is meant to be the object responsible for rendering the
scene graph. It will contain the logic related to the cogl winsys
backend, the clutter backend, and the clutter stage window.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
2facf26568 clutter: Add test .gitignore files
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
9c0fa583f5 clutter/tests/conform: Fix actor-offscreen-redirect
The actor-offscreen-redirect didn't initialize its state properly, so
it could potentially end up with the "was_painted" state being TRUE
from the start, effectively skipping the whole test.

Fixing so that the test even run resulted in the test getting stuck in
a dead lock due to the verification that a frame was drawn was done
from a paint callback. A paint callback had the mutex held, so when the
test case tried to run the main loop, the next paint callback caller
path taken would try to re-lock the same mutex, thus dead lock.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
feb4c36659 main: Add --x11 command line argument
Make it possible to force mutter to start as a X11 compositing/window
manager. This is needed when intending to start mutter as an X11 window
manager while running inside a Wayland session, for example when
intending to debug it in Xephyr.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
dd1eaeb262 Use correct cogl object types
Use the correct pointer types for cogl objects. This avoids warnings
when including the cogl headers doesn't result in all the cogl types
being typedefs to void.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
f096cc327d launcher: Expose KMS fd
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
e05f48fc53 Make it possible to include private cogl API from mutter
If we want to put a cogl winsys backend in mutter, that backend need to
have access to the internal workings of cogl.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
95a68854ad configure.ac: Add AC_GNU_SOURCE
We define it here and there already, and if we are to include private
cogl files, we need it in more places. Lets just add it everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
d63e9452d9 cogl: Remove some now dead code
We require glib and don't support building on win32 any more.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
f1b7b41b8d Update .gitignore
The cogl/clutter merge made the .gitignore files in the respective
directories incorrect, due to the using absolute paths.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
bdc68efe45 cogl: Fix signage miss match warnings
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
bf71cb2e3c Don't use config.h in clutter and cogl
In cogl use cogl-config.h and in clutter use clutter-build-config.h. We
can't use clutter-config.h in clutter because its already used and
installed.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
4d13f6e2d0 cogl: Expose winsys vtable getters
This is so we can use as base in mutter's future winsys backends.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
d6cde4b043 cogl: Add API for setting custom winsys
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
e2f5579391 cogl: Don't undef __INSIDE_COGL_H__ in file not defining it
If you include a file that might define __INSIDE_COGL_H__, don't
undefine it if it wasn't defined in that file. This makes it possible
to include for example cogl-gles2.h from some other file which defines
__INSIDE_COGL_H__.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
90de521799 Make mutter manage its own clutter backends
Introduce two new clutter backends: MetaClutterBackendX11 and
MetaClutterBackendNative. They are so far only wrap ClutterBackendX11
and ClutterBackendEglNative respectively, but the aim is to move things
from the original clutter backends when needed.

https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
a1bedd4b1c clutter: Remove leftover wayland backend references
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
b281f9566d wayland-surface: Make get_relative_coordinates() accurate for X apps
Using clutter API to transform coordinates is only accurate right
after a clutter layout pass but this function is used e.g. to deliver
pointer motion events which can happen at any time. This isn't a
problem for wayland clients since they don't control their position,
but X clients do and we'd be sending outdated coordinates if a client
is moving a window in response to motion events.

https://bugzilla.gnome.org/show_bug.cgi?id=768039
2016-07-15 14:27:16 +02:00
5ee0f24ab9 window: Stop updating layers on focus changes
Commit 3a4ae679ea removed the
FOCUSED_WINDOW layer definition but it was already unused for a long
time. There's no layers to update on focus changes.

https://bugzilla.gnome.org/show_bug.cgi?id=768221
2016-07-06 19:11:30 +02:00
fcc7501eb8 core: Remove META_LAYER_FULLSCREEN
This layer isn't really being used and in fact, it causes
meta_stack_get_default_focus_window() to return a fullscreen window
even if the naturally topmost window in the stack isn't a fullscreen
one.

Note that commit a3bf9b01aa changed how
we choose the default focus window from the MRU to the topmost in the
stack.

https://bugzilla.gnome.org/show_bug.cgi?id=768221
2016-07-06 19:11:30 +02:00
492854e14d window: Do not try to focus O-R windows in focus-follow-mouse
Doing so would raise a critical warning.

https://bugzilla.gnome.org/show_bug.cgi?id=767997
2016-07-06 09:14:56 +02:00
c325a0bebf Fix string format in startup notification to be a gint64
https://bugzilla.gnome.org/show_bug.cgi?id=762407
2016-07-04 22:34:31 +02:00
d6b290ef77 Don't create the Cogl GLib source multiple times
Since the check for backend->cogl_context was accidentally moved
to clutter_backend_do_real_create_context, the Glib source that
is created at the end of clutter_backend_do_create_context() is
created and added each time create_context() is called, though
create_context() is supposed to be idempotent.

https://bugzilla.gnome.org/show_bug.cgi?id=768243
2016-06-30 11:20:21 -04:00
b112d98278 Improve handling of tracking the old focused window during restart
When restarting (X compositor only, obviously), we want to keep
the same window focused. There is code that tries to do this by
calling XGetInputFocus() but the previously focused window will
almost certainly not still be focused by the time we get to the
point where we call XGetInputFocus(), and in fact, probably was
no longer correct after the previous window manager exited, so
the net result is that we tend to focus no window on restart.

A better approach is to leave the _NET_ACTIVE_WINDOW property
set on the root window during exit, and if we find it set when
starting, use that to initialize focus.

https://bugzilla.gnome.org/show_bug.cgi?id=766243
2016-06-29 10:22:55 -04:00
cc6efeb14f MetaSurfaceActorX11: invalidate the stex on video memory purged errors
MetaShapedTexture uses FBOs when mipmapping so we need to cause them
to be recreated.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:50 +02:00
53993ba4d2 MetaBackground: invalidate contents on video memory purged errors
We use FBOs so we need to cause them to be recreated.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:50 +02:00
7f6bcea331 compositor: Handle GL video memory purged errors
Emit a signal so that interested parties can recreate their FBOs and
queue a full scene graph redraw to ensure we don't end up showing
graphical artifacts.

This relies on the GL driver supporting the
NV_robustness_video_memory_purge extension and cogl creating a
suitable GL context. For now we only make use of it with the X backend
since the only driver with which this is useful is NVIDIA.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:50 +02:00
7ed14e0ee8 restart: Make meta_restart() work without a message
In some cases there's no meaningful message to show.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:49 +02:00
3691eb6d70 clutter/x11: Add API to request video memory purges to be reported
https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:49 +02:00
d4d2bf0f6c cogl: Ignore GL_CONTEXT_LOST when checking for GL errors
When using a context with robustness, glGetError() may return
GL_CONTEXT_LOST at any time and this error doesn't get cleared until
the application calls glGetGraphicsResetStatus() . This means that our
error checking can't call glGetError() in a loop without checking for
that return value and returning in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:49 +02:00
0f2be43af4 cogl-context: Add a cogl_get_graphics_reset_status API
If the driver supports the GL_ARB_robustness extension we can expose
the graphics reset status this way.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:49 +02:00
87f9927375 cogl-winsys-glx: Add support for NV_robustness_video_memory_purge
This adds API to allow callers to specify that they're interested in
video memory purge errors.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-27 20:23:49 +02:00
21fd87c4af xwayland: Use CurrentTime on all XConvertSelection calls
The call fetching the targets mistakenly used the timestamp meant
to back up the TIMESTAMP atom (hence, it's the timestamp at which
the selection is *owned* by the compositor, on behalf of a wayland
client).

This timestamp is actually only updated when the compositor gets
to own the selection, so it's a randomly late timestamp to retrieve
the TARGETS atom content, which certain clients might end up
ignoring.

https://bugzilla.gnome.org/show_bug.cgi?id=768007
2016-06-27 11:42:26 +02:00
1d2bead358 ui/frames: Drop the current grab info on button release
This was added in commit d05b750b8d and
later removed inadvertently in commit
d561b3b18f .

https://bugzilla.gnome.org/show_bug.cgi?id=767969
2016-06-23 18:45:53 +02:00
a174c18fb5 frames: "Initialize" frame background
Frames are painted on the frame window according to the GTK+ theme.
Depending on the target's visual, this means either drawing over
a black destination or a fully transparent one. So in cases where
the theme doesn't paint decorations with full opacity, decorations
for windows with an rgba visual look different from those with a
non-rgba visual. Using an rgba visual for all frames independent
from the client's visual can potentially break clients, so our
only option for a consistent appearance is to explicitly initialize
the frame background to black before painting the theme's decoration
on top.

https://bugzilla.gnome.org/show_bug.cgi?id=745060
2016-06-23 16:47:51 +02:00
c61dfa71ed frames: Don't clip out "invisible" parts of frames
The GTK+ theme may draw parts of the decorations outside the actual
frame. Since commit f9db65f47f we make sure that the frame is big
enough to account for any overdrawing, however as we still clip the
cairo context to the actual frame before drawing the decorations,
those parts aren't actually painted.
This issue is not very obvious for most frames, as they use a non-rgba
visual where the unpainted parts appear black, which gives the expected
result with many themes once the shape mask is applied (as the mask does
include any overdrawn parts). For frames using an rgba visual however,
unpainted parts are transparent, so any overdrawn decorations are clearly
missing.
Fix this by only clipping out the client area when drawing decorations.

https://bugzilla.gnome.org/show_bug.cgi?id=745060
2016-06-23 16:47:51 +02:00
65cc1c711a Updated Indonesian translation
(cherry picked from commit bd1297f35c)
2016-06-22 21:19:55 +00:00
2f74ecd469 Bump version to 3.21.3
Update NEWS.
2016-06-21 21:04:52 +02:00
53a9411255 surface-actor: Keep track of ignored damage
We ignore all damage while a surface is frozen and queue a full
update instead once it's thawed. While not super efficient, this
isn't overly bad for the intended case of catching up with any
updates that happened during a compositor effect. However when
extended frame sync is used, surfaces are also frozen while the
client is drawing a frame, in which case the current behavior is
pretty damaging (pun intended), as we end up redrawing the entire
window each frame. To address this, keep track of the actual damage
we ignore and apply it when the surface is thawed.

https://bugzilla.gnome.org/show_bug.cgi?id=767798
2016-06-17 21:39:06 +02:00
989ec7fc60 wayland: Mark pending moved as moved
The result flag needs to be marked as moved even for pending moves,
otherwise the window's unconstrained_rect doesn't get updated in
meta_window_move_resize_internal() and the anchor grab is wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=764180
2016-06-13 17:31:35 +02:00
c72efc90cb wayland: Implement force-quit using kill()
The X11 backend uses EWMH's _NET_WM_PID to get the PID of an offending
client and kill its PID to force the client to terminate.

The Wayland backend is using a Wayland protocol error, but if the client
is hung, that will not be sufficient to kill the client.

Retrieve the client PID under Wayland using the Wayland client API
wl_client_get_credentials() and kill() the client the same way the X11
backend does.

https://bugzilla.gnome.org/show_bug.cgi?id=767464
2016-06-10 09:55:19 +02:00
e7430a4535 wayland: add extended state for tiled
xdg-shell allows desktop environments to extend the list of states
within a given range.

Use this possibility to add a new state for tiled so that gtk+ can
benefit from this.

https://bugzilla.gnome.org/show_bug.cgi?id=766860
2016-06-08 14:54:41 +02:00
2292458f5e wayland/*-shell: UTF-8 validate title, class and app ID strings
The protocol says these must be UTF-8 so let's ensure they are.

https://bugzilla.gnome.org/show_bug.cgi?id=752788
2016-06-07 20:17:39 +02:00
d62491f46e x11/window-props: Convert WM_NAME and WM_CLASS to UTF-8
gjs throws exceptions on non UTF-8 strings which, in some cases, crash
gnome-shell. ICCCM string properties are defined to be Latin-1 encoded
so we can try to convert them to avoid it.

Note that _NET_WM_NAME is defined to be UTF-8 and we already validate
it in utf8_string_from_results() .

https://bugzilla.gnome.org/show_bug.cgi?id=752788
2016-06-07 20:17:38 +02:00
8f7a36c53f window: Don't create invalid UTF-8 window description strings
printf string precision counts bytes so we may end up creating invalid
UTF-8 strings here. Instead, use glib's unicode aware methods to clip
the title.

https://bugzilla.gnome.org/show_bug.cgi?id=765535
2016-06-07 20:17:37 +02:00
8d7ae52565 stage: Fix function definition 2016-06-02 16:10:42 +02:00
cffd2a658b Updated Occitan translation 2016-05-30 19:00:16 +00:00
613 changed files with 15420 additions and 11129 deletions

10
.gitignore vendored
View File

@ -36,11 +36,19 @@ mutter-wayland.desktop
stamp-h1
*.gmo
*.make
*.log
*.trs
*~
stamp-it
.intltool-merge-cache
ABOUT-NLS
POTFILES
Makevars.template
po/*.header
po/*.pot
po/*.sed
po/*.sin
Rules-quot
libmutter.pc
mutter
mutter-restart-helper
@ -75,6 +83,8 @@ src/relative-pointer-unstable-v*-protocol.c
src/relative-pointer-unstable-v*-server-protocol.h
src/pointer-constraints-unstable-v*-protocol.c
src/pointer-constraints-unstable-v*-server-protocol.h
src/xdg-foreign-unstable-v*-protocol.c
src/xdg-foreign-unstable-v*-server-protocol.h
src/meta/meta-version.h
doc/reference/*.args
doc/reference/*.bak

56
NEWS
View File

@ -1,3 +1,59 @@
3.21.90
=======
* Consider XDG_SESSION_TYPE when determining session type [Jouke; #759388]
* Re-add support for edge scrolling on some touchpads [Bastien; #768245]
* Support mouse and trackball acceleration profile [Jonas; #769179]
* Draw monitor contentn to individual framebuffer [Jonas; #768976]
* Support virtual input devices [Jonas, Carlos; #765009]
* Set correct output scale on hotplug [Jonas; #769505]
* Misc. bug fixes and cleanups [Florian, Jonas, Thomas, Bastien, Carlos;
#769014, #769024, #769054, #769070, #769036, #769305, #769578, #769800,
#769073]
Contributors:
Jonas Ådahl, Carlos Garnacho, Thomas Hindoe Paaboel Andersen, Simon McVittie,
Alberts Muktupāvels, Florian Müllner, Bastien Nocera, Jouke Witteveen
Translations:
Daniel Mustieles [es], Aurimas Černius [lt], Dušan Kazik [sk],
Fabio Tomat [fur], Balázs Úr [hu], Yosef Or Boczko [he], Marek Černocký [cs],
Matej Urbančič [sl]
3.21.4
======
* Fix missing frame border around GTK+ dialogs [Florian; #745060]
* Improve X11 <-> wayland copy and paste interaction [Carlos; #768007]
* Add support for NV_robustness_video_memory_purge extension [Rui; #739178]
* Fix restoring the old focused window on restart [Owen; #766243]
* Fix fullscreen windows on other monitors stealing focus after closing
a window [Rui; #768221]
* Draw monitor content to individual framebuffer [Jonas; #768976]
* Provide screen capture API [Jonas; #768978]
* Misc. bug fixes and cleanups [Rui, Owen, Luca, Olivier, Jonas, Carlos;
#767969, #768243, #762407, #767997, #768039, #768977, #768977]
Contributors:
Jonas Ådahl, Luca Bruno, Olivier Fourdan, Carlos Garnacho, Rui Matos,
Florian Müllner, Owen W. Taylor
Translations:
Andika Triwidada [id]
3.21.3
======
* Don't create invalid UTF-8 window description strings [Rui; #765535]
* Convert window titles and wm_class to UTF-8 [Rui; #752788]
* Communicate tiled state to GTK+ on wayland [Olivier; #766860]
* Use kill() to force-quit unresponsive wayland clients [Olivier; #767464]
* Fix window position when unmaximizing via DND on wayland [Olivier; #764180]
* Avoid full window redraws when using extended frame sync [Florian; #767798]
Contributors:
Olivier Fourdan, Rui Matos, Florian Müllner
Translations:
Cédric Valmary [oc]
3.21.2
======
* Clean up surface <-> shell interaction [Jonas; #763431]

20
clutter/.gitignore vendored
View File

@ -18,16 +18,16 @@ stamp-enum-types
stamp-marshal
tags
/ChangeLog*
/clutter/clutter-config.h
/clutter/clutter-enum-types.[ch]
/clutter/clutter-marshal.[ch]
/clutter/clutter-version.h
/clutter/gcov-report.txt
/clutter/clutter-json.h
/clutter/*.log
/clutter/*.trs
/clutter-lcov.info
/clutter-lcov
clutter-build-config.h
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
clutter-lcov
!/build/autotools/introspection.m4
!/build/autotools/as-linguas.m4
!/build/autotools/as-compiler-flag.m4

View File

@ -16,7 +16,6 @@ AM_CPPFLAGS = \
-DCLUTTER_LOCALEDIR=\""$(localedir)"\" \
-DCLUTTER_SYSCONFDIR=\""$(sysconfdir)"\" \
-DCLUTTER_COMPILATION=1 \
-DCOGL_ENABLE_EXPERIMENTAL_API \
-DCOGL_DISABLE_DEPRECATION_WARNINGS \
-DG_LOG_DOMAIN=\"Clutter\" \
-I$(top_srcdir) \
@ -62,7 +61,6 @@ source_h = \
clutter-canvas.h \
clutter-child-meta.h \
clutter-click-action.h \
clutter-cogl-compat.h \
clutter-clone.h \
clutter-color-static.h \
clutter-color.h \
@ -114,6 +112,7 @@ source_h = \
clutter-snap-constraint.h \
clutter-stage.h \
clutter-stage-manager.h \
clutter-stage-view.h \
clutter-tap-action.h \
clutter-test-utils.h \
clutter-texture.h \
@ -124,6 +123,7 @@ source_h = \
clutter-transition.h \
clutter-types.h \
clutter-units.h \
clutter-virtual-input-device.h \
clutter-zoom-action.h \
$(NULL)
@ -169,6 +169,7 @@ source_c = \
clutter-image.c \
clutter-input-device.c \
clutter-input-device-tool.c \
clutter-virtual-input-device.c \
clutter-interval.c \
clutter-keyframe-transition.c \
clutter-keysyms-table.c \
@ -197,6 +198,7 @@ source_c = \
clutter-snap-constraint.c \
clutter-stage.c \
clutter-stage-manager.c \
clutter-stage-view.c \
clutter-stage-window.c \
clutter-tap-action.c \
clutter-test-utils.c \
@ -267,7 +269,6 @@ deprecated_h = \
deprecated/clutter-box.h \
deprecated/clutter-cairo-texture.h \
deprecated/clutter-container.h \
deprecated/clutter-fixed.h \
deprecated/clutter-frame-source.h \
deprecated/clutter-group.h \
deprecated/clutter-input-device.h \
@ -304,7 +305,6 @@ deprecated_c = \
deprecated/clutter-behaviour-scale.c \
deprecated/clutter-box.c \
deprecated/clutter-cairo-texture.c \
deprecated/clutter-fixed.c \
deprecated/clutter-frame-source.c \
deprecated/clutter-group.c \
deprecated/clutter-input-device-deprecated.c \
@ -420,6 +420,14 @@ x11_source_h_priv += \
x11/clutter-input-device-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)
@ -460,13 +468,17 @@ 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
@ -487,8 +499,8 @@ egl_source_h = \
egl/clutter-egl.h \
$(NULL)
egl_source_h_priv = egl/clutter-backend-eglnative.h egl/clutter-stage-eglnative.h
egl_source_c = egl/clutter-backend-eglnative.c egl/clutter-stage-eglnative.c
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 \
@ -562,7 +574,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
DISTCLEANFILES += $(pc_files)
clutter_include_HEADERS = $(source_h) clutter.h clutter-version.h clutter-autocleanups.h
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)

View File

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

View File

@ -69,7 +69,7 @@
* a11y POV should still be managed as a image (with the proper properties,
* position, size, etc.).
*/
#include "config.h"
#include "clutter-build-config.h"
#include "cally-clone.h"
#include "cally-actor-private.h"

View File

@ -34,7 +34,7 @@
* group.
*/
#include "config.h"
#include "clutter-build-config.h"
#include "cally-group.h"
#include "cally-actor-private.h"

View File

@ -30,7 +30,7 @@
* In particular it sets a proper role for the rectangle.
*/
#include "config.h"
#include "clutter-build-config.h"
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS

View File

@ -35,7 +35,7 @@
* #ClutterStageManager).
*/
#include "config.h"
#include "clutter-build-config.h"
#include "cally-root.h"

View File

@ -34,7 +34,7 @@
* being a canvas. Anyway, this is required for applications using
* just clutter, or directly #ClutterStage
*/
#include "config.h"
#include "clutter-build-config.h"
#include "cally-stage.h"
#include "cally-actor-private.h"

View File

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

View File

@ -30,7 +30,7 @@
*
* In particular it sets a proper role for the texture.
*/
#include "config.h"
#include "clutter-build-config.h"
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS

View File

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

View File

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

View File

@ -42,7 +42,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-action.h"

View File

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

View File

@ -42,7 +42,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-actor-meta-private.h"

View File

@ -605,7 +605,7 @@
* #ClutterActor:reactive property instead of this macro.
*/
#include "config.h"
#include "clutter-build-config.h"
#include <math.h>

View File

@ -856,8 +856,6 @@ CLUTTER_AVAILABLE_IN_1_10
void clutter_actor_remove_all_transitions (ClutterActor *self);
/* Experimental API */
#ifdef CLUTTER_ENABLE_EXPERIMENTAL_API
CLUTTER_AVAILABLE_IN_1_16
gboolean clutter_actor_has_mapped_clones (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_22
@ -865,7 +863,6 @@ void clutter_actor_set_opacity_override
gint opacity);
CLUTTER_AVAILABLE_IN_1_22
gint clutter_actor_get_opacity_override (ClutterActor *self);
#endif
/**
* ClutterActorCreateChildFunc:

View File

@ -35,7 +35,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-align-constraint.h"

View File

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

View File

@ -65,8 +65,6 @@ struct _ClutterBackendClass
/*< private >*/
GObjectClass parent_class;
GType stage_window_type;
/* vfuncs */
gboolean (* pre_parse) (ClutterBackend *backend,
GError **error);
@ -88,8 +86,6 @@ struct _ClutterBackendClass
GError **error);
gboolean (* create_context) (ClutterBackend *backend,
GError **error);
void (* ensure_context) (ClutterBackend *backend,
ClutterStage *stage);
ClutterDeviceManager *(* get_device_manager) (ClutterBackend *backend);
void (* copy_event_data) (ClutterBackend *backend,
@ -115,10 +111,6 @@ ClutterBackend * _clutter_create_backend (void);
ClutterStageWindow * _clutter_backend_create_stage (ClutterBackend *backend,
ClutterStage *wrapper,
GError **error);
void _clutter_backend_ensure_context (ClutterBackend *backend,
ClutterStage *stage);
void _clutter_backend_ensure_context_internal (ClutterBackend *backend,
ClutterStage *stage);
gboolean _clutter_backend_create_context (ClutterBackend *backend,
GError **error);
@ -138,8 +130,11 @@ void _clutter_backend_free_event_data (Clutter
gboolean _clutter_backend_translate_event (ClutterBackend *backend,
gpointer native,
ClutterEvent *event);
CLUTTER_AVAILABLE_IN_MUTTER
void _clutter_backend_add_event_translator (ClutterBackend *backend,
ClutterEventTranslator *translator);
void _clutter_backend_remove_event_translator (ClutterBackend *backend,
ClutterEventTranslator *translator);
@ -151,6 +146,7 @@ gint32 _clutter_backend_get_units_serial (Clutter
PangoDirection _clutter_backend_get_keymap_direction (ClutterBackend *backend);
CLUTTER_AVAILABLE_IN_MUTTER
void _clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend);
void clutter_set_allowed_drivers (const char *drivers);

View File

@ -39,7 +39,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
@ -48,6 +48,7 @@
#include "clutter-debug.h"
#include "clutter-event-private.h"
#include "clutter-marshal.h"
#include "clutter-mutter.h"
#include "clutter-private.h"
#include "clutter-stage-manager-private.h"
#include "clutter-stage-private.h"
@ -230,31 +231,17 @@ clutter_backend_do_real_create_context (ClutterBackend *backend,
CoglSwapChain *swap_chain;
GError *internal_error;
if (backend->cogl_context != NULL)
return TRUE;
klass = CLUTTER_BACKEND_GET_CLASS (backend);
swap_chain = NULL;
internal_error = NULL;
CLUTTER_NOTE (BACKEND, "Creating Cogl renderer");
if (klass->get_renderer != NULL)
backend->cogl_renderer = klass->get_renderer (backend, &internal_error);
else
backend->cogl_renderer = cogl_renderer_new ();
backend->cogl_renderer = klass->get_renderer (backend, &internal_error);
if (backend->cogl_renderer == NULL)
goto error;
#ifdef CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT
/* If the application is trying to act as a Wayland compositor then
it needs to have an EGL-based renderer backend */
if (_wayland_compositor_display)
cogl_renderer_add_constraint (backend->cogl_renderer,
COGL_RENDERER_CONSTRAINT_USES_EGL);
#endif
CLUTTER_NOTE (BACKEND, "Connecting the renderer");
cogl_renderer_set_driver (backend->cogl_renderer, driver_id);
if (!cogl_renderer_connect (backend->cogl_renderer, &internal_error))
@ -361,6 +348,9 @@ clutter_backend_real_create_context (ClutterBackend *backend,
gboolean allow_any;
int i;
if (backend->cogl_context != NULL)
return TRUE;
if (allowed_drivers == NULL)
allowed_drivers = CLUTTER_DRIVERS;
@ -423,27 +413,6 @@ clutter_backend_real_create_context (ClutterBackend *backend,
return TRUE;
}
static void
clutter_backend_real_ensure_context (ClutterBackend *backend,
ClutterStage *stage)
{
ClutterStageWindow *stage_impl;
CoglFramebuffer *framebuffer;
if (stage == NULL)
return;
stage_impl = _clutter_stage_get_window (stage);
if (stage_impl == NULL)
return;
framebuffer = _clutter_stage_window_get_active_framebuffer (stage_impl);
if (framebuffer == NULL)
return;
cogl_set_framebuffer (framebuffer);
}
static ClutterFeatureFlags
clutter_backend_real_get_features (ClutterBackend *backend)
{
@ -477,39 +446,10 @@ clutter_backend_real_get_features (ClutterBackend *backend)
return flags;
}
static ClutterStageWindow *
clutter_backend_real_create_stage (ClutterBackend *backend,
ClutterStage *wrapper,
GError **error)
{
ClutterBackendClass *klass;
if (!clutter_feature_available (CLUTTER_FEATURE_STAGE_MULTIPLE))
{
ClutterStageManager *manager = clutter_stage_manager_get_default ();
if (clutter_stage_manager_get_default_stage (manager) != NULL)
{
g_set_error (error, CLUTTER_INIT_ERROR,
CLUTTER_INIT_ERROR_BACKEND,
_("The backend of type '%s' does not support "
"creating multiple stages"),
G_OBJECT_TYPE_NAME (backend));
return NULL;
}
}
klass = CLUTTER_BACKEND_GET_CLASS (backend);
g_assert (klass->stage_window_type != G_TYPE_INVALID);
return g_object_new (klass->stage_window_type,
"backend", backend,
"wrapper", wrapper,
NULL);
}
static const char *allowed_backends;
static ClutterBackend * (* custom_backend_func) (void);
static const struct {
const char *name;
ClutterBackend * (* create_backend) (void);
@ -517,15 +457,18 @@ static const struct {
#ifdef CLUTTER_WINDOWING_X11
{ CLUTTER_WINDOWING_X11, clutter_backend_x11_new },
#endif
#ifdef CLUTTER_WINDOWING_WAYLAND
{ CLUTTER_WINDOWING_WAYLAND, clutter_backend_wayland_new },
#endif
#ifdef CLUTTER_WINDOWING_EGL
{ CLUTTER_WINDOWING_EGL, clutter_backend_egl_native_new },
#endif
{ NULL, NULL },
};
void
clutter_set_custom_backend_func (ClutterBackend *(* func) (void))
{
custom_backend_func = func;
}
ClutterBackend *
_clutter_create_backend (void)
{
@ -535,6 +478,16 @@ _clutter_create_backend (void)
char **backends;
int i;
if (custom_backend_func)
{
retval = custom_backend_func ();
if (!retval)
g_error ("Failed to create custom backend.");
return retval;
}
if (allowed_backends == NULL)
allowed_backends = "*";
@ -662,8 +615,6 @@ clutter_backend_class_init (ClutterBackendClass *klass)
gobject_class->dispose = clutter_backend_dispose;
gobject_class->finalize = clutter_backend_finalize;
klass->stage_window_type = G_TYPE_INVALID;
/**
* ClutterBackend::resolution-changed:
* @backend: the #ClutterBackend that emitted the signal
@ -725,9 +676,7 @@ clutter_backend_class_init (ClutterBackendClass *klass)
klass->get_device_manager = clutter_backend_real_get_device_manager;
klass->translate_event = clutter_backend_real_translate_event;
klass->create_context = clutter_backend_real_create_context;
klass->ensure_context = clutter_backend_real_ensure_context;
klass->get_features = clutter_backend_real_get_features;
klass->create_stage = clutter_backend_real_create_stage;
}
static void
@ -818,87 +767,6 @@ _clutter_backend_create_context (ClutterBackend *backend,
return klass->create_context (backend, error);
}
void
_clutter_backend_ensure_context_internal (ClutterBackend *backend,
ClutterStage *stage)
{
ClutterBackendClass *klass = CLUTTER_BACKEND_GET_CLASS (backend);
if (G_LIKELY (klass->ensure_context))
klass->ensure_context (backend, stage);
}
void
_clutter_backend_ensure_context (ClutterBackend *backend,
ClutterStage *stage)
{
static ClutterStage *current_context_stage = NULL;
g_assert (CLUTTER_IS_BACKEND (backend));
g_assert (CLUTTER_IS_STAGE (stage));
if (current_context_stage != stage ||
!clutter_actor_is_realized (CLUTTER_ACTOR (stage)))
{
ClutterStage *new_stage = NULL;
if (!clutter_actor_is_realized (CLUTTER_ACTOR (stage)))
{
new_stage = NULL;
CLUTTER_NOTE (BACKEND,
"Stage [%p] is not realized, unsetting the stage",
stage);
}
else
{
new_stage = stage;
CLUTTER_NOTE (BACKEND,
"Setting the new stage [%p]",
new_stage);
}
/* XXX: Until Cogl becomes fully responsible for backend windows
* Clutter need to manually keep it informed of the current window size
*
* NB: This must be done after we ensure_context above because Cogl
* always assumes there is a current GL context.
*/
if (new_stage != NULL)
{
float width, height;
_clutter_backend_ensure_context_internal (backend, new_stage);
clutter_actor_get_size (CLUTTER_ACTOR (stage), &width, &height);
cogl_onscreen_clutter_backend_set_size (width, height);
/* Eventually we will have a separate CoglFramebuffer for
* each stage and each one will track private projection
* matrix and viewport state, but until then we need to make
* sure we update the projection and viewport whenever we
* switch between stages.
*
* This dirty mechanism will ensure they are asserted before
* the next paint...
*/
_clutter_stage_dirty_viewport (stage);
_clutter_stage_dirty_projection (stage);
}
/* FIXME: With a NULL stage and thus no active context it may make more
* sense to clean the context but then re call with the default stage
* so at least there is some kind of context in place (as to avoid
* potential issue of GL calls with no context).
*/
current_context_stage = new_stage;
}
else
CLUTTER_NOTE (BACKEND, "Stage is the same");
}
ClutterFeatureFlags
_clutter_backend_get_features (ClutterBackend *backend)
{
@ -1346,7 +1214,7 @@ _clutter_backend_remove_event_translator (ClutterBackend *backend,
}
/**
* clutter_backend_get_cogl_context:
* clutter_backend_get_cogl_context: (skip)
* @backend: a #ClutterBackend
*
* Retrieves the #CoglContext associated with the given clutter

View File

@ -31,9 +31,7 @@
#include <cairo.h>
#include <pango/pango.h>
#ifdef COGL_ENABLE_EXPERIMENTAL_API
#include <cogl/cogl.h>
#endif
#include <clutter/clutter-config.h>
#include <clutter/clutter-types.h>
@ -73,10 +71,8 @@ void clutter_backend_set_font_options (Clutter
CLUTTER_AVAILABLE_IN_ALL
const cairo_font_options_t * clutter_backend_get_font_options (ClutterBackend *backend);
#if defined (COGL_ENABLE_EXPERIMENTAL_API) && defined (CLUTTER_ENABLE_EXPERIMENTAL_API)
CLUTTER_AVAILABLE_IN_1_8
CoglContext * clutter_backend_get_cogl_context (ClutterBackend *backend);
#endif
G_END_DECLS

View File

@ -31,7 +31,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-types.h"

View File

@ -21,6 +21,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "clutter-build-config.h"
#include <glib.h>
#include <string.h>
#include "clutter-bezier.h"
@ -57,6 +59,10 @@
#define CBZ_T_STEP (CBZ_T_ONE / CBZ_T_SAMPLES)
#define CBZ_L_STEP (CBZ_T_ONE / CBZ_T_SAMPLES)
#define FIXED_BITS (32)
#define FIXED_Q (FIXED_BITS - 16)
#define FIXED_FROM_INT(x) ((x) << FIXED_Q)
typedef gint32 _FixedT;
/*
@ -186,6 +192,90 @@ _clutter_bezier_advance (const ClutterBezier *b, gint L, ClutterKnot * knot)
knot->x, knot->y);
}
static int
sqrti (int number)
{
#if defined __SSE2__
/* The GCC built-in with SSE2 (sqrtsd) is up to twice as fast as
* the pure integer code below. It is also more accurate.
*/
return __builtin_sqrt (number);
#else
/* This is a fixed point implementation of the Quake III sqrt algorithm,
* described, for example, at
* http://www.codemaestro.com/reviews/review00000105.html
*
* While the original QIII is extremely fast, the use of floating division
* and multiplication makes it perform very on arm processors without FPU.
*
* The key to successfully replacing the floating point operations with
* fixed point is in the choice of the fixed point format. The QIII
* algorithm does not calculate the square root, but its reciprocal ('y'
* below), which is only at the end turned to the inverse value. In order
* for the algorithm to produce satisfactory results, the reciprocal value
* must be represented with sufficient precission; the 16.16 we use
* elsewhere in clutter is not good enough, and 10.22 is used instead.
*/
_FixedT x;
uint32_t y_1; /* 10.22 fixed point */
uint32_t f = 0x600000; /* '1.5' as 10.22 fixed */
union
{
float f;
uint32_t i;
} flt, flt2;
flt.f = number;
x = FIXED_FROM_INT (number) / 2;
/* The QIII initial estimate */
flt.i = 0x5f3759df - ( flt.i >> 1 );
/* Now, we convert the float to 10.22 fixed. We exploit the mechanism
* described at http://www.d6.com/users/checker/pdfs/gdmfp.pdf.
*
* We want 22 bit fraction; a single precission float uses 23 bit
* mantisa, so we only need to add 2^(23-22) (no need for the 1.5
* multiplier as we are only dealing with positive numbers).
*
* Note: we have to use two separate variables here -- for some reason,
* if we try to use just the flt variable, gcc on ARM optimises the whole
* addition out, and it all goes pear shape, since without it, the bits
* in the float will not be correctly aligned.
*/
flt2.f = flt.f + 2.0;
flt2.i &= 0x7FFFFF;
/* Now we correct the estimate */
y_1 = (flt2.i >> 11) * (flt2.i >> 11);
y_1 = (y_1 >> 8) * (x >> 8);
y_1 = f - y_1;
flt2.i = (flt2.i >> 11) * (y_1 >> 11);
/* If the original argument is less than 342, we do another
* iteration to improve precission (for arguments >= 342, the single
* iteration produces generally better results).
*/
if (x < 171)
{
y_1 = (flt2.i >> 11) * (flt2.i >> 11);
y_1 = (y_1 >> 8) * (x >> 8);
y_1 = f - y_1;
flt2.i = (flt2.i >> 11) * (y_1 >> 11);
}
/* Invert, round and convert from 10.22 to an integer
* 0x1e3c68 is a magical rounding constant that produces slightly
* better results than 0x200000.
*/
return (number * flt2.i + 0x1e3c68) >> 22;
#endif
}
void
_clutter_bezier_init (ClutterBezier *b,
gint x_0, gint y_0,
@ -250,7 +340,7 @@ _clutter_bezier_init (ClutterBezier *b,
int x = _clutter_bezier_t2x (b, t);
int y = _clutter_bezier_t2y (b, t);
guint l = cogl_sqrti ((y - yp)*(y - yp) + (x - xp)*(x - xp));
guint l = sqrti ((y - yp)*(y - yp) + (x - xp)*(x - xp));
l += length[i-1];

View File

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

View File

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

View File

@ -95,7 +95,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-binding-pool.h"

View File

@ -38,7 +38,7 @@
#define CLUTTER_BLUR_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BLUR_EFFECT, ClutterBlurEffectClass))
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API

View File

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

View File

@ -38,7 +38,7 @@
#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 "config.h"
#include "clutter-build-config.h"
#endif
#include <math.h>

View File

@ -28,7 +28,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-cairo.h"

View File

@ -43,7 +43,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include <cogl/cogl.h>
@ -401,7 +401,7 @@ clutter_canvas_emit_draw (ClutterCanvas *self)
gboolean res;
cairo_t *cr;
g_assert (priv->width > 0 && priv->width > 0);
g_assert (priv->height > 0 && priv->width > 0);
priv->dirty = TRUE;

View File

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

View File

@ -93,7 +93,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-click-action.h"

View File

@ -38,7 +38,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API

View File

@ -1,52 +0,0 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Copyright (C) 2012 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __CLUTTER_COGL_COMPAT_H__
#define __CLUTTER_COGL_COMPAT_H__
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
#error "Only <clutter/clutter.h> can be included directly."
#endif
G_BEGIN_DECLS
/* XXX: Some public Clutter apis depend on Cogl types that have been
* removed from the Cogl 2.0 experimental api.
*
* If somone has opted to use the Cogl 2.0 experimental api by
* defining COGL_ENABLE_EXPERIMENTAL_2_0_API then we need to define
* some place holder typdefs for compatability.
*
* NB: we build all clutter internals with COGL_ENABLE_EXPERIMENTAL_2_0_API
* defined.
*/
#ifdef COGL_ENABLE_EXPERIMENTAL_2_0_API
/* CoglMaterial has been replaced with CoglPipeline in Cogl 2.0 */
typedef struct _CoglMaterial CoglMaterial;
#endif
G_END_DECLS
#endif /* __CLUTTER_COGL_COMPAT_H__ */

View File

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

View File

@ -38,7 +38,7 @@
#define CLUTTER_COLORIZE_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_COLORIZE_EFFECT, ClutterColorizeEffectClass))
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API

View File

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

View File

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

View File

@ -37,7 +37,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-content-private.h"

View File

@ -52,7 +52,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API

View File

@ -20,7 +20,6 @@
#include "deprecated/clutter-box.h"
#include "deprecated/clutter-cairo-texture.h"
#include "deprecated/clutter-container.h"
#include "deprecated/clutter-fixed.h"
#include "deprecated/clutter-frame-source.h"
#include "deprecated/clutter-group.h"
#include "deprecated/clutter-input-device.h"

View File

@ -40,7 +40,7 @@
#define CLUTTER_DESATURATE_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_DESATURATE_EFFECT, ClutterDesaturateEffectClass))
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API

View File

@ -131,9 +131,16 @@ struct _ClutterInputDevice
gchar *vendor_id;
gchar *product_id;
gchar *node_path;
GPtrArray *tools;
gint n_rings;
gint n_strips;
gint n_mode_groups;
ClutterInputDeviceMapping mapping_mode;
guint has_cursor : 1;
guint is_enabled : 1;
};

View File

@ -37,7 +37,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-backend-private.h"
@ -47,6 +47,7 @@
#include "clutter-marshal.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include "clutter-virtual-input-device.h"
struct _ClutterDeviceManagerPrivate
{
@ -435,3 +436,25 @@ _clutter_device_manager_get_backend (ClutterDeviceManager *manager)
return manager->priv->backend;
}
/**
* clutter_device_manager_create_virtual_device:
* @device_manager: a #ClutterDeviceManager
* @device_type: the type of the virtual device
*
* Creates a virtual input device.
*
* Returns: (transfer full): a newly created virtual device
**/
ClutterVirtualInputDevice *
clutter_device_manager_create_virtual_device (ClutterDeviceManager *device_manager,
ClutterInputDeviceType device_type)
{
ClutterDeviceManagerClass *manager_class;
g_return_val_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager), NULL);
manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
return manager_class->create_virtual_device (device_manager,
device_type);
}

View File

@ -83,6 +83,8 @@ struct _ClutterDeviceManagerClass
ClutterInputDevice *device);
void (* select_stage_events) (ClutterDeviceManager *manager,
ClutterStage *stage);
ClutterVirtualInputDevice *(* create_virtual_device) (ClutterDeviceManager *manager,
ClutterInputDeviceType device_type);
/* padding */
gpointer _padding[7];
@ -105,6 +107,10 @@ CLUTTER_AVAILABLE_IN_1_2
ClutterInputDevice * clutter_device_manager_get_core_device (ClutterDeviceManager *device_manager,
ClutterInputDeviceType device_type);
CLUTTER_AVAILABLE_IN_ALL
ClutterVirtualInputDevice *clutter_device_manager_create_virtual_device (ClutterDeviceManager *device_manager,
ClutterInputDeviceType device_type);
G_END_DECLS
#endif /* __CLUTTER_DEVICE_MANAGER_H__ */

View File

@ -64,7 +64,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-drag-action.h"

View File

@ -59,7 +59,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-drop-action.h"

View File

@ -1,4 +1,4 @@
#include "config.h"
#include "clutter-build-config.h"
#include "clutter-easing.h"

View File

@ -161,7 +161,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-effect.h"

View File

@ -1,5 +1,5 @@
/*** BEGIN file-header ***/
#include "config.h"
#include "clutter-build-config.h"
#include "clutter-enum-types.h"
/*** END file-header ***/

View File

@ -794,6 +794,10 @@ typedef enum { /*< prefix=CLUTTER >*/
CLUTTER_TOUCHPAD_SWIPE,
CLUTTER_PROXIMITY_IN,
CLUTTER_PROXIMITY_OUT,
CLUTTER_PAD_BUTTON_PRESS,
CLUTTER_PAD_BUTTON_RELEASE,
CLUTTER_PAD_STRIP,
CLUTTER_PAD_RING,
CLUTTER_EVENT_LAST /* helper */
} ClutterEventType;
@ -900,6 +904,7 @@ typedef enum { /*< prefix=CLUTTER_FLOW >*/
* @CLUTTER_PEN_DEVICE: A pen device
* @CLUTTER_ERASER_DEVICE: An eraser device
* @CLUTTER_CURSOR_DEVICE: A cursor device
* @CLUTTER_PAD_DEVICE: A tablet pad
* @CLUTTER_N_DEVICE_TYPES: The number of device types
*
* The types of input devices available.
@ -920,6 +925,7 @@ typedef enum {
CLUTTER_PEN_DEVICE,
CLUTTER_ERASER_DEVICE,
CLUTTER_CURSOR_DEVICE,
CLUTTER_PAD_DEVICE,
CLUTTER_N_DEVICE_TYPES
} ClutterInputDeviceType;
@ -1520,6 +1526,16 @@ typedef enum {
CLUTTER_INPUT_DEVICE_TOOL_LENS
} ClutterInputDeviceToolType;
typedef enum {
CLUTTER_INPUT_DEVICE_PAD_SOURCE_UNKNOWN,
CLUTTER_INPUT_DEVICE_PAD_SOURCE_FINGER,
} ClutterInputDevicePadSource;
typedef enum {
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE,
CLUTTER_INPUT_DEVICE_MAPPING_RELATIVE,
} ClutterInputDeviceMapping;
G_END_DECLS
#endif /* __CLUTTER_ENUMS_H__ */

View File

@ -1,4 +1,4 @@
#include "config.h"
#include "clutter-build-config.h"
#include "clutter-event-translator.h"

View File

@ -29,6 +29,7 @@ struct _ClutterEventTranslatorIface
ClutterEvent *translated);
};
CLUTTER_AVAILABLE_IN_MUTTER
GType _clutter_event_translator_get_type (void) G_GNUC_CONST;
ClutterTranslateReturn _clutter_event_translator_translate_event (ClutterEventTranslator *translator,

View File

@ -24,7 +24,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-backend-private.h"
@ -413,6 +413,10 @@ clutter_event_get_position (const ClutterEvent *event,
case CLUTTER_EVENT_LAST:
case CLUTTER_PROXIMITY_IN:
case CLUTTER_PROXIMITY_OUT:
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
case CLUTTER_PAD_STRIP:
case CLUTTER_PAD_RING:
clutter_point_init (position, 0.f, 0.f);
break;
@ -483,6 +487,10 @@ clutter_event_set_coords (ClutterEvent *event,
case CLUTTER_EVENT_LAST:
case CLUTTER_PROXIMITY_IN:
case CLUTTER_PROXIMITY_OUT:
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
case CLUTTER_PAD_STRIP:
case CLUTTER_PAD_RING:
break;
case CLUTTER_ENTER:
@ -811,9 +819,15 @@ clutter_event_get_button (const ClutterEvent *event)
{
g_return_val_if_fail (event != NULL, 0);
g_return_val_if_fail (event->type == CLUTTER_BUTTON_PRESS ||
event->type == CLUTTER_BUTTON_RELEASE, 0);
event->type == CLUTTER_BUTTON_RELEASE ||
event->type == CLUTTER_PAD_BUTTON_PRESS ||
event->type == CLUTTER_PAD_BUTTON_RELEASE, 0);
return event->button.button;
if (event->type == CLUTTER_BUTTON_PRESS ||
event->type == CLUTTER_BUTTON_RELEASE)
return event->button.button;
else
return event->pad_button.button;
}
/**
@ -1133,6 +1147,19 @@ clutter_event_set_device (ClutterEvent *event,
case CLUTTER_PROXIMITY_OUT:
event->proximity.device = device;
break;
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
event->pad_button.device = device;
break;
case CLUTTER_PAD_STRIP:
event->pad_strip.device = device;
break;
case CLUTTER_PAD_RING:
event->pad_ring.device = device;
break;
}
}
@ -1217,6 +1244,19 @@ clutter_event_get_device (const ClutterEvent *event)
case CLUTTER_PROXIMITY_OUT:
device = event->proximity.device;
break;
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
device = event->pad_button.device;
break;
case CLUTTER_PAD_STRIP:
device = event->pad_strip.device;
break;
case CLUTTER_PAD_RING:
device = event->pad_ring.device;
break;
}
return device;
@ -1708,6 +1748,10 @@ clutter_event_get_axes (const ClutterEvent *event,
case CLUTTER_TOUCHPAD_PINCH:
case CLUTTER_TOUCHPAD_SWIPE:
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
case CLUTTER_PAD_STRIP:
case CLUTTER_PAD_RING:
break;
}
@ -2108,3 +2152,24 @@ clutter_event_get_scroll_finish_flags (const ClutterEvent *event)
return event->scroll.finish_flags;
}
guint
clutter_event_get_mode_group (const ClutterEvent *event)
{
g_return_val_if_fail (event->type == CLUTTER_PAD_BUTTON_PRESS ||
event->type == CLUTTER_PAD_BUTTON_RELEASE ||
event->type == CLUTTER_PAD_RING ||
event->type == CLUTTER_PAD_STRIP, 0);
switch (event->type)
{
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
return event->pad_button.group;
case CLUTTER_PAD_RING:
return event->pad_ring.group;
case CLUTTER_PAD_STRIP:
return event->pad_strip.group;
default:
return 0;
}
}

View File

@ -118,6 +118,9 @@ typedef struct _ClutterTouchEvent ClutterTouchEvent;
typedef struct _ClutterTouchpadPinchEvent ClutterTouchpadPinchEvent;
typedef struct _ClutterTouchpadSwipeEvent ClutterTouchpadSwipeEvent;
typedef struct _ClutterProximityEvent ClutterProximityEvent;
typedef struct _ClutterPadButtonEvent ClutterPadButtonEvent;
typedef struct _ClutterPadStripEvent ClutterPadStripEvent;
typedef struct _ClutterPadRingEvent ClutterPadRingEvent;
/**
* ClutterAnyEvent:
@ -493,6 +496,49 @@ struct _ClutterTouchpadSwipeEvent
gfloat dy;
};
struct _ClutterPadButtonEvent
{
ClutterEventType type;
guint32 time;
ClutterEventFlags flags;
ClutterStage *stage;
ClutterActor *source;
guint32 button;
guint32 group;
ClutterInputDevice *device;
};
struct _ClutterPadStripEvent
{
ClutterEventType type;
guint32 time;
ClutterEventFlags flags;
ClutterStage *stage;
ClutterActor *source;
ClutterInputDevice *device;
ClutterInputDevicePadSource strip_source;
guint32 strip_number;
guint32 group;
gdouble value;
};
struct _ClutterPadRingEvent
{
ClutterEventType type;
guint32 time;
ClutterEventFlags flags;
ClutterStage *stage;
ClutterActor *source;
ClutterInputDevice *device;
ClutterInputDevicePadSource ring_source;
guint32 ring_number;
guint32 group;
gdouble angle;
};
/**
* ClutterEvent:
*
@ -516,6 +562,9 @@ union _ClutterEvent
ClutterTouchpadPinchEvent touchpad_pinch;
ClutterTouchpadSwipeEvent touchpad_swipe;
ClutterProximityEvent proximity;
ClutterPadButtonEvent pad_button;
ClutterPadStripEvent pad_strip;
ClutterPadRingEvent pad_ring;
};
/**
@ -722,6 +771,10 @@ void clutter_event_get_gesture_motion_delta (const Clut
ClutterScrollSource clutter_event_get_scroll_source (const ClutterEvent *event);
ClutterScrollFinishFlags clutter_event_get_scroll_finish_flags (const ClutterEvent *event);
CLUTTER_AVAILABLE_IN_ALL
guint clutter_event_get_mode_group (const ClutterEvent *event);
G_END_DECLS
#endif /* __CLUTTER_EVENT_H__ */

View File

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

View File

@ -35,7 +35,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-debug.h"

View File

@ -28,7 +28,7 @@
it only exists because that class is abstract */
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-flatten-effect.h"

View File

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

View File

@ -84,7 +84,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-gesture-action-private.h"

View File

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

View File

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

View File

@ -37,7 +37,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API

View File

@ -131,10 +131,8 @@ gboolean clutter_image_set_bytes (ClutterImage
guint row_stride,
GError **error);
#if defined(COGL_ENABLE_EXPERIMENTAL_API) && defined(CLUTTER_ENABLE_EXPERIMENTAL_API)
CLUTTER_AVAILABLE_IN_1_10
CoglTexture * clutter_image_get_texture (ClutterImage *image);
#endif
G_END_DECLS

View File

@ -22,7 +22,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-input-device-tool.h"
@ -34,12 +34,14 @@ struct _ClutterInputDeviceToolPrivate
{
ClutterInputDeviceToolType type;
guint64 serial;
guint64 id;
};
enum {
PROP_0,
PROP_TYPE,
PROP_SERIAL,
PROP_ID,
PROP_LAST
};
@ -66,6 +68,9 @@ clutter_input_device_tool_set_property (GObject *object,
case PROP_SERIAL:
priv->serial = g_value_get_uint64 (value);
break;
case PROP_ID:
priv->id = g_value_get_uint64 (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@ -90,6 +95,9 @@ clutter_input_device_tool_get_property (GObject *object,
case PROP_SERIAL:
g_value_set_uint64 (value, priv->serial);
break;
case PROP_ID:
g_value_set_uint64 (value, priv->id);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@ -116,6 +124,12 @@ clutter_input_device_tool_class_init (ClutterInputDeviceToolClass *klass)
P_("Tool serial"),
0, G_MAXUINT64, 0,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
props[PROP_ID] =
g_param_spec_uint64 ("id",
P_("Tool ID"),
P_("Tool ID"),
0, G_MAXUINT64, 0,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_properties (gobject_class, PROP_LAST, props);
}
@ -136,7 +150,7 @@ clutter_input_device_tool_init (ClutterInputDeviceTool *tool)
*
* Since: 1.28
**/
guint
guint64
clutter_input_device_tool_get_serial (ClutterInputDeviceTool *tool)
{
ClutterInputDeviceToolPrivate *priv;
@ -170,3 +184,24 @@ clutter_input_device_tool_get_tool_type (ClutterInputDeviceTool *tool)
return priv->type;
}
/**
* clutter_input_device_tool_get_id:
* @tool: a #ClutterInputDeviceTool
*
* Gets the ID of this tool, this value can be used to identify a
* physical tool (eg. a tablet pen) across program executions.
*
* Returns: The tool ID for this tool
**/
guint64
clutter_input_device_tool_get_id (ClutterInputDeviceTool *tool)
{
ClutterInputDeviceToolPrivate *priv;
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE_TOOL (tool), 0);
priv = clutter_input_device_tool_get_instance_private (tool);
return priv->id;
}

View File

@ -56,11 +56,14 @@ CLUTTER_AVAILABLE_IN_ALL
GType clutter_input_device_tool_get_type (void) G_GNUC_CONST;
CLUTTER_AVAILABLE_IN_ALL
guint clutter_input_device_tool_get_serial (ClutterInputDeviceTool *tool);
guint64 clutter_input_device_tool_get_serial (ClutterInputDeviceTool *tool);
CLUTTER_AVAILABLE_IN_ALL
ClutterInputDeviceToolType clutter_input_device_tool_get_tool_type (ClutterInputDeviceTool *tool);
CLUTTER_AVAILABLE_IN_ALL
guint64 clutter_input_device_tool_get_id (ClutterInputDeviceTool *tool);
G_END_DECLS
#endif /* __CLUTTER_INPUT_DEVICE_TOOL_H__ */

View File

@ -32,7 +32,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-input-device.h"
@ -70,6 +70,12 @@ enum
PROP_VENDOR_ID,
PROP_PRODUCT_ID,
PROP_N_STRIPS,
PROP_N_RINGS,
PROP_N_MODE_GROUPS,
PROP_DEVICE_NODE,
PROP_MAPPING_MODE,
PROP_LAST
};
@ -195,6 +201,26 @@ clutter_input_device_set_property (GObject *gobject,
self->product_id = g_value_dup_string (value);
break;
case PROP_N_RINGS:
self->n_rings = g_value_get_int (value);
break;
case PROP_N_STRIPS:
self->n_strips = g_value_get_int (value);
break;
case PROP_N_MODE_GROUPS:
self->n_mode_groups = g_value_get_int (value);
break;
case PROP_DEVICE_NODE:
self->node_path = g_value_dup_string (value);
break;
case PROP_MAPPING_MODE:
self->mapping_mode = g_value_get_enum (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
break;
@ -255,6 +281,26 @@ clutter_input_device_get_property (GObject *gobject,
g_value_set_string (value, self->product_id);
break;
case PROP_N_RINGS:
g_value_set_int (value, self->n_rings);
break;
case PROP_N_STRIPS:
g_value_set_int (value, self->n_strips);
break;
case PROP_N_MODE_GROUPS:
g_value_set_int (value, self->n_mode_groups);
break;
case PROP_DEVICE_NODE:
g_value_set_string (value, self->node_path);
break;
case PROP_MAPPING_MODE:
g_value_set_enum (value, self->mapping_mode);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
break;
@ -432,6 +478,42 @@ clutter_input_device_class_init (ClutterInputDeviceClass *klass)
NULL,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
obj_props[PROP_N_RINGS] =
g_param_spec_int ("n-rings",
P_("Number of rings"),
P_("Number of rings (circular sliders) in this device"),
0, G_MAXINT, 0,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
obj_props[PROP_N_STRIPS] =
g_param_spec_int ("n-strips",
P_("Number of strips"),
P_("Number of strips (linear sliders) in this device"),
0, G_MAXINT, 0,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
obj_props[PROP_N_MODE_GROUPS] =
g_param_spec_int ("n-mode-groups",
P_("Number of mode groups"),
P_("Number of mode groups"),
0, G_MAXINT, 0,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
obj_props[PROP_DEVICE_NODE] =
g_param_spec_string ("device-node",
P_("Device node path"),
P_("Device node path"),
NULL,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
obj_props[PROP_MAPPING_MODE] =
g_param_spec_enum ("mapping-mode",
P_("Device mapping mode"),
P_("Device mapping mode"),
CLUTTER_TYPE_INPUT_DEVICE_MAPPING,
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE,
CLUTTER_PARAM_READWRITE);
gobject_class->dispose = clutter_input_device_dispose;
gobject_class->set_property = clutter_input_device_set_property;
gobject_class->get_property = clutter_input_device_get_property;
@ -2066,3 +2148,64 @@ clutter_input_device_update_from_tool (ClutterInputDevice *device,
if (device_class->update_from_tool)
device_class->update_from_tool (device, tool);
}
gint
clutter_input_device_get_n_rings (ClutterInputDevice *device)
{
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), 0);
return device->n_rings;
}
gint
clutter_input_device_get_n_strips (ClutterInputDevice *device)
{
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), 0);
return device->n_strips;
}
gint
clutter_input_device_get_n_mode_groups (ClutterInputDevice *device)
{
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), 0);
g_return_val_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_PAD_DEVICE, 0);
return device->n_mode_groups;
}
const gchar *
clutter_input_device_get_device_node (ClutterInputDevice *device)
{
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), NULL);
return device->node_path;
}
ClutterInputDeviceMapping
clutter_input_device_get_mapping_mode (ClutterInputDevice *device)
{
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device),
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE);
g_return_val_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_TABLET_DEVICE,
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE);
return device->mapping_mode;
}
void
clutter_input_device_set_mapping_mode (ClutterInputDevice *device,
ClutterInputDeviceMapping mapping)
{
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
g_return_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_TABLET_DEVICE);
if (device->mapping_mode == mapping)
return;
device->mapping_mode = mapping;
g_object_notify (G_OBJECT (device), "mapping-mode");
}

View File

@ -140,6 +140,23 @@ const gchar * clutter_input_device_get_vendor_id (ClutterInputDev
CLUTTER_AVAILABLE_IN_1_22
const gchar * clutter_input_device_get_product_id (ClutterInputDevice *device);
CLUTTER_AVAILABLE_IN_ALL
gint clutter_input_device_get_n_rings (ClutterInputDevice *device);
CLUTTER_AVAILABLE_IN_ALL
gint clutter_input_device_get_n_strips (ClutterInputDevice *device);
CLUTTER_AVAILABLE_IN_ALL
gint clutter_input_device_get_n_mode_groups (ClutterInputDevice *device);
CLUTTER_AVAILABLE_IN_ALL
const gchar * clutter_input_device_get_device_node (ClutterInputDevice *device);
CLUTTER_AVAILABLE_IN_ALL
ClutterInputDeviceMapping clutter_input_device_get_mapping_mode (ClutterInputDevice *device);
CLUTTER_AVAILABLE_IN_ALL
void clutter_input_device_set_mapping_mode (ClutterInputDevice *device,
ClutterInputDeviceMapping mapping);
G_END_DECLS
#endif /* __CLUTTER_INPUT_DEVICE_H__ */

View File

@ -46,7 +46,7 @@
* #ClutterInterval is available since Clutter 1.0
*/
#include "config.h"
#include "clutter-build-config.h"
#include <stdlib.h>
#include <string.h>
@ -62,9 +62,6 @@
#include "clutter-scriptable.h"
#include "clutter-script-private.h"
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
#include "deprecated/clutter-fixed.h"
enum
{
PROP_0,
@ -110,25 +107,6 @@ clutter_interval_real_validate (ClutterInterval *interval,
{
GType pspec_gtype = G_PARAM_SPEC_VALUE_TYPE (pspec);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
/* check the GTypes we provide first */
if (pspec_gtype == COGL_TYPE_FIXED)
{
ClutterParamSpecFixed *pspec_fixed = CLUTTER_PARAM_SPEC_FIXED (pspec);
CoglFixed a, b;
a = b = 0;
clutter_interval_get_interval (interval, &a, &b);
if ((a >= pspec_fixed->minimum && a <= pspec_fixed->maximum) &&
(b >= pspec_fixed->minimum && b <= pspec_fixed->maximum))
return TRUE;
else
return FALSE;
}
G_GNUC_END_IGNORE_DEPRECATIONS;
/* then check the fundamental types */
switch (G_TYPE_FUNDAMENTAL (pspec_gtype))
{

View File

@ -63,7 +63,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-keyframe-transition.h"

View File

@ -1,4 +1,4 @@
#include "config.h"
#include "clutter-build-config.h"
#include <glib.h>

View File

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

View File

@ -35,7 +35,7 @@
* #ClutterLayoutMeta is available since Clutter 1.2
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-layout-meta.h"

View File

@ -128,6 +128,8 @@
#define CLUTTER_AVAILABLE_IN_ALL _CLUTTER_EXTERN
#define CLUTTER_AVAILABLE_IN_MUTTER _CLUTTER_EXTERN
/**
* CLUTTER_VERSION_MIN_REQUIRED:
*
@ -276,6 +278,8 @@
# define CLUTTER_DEPRECATED_IN_1_12_FOR(f) _CLUTTER_EXTERN
#endif
#define CLUTTER_DEPRECATED_IN_MUTTER CLUTTER_DEPRECATED
#if CLUTTER_VERSION_MAX_ALLOWED < CLUTTER_VERSION_1_12
# define CLUTTER_AVAILABLE_IN_1_12 CLUTTER_UNAVAILABLE(1, 12)
#else

View File

@ -48,7 +48,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include <stdlib.h>
@ -62,6 +62,7 @@
#include "clutter-feature.h"
#include "clutter-main.h"
#include "clutter-master-clock.h"
#include "clutter-mutter.h"
#include "clutter-private.h"
#include "clutter-settings-private.h"
#include "clutter-stage-manager.h"
@ -2162,6 +2163,10 @@ _clutter_process_event_details (ClutterActor *stage,
case CLUTTER_KEY_PRESS:
case CLUTTER_KEY_RELEASE:
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
case CLUTTER_PAD_STRIP:
case CLUTTER_PAD_RING:
{
ClutterActor *actor = NULL;

View File

@ -30,7 +30,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-master-clock.h"

View File

@ -32,7 +32,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-master-clock.h"

View File

@ -0,0 +1,45 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Copyright (C) 2016 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __CLUTTER_MUTTER_H__
#define __CLUTTER_MUTTER_H__
#define __CLUTTER_H_INSIDE__
#include "clutter-backend.h"
#include "clutter-macros.h"
#include "clutter-stage-view.h"
#include "cogl/clutter-stage-cogl.h"
#include "x11/clutter-stage-x11.h"
CLUTTER_AVAILABLE_IN_MUTTER
void clutter_set_custom_backend_func (ClutterBackend *(* func) (void));
CLUTTER_AVAILABLE_IN_MUTTER
gboolean _clutter_get_sync_to_vblank (void);
CLUTTER_AVAILABLE_IN_MUTTER
int64_t clutter_stage_get_frame_counter (ClutterStage *stage);
#undef __CLUTTER_H_INSIDE__
#endif /* __CLUTTER_MUTTER_H__ */

View File

@ -63,11 +63,9 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#include "clutter-offscreen-effect.h"
#include "cogl/cogl.h"
@ -520,7 +518,7 @@ clutter_offscreen_effect_get_texture (ClutterOffscreenEffect *effect)
}
/**
* clutter_offscreen_effect_get_target:
* clutter_offscreen_effect_get_target: (skip)
* @effect: a #ClutterOffscreenEffect
*
* Retrieves the material used as a render target for the offscreen

View File

@ -31,7 +31,6 @@
#include <cogl/cogl.h>
#include <clutter/clutter-effect.h>
#include <clutter/clutter-cogl-compat.h>
G_BEGIN_DECLS

View File

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

View File

@ -59,7 +59,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
@ -884,7 +884,7 @@ clutter_paint_node_add_texture_rectangle (ClutterPaintNode *node,
}
/**
* clutter_paint_node_add_path:
* clutter_paint_node_add_path: (skip)
* @node: a #ClutterPaintNode
* @path: a Cogl path
*
@ -912,7 +912,7 @@ clutter_paint_node_add_path (ClutterPaintNode *node,
}
/**
* clutter_paint_node_add_primitive:
* clutter_paint_node_add_primitive: (skip)
* @node: a #ClutterPaintNode
* @primitive: a Cogl primitive
*

View File

@ -66,14 +66,13 @@ void clutter_paint_node_add_texture_rectangle (Clutter
float y_1,
float x_2,
float y_2);
#if defined(COGL_ENABLE_EXPERIMENTAL_API) && defined(CLUTTER_ENABLE_EXPERIMENTAL_API)
CLUTTER_AVAILABLE_IN_1_10
void clutter_paint_node_add_path (ClutterPaintNode *node,
CoglPath *path);
CLUTTER_AVAILABLE_IN_1_10
void clutter_paint_node_add_primitive (ClutterPaintNode *node,
CoglPrimitive *primitive);
#endif /* COGL_ENABLE_EXPERIMENTAL_API && CLUTTER_ENABLE_EXPERIMENTAL_API */
/**
* CLUTTER_VALUE_HOLDS_PAINT_NODE:

View File

@ -32,7 +32,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
@ -511,7 +511,7 @@ clutter_pipeline_node_init (ClutterPipelineNode *self)
}
/**
* clutter_pipeline_node_new:
* clutter_pipeline_node_new: (skip)
* @pipeline: (allow-none): a Cogl pipeline state object, or %NULL
*
* Creates a new #ClutterPaintNode that will use the @pipeline to

View File

@ -118,10 +118,8 @@ typedef struct _ClutterPipelineNodeClass ClutterPipelineNodeClass;
CLUTTER_AVAILABLE_IN_1_10
GType clutter_pipeline_node_get_type (void) G_GNUC_CONST;
#if defined(COGL_ENABLE_EXPERIMENTAL_API) && defined(CLUTTER_ENABLE_EXPERIMENTAL_API)
CLUTTER_AVAILABLE_IN_1_10
ClutterPaintNode * clutter_pipeline_node_new (CoglPipeline *pipeline);
#endif /* COGL_ENABLE_EXPERIMENTAL_API && CLUTTER_ENABLE_EXPERIMENTAL_API */
#define CLUTTER_TYPE_TEXT_NODE (clutter_text_node_get_type ())
#define CLUTTER_TEXT_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_TEXT_NODE, ClutterTextNode))

View File

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

View File

@ -54,7 +54,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-pan-action.h"

View File

@ -37,7 +37,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-path-constraint.h"

View File

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

View File

@ -210,7 +210,6 @@ void _clutter_id_to_color (guint id,
ClutterColor *col);
void _clutter_set_sync_to_vblank (gboolean sync_to_vblank);
gboolean _clutter_get_sync_to_vblank (void);
/* use this function as the accumulator if you have a signal with
* a G_TYPE_BOOLEAN return value; this will stop the emission as
@ -245,6 +244,10 @@ void _clutter_util_rectangle_union (const cairo_rectangle_int_t *src1,
const cairo_rectangle_int_t *src2,
cairo_rectangle_int_t *dest);
gboolean _clutter_util_rectangle_intersection (const cairo_rectangle_int_t *src1,
const cairo_rectangle_int_t *src2,
cairo_rectangle_int_t *dest);
struct _ClutterVertex4
{

View File

@ -31,7 +31,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-property-transition.h"

View File

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

View File

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

View File

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

View File

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

View File

@ -43,7 +43,7 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "clutter-build-config.h"
#endif
#include "clutter-scroll-actor.h"

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