Commit Graph

14 Commits

Author SHA1 Message Date
Povilas Kanapickas 22fa31ed56 dix: Add new internal event enums for gesture events 2021-05-30 13:26:30 +03:00
Peter Hutterer fd214aabf7 input: drop FP1616 macro
The double_to_f1616() functions do the same thing, and they're tested.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-11-19 12:12:23 +10:00
Keith Packard 9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Peter Hutterer 218752bdc5 input: replace GRABTYPE_* with the InputLevel enums
They achieve the same thing, re-use the more generic InputLevel so we can
convert to/fro easier.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-13 13:24:08 +10:00
Chase Douglas 7e2207548b include: Add an InputLevel enum
Currently unused, but will be in the future.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-13 13:23:56 +10:00
Peter Hutterer e5aa00989c Change GetXI2/XI/CoreType to just take a type argument
Avoids the dummy-event dance if we have an event type and need to get the
matching XI2 type.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-10 17:54:34 +10:00
Daniel Stone 46b4979601 Input: Allow EventToCore to return multiple events
Some event types (notably Expose and GraphicsExpose) require multiple
events, a la XI 1.x.  Bring the EventToCore API in line with EventToXI's
and allow it to generate multiple events.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-02-17 09:40:59 +10:00
Chris Dekter 122fc0e7a0 Re-enable RECORD extension.
RECORD was disabled during the switch to internal events. This patch
modifies the record callback to work with internal events instead of
xEvents. The InternalEvents are converted to core/Xi events as needed.

Since record is a loadable extension, the EventTo* calls must be externed.

Signed-off-by: Chris Dekter <cdekter@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-22 12:04:28 +10:00
Peter Hutterer 33fcaaaea5 Fix missing parentheses in FP1616 macro.
Missing parens led to interesting results if an expression instead of a
constant was passed in (ProcXIQueryPointer for example).
2009-05-18 16:05:35 +10:00
Peter Hutterer 54716fd3db Convert to using int32_t fixed point values on the wire.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:12 +10:00
Peter Hutterer b2ba77bac4 dix: add EventToXI2 and GetXI2Type.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:55 +10:00
Peter Hutterer 64ea607810 dix: change eventconvert to always return an array of xEvents
Just alloc the memory on demand rather than doing things with EventListPtrs
etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00
Peter Hutterer 269d4d9f2e dix: add GetCoreType and GetXIType.
Convert from an InternalEvent type to the matching core/XI type. Currently
only for a few events, those we actually need in the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:38 +10:00
Peter Hutterer 656491921e dix: add InternalEvent -> core/xi event conversion routines.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:38 +10:00