xserver-multidpi/hw/xfree86/ramdac/xf86CursorPriv.h
Michael Thayer 901fbfbbbd Add a return value to load_cursor_argb() to allow it to report failure
load_cursor_argb() may need to be able to fail and have the server fall back
to a software cursor in at least the following circumstances.
1) The hardware can only support some ARGB cursors and this does not just
depend on cursor size.
2) Virtual hardware may not wish to pass through a cursor to the host at a
particular time but may wish to accept the same cursor at another time.
This patch adds a return value to the API and makes the server do the
software fall-back on failure.

Signed-off-by: Michael Thayer <michael.thayer@oracle.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-03 16:46:55 -07:00

51 lines
1.4 KiB
C

#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _XF86CURSORPRIV_H
#define _XF86CURSORPRIV_H
#include "xf86Cursor.h"
#include "mipointrst.h"
typedef struct {
Bool SWCursor;
Bool isUp;
Bool showTransparent;
short HotX;
short HotY;
short x;
short y;
CursorPtr CurrentCursor, CursorToRestore;
xf86CursorInfoPtr CursorInfoPtr;
CloseScreenProcPtr CloseScreen;
RecolorCursorProcPtr RecolorCursor;
InstallColormapProcPtr InstallColormap;
QueryBestSizeProcPtr QueryBestSize;
miPointerSpriteFuncPtr spriteFuncs;
Bool PalettedCursor;
ColormapPtr pInstalledMap;
Bool (*SwitchMode) (ScrnInfoPtr, DisplayModePtr);
xf86EnableDisableFBAccessProc *EnableDisableFBAccess;
CursorPtr SavedCursor;
/* Number of requests to force HW cursor */
int ForceHWCursorCount;
Bool HWCursorForced;
void *transparentData;
} xf86CursorScreenRec, *xf86CursorScreenPtr;
Bool xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y);
void xf86SetTransparentCursor(ScreenPtr pScreen);
void xf86MoveCursor(ScreenPtr pScreen, int x, int y);
void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed);
Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr);
extern _X_EXPORT DevPrivateKeyRec xf86CursorScreenKeyRec;
#define xf86CursorScreenKey (&xf86CursorScreenKeyRec)
#endif /* _XF86CURSORPRIV_H */