[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fast mouse pointer
- To: firstname.lastname@example.org
- Subject: Re: Fast mouse pointer
- From: Josef Spillner <email@example.com>
- Date: Sun, 23 Mar 2003 22:33:25 +0100
- Delivered-to: firstname.lastname@example.org
- Delivered-to: mailing list email@example.com
- Delivery-date: Sun, 23 Mar 2003 16:33:51 -0500
- In-reply-to: <20030219084547.AF05EE44D@whouse.4orsi.it>
- Mailing-list: contact firstname.lastname@example.org; run by ezmlm
- Organization: GGZ Gaming Zone
- References: <20030218210752.9FC1FE44A@whouse.4orsi.it> <email@example.com> <20030219084547.AF05EE44D@whouse.4orsi.it>
- Reply-to: firstname.lastname@example.org
- User-agent: KMail/1.5.9
On Wednesday 19 February 2003 09:48, Francesco Orsenigo wrote:
> SDL_CreateCursor() is unfit to do this, another different function will be
> needed: either this function does not yet exists or is not documented.
That mail was a month ago, in case it's still relevant, here's how to do it
(yeah, some real code on this list):
- check for Xcursor during configuration, e.g. in configure.ac
[AC_MSG_WARN(*** Cannot find X11/Xcursor/Xcursor.h header)],
[AC_MSG_WARN(*** Cannot find Xcursor library )],
- setup variables for Makefile.am accordingly, or whatever framework is used
if test "x$xcursor" = "x1"; then
AC_DEFINE_UNQUOTED(HAVE_XCURSOR, 1, [Xcursor support])
- include the Xcursor library, and SDL's window manager stuff (which is
- Load a cursor theme of your choice
info.version.major = 1;
ret = SDL_GetWMInfo(&info);
if(ret == 1)
cursor = XcursorLibraryLoadCursor(info.info.x11.display, "redglass");
XDefineCursor(info.info.x11.display, info.info.x11.window, cursor);
Either the game must provide an own cursor, or a foreign one must be chosen
according to freedesktop.org "standards".
(The issue with fonts is similar...)
A stock X11 pointer will be used in case Xcursor support has been compiled in
but the Xserver doesn't provide this feature.
SDL 2.0 will appear one day, the first CVS checkins happened a few days ago.
It should be possible to add this stuff without even changing the API for
1.x, but things will be more difficult when it comes to animated cursors.
I'll try to write a patch for 1.2.x for the time being, if it's considered
Play for fun, win for freedom.