diff options
author | Peter Osterlund <petero2@telia.com> | 2004-04-12 01:27:55 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:02:00 +0200 |
commit | 5a3e05478ae3e641791031c241dc00eb43598726 (patch) | |
tree | 9afe8241c4ed96adedb9afd338734e980f5acc00 /synproto.h | |
parent | bda42daf592497ee210868660ce6be5a0f390e98 (diff) |
Some work on abstracting out the protocol differences from
synaptics.c to make supporting the FreeBSD psm driver possible.
Diffstat (limited to 'synproto.h')
-rw-r--r-- | synproto.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/synproto.h b/synproto.h new file mode 100644 index 0000000..f1995e8 --- /dev/null +++ b/synproto.h @@ -0,0 +1,66 @@ +/* + * Copyright 2004 Peter Osterlund <petero2@telia.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +#ifndef _SYNPROTO_H_ +#define _SYNPROTO_H_ + +#include <sys/ioctl.h> +#include <xf86Xinput.h> + +/* + * A structure to describe the state of the touchpad hardware (buttons and pad) + */ +struct SynapticsHwState { + int millis; /* Timestamp in milliseconds */ + int x; /* X position of finger */ + int y; /* Y position of finger */ + int z; /* Finger pressure */ + int numFingers; + int fingerWidth; + + Bool left; + Bool right; + Bool up; + Bool down; + + Bool multi[8]; + Bool middle; /* Some ALPS touchpads have a middle button */ + + Bool guest_left; /* guest device */ + Bool guest_mid; + Bool guest_right; + int guest_dx; + int guest_dy; +}; + + +enum SynapticsProtocol { + SYN_PROTO_PSAUX, /* Raw psaux device */ + SYN_PROTO_EVENT /* Linux kernel event interface */ +}; + +struct SynapticsProtocolOperations { + void (*DeviceOnHook)(LocalDevicePtr local); + void (*DeviceOffHook)(LocalDevicePtr local); +}; + +extern struct SynapticsProtocolOperations psaux_proto_operations; +extern struct SynapticsProtocolOperations event_proto_operations; + + +#endif /* _SYNPROTO_H_ */ |