2 * Copyright (C) 2007-2008 Alacatia Labs
4 * This software is provided 'as-is', without any express or implied
5 * warranty. In no event will the authors be held liable for any damages
6 * arising from the use of this software.
8 * Permission is granted to anyone to use this software for any purpose,
9 * including commercial applications, and to alter it and redistribute it
10 * freely, subject to the following restrictions:
12 * 1. The origin of this software must not be misrepresented; you must not
13 * claim that you wrote the original software. If you use this software
14 * in a product, an acknowledgment in the product documentation would be
15 * appreciated but is not required.
16 * 2. Altered source versions must be plainly marked as such, and must not be
17 * misrepresented as being the original software.
18 * 3. This notice may not be removed or altered from any source distribution.
20 * Joe Ranieri joe@alacatia.com
25 #include "CGSConnection.h"
27 typedef int CGSCursorID;
32 /*! Does the system support hardware cursors? */
33 CG_EXTERN CGError CGSSystemSupportsHardwareCursor(CGSConnectionID cid, bool *outSupportsHardwareCursor);
35 /*! Does the system support hardware color cursors? */
36 CG_EXTERN CGError CGSSystemSupportsColorHardwareCursor(CGSConnectionID cid, bool *outSupportsHardwareCursor);
38 /*! Shows the cursor. */
39 CG_EXTERN CGError CGSShowCursor(CGSConnectionID cid);
41 /*! Hides the cursor. */
42 CG_EXTERN CGError CGSHideCursor(CGSConnectionID cid);
44 /*! Hides the cursor until the mouse is moved. */
45 CG_EXTERN CGError CGSObscureCursor(CGSConnectionID cid);
47 /*! Gets the cursor location. */
48 CG_EXTERN CGError CGSGetCurrentCursorLocation(CGSConnectionID cid, CGPoint *outPos);
50 /*! Gets the name (in reverse DNS form) of a system cursor. */
51 CG_EXTERN char *CGSCursorNameForSystemCursor(CGSCursorID cursor);
53 /*! Gets the size of the data for the connection's cursor. */
54 CG_EXTERN CGError CGSGetCursorDataSize(CGSConnectionID cid, int *outDataSize);
56 /*! Gets the data for the connection's cursor. */
57 CG_EXTERN CGError CGSGetCursorData(CGSConnectionID cid, void *outData);
59 /*! Gets the size of the data for the current cursor. */
60 CG_EXTERN CGError CGSGetGlobalCursorDataSize(CGSConnectionID cid, int *outDataSize);
62 /*! Gets the data for the current cursor. */
63 CG_EXTERN CGError CGSGetGlobalCursorData(CGSConnectionID cid, void *outData, int *outRowBytes, CGRect *outRect, CGRect *outHotSpot, int *outDepth, int *outComponents, int *outBitsPerComponent);
65 /*! Gets the size of data for a system-defined cursor. */
66 CG_EXTERN CGError CGSGetSystemDefinedCursorDataSize(CGSConnectionID cid, CGSCursorID cursor, int *outDataSize);
68 /*! Gets the data for a system-defined cursor. */
69 CG_EXTERN CGError CGSGetSystemDefinedCursorData(CGSConnectionID cid, CGSCursorID cursor, void *outData, int *outRowBytes, CGRect *outRect, CGRect *outHotSpot, int *outDepth, int *outComponents, int *outBitsPerComponent);
71 /*! Gets the cursor 'seed'. Every time the cursor is updated, the seed changes. */
72 CG_EXTERN int CGSCurrentCursorSeed(void);
74 /*! Shows or hides the spinning beachball of death. */
75 CG_EXTERN CGError CGSForceWaitCursorActive(CGSConnectionID cid, bool showWaitCursor);