[PATCH 01/19] input: constify valuators passed in by input drivers.
Peter Hutterer
peter.hutterer at who-t.net
Sun Sep 5 19:52:37 PDT 2010
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Keith Packard <keithp at keithp.com>
---
dix/getevents.c | 6 +++---
hw/xfree86/common/xf86Xinput.c | 8 ++++----
hw/xfree86/common/xf86Xinput.h | 8 ++++----
include/input.h | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/dix/getevents.c b/dix/getevents.c
index e5134d3..4d32ed3 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -912,7 +912,7 @@ GetKeyboardEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code)
int
GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
int key_code, int first_valuator,
- int num_valuators, int *valuators_in) {
+ int num_valuators, const int *valuators_in) {
int num_events = 0;
CARD32 ms = 0;
DeviceEvent *event;
@@ -1071,7 +1071,7 @@ transformAbsolute(DeviceIntPtr dev, int v[MAX_VALUATORS])
int
GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
int flags, int first_valuator, int num_valuators,
- int *valuators_in) {
+ const int *valuators_in) {
int num_events = 1;
CARD32 ms;
DeviceEvent *event;
@@ -1191,7 +1191,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
*/
int
GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type,
- int first_valuator, int num_valuators, int *valuators_in)
+ int first_valuator, int num_valuators, const int *valuators_in)
{
int num_events = 1;
DeviceEvent *event;
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 1654103..6673b1e 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -1016,7 +1016,7 @@ xf86PostMotionEventP(DeviceIntPtr device,
int is_absolute,
int first_valuator,
int num_valuators,
- int *valuators)
+ const int *valuators)
{
int i = 0, nevents = 0;
DeviceEvent *event;
@@ -1097,7 +1097,7 @@ xf86PostProximityEventP(DeviceIntPtr device,
int is_in,
int first_valuator,
int num_valuators,
- int *valuators)
+ const int *valuators)
{
int i, nevents;
@@ -1143,7 +1143,7 @@ xf86PostButtonEventP(DeviceIntPtr device,
int is_down,
int first_valuator,
int num_valuators,
- int *valuators)
+ const int *valuators)
{
int i = 0, nevents = 0;
int flags = 0;
@@ -1208,7 +1208,7 @@ xf86PostKeyEventP(DeviceIntPtr device,
int is_absolute,
int first_valuator,
int num_valuators,
- int *valuators)
+ const int *valuators)
{
int i = 0, nevents = 0;
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 0ddfe70..edc447c 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -140,23 +140,23 @@ extern _X_EXPORT InputInfoPtr xf86InputDevs;
extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
int first_valuator, int num_valuators, ...);
extern _X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute,
- int first_valuator, int num_valuators, int *valuators);
+ int first_valuator, int num_valuators, const int *valuators);
extern _X_EXPORT void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
int first_valuator, int num_valuators, ...);
extern _X_EXPORT void xf86PostProximityEventP(DeviceIntPtr device, int is_in, int first_valuator,
- int num_valuators, int *valuators);
+ int num_valuators, const int *valuators);
extern _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button,
int is_down, int first_valuator, int num_valuators,
...);
extern _X_EXPORT void xf86PostButtonEventP(DeviceIntPtr device, int is_absolute, int button,
int is_down, int first_valuator, int num_valuators,
- int *valuators);
+ const int *valuators);
extern _X_EXPORT void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down,
int is_absolute, int first_valuator, int num_valuators,
...);
extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_code, int is_down,
int is_absolute, int first_valuator, int num_valuators,
- int *valuators);
+ const int *valuators);
extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code,
int is_down);
extern _X_EXPORT InputInfoPtr xf86FirstLocalDevice(void);
diff --git a/include/input.h b/include/input.h
index 388ef21..36ce4c9 100644
--- a/include/input.h
+++ b/include/input.h
@@ -447,7 +447,7 @@ extern _X_EXPORT int GetPointerEvents(
int flags,
int first_valuator,
int num_valuators,
- int *valuators);
+ const int *valuators);
extern _X_EXPORT int GetKeyboardEvents(
EventListPtr events,
@@ -462,7 +462,7 @@ extern int GetKeyboardValuatorEvents(
int key_code,
int first_valuator,
int num_valuator,
- int *valuators);
+ const int *valuators);
extern int GetProximityEvents(
EventListPtr events,
@@ -470,7 +470,7 @@ extern int GetProximityEvents(
int type,
int first_valuator,
int num_valuators,
- int *valuators);
+ const int *valuators);
extern void PostSyntheticMotion(
DeviceIntPtr pDev,
--
1.7.2.2
More information about the xorg-devel
mailing list