2003-11-14 16:54:54 +01:00
|
|
|
/*
|
|
|
|
|
|
|
|
Copyright 1989, 1998 The Open Group
|
|
|
|
|
|
|
|
Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
the above copyright notice appear in all copies and that both that
|
|
|
|
copyright notice and this permission notice appear in supporting
|
|
|
|
documentation.
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
|
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
Except as contained in this notice, the name of The Open Group shall not be
|
|
|
|
used in advertising or otherwise to promote the sale, use or other dealings
|
|
|
|
in this Software without prior written authorization from The Open Group.
|
|
|
|
*/
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
#ifndef MIPOINTER_H
|
|
|
|
#define MIPOINTER_H
|
|
|
|
|
|
|
|
#include "cursor.h"
|
|
|
|
#include "input.h"
|
2007-08-28 15:28:25 +02:00
|
|
|
#include "privates.h"
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
typedef struct _miPointerSpriteFuncRec {
|
2003-11-14 17:49:22 +01:00
|
|
|
Bool (*RealizeCursor)(
|
2006-11-17 05:40:37 +01:00
|
|
|
DeviceIntPtr /* pDev */,
|
2003-11-14 17:49:22 +01:00
|
|
|
ScreenPtr /* pScr */,
|
|
|
|
CursorPtr /* pCurs */
|
|
|
|
);
|
|
|
|
Bool (*UnrealizeCursor)(
|
2006-11-17 05:40:37 +01:00
|
|
|
DeviceIntPtr /* pDev */,
|
2003-11-14 17:49:22 +01:00
|
|
|
ScreenPtr /* pScr */,
|
|
|
|
CursorPtr /* pCurs */
|
|
|
|
);
|
|
|
|
void (*SetCursor)(
|
2006-11-17 05:40:37 +01:00
|
|
|
DeviceIntPtr /* pDev */,
|
2003-11-14 17:49:22 +01:00
|
|
|
ScreenPtr /* pScr */,
|
|
|
|
CursorPtr /* pCurs */,
|
|
|
|
int /* x */,
|
|
|
|
int /* y */
|
|
|
|
);
|
|
|
|
void (*MoveCursor)(
|
2006-11-17 05:40:37 +01:00
|
|
|
DeviceIntPtr /* pDev */,
|
2003-11-14 17:49:22 +01:00
|
|
|
ScreenPtr /* pScr */,
|
|
|
|
int /* x */,
|
|
|
|
int /* y */
|
|
|
|
);
|
2007-04-09 12:01:59 +02:00
|
|
|
Bool (*DeviceCursorInitialize)(
|
|
|
|
DeviceIntPtr /* pDev */,
|
|
|
|
ScreenPtr /* pScr */
|
|
|
|
);
|
|
|
|
void (*DeviceCursorCleanup)(
|
|
|
|
DeviceIntPtr /* pDev */,
|
|
|
|
ScreenPtr /* pScr */
|
|
|
|
);
|
2003-11-14 16:54:54 +01:00
|
|
|
} miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
|
|
|
|
|
|
|
|
typedef struct _miPointerScreenFuncRec {
|
2003-11-14 17:49:22 +01:00
|
|
|
Bool (*CursorOffScreen)(
|
|
|
|
ScreenPtr* /* ppScr */,
|
|
|
|
int* /* px */,
|
|
|
|
int* /* py */
|
|
|
|
);
|
|
|
|
void (*CrossScreen)(
|
|
|
|
ScreenPtr /* pScr */,
|
|
|
|
int /* entering */
|
|
|
|
);
|
|
|
|
void (*WarpCursor)(
|
2006-11-23 07:45:14 +01:00
|
|
|
DeviceIntPtr /*pDev*/,
|
2003-11-14 17:49:22 +01:00
|
|
|
ScreenPtr /* pScr */,
|
|
|
|
int /* x */,
|
|
|
|
int /* y */
|
|
|
|
);
|
|
|
|
void (*EnqueueEvent)(
|
2006-10-25 00:07:36 +02:00
|
|
|
DeviceIntPtr /* pDev */,
|
2009-04-09 12:27:00 +02:00
|
|
|
InternalEvent* /* event */
|
2003-11-14 17:49:22 +01:00
|
|
|
);
|
|
|
|
void (*NewEventScreen)(
|
2007-04-26 08:28:50 +02:00
|
|
|
DeviceIntPtr /* pDev */,
|
2003-11-14 17:49:22 +01:00
|
|
|
ScreenPtr /* pScr */,
|
|
|
|
Bool /* fromDIX */
|
|
|
|
);
|
2003-11-14 16:54:54 +01:00
|
|
|
} miPointerScreenFuncRec, *miPointerScreenFuncPtr;
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT Bool miDCInitialize(
|
2003-11-14 16:54:54 +01:00
|
|
|
ScreenPtr /*pScreen*/,
|
|
|
|
miPointerScreenFuncPtr /*screenFuncs*/
|
|
|
|
);
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT Bool miPointerInitialize(
|
2003-11-14 16:54:54 +01:00
|
|
|
ScreenPtr /*pScreen*/,
|
|
|
|
miPointerSpriteFuncPtr /*spriteFuncs*/,
|
|
|
|
miPointerScreenFuncPtr /*screenFuncs*/,
|
|
|
|
Bool /*waitForUpdate*/
|
|
|
|
);
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT void miPointerWarpCursor(
|
2006-11-23 07:45:14 +01:00
|
|
|
DeviceIntPtr /*pDev*/,
|
2003-11-14 16:54:54 +01:00
|
|
|
ScreenPtr /*pScreen*/,
|
|
|
|
int /*x*/,
|
|
|
|
int /*y*/
|
2009-05-12 13:24:07 +02:00
|
|
|
);
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2006-10-08 16:44:37 +02:00
|
|
|
/* Deprecated in favour of miPointerGetScreen. */
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT ScreenPtr miPointerCurrentScreen(
|
2003-11-14 17:49:22 +01:00
|
|
|
void
|
2006-10-08 16:23:54 +02:00
|
|
|
) _X_DEPRECATED;
|
2003-11-14 17:49:22 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT ScreenPtr miPointerGetScreen(
|
2006-10-08 16:44:37 +02:00
|
|
|
DeviceIntPtr pDev);
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT void miPointerSetScreen(
|
2006-10-08 19:34:32 +02:00
|
|
|
DeviceIntPtr pDev,
|
|
|
|
int screen_num,
|
|
|
|
int x,
|
|
|
|
int y);
|
2006-10-08 16:44:37 +02:00
|
|
|
|
2006-10-08 19:34:32 +02:00
|
|
|
/* Returns the current cursor position. */
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT void miPointerGetPosition(
|
2006-10-08 16:44:37 +02:00
|
|
|
DeviceIntPtr pDev,
|
|
|
|
int *x,
|
|
|
|
int *y);
|
|
|
|
|
2006-10-08 19:34:32 +02:00
|
|
|
/* Moves the cursor to the specified position. May clip the co-ordinates:
|
|
|
|
* x and y are modified in-place. */
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT void miPointerSetPosition(
|
2006-10-08 16:44:37 +02:00
|
|
|
DeviceIntPtr pDev,
|
2011-02-18 05:19:18 +01:00
|
|
|
int mode,
|
2006-10-08 19:34:32 +02:00
|
|
|
int *x,
|
2008-10-08 08:19:45 +02:00
|
|
|
int *y);
|
2006-10-08 16:44:37 +02:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT void miPointerUpdateSprite(
|
2006-10-08 16:44:37 +02:00
|
|
|
DeviceIntPtr pDev);
|
2003-11-14 17:49:22 +01:00
|
|
|
|
2010-06-04 04:00:53 +02:00
|
|
|
/* Sets whether the sprite should be updated immediately on pointer moves */
|
|
|
|
extern _X_EXPORT Bool miPointerSetWaitForUpdate(
|
|
|
|
ScreenPtr pScreen,
|
|
|
|
Bool wait);
|
|
|
|
|
2010-04-27 02:22:21 +02:00
|
|
|
extern _X_EXPORT DevPrivateKeyRec miPointerPrivKeyRec;
|
|
|
|
#define miPointerPrivKey (&miPointerPrivKeyRec)
|
|
|
|
|
|
|
|
extern _X_EXPORT DevPrivateKeyRec miPointerScreenKeyRec;
|
|
|
|
#define miPointerScreenKey (&miPointerScreenKeyRec)
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
#endif /* MIPOINTER_H */
|