summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-08-13 10:16:18 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-08-13 14:36:46 +1000
commit8bf93709cbcf9f041cd177e929ff46adce8a6b79 (patch)
tree6f6e000dbe2dd092d057eb09fe5580e71548e179
parent37373a223b2aeef7041c9c0bb99be613789a3125 (diff)
Rename parts of the Post API to a Queue API.
Button and key events aren't posted from EvdevPost*Event, they are simply enqueued onto the evdev-internal event queue until the next EV_SYN arrives. Rename those interfaces from EvdevPost* to EvdevQueue* and leave only those that actually post to the server with a matching "*Post*" name. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com>
-rw-r--r--src/draglock.c2
-rw-r--r--src/emuMB.c6
-rw-r--r--src/emuWheel.c4
-rw-r--r--src/evdev.c22
-rw-r--r--src/evdev.h6
5 files changed, 20 insertions, 20 deletions
diff --git a/src/draglock.c b/src/draglock.c
index d89e979..a8bf079 100644
--- a/src/draglock.c
+++ b/src/draglock.c
@@ -158,7 +158,7 @@ EvdevDragLockLockButton(InputInfoPtr pInfo, unsigned int button)
state = pEvdev->dragLock.lock_state[button - 1] ? FALSE : TRUE;
pEvdev->dragLock.lock_state[button - 1] = state;
- EvdevPostButtonEvent(pInfo, button, state);
+ EvdevQueueButtonEvent(pInfo, button, state);
}
/* Filter button presses looking for either a meta button or the
diff --git a/src/emuMB.c b/src/emuMB.c
index dc689b6..ac763cd 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -198,7 +198,7 @@ EvdevMBEmuTimer(InputInfoPtr pInfo)
pEvdev->emulateMB.pending = FALSE;
if ((id = stateTab[pEvdev->emulateMB.state][4][0]) != 0) {
- EvdevPostButtonEvent(pInfo, abs(id), (id >= 0));
+ EvdevQueueButtonEvent(pInfo, abs(id), (id >= 0));
pEvdev->emulateMB.state =
stateTab[pEvdev->emulateMB.state][4][2];
} else {
@@ -248,12 +248,12 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
if ((id = stateTab[pEvdev->emulateMB.state][*btstate][0]) != 0)
{
- EvdevPostButtonEvent(pInfo, abs(id), (id >= 0));
+ EvdevQueueButtonEvent(pInfo, abs(id), (id >= 0));
ret = TRUE;
}
if ((id = stateTab[pEvdev->emulateMB.state][*btstate][1]) != 0)
{
- EvdevPostButtonEvent(pInfo, abs(id), (id >= 0));
+ EvdevQueueButtonEvent(pInfo, abs(id), (id >= 0));
ret = TRUE;
}
diff --git a/src/emuWheel.c b/src/emuWheel.c
index b9337de..421477e 100644
--- a/src/emuWheel.c
+++ b/src/emuWheel.c
@@ -82,7 +82,7 @@ EvdevWheelEmuFilterButton(InputInfoPtr pInfo, unsigned int button, int value)
* If the button is released early enough emit the button
* press/release events
*/
- EvdevPostButtonClicks(pInfo, button, 1);
+ EvdevQueueButtonClicks(pInfo, button, 1);
}
}
@@ -163,7 +163,7 @@ EvdevWheelEmuInertia(InputInfoPtr pInfo, WheelAxisPtr axis, int value)
/* Produce button press events for wheel motion */
while(abs(axis->traveled_distance) > pEvdev->emulateWheel.inertia) {
axis->traveled_distance -= inertia;
- EvdevPostButtonClicks(pInfo, button, 1);
+ EvdevQueueButtonClicks(pInfo, button, 1);
}
}
diff --git a/src/evdev.c b/src/evdev.c
index e1e1eae..b653311 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -250,7 +250,7 @@ static int wheel_left_button = 6;
static int wheel_right_button = 7;
void
-EvdevPostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
+EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
{
int code = ev->code + MIN_KEYCODE;
static char warned[KEY_CNT];
@@ -298,7 +298,7 @@ EvdevPostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
}
void
-EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value)
+EvdevQueueButtonEvent(InputInfoPtr pInfo, int button, int value)
{
EventQueuePtr pQueue;
EvdevPtr pEvdev = pInfo->private;
@@ -317,13 +317,13 @@ EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value)
}
void
-EvdevPostButtonClicks(InputInfoPtr pInfo, int button, int count)
+EvdevQueueButtonClicks(InputInfoPtr pInfo, int button, int count)
{
int i;
for (i = 0; i < count; i++) {
- EvdevPostButtonEvent(pInfo, button, 1);
- EvdevPostButtonEvent(pInfo, button, 0);
+ EvdevQueueButtonEvent(pInfo, button, 1);
+ EvdevQueueButtonEvent(pInfo, button, 0);
}
}
@@ -507,9 +507,9 @@ EvdevProcessButtonEvent(InputInfoPtr pInfo, struct input_event *ev)
return;
if (button)
- EvdevPostButtonEvent(pInfo, button, value);
+ EvdevQueueButtonEvent(pInfo, button, value);
else
- EvdevPostKbdEvent(pInfo, ev, value);
+ EvdevQueueKbdEvent(pInfo, ev, value);
}
/**
@@ -529,17 +529,17 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
switch (ev->code) {
case REL_WHEEL:
if (value > 0)
- EvdevPostButtonClicks(pInfo, wheel_up_button, value);
+ EvdevQueueButtonClicks(pInfo, wheel_up_button, value);
else if (value < 0)
- EvdevPostButtonClicks(pInfo, wheel_down_button, -value);
+ EvdevQueueButtonClicks(pInfo, wheel_down_button, -value);
break;
case REL_DIAL:
case REL_HWHEEL:
if (value > 0)
- EvdevPostButtonClicks(pInfo, wheel_right_button, value);
+ EvdevQueueButtonClicks(pInfo, wheel_right_button, value);
else if (value < 0)
- EvdevPostButtonClicks(pInfo, wheel_left_button, -value);
+ EvdevQueueButtonClicks(pInfo, wheel_left_button, -value);
break;
/* We don't post wheel events as axis motion. */
diff --git a/src/evdev.h b/src/evdev.h
index 142801c..a4a1064 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -181,9 +181,9 @@ typedef struct {
} EvdevRec, *EvdevPtr;
/* Event posting functions */
-void EvdevPostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value);
-void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value);
-void EvdevPostButtonClicks(InputInfoPtr pInfo, int button, int count);
+void EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value);
+void EvdevQueueButtonEvent(InputInfoPtr pInfo, int button, int value);
+void EvdevQueueButtonClicks(InputInfoPtr pInfo, int button, int count);
void EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
int v[MAX_VALUATORS]);
void EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,