diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-09 11:23:53 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-11 17:24:19 +0930 |
commit | e083b5a07507d53de0d1d365ef1565346284c997 (patch) | |
tree | f205ca6aa8e5bf5db59ad74f4f197c54338260f7 /hw/xnest/Cursor.c | |
parent | ea6a02c048e8589e99ee3b459f3612eb3d041558 (diff) |
xnest: wrap the xnest cursor sprite funcs around the mi funcs.
Modelled after the xfree86 code. Call miDCInitialize to init the SW rendering
engine, then take the pointers, store it in a xnest-local variable, and put
the xnest-specific sprite funcs in place. In the xnest sprite funcs, call
through to the mi sprite funcs after doing xnest-specific stuff.
Diffstat (limited to 'hw/xnest/Cursor.c')
-rw-r--r-- | hw/xnest/Cursor.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c index 3e676d11b..12f47e725 100644 --- a/hw/xnest/Cursor.c +++ b/hw/xnest/Cursor.c @@ -25,6 +25,7 @@ is" without express or implied warranty. #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" +#include "mipointrst.h" #include "Xnest.h" @@ -35,6 +36,8 @@ is" without express or implied warranty. #include "Keyboard.h" #include "Args.h" +xnestCursorFuncRec xnestCursorFuncs = {NULL}; + Bool xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { @@ -155,3 +158,26 @@ void xnestMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { } + +Bool +xnestDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + xnestCursorFuncPtr pScreenPriv; + + pScreenPriv = (xnestCursorFuncPtr) + dixLookupPrivate(&pScreen->devPrivates, xnestCursorScreenKey); + + pScreenPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen); + return TRUE; +} + +void +xnestDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + xnestCursorFuncPtr pScreenPriv; + + pScreenPriv = (xnestCursorFuncPtr) + dixLookupPrivate(&pScreen->devPrivates, xnestCursorScreenKey); + + pScreenPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen); +} |