Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

# dmxmotion.c File Reference

`#include "inputstr.h"`
`#include "dmxinputinit.h"`
`#include "dmxcommon.h"`
`#include "dmxmotion.h"`

## 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.

## Function Documentation

int dmxPointerGetMotionBufferSize | ( | void |  | ) |

| Return size of motion buffer. See also: DMX_MOTION_SIZE

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.

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.