diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-23 14:02:53 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-31 14:56:49 +1000 |
commit | 7fcf290c71952f2b9b495e2430fac64fcfe81ae0 (patch) | |
tree | 137f0c962fd47c358976630ff50eebcde24ed0f4 | |
parent | d7c4f6017885460ecc8d3ba4a99cfa2e06e71cfb (diff) |
Un-typedef SynapticsParameters
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/alpscomm.c | 2 | ||||
-rw-r--r-- | src/eventcomm.c | 6 | ||||
-rw-r--r-- | src/properties.c | 8 | ||||
-rw-r--r-- | src/ps2comm.c | 4 | ||||
-rw-r--r-- | src/psmcomm.c | 2 | ||||
-rw-r--r-- | src/synaptics-x11.c | 6 | ||||
-rw-r--r-- | src/synaptics.c | 30 | ||||
-rw-r--r-- | src/synapticsstr.h | 6 | ||||
-rw-r--r-- | src/synproto.h | 4 |
9 files changed, 34 insertions, 34 deletions
diff --git a/src/alpscomm.c b/src/alpscomm.c index 57a2736..033329b 100644 --- a/src/alpscomm.c +++ b/src/alpscomm.c @@ -227,7 +227,7 @@ ALPSReadHwState(SynapticsPrivate *priv, int fd, } Bool -ALPSDeviceOnHook(SynapticsPrivate *priv, SynapticsParameters *para, int fd) +ALPSDeviceOnHook(SynapticsPrivate *priv, struct SynapticsParameters *para, int fd) { return PS2ProtoDataInit(priv, fd) && ALPSQueryHardware(priv, fd); } diff --git a/src/eventcomm.c b/src/eventcomm.c index 87c77b5..0221738 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -177,7 +177,7 @@ InitializeTouch(SynapticsPrivate * priv, int fd) } static int -EventDeviceOnHook(SynapticsPrivate * priv, SynapticsParameters * para, int fd) +EventDeviceOnHook(SynapticsPrivate * priv, struct SynapticsParameters * para, int fd) { struct eventcomm_proto_data *proto_data = (struct eventcomm_proto_data *) priv->proto_data; @@ -608,7 +608,7 @@ EventReadHwState(SynapticsPrivate * priv, int fd, struct input_event ev; Bool v; struct SynapticsHwState *hw = comm->hwState; - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; struct eventcomm_proto_data *proto_data = priv->proto_data; SynapticsResetTouchHwState(hw, FALSE); @@ -722,7 +722,7 @@ EventDevOnly(const struct dirent *dir) static void event_query_touch(SynapticsPrivate *priv, int fd) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; struct eventcomm_proto_data *proto_data = priv->proto_data; struct mtdev *mtdev; int i; diff --git a/src/properties.c b/src/properties.c index 2830bba..53d91a7 100644 --- a/src/properties.c +++ b/src/properties.c @@ -159,7 +159,7 @@ static void InitSoftButtonProperty(InputInfoPtr pInfo) { SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; int values[8]; values[0] = para->softbutton_areas[0][0]; @@ -178,7 +178,7 @@ void InitDeviceProperties(InputInfoPtr pInfo) { SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; int values[9]; /* we never have more than 9 values in an atom */ float fvalues[4]; /* never have more than 4 float values */ @@ -367,8 +367,8 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, { InputInfoPtr pInfo = dev->public.devicePrivate; SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; - SynapticsParameters *para = &priv->synpara; - SynapticsParameters tmp; + struct SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters tmp; /* If checkonly is set, no parameters may be changed. So just let the code * change temporary variables and forget about it. */ diff --git a/src/ps2comm.c b/src/ps2comm.c index 3451367..163188d 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -531,7 +531,7 @@ PS2ReadHwStateProto(SynapticsPrivate *priv, int fd, struct PS2CommData *ps2_comm_data = priv->proto_data; unsigned char *buf = ps2_comm_data->protoBuf; struct SynapticsHwState *hw = comm->hwState; - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; struct PS2SynapticsHwInfo *synhw; int newabs; int w, i; @@ -694,7 +694,7 @@ PS2ProtoDataCleanup(SynapticsPrivate *priv, int fd) Bool -PS2DeviceOnHook(SynapticsPrivate *priv, SynapticsParameters *para, int fd) +PS2DeviceOnHook(SynapticsPrivate *priv, struct SynapticsParameters *para, int fd) { return PS2ProtoDataInit(priv, fd) && PS2QueryHardware(priv, fd); diff --git a/src/psmcomm.c b/src/psmcomm.c index 1477f42..f041711 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -161,7 +161,7 @@ PSMReadHwState(InputInfoPtr pInfo, } static Bool -PSMDeviceOnHook(SynapticsPrivate *priv, SynapticsParameters *para, int fd) +PSMDeviceOnHook(SynapticsPrivate *priv, struct SynapticsParameters *para, int fd) { return PSMQueryHardware(priv, fd); } diff --git a/src/synaptics-x11.c b/src/synaptics-x11.c index 71b0f7a..7da4419 100644 --- a/src/synaptics-x11.c +++ b/src/synaptics-x11.c @@ -196,7 +196,7 @@ SynapticsAccelerationProfile(DeviceIntPtr dev, { InputInfoPtr pInfo = dev->public.devicePrivate; SynapticsPrivate *priv = (SynapticsPrivate *) (pInfo->private); - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; double accelfct; @@ -505,7 +505,7 @@ static int set_percent_option(pointer options, const char* optname, static void set_softbutton_areas_option(InputInfoPtr pInfo) { SynapticsPrivate *priv = pInfo->private; - SynapticsParameters *pars = &priv->synpara; + struct SynapticsParameters *pars = &priv->synpara; int values[8]; int in_percent = 0; /* bitmask for which ones are in % */ char *option_string; @@ -576,7 +576,7 @@ fail: void SynapticsOverrideDefaults(InputInfoPtr pInfo, SynapticsPrivate *priv) { - SynapticsParameters *pars = &priv->synpara; + struct SynapticsParameters *pars = &priv->synpara; pointer opts = pInfo->options; /* read-only */ int width, height; diff --git a/src/synaptics.c b/src/synaptics.c index 2049b16..86c50b2 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -348,7 +348,7 @@ SynapticsIsSoftButtonAreasValid(int *values) static void SetDefaultParameters(SynapticsPrivate *priv) { - SynapticsParameters *pars = &priv->synpara; /* modified */ + struct SynapticsParameters *pars = &priv->synpara; /* modified */ int horizScrollDelta, vertScrollDelta; /* pixels */ int tapMove; /* pixels */ @@ -732,7 +732,7 @@ is_inside_active_area(SynapticsPrivate * priv, int x, int y) } static Bool -is_inside_button_area(SynapticsParameters * para, int which, int x, int y) +is_inside_button_area(struct SynapticsParameters * para, int which, int x, int y) { Bool inside_area = TRUE; @@ -759,13 +759,13 @@ is_inside_button_area(SynapticsParameters * para, int which, int x, int y) } static Bool -is_inside_rightbutton_area(SynapticsParameters * para, int x, int y) +is_inside_rightbutton_area(struct SynapticsParameters * para, int x, int y) { return is_inside_button_area(para, 0, x, y); } static Bool -is_inside_middlebutton_area(SynapticsParameters * para, int x, int y) +is_inside_middlebutton_area(struct SynapticsParameters * para, int x, int y) { return is_inside_button_area(para, 1, x, y); } @@ -842,7 +842,7 @@ static int HandleMidButtonEmulation(SynapticsPrivate * priv, struct SynapticsHwState *hw, unsigned int now, int *delay) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; Bool done = FALSE; int timeleft; int mid = 0; @@ -941,7 +941,7 @@ HandleMidButtonEmulation(SynapticsPrivate * priv, struct SynapticsHwState *hw, static enum FingerState SynapticsDetectFinger(SynapticsPrivate * priv, struct SynapticsHwState *hw) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; enum FingerState finger; /* finger detection thru pressure and threshold */ @@ -1074,7 +1074,7 @@ SetMovingState(SynapticsPrivate * priv, enum MovingState moving_state, static int GetTimeOut(SynapticsPrivate * priv) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; switch (priv->tap_state) { case TS_1: @@ -1099,7 +1099,7 @@ HandleTapProcessing(SynapticsPrivate * priv, struct SynapticsHwState *hw, unsigned int now, enum FingerState finger, Bool inside_active_area) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; Bool touch, release, is_timeout, move, press; int timeleft, timeout; enum EdgeType edge; @@ -1450,7 +1450,7 @@ static void start_coasting(SynapticsPrivate * priv, struct SynapticsHwState *hw, Bool vert, Bool horiz, Bool circ) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; priv->scroll.coast_delta_y = 0.0; priv->scroll.coast_delta_x = 0.0; @@ -1520,7 +1520,7 @@ static int HandleScrolling(SynapticsPrivate * priv, struct SynapticsHwState *hw, enum EdgeType edge, Bool finger) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; int delay = 1000000000; if ((priv->synpara.touchpad_off == 2) || (priv->finger_state == FS_BLOCKED)) { @@ -1820,7 +1820,7 @@ clickpad_guess_clickfingers(SynapticsPrivate * priv, static void handle_clickfinger(SynapticsPrivate * priv, struct SynapticsHwState *hw) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; int action = 0; int nfingers = hw->numFingers; @@ -1863,7 +1863,7 @@ static void update_hw_button_state(SynapticsPrivate *priv, struct SynapticsHwState *hw, struct SynapticsHwState *old, unsigned int now, int *delay) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; /* Treat the first two multi buttons as up/down for now. */ hw->up |= hw->multi[0]; @@ -1973,7 +1973,7 @@ UpdateTouchState(SynapticsPrivate *priv, struct SynapticsHwState *hw) static void HandleTouches(SynapticsPrivate *priv, struct SynapticsHwState *hw) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; int new_active_touches = priv->num_active_touches; int min_touches = 2; Bool restart_touches = FALSE; @@ -2049,7 +2049,7 @@ HandleTouches(SynapticsPrivate *priv, struct SynapticsHwState *hw) static void filter_jitter(SynapticsPrivate * priv, int *x, int *y) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; priv->hyst_center_x = hysteresis(*x, priv->hyst_center_x, para->hyst_x); priv->hyst_center_y = hysteresis(*y, priv->hyst_center_y, para->hyst_y); @@ -2081,7 +2081,7 @@ static int HandleState(SynapticsPrivate *priv, struct SynapticsHwState *hw, unsigned int now, Bool from_timer) { - SynapticsParameters *para = &priv->synpara; + struct SynapticsParameters *para = &priv->synpara; enum FingerState finger = FS_UNTOUCHED; int dx = 0, dy = 0, buttons, id; enum EdgeType edge = NO_EDGE; diff --git a/src/synapticsstr.h b/src/synapticsstr.h index c2293cf..27c7fae 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -150,7 +150,7 @@ enum TouchpadModel { MODEL_ELANTECH }; -typedef struct _SynapticsParameters { +struct SynapticsParameters { /* Parameter data */ int left_edge, right_edge, top_edge, bottom_edge; /* edge coordinates absolute */ int finger_low, finger_high, finger_press; /* finger detection values in Z-values */ @@ -201,10 +201,10 @@ typedef struct _SynapticsParameters { int area_left_edge, area_right_edge, area_top_edge, area_bottom_edge; /* area coordinates absolute */ int softbutton_areas[2][4]; /* soft button area coordinates, 0 => right, 1 => middle button */ int hyst_x, hyst_y; /* x and y width of hysteresis box */ -} SynapticsParameters; +}; struct _SynapticsPrivateRec { - SynapticsParameters synpara; /* Default parameter settings, read from + struct SynapticsParameters synpara; /* Default parameter settings, read from the X config file */ struct SynapticsProtocolOperations *proto_ops; void *proto_data; /* protocol-specific data */ diff --git a/src/synproto.h b/src/synproto.h index 8a4e5a2..a7a1785 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -92,12 +92,12 @@ struct CommData { Bool threeFingers; }; -struct _SynapticsParameters; +struct SynapticsParameters; /* All return 1 on success or 0 otherwise */ struct SynapticsProtocolOperations { int (*DeviceOnHook) (SynapticsPrivate *priv, - struct _SynapticsParameters * para, + struct SynapticsParameters * para, int fd); int (*DeviceOffHook) (SynapticsPrivate *priv, int fd); int (*QueryHardware) (SynapticsPrivate * priv, int fd); |