Commit Graph

68 Commits

Author SHA1 Message Date
Peter Hutterer
fd2d40b7ec Xi: change XIUnRegisterPropertyHandler to XIUnregisterPropertyHandler
CamelCase can be taken too far, and AFAICT there's no consumers of that
function yet anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-03 20:25:15 +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
Paulo Cesar Pereira de Andrade
d6cbd4511e Export symbols defined in the sdk.
This is the biggest "visibility" patch. Instead of doing a "export"
symbol on demand, export everything in the sdk, so that if some module
fails due to an unresolved symbol, it is because it is using a symbol
not in the sdk.

  Most exported symbols shouldn't really be made visible, neither
advertised in the sdk, as they are only used by a single shared object.

  Symbols in the sdk (or referenced in sdk macros), but not defined
anywhere include:
XkbBuildCoreState()
XkbInitialMap
XkbXIUnsupported
XkbCheckActionVMods()
XkbSendCompatNotify()
XkbDDXFakePointerButton()
XkbDDXApplyConfig()
_XkbStrCaseCmp()
_XkbErrMessages[]
_XkbErrCode
_XkbErrLocation
_XkbErrData
XkbAccessXDetailText()
XkbNKNDetailMaskText()
XkbLookupGroupAndLevel()
XkbInitAtoms()
XkbGetOrderedDrawables()
XkbFreeOrderedDrawables()
XkbConvertXkbComponents()
XkbWriteXKBSemantics()
XkbWriteXKBLayout()
XkbWriteXKBKeymap()
XkbWriteXKBFile()
XkbWriteCFile()
XkbWriteXKMFile()
XkbWriteToServer()
XkbMergeFile()
XkmFindTOCEntry()
XkmReadFileSection()
XkmReadFileSectionName()
InitExtInput()
xf86CheckButton()
xf86SwitchCoreDevice()
RamDacSetGamma()
RamDacRestoreDACValues()
xf86Bpp
xf86ConfigPix24
xf86MouseCflags[]
xf86SupportedMouseTypes[]
xf86NumMouseTypes
xf86ChangeBusIndex()
xf86EntityEnter()
xf86EntityLeave()
xf86WrapperInit()
xf86RingBell()
xf86findOptionBoolean()
xf86debugListOptions()
LoadSubModuleLocal()
LoaderSymbolLocal()
getInt10Rec()
xf86CurrentScreen
xf86ReallocatePciResources()
xf86NewSerialNumber()
xf86RandRSetInitialMode()
fbCompositeSolidMask_nx1xn
fbCompositeSolidMask_nx8888x0565C
fbCompositeSolidMask_nx8888x8888C
fbCompositeSolidMask_nx8x0565
fbCompositeSolidMask_nx8x0888
fbCompositeSolidMask_nx8x8888
fbCompositeSrc_0565x0565
fbCompositeSrc_8888x0565
fbCompositeSrc_8888x0888
fbCompositeSrc_8888x8888
fbCompositeSrcAdd_1000x1000
fbCompositeSrcAdd_8000x8000
fbCompositeSrcAdd_8888x8888
fbGeneration
fbIn
fbOver
fbOver24
fbOverlayGeneration
fbRasterizeEdges
fbRestoreAreas
fbSaveAreas
composeFunctions
VBEBuildVbeModeList()
VBECalcVbeModeIndex()
TIramdac3030CalculateMNPForClock()
shadowBufPtr
shadowFindBuf()
miRRGetScreenInfo()
RRSetScreenConfig()
RRModePruneUnused()
PixmanImageFromPicture()
extern int miPointerGetMotionEvents()
miClipPicture()
miRasterizeTriangle()
fbPush1toN()
fbInitializeBackingStore()
ddxBeforeReset()
SetupSprite()
InitSprite()
DGADeliverEvent()

  SPECIAL CASES
o defined as _X_INTERNAL
	xf86NewInputDevice()
o defined as static
	fbGCPrivateKey
	fbOverlayScreenPrivateKey
	fbScreenPrivateKey
	fbWinPrivateKey
o defined in libXfont.so, but declared in xorg/dixfont.h
	GetGlyphs()
	QueryGlyphExtents()
	QueryTextExtents()
	ParseGlyphCachingMode()
	InitGlyphCaching()
	SetGlyphCachingMode()
2008-11-29 23:56:06 -02:00
Peter Hutterer
f3f6ea89aa Xi: check all handlers before applying property changes.
The current code exposes to inconsistent updates, i.e. if handler N succeeds
but handler N+1 fails in setting the property, an error is returned to the
client although parts of the server now behave as if the property change
succeeded.

This patch adds a "checkonly" parameter to the SetProperty handler. The
handlers are then called twice, once with checkonly set to TRUE.
On the checkonly run, handlers _MUST_ return error codes if the property
cannot be applied. Handlers are not permitted to actually apply the changes.
On the second run, handlers are permitted to apply property changes.
Errors codes returned on the second run are ignored.
2008-10-13 13:50:40 +10:30
Peter Hutterer
fbd09486c6 Push server-known properties into xserver-properties.h. 2008-09-26 13:32:11 +09:30
Peter Hutterer
a2d83b9dc8 Xi: add "deletable" flag to properties, add DeleteProperty handler.
A property can only be deleted if any of the following is true:
- if a property is deletable and all handlers return Success.
- if a property is non-deleteable and the all handlers return Success AND the
  delete request does not come from a client (i.e. driver or the server).

A client can never delete a non-deletable property.
2008-09-26 13:32:08 +09:30
Peter Hutterer
22e9047268 Xi: allow Set/GetProperties to return a status, and honour this status code.
If a property handler now bails out, return the error code to the caller. This
allows to be slightly more specific with the errors.
2008-09-26 13:32:07 +09:30
Peter Hutterer
1e24e7b9df Xi: remove configure/query device property calls.
This removes all the meta-information about device properties (pending,
fromClient, range, valid_values, immutable).
2008-09-26 13:32:05 +09:30
Peter Hutterer
c696da75c7 Xi: swap devices property replies. 2008-08-22 21:38:01 +09:30
Peter Hutterer
de1573172a Backport device properties to XI 1.5 instead of XI 2.0 2008-08-15 14:52:13 +09:30
Peter Hutterer
e6813e8de6 Xi: byte-swap device property requests. 2008-08-14 15:01:18 +09:30
Peter Hutterer
5bcc45e07e Xi: expose Enable/DisableDevice through XI_PROP_ENABLED property. 2008-07-13 20:54:33 +09:30
Peter Hutterer
e7abe1676a Xi: protect against NULL handlers, don't try to dereference. 2008-07-13 20:54:33 +09:30
Peter Hutterer
18ff17756c Xi: GetDeviceProperty reply includes deviceid. 2008-07-13 20:54:33 +09:30
Peter Hutterer
e4054e5cb3 Xi: pack the property stuff into a struct, make handlers a linked list.
We may need more than one handler to deal with a property (e.g. one in the
driver, one in the DIX), so get the handlers into a linked list and call them
one-by-one. This is of course slightly less entertaining than the hilarious
WRAP/UNWRAP game we play in other parts of the server.

XIRegisterPropertyHandler/XIUnregisterPropertyHandler are the interface
drivers/the DIX should use to attach themselves to the device.

XIDeleteAllDeviceProperties destroys everything, including the handlers.
2008-07-10 16:28:44 +09:30
Peter Hutterer
2039c6ea43 Xi: add support for input device properties.
Basically just copied from randr properties, with minor changes only.
Each device supports arbitrary properties that can be modified by clients.
Modifications to the properties are passed to the driver (if applicable) and
can then affect the configuration of the device.

Note that device properties are limited to a specific device. A property set
on a slave device does not migrate to the master.
2008-07-10 16:28:34 +09:30
Peter Hutterer
4ab01fe5db Revert "Xi: add support for input device properties."
Note to self: don't mix up branches with half-finished cherrypicks.

This reverts commit 666838fcc8.
2008-07-10 16:27:36 +09:30
Peter Hutterer
666838fcc8 Xi: add support for input device properties.
Basically just copied from randr properties, with minor changes only.
Each device supports arbitrary properties that can be modified by clients.
Modifications to the properties are passed to the driver (if applicable) and
can then affect the configuration of the device.

Note that device properties are limited to a specific device. A property set
on a slave device does not migrate to the master.
2008-07-10 16:02:55 +09:30