summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemysław Firszt <przemo@firszt.eu>2009-12-23 15:20:57 +0000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-01-01 12:13:44 +1000
commit27addb06d4ebf6f8988a14174b2823c1a4ab1504 (patch)
tree2b60e332a9428bff53a6e74ec72d50c2bd5ae522
parent2a388e56688300c437926eff2915b10e6e6a06d9 (diff)
Rename xf86Wcm* to wcm* - part 2
Rename xf86WcmTilt2R to wcmTilt2R Rename xf86WcmMappingFactor to wcmMappingFactor Change xf86WcmWrite to wcmWriteWait in comment Rename xf86WcmInitialScreens to wcmInitialScreens Rename xf86WcmDesktopSize to wcmDesktopSize Reneme xf86WcmIsWacomDevice to wcmIsWacomDevice Rename xf86WcmRotateTablet to wcmRotateTablet Rename xf86WcmSuppress to wcmCheckSuppress It's wcmCheckSuppress instead of wcmSuppress to avoid collision with variable with the same name used in xf86WacomDefs.h Rename some Wcm* to wcm* to keep function names consistent Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/wcmCommon.c62
-rw-r--r--src/wcmConfig.c2
-rw-r--r--src/wcmISDV4.c2
-rw-r--r--src/wcmTilt2Rotation.c6
-rw-r--r--src/wcmXCommand.c10
-rw-r--r--src/xf86Wacom.c24
-rw-r--r--src/xf86Wacom.h6
7 files changed, 56 insertions, 56 deletions
diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index 173ee53..32ad82e 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -25,8 +25,8 @@
#include "Xwacom.h"
#include <xkbsrv.h>
-void xf86WcmInitialScreens(LocalDevicePtr local);
-void xf86WcmRotateTablet(LocalDevicePtr local, int value);
+void wcmInitialScreens(LocalDevicePtr local);
+void wcmRotateTablet(LocalDevicePtr local, int value);
void wcmRotateCoordinates(LocalDevicePtr local, int* x, int* y);
extern int xf86WcmDevSwitchModeCall(LocalDevicePtr local, int mode);
@@ -34,7 +34,7 @@ extern void xf86WcmChangeScreen(LocalDevicePtr local, int value);
extern void xf86WcmInitialCoordinates(LocalDevicePtr local, int axes);
extern void xf86WcmVirtualTabletSize(LocalDevicePtr local);
extern void xf86WcmVirtualTabletPadding(LocalDevicePtr local);
-extern void xf86WcmTilt2R(WacomDeviceStatePtr ds);
+extern void wcmTilt2R(WacomDeviceStatePtr ds);
extern void xf86WcmFingerTapToClick(WacomCommonPtr common);
/*****************************************************************************
@@ -49,12 +49,12 @@ static void sendAButton(LocalDevicePtr local, int button, int mask,
int rx, int ry, int rz, int v3, int v4, int v5);
/*****************************************************************************
- * xf86WcmMappingFactor --
+ * wcmMappingFactor --
* calculate the proper tablet to screen mapping factor according to the
* screen/desktop size and the tablet size
****************************************************************************/
-void xf86WcmMappingFactor(LocalDevicePtr local)
+void wcmMappingFactor(LocalDevicePtr local)
{
WacomDevicePtr priv = (WacomDevicePtr) local->private;
@@ -157,7 +157,7 @@ static void xf86WcmSetScreen(LocalDevicePtr local, int v0, int v1)
priv->currentScreen);
}
- xf86WcmMappingFactor(local);
+ wcmMappingFactor(local);
if (!(priv->flags & ABSOLUTE_FLAG) || screenInfo.numScreens == 1 || !priv->wcmMMonitor)
return;
@@ -1018,12 +1018,12 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds)
}
/*****************************************************************************
- * xf86WcmSuppress --
+ * wcmCheckSuppress --
* Determine whether device state has changed enough - return 0
* if not.
****************************************************************************/
-static int xf86WcmSuppress(WacomCommonPtr common, const WacomDeviceState* dsOrig,
+static int wcmCheckSuppress(WacomCommonPtr common, const WacomDeviceState* dsOrig,
WacomDeviceState* dsNew)
{
int suppress = common->wcmSuppress;
@@ -1136,7 +1136,7 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
if (strstr(common->wcmModel->name, "Intuos4"))
{
/* convert Intuos4 mouse tilt to rotation */
- xf86WcmTilt2R(&ds);
+ wcmTilt2R(&ds);
}
fs = &pChannel->rawFilter;
@@ -1183,7 +1183,7 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
}
/* Discard unwanted data */
- suppress = xf86WcmSuppress(common, pLast, &ds);
+ suppress = wcmCheckSuppress(common, pLast, &ds);
if (!suppress)
{
resetSampleCounter(pChannel);
@@ -1361,7 +1361,7 @@ static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel,
*/
WacomToolAreaPtr outprox = NULL;
if (tool->current && tool->arealist->next &&
- !WcmPointInArea(tool->current, ds->x, ds->y))
+ !wcmPointInArea(tool->current, ds->x, ds->y))
{
outprox = tool->current;
tool->current = NULL;
@@ -1378,7 +1378,7 @@ static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel,
{
WacomToolAreaPtr area = tool->arealist;
for(; area; area = area->next)
- if (WcmPointInArea(area, ds->x, ds->y))
+ if (wcmPointInArea(area, ds->x, ds->y))
break;
tool->current = area;
}
@@ -1807,10 +1807,10 @@ static void xf86WcmInitialTVScreens(LocalDevicePtr local)
}
/*****************************************************************************
- * xf86WcmInitialScreens
+ * wcmInitialScreens
****************************************************************************/
-void xf86WcmInitialScreens(LocalDevicePtr local)
+void wcmInitialScreens(LocalDevicePtr local)
{
WacomDevicePtr priv = (WacomDevicePtr)local->private;
int i;
@@ -1914,10 +1914,10 @@ static void rotateOneTool(WacomDevicePtr priv)
}
/*****************************************************************************
- * xf86WcmRotateTablet
+ * wcmRotateTablet
****************************************************************************/
-void xf86WcmRotateTablet(LocalDevicePtr local, int value)
+void wcmRotateTablet(LocalDevicePtr local, int value)
{
WacomDevicePtr priv = (WacomDevicePtr)local->private;
WacomCommonPtr common = priv->common;
@@ -1996,9 +1996,9 @@ void xf86WcmRotateTablet(LocalDevicePtr local, int value)
}
}
-/* WcmPointInArea - check whether the point is within the area */
+/* wcmPointInArea - check whether the point is within the area */
-Bool WcmPointInArea(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)
@@ -2006,28 +2006,28 @@ Bool WcmPointInArea(WacomToolAreaPtr area, int x, int y)
return 0;
}
-/* WcmAreasOverlap - check if two areas are overlapping */
+/* wcmAreasOverlap - check if two areas are overlapping */
-static Bool WcmAreasOverlap(WacomToolAreaPtr area1, WacomToolAreaPtr area2)
+static Bool wcmAreasOverlap(WacomToolAreaPtr area1, WacomToolAreaPtr area2)
{
- 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))
+ 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 (WcmPointInArea(area2, area1->topX, area1->topY) ||
- WcmPointInArea(area2, area1->topX, area1->bottomY) ||
- WcmPointInArea(area2, area1->bottomX, area1->topY) ||
- WcmPointInArea(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;
}
-/* WcmAreaListOverlaps - check if the area overlaps any area in the list */
-Bool WcmAreaListOverlap(WacomToolAreaPtr area, WacomToolAreaPtr list)
+/* wcmAreaListOverlap - check if the area overlaps any area in the list */
+Bool wcmAreaListOverlap(WacomToolAreaPtr area, WacomToolAreaPtr list)
{
for (; list; list=list->next)
- if (area != list && WcmAreasOverlap(list, area))
+ if (area != list && wcmAreasOverlap(list, area))
return 1;
return 0;
}
diff --git a/src/wcmConfig.c b/src/wcmConfig.c
index 6f317b0..feb17b4 100644
--- a/src/wcmConfig.c
+++ b/src/wcmConfig.c
@@ -26,7 +26,7 @@
#include <sys/stat.h>
#include <fcntl.h>
-extern Bool xf86WcmIsWacomDevice (char* fname);
+extern Bool wcmIsWacomDevice (char* fname);
extern Bool wcmIsAValidType(const char* type, unsigned long* keys);
extern int wcmIsDuplicate(char* device, LocalDevicePtr local);
extern int wcmNeedAutoHotplug(LocalDevicePtr local,
diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c
index df4d8b3..2ad15b3 100644
--- a/src/wcmISDV4.c
+++ b/src/wcmISDV4.c
@@ -545,7 +545,7 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned char* data)
}
/*****************************************************************************
- * xf86WcmWrite --
+ * wcmWriteWait --
* send a request
****************************************************************************/
diff --git a/src/wcmTilt2Rotation.c b/src/wcmTilt2Rotation.c
index 0c20c38..23fd878 100644
--- a/src/wcmTilt2Rotation.c
+++ b/src/wcmTilt2Rotation.c
@@ -22,7 +22,7 @@
#include "xf86Wacom.h"
-void xf86WcmTilt2R(WacomDeviceStatePtr ds);
+void wcmTilt2R(WacomDeviceStatePtr ds);
/* Constants to convert X and Y tilt to rotation */
unsigned short tiltTable_00[65] = {
@@ -690,12 +690,12 @@ unsigned short *cTable[] = {
};
/*****************************************************************************
- * xf86WcmTilt2R -
+ * wcmTilt2R -
* Converts tilt X and Y to rotation, for Intuos4 mouse for now.
* It can be used for other devices when necessary.
****************************************************************************/
-void xf86WcmTilt2R(WacomDeviceStatePtr ds)
+void wcmTilt2R(WacomDeviceStatePtr ds)
{
short tilt_x = ds->tiltx;
short tilt_y = ds->tilty;
diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index 9237ff4..41f0051 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -25,8 +25,8 @@
#include "wcmFilter.h"
extern void xf86WcmInitialCoordinates(LocalDevicePtr local, int axes);
-extern void xf86WcmRotateTablet(LocalDevicePtr local, int value);
-extern void xf86WcmInitialScreens(LocalDevicePtr local);
+extern void wcmRotateTablet(LocalDevicePtr local, int value);
+extern void wcmInitialScreens(LocalDevicePtr local);
int xf86WcmDevSwitchModeCall(LocalDevicePtr local, int mode);
int xf86WcmDevSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode);
@@ -135,7 +135,7 @@ void xf86WcmChangeScreen(LocalDevicePtr local, int value)
if (priv->screen_no != -1)
priv->currentScreen = priv->screen_no;
- xf86WcmInitialScreens(local);
+ wcmInitialScreens(local);
xf86WcmInitialCoordinates(local, 0);
xf86WcmInitialCoordinates(local, 1);
}
@@ -330,7 +330,7 @@ int xf86WcmSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
area->bottomY = values[3];
/* validate the area */
- if (WcmAreaListOverlap(area, priv->tool->arealist))
+ if (wcmAreaListOverlap(area, priv->tool->arealist))
{
*area = tmp_area;
return BadValue;
@@ -407,7 +407,7 @@ int xf86WcmSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
return BadValue;
if (!checkonly && common->wcmRotate != value)
- xf86WcmRotateTablet(local, value);
+ wcmRotateTablet(local, value);
} else if (property == prop_serials)
{
return BadValue; /* Read-only */
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index cf06e4d..231325d 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -53,7 +53,7 @@
void xf86WcmVirtualTabletPadding(LocalDevicePtr local);
void xf86WcmVirtualTabletSize(LocalDevicePtr local);
-Bool xf86WcmIsWacomDevice (char* fname);
+Bool wcmIsWacomDevice (char* fname);
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
extern void InitWcmDeviceProperties(LocalDevicePtr local);
@@ -62,8 +62,8 @@ Bool xf86WcmIsWacomDevice (char* fname);
#endif
extern int xf86WcmDevSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode);
-extern void xf86WcmRotateTablet(LocalDevicePtr local, int value);
-extern void xf86WcmInitialScreens(LocalDevicePtr local);
+extern void wcmRotateTablet(LocalDevicePtr local, int value);
+extern void wcmInitialScreens(LocalDevicePtr local);
extern void xf86WcmInitialCoordinates(LocalDevicePtr local, int axes);
static int xf86WcmDevOpen(DeviceIntPtr pWcm);
@@ -109,15 +109,15 @@ static void xf86WcmKbdCtrlCallback(DeviceIntPtr di, KeybdCtrl* ctrl)
}
/*****************************************************************************
- * xf86WcmDesktopSize --
+ * wcmDesktopSize --
* calculate the whole desktop size
****************************************************************************/
-static void xf86WcmDesktopSize(LocalDevicePtr local)
+static void wcmDesktopSize(LocalDevicePtr local)
{
WacomDevicePtr priv = (WacomDevicePtr) local->private;
int i = 0, minX = 0, minY = 0, maxX = 0, maxY = 0;
- xf86WcmInitialScreens(local);
+ wcmInitialScreens(local);
minX = priv->screenTopX[0];
minY = priv->screenTopY[0];
maxX = priv->screenBottomX[0];
@@ -191,7 +191,7 @@ static int xf86WcmInitArea(LocalDevicePtr local)
}
/* need maxWidth and maxHeight for keepshape */
- xf86WcmDesktopSize(local);
+ wcmDesktopSize(local);
/* Maintain aspect ratio to the whole desktop
* May need to consider a specific screen in multimonitor settings
@@ -224,7 +224,7 @@ static int xf86WcmInitArea(LocalDevicePtr local)
inlist = priv->tool->arealist;
/* The first one in the list is always valid */
- if (area != inlist && WcmAreaListOverlap(area, inlist))
+ if (area != inlist && wcmAreaListOverlap(area, inlist))
{
inlist = priv->tool->arealist;
@@ -348,7 +348,7 @@ void xf86WcmInitialCoordinates(LocalDevicePtr local, int axes)
Atom label;
#endif
- xf86WcmMappingFactor(local);
+ wcmMappingFactor(local);
/* x ax */
if ( !axes )
@@ -788,7 +788,7 @@ static int xf86WcmRegisterX11Devices (LocalDevicePtr local)
}
/* Rotation rotates the Max X and Y */
- xf86WcmRotateTablet(local, common->wcmRotate);
+ wcmRotateTablet(local, common->wcmRotate);
/* pressure */
InitValuatorAxisStruct(local->dev, 2,
@@ -887,7 +887,7 @@ static int xf86WcmRegisterX11Devices (LocalDevicePtr local)
return TRUE;
}
-Bool xf86WcmIsWacomDevice (char* fname)
+Bool wcmIsWacomDevice (char* fname)
{
int fd = -1;
struct input_id id;
@@ -930,7 +930,7 @@ char *wcmEventAutoDevProbe (LocalDevicePtr local)
Bool is_wacom;
sprintf(fname, DEV_INPUT_EVENT, i);
- is_wacom = xf86WcmIsWacomDevice(fname);
+ is_wacom = wcmIsWacomDevice(fname);
if (is_wacom)
{
xf86Msg(X_PROBED, "%s: probed device is %s (waited %d msec)\n",
diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
index c2194a7..351abb1 100644
--- a/src/xf86Wacom.h
+++ b/src/xf86Wacom.h
@@ -168,14 +168,14 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel, const WacomDeviceStat
void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds);
/* generic area check for xf86Wacom.c, wcmCommon.c and wcmXCommand.c */
-Bool WcmPointInArea(WacomToolAreaPtr area, int x, int y);
-Bool WcmAreaListOverlap(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);
/* calculate the proper tablet to screen mapping factor */
-void xf86WcmMappingFactor(LocalDevicePtr local);
+void wcmMappingFactor(LocalDevicePtr local);
/****************************************************************************/
#endif /* __XF86WACOM_H */