Commit Graph

6397 Commits

Author SHA1 Message Date
Carlos Garnacho
be9997c717 clutter: Add ClutterInputDeviceTool:id property 2016-07-20 19:26:31 +02:00
Carlos Garnacho
04629d2bc2 clutter: Handle pad button events in clutter_event_get_button() 2016-07-20 19:26:31 +02:00
Carlos Garnacho
c789459a31 clutter/evdev: Translate/emit libinput pad events 2016-07-20 19:26:31 +02:00
Carlos Garnacho
2f7602f297 clutter/evdev: Handle management of pad devices 2016-07-20 19:26:31 +02:00
Carlos Garnacho
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
Carlos Garnacho
379c6fb81a clutter: Add pad event types
And their management along the pipeline.
2016-07-20 19:26:31 +02:00
Carlos Garnacho
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
Carlos Garnacho
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
Carlos Garnacho
1d9d176c3f clutter: Add "pad" device type 2016-07-20 19:26:31 +02:00
Florian Müllner
a310ba7649 build: Dist cogl-mutter/cogl-clutter headers 2016-07-20 14:30:57 +02:00
Florian Müllner
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
Jonas Ådahl
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
Carlos Garnacho
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
f31d71ce63 ClutterStageX11: Remove dead code
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
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
Jonas Ådahl
942feadffd ClutterStageX11: Don't exposed unused function
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
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
Jonas Ådahl
2facf26568 clutter: Add test .gitignore files
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
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
Jonas Ådahl
a1bedd4b1c clutter: Remove leftover wayland backend references
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-07-20 14:23:48 +08:00
Owen W. Taylor
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
Rui Matos
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
Florian Müllner
434f22e820 text: Bind <ctrl>A in addition to <ctrl>a
The 'select-all' action is currently only bound to <ctrl>a, which makes
it awkward to use when caps-lock is active, and is inconsistent with GTK+.
Just accept both upper- and lower-case variants.

https://bugzilla.gnome.org/show_bug.cgi?id=766326
2016-05-12 19:51:54 +02:00
Carlos Garnacho
4c6dae0bae evdev: Avoid updating seat pointer position on tablet events 2016-05-03 13:05:06 +02:00
Carlos Garnacho
2b07a493c5 evdev: Implement ClutterInputDevice::update_from_tool
This vfunc pokes the libinput_tool in order to find out the currently
available axes, and updates the device as such.
2016-05-03 13:05:06 +02:00
Carlos Garnacho
eafa04230b main: Allow updating device axes from the current tool
This way devices are ensured the proper axis status at the time
of processing the events.
2016-05-03 13:05:06 +02:00
Carlos Garnacho
7004818508 evdev: Implement tablet events
Tablet proximity, motion and button events are translated into ClutterEvents,
and the device state is updated accordingly.
2016-05-03 13:05:06 +02:00
Carlos Garnacho
bc8b3d9f39 evdev: Implement ClutterInputDeviceTool
This will be backed by a libinput_tool, the type and serial are
fetched from there.
2016-05-03 13:05:06 +02:00
Carlos Garnacho
b63e73e422 events: Add proximity events
These events will be sent on tool proximity of tablet events.
2016-05-03 13:05:06 +02:00
Carlos Garnacho
3602b49a30 event: Add ClutterInputDeviceTool information to clutter events
These can be used to determine the tool that's being in use for a given event
2016-05-03 13:05:06 +02:00
Carlos Garnacho
8b2c888368 input-device: Add ClutterInputDeviceTool
This is an unique opaque struct that identifies a given tool of
a given device.
2016-05-03 13:05:06 +02:00
Carlos Garnacho
ec708fc1a9 enums: Add rotation/slider axes
These will be useful for the tablet tools that have these features.
2016-05-03 13:05:06 +02:00
Carlos Garnacho
6e773389fd evdev: Map LIBINPUT_DEVICE_CAP_TABLET to CLUTTER_TABLET_DEVICE
This is so tablet devices have the correct ClutterInputDeviceType
2016-05-03 13:05:06 +02:00
Carlos Garnacho
fe59da43ef evdev: Pass axis parameters when notifying absolute motion events
This will be useful for tablet support, NULL is given in the current
callers.
2016-05-03 13:05:06 +02:00