Distributed Multihead X  1.16.4
dmxmotion.c File Reference
#include "inputstr.h"
#include "dmxinputinit.h"
#include "dmxcommon.h"
#include "dmxmotion.h"

Macros

#define OFFSET(offset, element)   ((offset) * (numAxes + 1) + (element))
 

Functions

int dmxPointerGetMotionBufferSize (void)
 
int dmxPointerGetMotionEvents (DeviceIntPtr pDevice, xTimecoord *coords, unsigned long start, unsigned long stop, ScreenPtr pScreen)
 
void dmxPointerPutMotionEvent (DeviceIntPtr pDevice, int firstAxis, int axesCount, int *v, unsigned long time)
 

Detailed Description

This file provides functions similar to miPointerGetMotionEvents and miPointerPutMotionEvents, with the exception that devices with more than two axes are fully supported. These routines may be used only for motion buffers for extension devices, and are not compatible replacements for the mi routines.

Macro Definition Documentation

#define OFFSET (   offset,
  element 
)    ((offset) * (numAxes + 1) + (element))

Function Documentation

int dmxPointerGetMotionBufferSize ( void  )

Return size of motion buffer.

See also
DMX_MOTION_SIZE

References DMX_MOTION_SIZE.

Referenced by dmxDeviceOnOff().

int dmxPointerGetMotionEvents ( DeviceIntPtr  pDevice,
xTimecoord *  coords,
unsigned long  start,
unsigned long  stop,
ScreenPtr  pScreen 
)

This routine performs the same function as miPointerGetMotionEvents: the events in the motion history that are between the start and stop times (in mS) are placed in the coords vector, and the count of the number of items so placed is returned. This routine is called from dix/devices.c so that coords can hold valuator->numMotionEvents events. This routine is called from Xi/gtmotion.c with coords large enough to hold the same number of events in a variable-length extended xTimecoord structure. This provides sufficient data for the XGetDeviceMotionEvents library call, and would be identical to miPointerGetMotionEvents for devices with only 2 axes (i.e., core pointers) if xTimecoord used 32bit integers.

Because DMX uses the mi* routines for all core devices, this routine only has to support extension devices using the polymorphic coords. Because compatibility with miPointerGetMotionEvents is not possible, it is not provided.

References DMX_MOTION_SIZE, GETDMXLOCALFROMPDEVICE, and OFFSET.

void dmxPointerPutMotionEvent ( DeviceIntPtr  pDevice,
int  firstAxis,
int  axesCount,
int *  v,
unsigned long  time 
)

This routine adds an event to the motion history. A similar function is performed by miPointerMove for the mi versions of these routines.

References DMX_MOTION_SIZE, GETDMXLOCALFROMPDEVICE, and OFFSET.


Generated on Tue Aug 18 2015 01:27:31 for Distributed Multihead X by doxygen 1.8.8