#ifdef HAVE_DMX_CONFIG_H
#include <dmx-config.h>
#endif
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
#include "inputstr.h"
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
#include "mipointer.h"
#include "dmxinputinit.h"
#include "exevents.h"
int ChangeKeyboardDevice(DeviceIntPtr old_dev, DeviceIntPtr new_dev)
{
#if 0
DMXLocalInputInfoPtr dmxLocalOld = old_dev->public.devicePrivate;
DMXLocalInputInfoPtr dmxLocalNew = new_dev->public.devicePrivate;
dmxLocalOld->isCore = 0;
dmxLocalOld->sendsCore = dmxLocalOld->savedSendsCore;
dmxLocalNew->isCore = 1;
dmxLocalNew->savedSendsCore = dmxLocalNew->sendsCore;
dmxLocalNew->sendsCore = 1;
dmxLocalCorePointer = dmxLocalNew;
RegisterKeyboardDevice(new_dev);
RegisterOtherDevice(old_dev);
return Success;
#endif
return BadMatch;
}
int ChangePointerDevice(DeviceIntPtr old_dev,
DeviceIntPtr new_dev,
unsigned char x,
unsigned char y)
{
DMXLocalInputInfoPtr dmxLocalOld = old_dev->public.devicePrivate;
DMXLocalInputInfoPtr dmxLocalNew = new_dev->public.devicePrivate;
if (x != 0 || y != 1) return BadMatch;
InitFocusClassDeviceStruct(old_dev);
if (dmxLocalOld->savedMotionProc) {
old_dev->valuator->GetMotionProc = dmxLocalOld->savedMotionProc;
old_dev->valuator->numMotionEvents = dmxLocalOld->savedMotionEvents;
}
dmxLocalNew->savedMotionProc = new_dev->valuator->GetMotionProc;
dmxLocalNew->savedMotionEvents = new_dev->valuator->numMotionEvents;
new_dev->valuator->GetMotionProc = miPointerGetMotionEvents;
new_dev->valuator->numMotionEvents = miPointerGetMotionBufferSize();
dmxLocalOld->isCore = 0;
dmxLocalOld->sendsCore = dmxLocalOld->savedSendsCore;
dmxLocalNew->isCore = 1;
dmxLocalNew->savedSendsCore = dmxLocalNew->sendsCore;
dmxLocalNew->sendsCore = 1;
dmxLocalCorePointer = dmxLocalNew;
return Success;
}
void CloseInputDevice (DeviceIntPtr d, ClientPtr client)
{
}
void AddOtherInputDevices(void)
{
}
void OpenInputDevice (DeviceIntPtr dev, ClientPtr client, int *status)
{
}
int SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode)
{
return BadMatch;
}
int SetDeviceValuators (ClientPtr client,
DeviceIntPtr dev,
int *valuators,
int first_valuator,
int num_valuators)
{
return BadMatch;
}
int ChangeDeviceControl(ClientPtr client,
DeviceIntPtr dev,
xDeviceCtl *control)
{
return BadMatch;
}