diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-11-25 11:48:52 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-12-20 15:01:56 +1000 |
commit | 50881abaef562adf53361d938b72327818989ea0 (patch) | |
tree | 8cfd5bd3467c3d154f770acede915eef24a0ff4a /test | |
parent | 4a7e86dc6b3b2b3857407ff45700f7cfb9e40d2c (diff) | |
download | xf86-input-wacom-50881abaef562adf53361d938b72327818989ea0.tar.gz |
Use WacomDevicePtr as primary context argument
This changes all functions (wherever possible) to take a WacomDevicePtr
instead of an InputInfoPtr as context argument, with the InputInfoPtr
either assigned to priv->pInfo or removed where now superfluous.
This should have no functional changes.
Remaining functions are those required by the X server to have a certain
signature.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r-- | test/wacom-tests.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/test/wacom-tests.c b/test/wacom-tests.c index f0cf16d..7274675 100644 --- a/test/wacom-tests.c +++ b/test/wacom-tests.c @@ -246,7 +246,6 @@ test_normalize_pressure(void) static void test_initial_size(void) { - InputInfoRec info = {0}; WacomDeviceRec priv = {0}; WacomCommonRec common = {0}; @@ -254,7 +253,6 @@ test_initial_size(void) int xres = 1920, yres = 1600; int minx, maxx = 2 * xres, miny, maxy = 2 * yres; - info.private = &priv; priv.common = &common; /* FIXME: we currently assume min of 0 in the driver. we cannot cope @@ -266,7 +264,7 @@ test_initial_size(void) common.wcmResolX = xres; common.wcmResolY = yres; - wcmInitialToolSize(&info); + wcmInitialToolSize(&priv); assert(priv.topX == minx); assert(priv.topY == minx); @@ -286,7 +284,7 @@ test_initial_size(void) common.wcmTouchResolX = xres; common.wcmTouchResolY = yres; - wcmInitialToolSize(&info); + wcmInitialToolSize(&priv); assert(priv.topX == minx); assert(priv.topY == minx); @@ -543,13 +541,13 @@ static void test_set_type(void) reset(info, priv, tool, common); - rc = wcmSetType(&info, NULL); + rc = wcmSetType(&priv, NULL); assert(rc == 0); reset(info, priv, tool, common); - rc = wcmSetType(&info, "stylus"); + rc = wcmSetType(&priv, "stylus"); assert(rc == 1); - assert(is_absolute(&info)); + assert(is_absolute(&priv)); assert(IsStylus(&priv)); assert(!IsTouch(&priv)); assert(!IsEraser(&priv)); @@ -557,10 +555,10 @@ static void test_set_type(void) assert(!IsPad(&priv)); reset(info, priv, tool, common); - rc = wcmSetType(&info, "touch"); + rc = wcmSetType(&priv, "touch"); assert(rc == 1); /* only some touch screens are absolute */ - assert(!is_absolute(&info)); + assert(!is_absolute(&priv)); assert(!IsStylus(&priv)); assert(IsTouch(&priv)); assert(!IsEraser(&priv)); @@ -568,9 +566,9 @@ static void test_set_type(void) assert(!IsPad(&priv)); reset(info, priv, tool, common); - rc = wcmSetType(&info, "eraser"); + rc = wcmSetType(&priv, "eraser"); assert(rc == 1); - assert(is_absolute(&info)); + assert(is_absolute(&priv)); assert(!IsStylus(&priv)); assert(!IsTouch(&priv)); assert(IsEraser(&priv)); @@ -578,9 +576,9 @@ static void test_set_type(void) assert(!IsPad(&priv)); reset(info, priv, tool, common); - rc = wcmSetType(&info, "cursor"); + rc = wcmSetType(&priv, "cursor"); assert(rc == 1); - assert(!is_absolute(&info)); + assert(!is_absolute(&priv)); assert(!IsStylus(&priv)); assert(!IsTouch(&priv)); assert(!IsEraser(&priv)); @@ -588,9 +586,9 @@ static void test_set_type(void) assert(!IsPad(&priv)); reset(info, priv, tool, common); - rc = wcmSetType(&info, "pad"); + rc = wcmSetType(&priv, "pad"); assert(rc == 1); - assert(is_absolute(&info)); + assert(is_absolute(&priv)); assert(!IsStylus(&priv)); assert(!IsTouch(&priv)); assert(!IsEraser(&priv)); @@ -598,7 +596,7 @@ static void test_set_type(void) assert(IsPad(&priv)); reset(info, priv, tool, common); - rc = wcmSetType(&info, "foobar"); + rc = wcmSetType(&priv, "foobar"); assert(rc == 0); #undef reset |