Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Stone
a1d41e311c Move extension initialisation prototypes into extinit.h
Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to
hold all our extension initialisation prototypes, rather than
duplicating them everywhere.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09 23:06:41 -07: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
6b6b660c36 Xext: remove ev_fill from GEExtensions. 2009-03-20 15:17:54 +10:00
Peter Hutterer
445daa62e7 Xext: purge XGE event masks.
The masks were originally designed to generically handle event masks for
extensions. Since all that is in-server anyway, it's much better writing
custom event masks for those extensions that need it and not providing a
unified mechanism.
XI2 needs more than the current implementation, which is already too complex
for most other extensions. good riddance.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:53 +10:00
Peter Hutterer
43a1c91a3d Xext: fix typo in GEEventFill macro
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03 11:17:02 +10:00
Peter Hutterer
e30032d0bb Xext: clean up XGE macros.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2009-01-15 16:11:02 +10:00
Paulo Cesar Pereira de Andrade
49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
Peter Hutterer
acce270935 Xext: store the GenericMasks in the resource system.
This fixes a severe issue - when the client died the event mask didn't get
unregistered and a future event would dereference dangling pointers. By
storing the event masks in the resource system we can free them when the
client dies.
2008-07-10 16:02:55 +09:30
Peter Hutterer
5f3e5b3462 Xext: remove trailing whitespaces in geext.{c|h} 2008-04-24 11:14:43 +09:30
Peter Hutterer
379f057646 Xext: add GEDeviceMaskIsSet (GE mask checking per device)
If a mask was set for the NULL device, then we pretend the mask is set for all
devices.
2008-01-25 10:27:26 +10:30
Peter Hutterer
94a6a65ae7 Xext: allow per-device GE masks.
Instead of a single mask per client we allow the storage of a mask per client
per device.
2008-01-25 10:26:41 +10:30
Peter Hutterer
c0a0580578 Xext: add simple macro to easily check a generic event's type. 2007-11-09 23:07:10 +10:30
Peter Hutterer
5ccc09b182 Use the same struct for generic event masks throughout the code.
Renaming those structs too.

Previously grabs were using a different struct than windows, which was
reasonably stupid.
2007-07-06 15:43:08 +09:30
Peter Hutterer
c1a16bdcfe Add 'evfill' field to GEExtensions.
We need this to allow extensions to fill in extra data for an event before it
is sent to the client. This is probably to be used like
FillUpEventsFromWindow().
2007-07-01 09:14:18 +09:30
Peter Hutterer
333bab4b23 Clean up, correct some comments.
Send event type down with the RawEvents.
2007-05-17 17:59:02 +09:30
Peter Hutterer
5e43910929 Add GenericEvent extension to Xext.
This adds (unconditional) support for the GE extension. Anything from now on
that sends events in MPX will have to use the GE extension. No GE, no MPX
events. GE is not actually used yet from anywhere with this commit.

You will need to update x11proto, xextproto, libX11, libXext and xcb to the
matching xge branches. Things will _NOT_ work without the updated protocol
headers and libraries.
2007-04-30 12:57:42 +09:30