Commit Graph

171 Commits

Author SHA1 Message Date
Peter Hutterer
df0567d2fa Don't call xf86OptionListReport()
All options used by the driver will show up in the log anyway.
And new xserver versions will call this for debugging purposes for us.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Trevor Woerner <twoerner@gmail.com>
2010-12-16 12:43:07 +10:00
Peter Hutterer
135aaf612b Purge use of XI_PRIVATE macro.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Trevor Woerner <twoerner@gmail.com>
2010-12-16 12:43:06 +10:00
Peter Hutterer
29a486ba56 Drop close_proc, conversion_proc, reverse_conversion_proc
All three aren't called by the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Trevor Woerner <twoerner@gmail.com>
2010-12-16 12:41:39 +10:00
Peter Hutterer
0674bdfdb6 Don't handle history_size in the driver.
This has been handled in the server for quite a while now, just initialize
with the defaults and ignore it otherwise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Trevor Woerner <twoerner@gmail.com>
2010-12-16 11:45:23 +10:00
Peter Hutterer
39205d76cb Require server 1.9, drop pre-ABI 11 support.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Trevor Woerner <twoerner@gmail.com>
2010-12-16 11:45:23 +10:00
Peter Hutterer
074dc4a2a0 Remove usage of XI86_POINTER_CAPABLE flag.
Flag was write-only for a number of server generations already.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Trevor Woerner <twoerner@gmail.com>
2010-12-16 11:45:23 +10:00
Peter Hutterer
107e4b14d9 Replace LocalDevicePtr with InputInfoPtr
Both typedefs describe the same struct, LocalDevicePtr has been removed with
input ABI 12.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Trevor Woerner <twoerner@gmail.com>
2010-12-16 11:45:18 +10:00
Trevor Woerner
cd6b81d377 Code cleanup, bad structure initialization.
The InputDriverRec data structure in xserver/hw/xfree86/common/xf86Xinput.h
no longer contains an integer refCount member; as per commit
d568221710959cf7d783e6ff0fb80fb43a231124.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-18 12:00:07 +10:00
Trevor Woerner
38363bde5d Deprecated code cleanup.
Replace calls to deprecated functions (Xfree(), Xcalloc(), Xmalloc(), etc)
with calls to standard dynamic memory functions (free(), calloc(), malloc(),
etc) in driver code.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-18 12:00:06 +10:00
Gaetan Nadon
25722aa12b config: remove AH_TOP autoheader statement
The generated config.h does not need to include xorg-server.h
for the content it provides.
Add #include <xorg-server.h> in .[hc] files as needed.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-06-11 15:44:26 -04:00
Gaetan Nadon
3de065d682 config: move CWARNFLAGS from configure.ac to Makefile.am
Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-11 10:08:07 -05:00
Sascha Hlusiak
5fdab9ca49 Fix NULL pointers in rmlvo 2009-09-11 18:23:26 +02:00
Sascha Hlusiak
462aae4db1 Merge branch 'scancodes' of ssh://deepthought/home/sascha/develop/xorg/xf86-input-joystick into scancodes 2009-09-11 17:54:13 +02:00
Sascha Hlusiak
b2de71f436 Support for axis labels; fix build on master
The first two axes are always REL_X and REL_Y. All other axes and buttons
are set to 'None', proper labeling will follow.

Thanks to Peter for the heads up.

Signed-off-by: Sascha Hlusiak <saschahlusiak@arcor.de>
2009-06-23 23:51:32 +02:00
Sascha Hlusiak
bf86269672 Property support for scancodes
Allows setting scancodes for keys using input-properties
2009-04-14 23:25:44 +02:00
Sascha Hlusiak
7f6e390fb1 Use preset keyboard layout instead of custom generated keymap.
Restored compatibility with recent xkb changes and xorg-server-1.7.
Keys are configured now using scancodes instead of keysyms. Depends on
set keymap; people could write custom layouts.
2009-04-11 14:19:58 +02:00
Sascha Hlusiak
4fbfcb17d6 Remove parsing of keysyms.
Key options are expected to be scancodes/plain numbers now.
2009-04-11 13:13:16 +02:00
Sascha Hlusiak
7c677b3d26 Remove ks_tables.h
No more keysym parsing
2009-04-11 13:12:17 +02:00
Sascha Hlusiak
8075ee4808 Remove parsing of keysyms
Change of configuration semantics again. Keys are specified in scancodes instead of keysyms.
2009-04-11 13:11:24 +02:00
Sascha Hlusiak
e171007239 Fix compiler warning about stray INT8-CARD8 conversion 2009-03-19 21:14:22 +01:00
Sascha Hlusiak
7af61c78fd Merge branch 'pwm' 2009-03-19 21:13:13 +01:00
Sascha Hlusiak
bc430cc2aa Missing initialization of button amplify
Always initialize button[]->amplify with 1.0
2009-03-19 21:08:30 +01:00
Sascha Hlusiak
dca19bde2b Merge branch 'master' of sascha:develop/xorg/xf86-input-joystick 2009-03-19 08:36:10 +01:00
Sascha Hlusiak
6f2a211b7c Fix build on FreeBSD with USB2
Including dev/usb/usb_ioctl.h fixes missing declaration
of USB_GET_REPORT_ID on FreeBSD-Current.
2009-03-18 17:39:07 +01:00
Sascha Hlusiak
367c32bab5 Support for float properties
Signed-off-by: Sascha Hlusiak <saschahlusiak@arcor.de>
2009-03-01 21:00:18 +01:00
Sascha Hlusiak
4978e78e7c Add PWM key generation when axis in accelerated mode
When axis is in accelerated mode and keyhigh/keylow is set,
the deflection of the axis will be linked to the _percent of time_ the key
will be down. Full deflection will set the key permanently down (old behaviour).

50% deflection will result in the key being  50ms down and 50ms up.
75% deflection will result in the key being 150ms down and 50ms up.
etc.
Minimum interval is 50ms, maximum is 600ms.
2009-02-19 23:40:58 +01:00
Sascha Hlusiak
d4bb86ddb0 Don't set axis.oldvalue in backend
The value needs to be set where it's needed, like in timers.
2009-02-19 23:37:46 +01:00
Sascha Hlusiak
4ec4376522 Fix for sparse warning of uninitialized variable
If axis is inside deadzone, 0.0 should be assumed.
2009-02-17 20:18:05 +01:00
Paulo Cesar Pereira de Andrade
b70b1f7d82 Janitor: gcc 4.5 and sparse warnings.
It is still required a patch in the X Server sdk to correct some
remaining warnings. Isn't it amazing that <X11/extensions/XKBsrv.h>
and $sdkdir/xkbsrv.h both use the #ifndef _XKBSRV_H_ include guard?

Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
2009-02-17 20:15:18 +01:00
Paulo Cesar Pereira de Andrade
76b82a41a6 Janitor: make distcheck, .gitignore.
The correction for make distcheck uses the same solution proposed
for xf86-input-evdev, that uses the new configure option --with-sdkdir.

Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
2009-02-17 20:06:44 +01:00
Sascha Hlusiak
4671904035 Use InitKeyboardDeviceStruct instead of nonexistant XkbInitKeyboardDeviceStruct
Realizing XkbInitKeyboardDeviceStruct has been removed, we do need to use InitKeyboardDeviceStruct.
This breaks custom keymaps on ABI_XINPUT_VERSION >= 5.

Hopefully this can be reimplemented later.
2009-02-02 00:10:42 +01:00
Sascha Hlusiak
fb632ba226 Fix build on master. All hail XKB! 2009-01-26 20:48:00 +01:00
Sascha Hlusiak
f81b9077d1 Export JSTK_* constants with joystick-properties.h 2008-12-28 17:28:50 +01:00
Sascha Hlusiak
79028fc80f Rename constants for better distinction
@jstk.h:
    TYPE_* -> JSTK_TYPE_*
    MAPPING_* -> JSTK_MAPPING_*
2008-12-28 17:24:08 +01:00
Peter Hutterer
38b4c9b3bd properties: handle checkonly flag in SetProperty.
If checkonly is TRUE, don't touch any values, just check vor validity of the
data.

Signed-off-by: Sascha Hlusiak <saschahlusiak@arcor.de>
2008-10-13 08:49:23 +02:00
Sascha Hlusiak
0da072fde4 Install joystick-properties.h and xorg-joystick.pc for clients.
Let's clients be aware of properties made available by the driver.
2008-10-01 23:14:22 +02:00
Sascha Hlusiak
3c2a323a3a Option for per-axis valuators. Defaults to off for all axes.
Old: Each axis had an extra valuator, starting with 2 (0 and 1 are pointer movement)
New: Add "valuator" to axis option to give it an extra valuator of range -32768 to 32768.
Default: Off for all axes, since rarely used (and broken anyway right now).
2008-10-01 21:43:49 +02:00
Sascha Hlusiak
432805db42 Remove XKB calls since we don't make use of it anyway.
No error messages because of missing xkb rules, yay.
2008-09-30 19:02:17 +02:00
Sascha Hlusiak
ba8ea1799c Support for setting Button Number property
does not change the button map, which is assumed to be default. Buttons can still be
reordered using xmodmap.
2008-09-30 18:13:19 +02:00
Sascha Hlusiak
5c72d14686 Replace dynamic button map with static one
Saves some configuration efforts but caps logical button numbers to BUTTONMAP_SIZE=32.
Makes property support much easier.
2008-09-30 18:08:04 +02:00
Sascha Hlusiak
03175f968c Name all properties uppercase
Just looks better
2008-09-30 00:35:01 +02:00
Sascha Hlusiak
34ca7d2683 Do not accept fewer values anymore when setting properties
Supplied number of values have to match the numbers of axes/buttons exactly. Fewer values are not accepted
anymore, because the omitted information get lost. That way we ensure that the properties are always complete
when requested by clients.
2008-09-30 00:30:24 +02:00
Sascha Hlusiak
e1c3b5e304 Exporting num_axes values instead of MAXAXES
Only export the number of axes/buttons in properties that we actually have.
No need to export MAXAXES values, if we don't support them.
2008-09-30 00:17:41 +02:00
Sascha Hlusiak
ab79083b13 Save probed number of axes/buttons for joystick backend 2008-09-30 00:01:38 +02:00
Sascha Hlusiak
e8432b7f8e Probed number of buttons shall not exceed MAXBUTTONS
Same for axes.
2008-09-30 00:01:16 +02:00
Sascha Hlusiak
06c607ebc1 Compile fix on BSD 2008-09-29 23:47:53 +02:00
Sascha Hlusiak
f4be58b1ea Probe device once on INIT and re-use found information.
Makes reopening a device on vt-enter much smoother and throws less warnings.
Remember number of found axes and buttons.
2008-09-29 23:36:12 +02:00
Sascha Hlusiak
b56085c73d Export number of configurable buttons/axes as readonly properties.
This number does not need to match the number of valuators/buttons.
2008-09-29 22:56:29 +02:00
Sascha Hlusiak
ebf31b61b3 jstk_key.c: missing include
xf86optionListDup is defined in xf86Optrec.h
2008-09-28 16:41:17 +02:00
Peter Hutterer
3794afd978 Adjust joystick properties to new property API.
ConfigureProperty doesn't exist anymore, ChangeProperty has two parameters
less. SetProperty handler must return Status.
Mark all properties as non-deletable.
2008-09-26 17:21:16 +09:30