diff options
author | Peter Osterlund <petero2@telia.com> | 2002-07-04 00:40:37 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:00:49 +0200 |
commit | 0d8042d8b68e259457de14a0c4365459b1de7d30 (patch) | |
tree | a9a0e8a6fcaa138d8cb6e1e77b7f9b7036b6f4e8 /synclient.c |
Added source code for the synaptics touchpad XFree86
driver.
Diffstat (limited to 'synclient.c')
-rw-r--r-- | synclient.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/synclient.c b/synclient.c new file mode 100644 index 0000000..89e6def --- /dev/null +++ b/synclient.c @@ -0,0 +1,26 @@ +#include <stdio.h> +#include <sys/types.h> +#include <sys/ipc.h> +#include <sys/shm.h> +#include <unistd.h> +#define SHM_SYNAPTICS 23947 +typedef struct _SynapticsSHM { + int x, y; +} SynapticsSHM; + +int main() { + SynapticsSHM *synshm; + int shmid; + + if((shmid = shmget(SHM_SYNAPTICS, 0, 0)) == -1) + printf("shmget Fehler\n"); + if((synshm = (SynapticsSHM*) shmat(shmid, NULL, 0)) == NULL) + printf("shmat Fehler\n"); + + while(1) { + printf("x:%d y:%d\n", synshm->x, synshm->y); + usleep(100000); + } + + exit(0); +} |