# dmxcursor.h File Reference

`#include "mipointer.h"`

Go to the source code of this file.

## Data Structures

struct | _dmxCursorPriv

## Defines

#define | DMX_GET_CURSOR_PRIV(_pCursor, _pScreen)
#define | DMX_SET_CURSOR_PRIV(_pCursor, _pScreen, v) dixSetPrivate(&(_pCursor)->devPrivates, CursorScreenKey(_pScreen), v)

## Typedefs

typedef struct _dmxCursorPriv | dmxCursorPrivRec
typedef struct _dmxCursorPriv * | dmxCursorPrivPtr

## Functions

void | dmxReInitOrigins (void)
void | dmxInitOrigins (void)
void | dmxInitOverlap (void)
void | dmxCursorNoMulti (void)
void | dmxMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
void | dmxCheckCursor (void)
int | dmxOnScreen (int x, int y, DMXScreenInfo *dmxScreen)
void | dmxHideCursor (DMXScreenInfo *dmxScreen)
void | dmxBECreateCursor (ScreenPtr pScreen, CursorPtr pCursor)
Bool | dmxBEFreeCursor (ScreenPtr pScreen, CursorPtr pCursor)

## Variables

miPointerScreenFuncRec | dmxPointerCursorFuncs
miPointerSpriteFuncRec | dmxPointerSpriteFuncs

## Detailed Description

Interface for cursor support.

See also:
  dmxcursor.c.

## Define Documentation

#define DMX_GET_CURSOR_PRIV | ( |  | _pCursor,
|  |  | _pScreen |
| ) |  |  |

Value:

    ((dmxCursorPrivPtr) \
        dixLookupPrivate(&(_pCursor)->devPrivates, CursorScreenKey(_pScreen)))

Referenced by _dmxRealizeCursor(), _dmxSetCursor(), _dmxUnrealizeCursor(), dmxBECreateCursor(), and dmxBEFreeCursor().

#define DMX_SET_CURSOR_PRIV | ( |  | _pCursor,
|  |  | _pScreen,
|  |  | v |
| ) |  |  | dixSetPrivate(&(_pCursor)->devPrivates, CursorScreenKey(_pScreen), v)

Referenced by _dmxRealizeCursor(), and _dmxUnrealizeCursor().

## Typedef Documentation

typedef struct _dmxCursorPriv * dmxCursorPrivPtr

typedef struct _dmxCursorPriv dmxCursorPrivRec

Cursor private area.

## Function Documentation

void dmxBECreateCursor | ( | ScreenPtr | pScreen,
|  | CursorPtr | pCursor |
| ) |  |  |

Create pCursor on the back-end associated with pScreen.

References _DMXScreenInfo::beDefVisualIndex, _DMXScreenInfo::beDisplay, _DMXScreenInfo::beNumPixmapFormats, _DMXScreenInfo::bePixmapFormats, _DMXScreenInfo::beVisuals, _dmxCursorPriv::cursor, DMX_GET_CURSOR_PRIV, dmxFatal, dmxLog(), dmxScreens, dmxSync(), _myPrivate::gc, _DMXScreenInfo::scrnDefDrawables, and _DMXScreenInfo::scrnWin.

Referenced by _dmxRealizeCursor(), and dmxBECreateResources().

Bool dmxBEFreeCursor | ( | ScreenPtr | pScreen,
|  | CursorPtr | pCursor |
| ) |  |  |

Free pCursor on the back-end associated with pScreen.

References _DMXScreenInfo::beDisplay, _dmxCursorPriv::cursor, DMX_GET_CURSOR_PRIV, and dmxScreens.

Referenced by _dmxUnrealizeCursor(), and dmxBEDestroyResources().

void dmxCheckCursor | ( | void |  | ) |

This routine is called during reconfiguration to make sure the cursor is visible.

References _dmxRealizeCursor(), _dmxSetCursor(), _DMXScreenInfo::cursor, DMXDBG2, dmxFindCursor(), dmxFindFirstScreen(), dmxGetGlobalPosition(), dmxNumScreens, dmxOnScreen(), dmxScreens, _DMXScreenInfo::index, _DMXScreenInfo::rootXOrigin, and _DMXScreenInfo::rootYOrigin.

Referenced by dmxAdjustCursorBoundaries(), and dmxBackendUpdatePosition().

void dmxCursorNoMulti | ( | void |  | ) |

Turn off support for displaying multiple cursors on overlapped back-end displays. See dmxCursorDoMultiCursors.

References dmxCursorDoMultiCursors.

Referenced by ddxProcessArgument().

void dmxHideCursor | ( | DMXScreenInfo * | dmxScreen | ) |

This routine is used by the backend input routines to hide the cursor on a screen that is being used for relative input.

See also:
  dmxbackend.c

References _dmxSetCursor(), dmxGetGlobalPosition(), and _DMXScreenInfo::index.

Referenced by dmxBackendUpdatePosition().

void dmxInitOrigins | ( | void |  | ) |

Initialize screen origins (and relative position). This is called for each server generation. For dynamic reconfiguration, use dmxReInitOrigins() instead.

References _DMXScreenInfo::beBPP, _DMXScreenInfo::beDepth, _DMXScreenInfo::beHeight, _DMXScreenInfo::beWidth, dmxComputeScreenOrigins(), dmxFatal, dmxLog(), dmxLogOutput(), dmxNumScreens, dmxReInitOrigins(), dmxScreens, _DMXScreenInfo::rootHeight, _DMXScreenInfo::rootWidth, _DMXScreenInfo::rootX, _DMXScreenInfo::rootXOrigin, _DMXScreenInfo::rootY, _DMXScreenInfo::rootYOrigin, _DMXScreenInfo::scrnHeight, _DMXScreenInfo::scrnWidth, _DMXScreenInfo::scrnX, _DMXScreenInfo::scrnY, _DMXScreenInfo::where, _DMXScreenInfo::whereX, and _DMXScreenInfo::whereY.

Referenced by InitOutput().

void dmxInitOverlap | ( | void |  | ) |

Detects overlapping dmxScreens and creates circular lists. This uses an O(dmxNumScreens^2) algorithm, but dmxNumScreens is < 100 and the computation only needs to be performed for every server generation or dynamic reconfiguration .

References _DMXScreenInfo::cursorNotShared, DMXDBG6, dmxDoesOverlap(), dmxInfo, dmxIterateOverlap(), dmxLog(), dmxLogOutput(), dmxLogOutputCont(), dmxNumScreens, dmxPrintOverlap(), dmxPropertyIterate(), dmxScreens, dmxTestSameDisplay(), _DMXScreenInfo::index, _DMXScreenInfo::name, and _DMXScreenInfo::over.

Referenced by dmxAdjustCursorBoundaries(), and InitOutput().

void dmxMoveCursor | ( | DeviceIntPtr | pDev,
|  | ScreenPtr | pScreen,
|  | int | x,
|  | int | y |
| ) |  |  |

Move the cursor to coordinates (x, y)on pScreen. This function is usually called via dmxPointerSpriteFuncs, except during reconfiguration when the cursor is repositioned to force an update on newley overlapping screens and on screens that no longer overlap.

The coords (x,y) are in global coord space. We'll loop over the back-end screens and see if they contain the global coord. If so, call _dmxMoveCursor() (XWarpPointer) to position the pointer on that screen.

References _dmxMoveCursor(), _dmxRealizeCursor(), _dmxSetCursor(), _DMXScreenInfo::cursor, _DMXScreenInfo::cursorNotShared, _DMXScreenInfo::cursorVisible, dmxCursorDoMultiCursors, DMXDBG3, dmxFindCursor(), dmxOnScreen(), dmxScreens, _DMXScreenInfo::index, _DMXScreenInfo::over, _DMXScreenInfo::rootXOrigin, and _DMXScreenInfo::rootYOrigin.

int dmxOnScreen | ( | int | x,
|  | int | y,
|  | DMXScreenInfo * | dmxScreen |
| ) |  |  |

Returns non-zero if the global x, y coordinate is on the screen window of the dmxScreen.

References dmxDebug, dmxLog(), _DMXScreenInfo::index, _DMXScreenInfo::rootHeight, _DMXScreenInfo::rootWidth, _DMXScreenInfo::rootX, _DMXScreenInfo::rootXOrigin, _DMXScreenInfo::rootY, _DMXScreenInfo::rootYOrigin, _DMXScreenInfo::scrnHeight, _DMXScreenInfo::scrnWidth, _DMXScreenInfo::scrnX, and _DMXScreenInfo::scrnY.

Referenced by dmxBackendFindOverlapping(), dmxBackendOffscreen(), dmxCheckCursor(), dmxDoesOverlap(), dmxFindFirstScreen(), dmxMoveCursor(), and dmxSetCursor().

void dmxReInitOrigins | ( | void |  | ) |

Recompute origin information in the dmxScreens list. This is called from dmxInitOrigins.

References _DMXScreenInfo::beBPP, _DMXScreenInfo::beDepth, _DMXScreenInfo::beHeight, _DMXScreenInfo::beWidth, dmxFatal, dmxLog(), dmxLogOutput(), dmxNumScreens, dmxScreens, _DMXScreenInfo::rootHeight, _DMXScreenInfo::rootWidth, _DMXScreenInfo::rootX, _DMXScreenInfo::rootXOrigin, _DMXScreenInfo::rootY, _DMXScreenInfo::rootYOrigin, _DMXScreenInfo::scrnHeight, _DMXScreenInfo::scrnWidth, _DMXScreenInfo::scrnX, and _DMXScreenInfo::scrnY.

Referenced by dmxAdjustCursorBoundaries(), and dmxInitOrigins().

## Variable Documentation

miPointerScreenFuncRec dmxPointerCursorFuncs

Cursor functions for mi layer.

See also:
  dmxcursor.c
  dmxscrinit.c

Referenced by dmxScreenInit().

miPointerSpriteFuncRec dmxPointerSpriteFuncs

Sprite functions for mi layer.

See also:
  dmxcursor.c
  dmxscrinit.c

Referenced by dmxScreenInit().

Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4. </addres>