summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemo Firszt <przemo@firszt.eu>2009-12-09 20:17:17 +0000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-12-12 10:35:32 +1000
commit3c5ce9f7052c1a51208458c588c82bff56ca9ff2 (patch)
tree28d3c0520303303013a27c3e5ddcab3460456bc7
parent34042b54581ad02b64452c4a898f2307718ae511 (diff)
downloadxf86-input-wacom-3c5ce9f7052c1a51208458c588c82bff56ca9ff2.tar.gz
Rename xf86Wcm* generic area check functions to Wcm*
(xf86)WcmPointInArea, (xf86)WcmAreasOverlap & (xf86)WcmAreaListOverlaps are not part of X interface, so xf86 prefix is not needed. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/wcmCommon.c34
-rw-r--r--src/wcmXCommand.c2
-rw-r--r--src/xf86Wacom.c2
-rw-r--r--src/xf86Wacom.h4
4 files changed, 21 insertions, 21 deletions
diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index 822db88..577517f 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -1267,7 +1267,7 @@ static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel,
*/
WacomToolAreaPtr outprox = NULL;
if (tool->current && tool->arealist->next &&
- !xf86WcmPointInArea(tool->current, ds->x, ds->y))
+ !WcmPointInArea(tool->current, ds->x, ds->y))
{
outprox = tool->current;
tool->current = NULL;
@@ -1284,7 +1284,7 @@ static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel,
{
WacomToolAreaPtr area = tool->arealist;
for(; area; area = area->next)
- if (xf86WcmPointInArea(area, ds->x, ds->y))
+ if (WcmPointInArea(area, ds->x, ds->y))
break;
tool->current = area;
}
@@ -1937,9 +1937,9 @@ void xf86WcmRotateTablet(LocalDevicePtr local, int value)
}
}
-/* xf86WcmPointInArea - check whether the point is within the area */
+/* WcmPointInArea - check whether the point is within the area */
-Bool xf86WcmPointInArea(WacomToolAreaPtr area, int x, int y)
+Bool WcmPointInArea(WacomToolAreaPtr area, int x, int y)
{
if (area->topX <= x && x <= area->bottomX &&
area->topY <= y && y <= area->bottomY)
@@ -1947,28 +1947,28 @@ Bool xf86WcmPointInArea(WacomToolAreaPtr area, int x, int y)
return 0;
}
-/* xf86WcmAreasOverlap - check if two areas are overlapping */
+/* WcmAreasOverlap - check if two areas are overlapping */
-static Bool xf86WcmAreasOverlap(WacomToolAreaPtr area1, WacomToolAreaPtr area2)
+static Bool WcmAreasOverlap(WacomToolAreaPtr area1, WacomToolAreaPtr area2)
{
- if (xf86WcmPointInArea(area1, area2->topX, area2->topY) ||
- xf86WcmPointInArea(area1, area2->topX, area2->bottomY) ||
- xf86WcmPointInArea(area1, area2->bottomX, area2->topY) ||
- xf86WcmPointInArea(area1, area2->bottomX, area2->bottomY))
+ if (WcmPointInArea(area1, area2->topX, area2->topY) ||
+ WcmPointInArea(area1, area2->topX, area2->bottomY) ||
+ WcmPointInArea(area1, area2->bottomX, area2->topY) ||
+ WcmPointInArea(area1, area2->bottomX, area2->bottomY))
return 1;
- if (xf86WcmPointInArea(area2, area1->topX, area1->topY) ||
- xf86WcmPointInArea(area2, area1->topX, area1->bottomY) ||
- xf86WcmPointInArea(area2, area1->bottomX, area1->topY) ||
- xf86WcmPointInArea(area2, area1->bottomX, area1->bottomY))
+ if (WcmPointInArea(area2, area1->topX, area1->topY) ||
+ WcmPointInArea(area2, area1->topX, area1->bottomY) ||
+ WcmPointInArea(area2, area1->bottomX, area1->topY) ||
+ WcmPointInArea(area2, area1->bottomX, area1->bottomY))
return 1;
return 0;
}
-/* xf86WcmAreaListOverlaps - check if the area overlaps any area in the list */
-Bool xf86WcmAreaListOverlap(WacomToolAreaPtr area, WacomToolAreaPtr list)
+/* WcmAreaListOverlaps - check if the area overlaps any area in the list */
+Bool WcmAreaListOverlap(WacomToolAreaPtr area, WacomToolAreaPtr list)
{
for (; list; list=list->next)
- if (area != list && xf86WcmAreasOverlap(list, area))
+ if (area != list && WcmAreasOverlap(list, area))
return 1;
return 0;
}
diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index 0cacb8b..90cf1c7 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -317,7 +317,7 @@ int xf86WcmSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
area.bottomX = values[2];
area.bottomY = values[3];
- if (xf86WcmAreaListOverlap(&area, priv->tool->arealist))
+ if (WcmAreaListOverlap(&area, priv->tool->arealist))
return BadValue;
if (!checkonly)
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index e5a7354..05851db 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -227,7 +227,7 @@ static int xf86WcmInitArea(LocalDevicePtr local)
inlist = priv->tool->arealist;
/* The first one in the list is always valid */
- if (area != inlist && xf86WcmAreaListOverlap(area, inlist))
+ if (area != inlist && WcmAreaListOverlap(area, inlist))
{
inlist = priv->tool->arealist;
diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
index d407897..ee6fcba 100644
--- a/src/xf86Wacom.h
+++ b/src/xf86Wacom.h
@@ -161,8 +161,8 @@ void xf86WcmEvent(WacomCommonPtr common, unsigned int channel, const WacomDevice
void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds);
/* generic area check for xf86Wacom.c, wcmCommon.c and wcmXCommand.c */
-Bool xf86WcmPointInArea(WacomToolAreaPtr area, int x, int y);
-Bool xf86WcmAreaListOverlap(WacomToolAreaPtr area, WacomToolAreaPtr list);
+Bool WcmPointInArea(WacomToolAreaPtr area, int x, int y);
+Bool WcmAreaListOverlap(WacomToolAreaPtr area, WacomToolAreaPtr list);
/* Change pad's mode according to it core event status */
int xf86WcmSetPadCoreMode(LocalDevicePtr local);