mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-01 02:30:08 +01:00
Add AnimForEachCursorElt function.
This commit is contained in:
parent
90483541ad
commit
8dacf32025
2 changed files with 28 additions and 0 deletions
|
|
@ -439,3 +439,23 @@ AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *pp
|
|||
*ppCursor = pCursor;
|
||||
return Success;
|
||||
}
|
||||
|
||||
void
|
||||
AnimForEachCursorElt (ScreenPtr pScreen,
|
||||
CursorPtr pCursor,
|
||||
CursorProcPtr callBack)
|
||||
{
|
||||
if (IsAnimCur (pCursor))
|
||||
{
|
||||
AnimCurPtr ac = GetAnimCur (pCursor);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ac->nelt; i++)
|
||||
(*callBack) (pScreen, ac->elts[i].pCursor);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
(*callBack) (pScreen, pCursor);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -673,4 +673,12 @@ void PanoramiXRenderInit (void);
|
|||
void PanoramiXRenderReset (void);
|
||||
#endif
|
||||
|
||||
typedef void (*CursorProcPtr) (ScreenPtr pScreen,
|
||||
CursorPtr pCursor);
|
||||
|
||||
void
|
||||
AnimForEachCursorElt (ScreenPtr pScreen,
|
||||
CursorPtr pCursor,
|
||||
CursorProcPtr callBack);
|
||||
|
||||
#endif /* _PICTURESTR_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue