xfree86: remove IDevRec, replace with InputInfoRec.

This struct is superfluous, maintaining the same info as the InputInfoRec
(with the exception of the driver name).

This is a rather large commit with the majority of changes being a rename
from the fields of the IDevRec (idev, commonOptions) to the InputInfoRec
(pInfo, options).

The actual changes affect the initialization process of the input device:
In NewInputDeviceRequest, the InputInfoRec is now always allocated and just
added to the internal list in xf86NewInputDevice() if the init process
succeeded.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
Peter Hutterer 2010-09-02 14:30:11 +10:00
commit b8d9c5ff00
6 changed files with 113 additions and 150 deletions

View file

@ -78,8 +78,6 @@
#define TS_Raw 60
#define TS_Scaled 61
struct _InputInfoRec;
/* This holds the input driver entry and module information. */
typedef struct _InputDriverRec {
int driverVersion;
@ -100,6 +98,8 @@ typedef struct _InputDriverRec {
typedef struct _InputInfoRec {
struct _InputInfoRec *next;
char * name;
char * driver;
int flags;
Bool (*device_control)(DeviceIntPtr device, int what);
@ -117,12 +117,11 @@ typedef struct _InputInfoRec {
DeviceIntPtr dev;
pointer private;
char * type_name;
IDevPtr conf_idev;
InputDriverPtr drv;
pointer module;
pointer options;
InputAttributes *attrs;
} InputInfoRec, *InputInfoPtr;
} *InputInfoPtr;
/* xf86Globals.c */
extern _X_EXPORT InputInfoPtr xf86InputDevs;
@ -163,7 +162,7 @@ extern _X_EXPORT void xf86RemoveEnabledDevice(InputInfoPtr pInfo);
extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic);
extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev);
/* not exported */
int xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL is_auto);
int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto);
/* xf86Helper.c */
extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags);