Commit graph

18 commits

Author SHA1 Message Date
Carlos Garnacho
fce8b631cc wacom: Rename calibrator API
Add "Cc" prefix so it's more consistent with the rest of the project.
2022-02-12 16:03:37 +00:00
Georges Basile Stavracas Neto
816e6203e3 wacom: Port to GTK4
Many part of this commit were made by Carlos
Garnacho <carlosg@gnome.org>

WIP wacom: Port to GTK4

Lots of stuff missing and probably broken.

wacom: Port CcDrawingArea input to gestures

We have a handy GtkGestureStylus to use here, which avoids direct
handling of GdkEvents.

wacom: Update current stylus tracking to GtkGestureStylus

Use the ::proximity signal to notice when we are being hovered with
a tablet stylus, and look up the tool from there.
2021-12-14 22:34:21 -03:00
Yuri Chornoivan
e7050ab6f4 Fix minor typos 2020-07-20 10:38:09 +03:00
Carlos Garnacho
d51336c2c2 wacom: Port calibrator UI to GTK+
Same dog, different collar. The UI has been ported 1:1 to GTK+, using
GtkBuilder, CSS and event controllers fairly reduced the amount of code
needed for this.

It also allows us to stop initializing clutter-gtk across the several
executables.
2018-11-07 23:02:10 +00:00
Jason Gerecke
50b39dc570 wacom: Drop old_axes from calibration API
The calibration utility was modified in cf408c27b0 to return unitless
padding measurements instead of axis values for storage in gsettings.
Unfortunately, the code still assumes in some places that it is working
with axes rather than paddings. This causes subtle math errors that
result in undesired cursor offsets after the calibration is applied.

Fortunately, this can be simplified, since tablet area is always reset
to the default state before starting calibration, we are sure that the
value will remain constant. Since both axes are in the same 0..1 scale,
calibration code doesn't need to swap X/Y back and forth to calculate
each axis scale.

Additionally, the code to get the calibrated axis values has been moved
into its own function along with a new function that returns padding
values suitable for consumption by g-c-c. All calculations are performed
internally in the 0..1 range.

https://bugzilla.gnome.org/show_bug.cgi?id=784009

Co-Authored-By: Carlos Garnacho <carlosg@gnome.org>
2017-07-05 23:46:22 +02:00
Carlos Garnacho
b26d6acb5f wacom: Make calibrator use GDK for button events
This way we can cut down the last step in the mapping across
GUdevDevice->GsdDevice->GdkDevice->ClutterInputDevice.

https://bugzilla.gnome.org/show_bug.cgi?id=782040
2017-06-30 21:11:54 +02:00
Bastien Nocera
aaf037d9a7 wacom: Fix format errors
format ‘%d’ expects argument of type ‘int’, but argument 2 has type
‘gdouble {aka const double}’
2016-11-16 17:03:49 +01:00
Joaquim Rocha
d78bc9772a wacom: Re-write gui_gtk in Clutter to introduce animations
The name of the file was also changed to calibratorgui.c/h to avoid
it being inconsistent, this way it is no longer dependent on the
the technology.

https://bugzilla.gnome.org/show_bug.cgi?id=667797
2013-05-17 16:36:59 +02:00
Olivier Fourdan
06554439b7 wacom: Do calibration for the selected tool only
As different tools may have different resolutions (e.g.
touch vs. stylus on tablets which support both).

https://bugzilla.gnome.org/show_bug.cgi?id=680114
2012-07-19 16:39:36 +01:00
Bastien Nocera
54ec95051e wacom: Update for new calibrator API 2012-01-12 18:57:45 +00:00
Bastien Nocera
6c215019db wacom: Remove geometry option from test app 2012-01-11 20:09:20 +00:00
Bastien Nocera
1087c92a0a wacom: Debug output by default in test prog 2012-01-11 16:22:44 +00:00
Bastien Nocera
0cd211cfda wacom: Add i18n support to calibrator test prog 2012-01-11 16:22:24 +00:00
Bastien Nocera
0b0cc5bbfd wacom: Remove unused main.h 2012-01-10 19:21:30 +00:00
Bastien Nocera
7b82472645 wacom: s/axys/axis/ 2012-01-10 19:19:24 +00:00
Bastien Nocera
8516b6a1f9 wacom: Remove custom boolean type 2012-01-10 19:12:18 +00:00
Bastien Nocera
ff3fd96310 wacom: Remove custom strdup function 2012-01-10 18:32:54 +00:00
Jason Gerecke
e50dbea195 wacom: Bring over files from xinput-calibrator and build utility
Copies over files from a trimmed version of xinput-calibrator and
modifies the Makefile.am to build the program as a seperate utility.
This is just to verify the functionality of the code when built with
gnome-control-center.

https://bugzilla.gnome.org/show_bug.cgi?id=657423
2012-01-10 18:26:55 +00:00