Commit Graph

21705 Commits

Author SHA1 Message Date
0cd46afa8f 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-20 19:26:31 +02:00
c73cc5138b 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-20 19:26:31 +02:00
f51972c2aa backends: Turn MetaInputSettings into a singleton
We will need to fetch information from it at certain places.
The MetaBackend still takes care of freeing it though.
2016-07-20 19:26:31 +02:00
f81e0f8922 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-20 19:26:31 +02:00
1bf263f038 wayland: Implement wp_tablet.path
Now that we have clutter_input_device_get_device_node(), it is trivial
to implement.
2016-07-20 19:26:31 +02:00
257b16680f clutter/x11: Set device node information in XI2 devices 2016-07-20 19:26:31 +02:00
ed6eb8c94b clutter/evdev: Set device node information to evdev devices 2016-07-20 19:26:31 +02:00
95181bdbaa 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-20 19:26:31 +02:00
59be5bf3b1 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-20 19:26:31 +02:00
7f8932b489 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-20 19:26:31 +02:00
f2feb6d53d 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-20 19:26:31 +02:00
47067e6d17 backends: Add empty stubs for tablet configuration
Those will be called when configuring tablets.
2016-07-20 19:26:31 +02:00
3386e5dc39 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-20 19:26:31 +02:00
384400cd24 clutter/evdev: Set tool IDs 2016-07-20 19:26:31 +02:00
be9997c717 clutter: Add ClutterInputDeviceTool:id property 2016-07-20 19:26:31 +02:00
d3be071196 configure: Check for libwacom
It will be used for some advanced tablet features, which we can't
get solely from libinput.
2016-07-20 19:26:31 +02:00
de704e591b 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-20 19:26:31 +02:00
a14f0edcae 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-20 19:26:31 +02:00
bf5324a339 wayland: Add pointer from MetaWaylandTabletSeat to MetaWaylandSeat
It will be useful to backreference to the MetaWaylandSeat from tablet
code.
2016-07-20 19:26:31 +02:00
9855ff010a wayland: Wire up pad device event management
The tablet manager will now lookup the correct MetaWaylandTabletSeat,
and forward the events through it.
2016-07-20 19:26:31 +02:00
6bd06cf40b wayland: Implement pad management in MetaWaylandTabletSeat
Now pads are looked up and notified upon, both on startup and
when plugging a tablet.
2016-07-20 19:26:31 +02:00
01fd218e17 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-20 19:26:31 +02:00
f8c0301ecc wayland: Implement wp_tablet_pad_group 2016-07-20 19:26:31 +02:00
2354643d55 wayland: Implement wp_tablet_pad_strip
This represents pad sliders.
2016-07-20 19:26:31 +02:00
c1d1477c64 wayland: Implement wp_tablet_pad_ring
This object represents pad "wheels"
2016-07-20 19:26:31 +02:00
04629d2bc2 clutter: Handle pad button events in clutter_event_get_button() 2016-07-20 19:26:31 +02:00
c789459a31 clutter/evdev: Translate/emit libinput pad events 2016-07-20 19:26:31 +02:00
2f7602f297 clutter/evdev: Handle management of pad devices 2016-07-20 19:26:31 +02:00
d5459427d5 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-20 19:26:31 +02:00
379c6fb81a clutter: Add pad event types
And their management along the pipeline.
2016-07-20 19:26:31 +02:00
fc5af32cdc 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-20 19:26:31 +02:00
b71d7058db 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-20 19:26:31 +02:00
1d9d176c3f clutter: Add "pad" device type 2016-07-20 19:26:31 +02:00
cd911584eb 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-20 19:26:31 +02:00
2ff629a984 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-20 19:26:31 +02:00
b0a3c472ea wayland: Make MetaWaylandSurfaceRoleCursor derivable 2016-07-20 19:26:31 +02:00
7ecbca6291 wayland: Make additional data in MetaWaylandSurfaceRoleCursor private
This will help subclassing it.
2016-07-20 19:26:31 +02:00
780c66fa73 wayland: Use wl_fixed_t for angle arguments in wp_tablet_tool
This is a change in tablet protocol v2
2016-07-20 19:26:31 +02:00
ffa991d422 wayland: Use tablet protocol v2
This commit merely updates the code generation from the v2 protocol
description.
2016-07-20 19:26:31 +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