Moved the cursor handling into the mouse code. SDL-1.3
authorSam Lantinga <slouken@libsdl.org>
Fri, 09 Jun 2006 06:42:42 +0000
branchSDL-1.3
changeset 167189f7510fe17a
parent 1670 eef792d31de8
child 1672 8e754b82cecc
Moved the cursor handling into the mouse code.
Added support for multiple mice, potentially dynamically added and removed.
include/SDL_mouse.h
src/events/SDL_mouse.c
src/events/SDL_mouse_c.h
src/events/blank_cursor.h
src/events/default_cursor.h
src/video/SDL_cursor.c
src/video/SDL_sysvideo.h
src/video/blank_cursor.h
src/video/default_cursor.h
     1.1 --- a/include/SDL_mouse.h	Wed Jun 07 16:10:28 2006 +0000
     1.2 +++ b/include/SDL_mouse.h	Fri Jun 09 06:42:42 2006 +0000
     1.3 @@ -57,7 +57,7 @@
     1.4   *
     1.5   * \brief Set the index of the currently selected mouse.
     1.6   *
     1.7 - * \return The index of the currently selected mouse.
     1.8 + * \return The index of the previously selected mouse.
     1.9   *
    1.10   * \note You can query the currently selected mouse by passing an index of -1.
    1.11   *
    1.12 @@ -109,7 +109,11 @@
    1.13                                                     int x, int y);
    1.14  
    1.15  /*
    1.16 - * Create a cursor using the specified data and mask (in MSB format).
    1.17 + * \fn SDL_Cursor *SDL_CreateCursor (const Uint8 * data, const Uint8 * mask, int w, int h, int hot_x, int hot_y)
    1.18 + *
    1.19 + * \brief Create a cursor for the currently selected mouse, using the
    1.20 + *        specified bitmap data and mask (in MSB format).
    1.21 + *
    1.22   * The cursor width must be a multiple of 8 bits.
    1.23   *
    1.24   * The cursor is created in black and white according to the following:
    1.25 @@ -119,34 +123,46 @@
    1.26   *  0     0       Transparent
    1.27   *  1     0       Inverted color if possible, black if not.
    1.28   *
    1.29 - * Cursors created with this function must be freed with SDL_FreeCursor().
    1.30 + * \sa SDL_FreeCursor()
    1.31   */
    1.32 -extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor
    1.33 -    (Uint8 * data, Uint8 * mask, int w, int h, int hot_x, int hot_y);
    1.34 +extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
    1.35 +                                                     const Uint8 * mask,
    1.36 +                                                     int w, int h, int hot_x,
    1.37 +                                                     int hot_y);
    1.38  
    1.39  /*
    1.40 - * Set the currently active cursor to the specified one.
    1.41 - * If the cursor is currently visible, the change will be immediately 
    1.42 - * represented on the display.
    1.43 + * \fn void SDL_SetCursor(SDL_Cursor * cursor)
    1.44 + *
    1.45 + * \brief Set the active cursor for the currently selected mouse.
    1.46 + *
    1.47 + * \note The cursor must have been created for the selected mouse.
    1.48   */
    1.49  extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
    1.50  
    1.51  /*
    1.52 - * Returns the currently active cursor.
    1.53 + * \fn SDL_Cursor *SDL_GetCursor(void)
    1.54 + *
    1.55 + * \brief Return the active cursor for the currently selected mouse.
    1.56   */
    1.57  extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
    1.58  
    1.59  /*
    1.60 - * Deallocates a cursor created with SDL_CreateCursor().
    1.61 + * \fn void SDL_FreeCursor(SDL_Cursor * cursor)
    1.62 + *
    1.63 + * \brief Frees a cursor created with SDL_CreateCursor().
    1.64 + *
    1.65 + * \sa SDL_CreateCursor()
    1.66   */
    1.67  extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
    1.68  
    1.69  /*
    1.70 - * Toggle whether or not the cursor is shown on the screen.
    1.71 - * The cursor start off displayed, but can be turned off.
    1.72 - * SDL_ShowCursor() returns 1 if the cursor was being displayed
    1.73 - * before the call, or 0 if it was not.  You can query the current
    1.74 - * state by passing a 'toggle' value of -1.
    1.75 + * \fn int SDL_ShowCursor(int toggle)
    1.76 + *
    1.77 + * \brief Toggle whether or not the cursor is shown for the currently selected mouse.
    1.78 + *
    1.79 + * \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current state.
    1.80 + *
    1.81 + * \return 1 if the cursor is shown, or 0 if the cursor is hidden.
    1.82   */
    1.83  extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
    1.84  
     2.1 --- a/src/events/SDL_mouse.c	Wed Jun 07 16:10:28 2006 +0000
     2.2 +++ b/src/events/SDL_mouse.c	Fri Jun 09 06:42:42 2006 +0000
     2.3 @@ -26,11 +26,12 @@
     2.4  #include "SDL_events.h"
     2.5  #include "SDL_events_c.h"
     2.6  #include "SDL_mouse_c.h"
     2.7 +#include "default_cursor.h"
     2.8  
     2.9  
    2.10  static int SDL_num_mice;
    2.11  static int SDL_current_mouse;
    2.12 -static SDL_Mouse *SDL_mice;
    2.13 +static SDL_Mouse **SDL_mice;
    2.14  
    2.15  
    2.16  /* Public functions */
    2.17 @@ -40,45 +41,97 @@
    2.18      return (0);
    2.19  }
    2.20  
    2.21 -int
    2.22 -SDL_AddMouse(SDL_WindowID focus, int x, int y, Uint8 buttonstate)
    2.23 -{
    2.24 -    SDL_Mouse *new_mice;
    2.25 -    int index;
    2.26 -    SDL_Mouse *mouse;
    2.27 -
    2.28 -    new_mice =
    2.29 -        (SDL_Mouse *) SDL_realloc(SDL_mice,
    2.30 -                                  (SDL_num_mice + 1) * sizeof(*new_mice));
    2.31 -    if (!new_mice) {
    2.32 -        SDL_OutOfMemory();
    2.33 -        return -1;
    2.34 -    }
    2.35 -
    2.36 -    index = SDL_num_mice++;
    2.37 -    mouse = &SDL_mice[index];
    2.38 -    mouse->focus = focus;
    2.39 -    mouse->x = x;
    2.40 -    mouse->y = y;
    2.41 -    mouse->xdelta = 0;
    2.42 -    mouse->ydelta = 0;
    2.43 -    mouse->buttonstate = buttonstate;
    2.44 -
    2.45 -    return index;
    2.46 -}
    2.47 -
    2.48  SDL_Mouse *
    2.49  SDL_GetMouse(int index)
    2.50  {
    2.51      if (index < 0 || index >= SDL_num_mice) {
    2.52          return NULL;
    2.53      }
    2.54 -    return &SDL_mice[index];
    2.55 +    return SDL_mice[index];
    2.56 +}
    2.57 +
    2.58 +int
    2.59 +SDL_AddMouse(const SDL_Mouse * mouse, int index)
    2.60 +{
    2.61 +    SDL_Mouse **mice;
    2.62 +    SDL_Cursor *cursor;
    2.63 +    int selected_mouse;
    2.64 +
    2.65 +    /* Add the mouse to the list of mice */
    2.66 +    if (index < 0 || index >= SDL_num_mice || SDL_mice[index]) {
    2.67 +        mice =
    2.68 +            (SDL_Mouse **) SDL_realloc(SDL_mice,
    2.69 +                                       (SDL_num_mice + 1) * sizeof(*mice));
    2.70 +        if (!mice) {
    2.71 +            SDL_OutOfMemory();
    2.72 +            return -1;
    2.73 +        }
    2.74 +
    2.75 +        SDL_mice = mice;
    2.76 +        index = SDL_num_mice++;
    2.77 +    }
    2.78 +    SDL_mice[index] = (SDL_Mouse *) SDL_malloc(sizeof(*SDL_mice[index]));
    2.79 +    if (!SDL_mice[index]) {
    2.80 +        SDL_OutOfMemory();
    2.81 +        return -1;
    2.82 +    }
    2.83 +    *SDL_mice[index] = *mouse;
    2.84 +
    2.85 +    /* Create the default cursor for the mouse */
    2.86 +    SDL_mice[index]->cursor_shown = SDL_TRUE;
    2.87 +    selected_mouse = SDL_SelectMouse(index);
    2.88 +    SDL_mice[index]->cur_cursor = NULL;
    2.89 +    SDL_mice[index]->def_cursor =
    2.90 +        SDL_CreateCursor(default_cdata, default_cmask, DEFAULT_CWIDTH,
    2.91 +                         DEFAULT_CHEIGHT, DEFAULT_CHOTX, DEFAULT_CHOTY);
    2.92 +    SDL_SetCursor(SDL_mice[index]->def_cursor);
    2.93 +    SDL_SelectMouse(selected_mouse);
    2.94 +
    2.95 +    return index;
    2.96 +}
    2.97 +
    2.98 +void
    2.99 +SDL_DelMouse(int index)
   2.100 +{
   2.101 +    SDL_Mouse *mouse = SDL_GetMouse(index);
   2.102 +
   2.103 +    if (!mouse) {
   2.104 +        return;
   2.105 +    }
   2.106 +
   2.107 +    mouse->def_cursor = NULL;
   2.108 +    while (mouse->cursors) {
   2.109 +        SDL_FreeCursor(mouse->cursors);
   2.110 +    }
   2.111 +
   2.112 +    if (mouse->FreeMouse) {
   2.113 +        mouse->FreeMouse(mouse);
   2.114 +    }
   2.115 +    SDL_free(mouse);
   2.116 +
   2.117 +    SDL_mice[index] = NULL;
   2.118 +}
   2.119 +
   2.120 +void
   2.121 +SDL_ResetMouse(int index)
   2.122 +{
   2.123 +    SDL_Mouse *mouse = SDL_GetMouse(index);
   2.124 +
   2.125 +    if (!mouse) {
   2.126 +        return;
   2.127 +    }
   2.128 +
   2.129 +    /* FIXME */
   2.130  }
   2.131  
   2.132  void
   2.133  SDL_MouseQuit(void)
   2.134  {
   2.135 +    int i;
   2.136 +
   2.137 +    for (i = 0; i < SDL_num_mice; ++i) {
   2.138 +        SDL_DelMouse(i);
   2.139 +    }
   2.140      SDL_num_mice = 0;
   2.141      SDL_current_mouse = 0;
   2.142  
   2.143 @@ -201,9 +254,16 @@
   2.144      }
   2.145  
   2.146      /* Update internal mouse state */
   2.147 +    mouse->x = x;
   2.148 +    mouse->y = y;
   2.149      mouse->xdelta += xrel;
   2.150      mouse->ydelta += yrel;
   2.151  
   2.152 +    /* Move the mouse cursor, if needed */
   2.153 +    if (mouse->MoveCursor && mouse->cur_cursor) {
   2.154 +        mouse->MoveCursor(mouse->cur_cursor);
   2.155 +    }
   2.156 +
   2.157      /* Post the event, if desired */
   2.158      posted = 0;
   2.159      if (SDL_ProcessEvents[SDL_MOUSEMOTION] == SDL_ENABLE) {
   2.160 @@ -225,8 +285,8 @@
   2.161  }
   2.162  
   2.163  int
   2.164 -SDL_PrivateMouseButton(int index, SDL_WindowID windowID, Uint8 state,
   2.165 -                       Uint8 button)
   2.166 +SDL_SendMouseButton(int index, SDL_WindowID windowID, Uint8 state,
   2.167 +                    Uint8 button)
   2.168  {
   2.169      SDL_Mouse *mouse = SDL_GetMouse(index);
   2.170      int posted;
   2.171 @@ -282,4 +342,204 @@
   2.172      return posted;
   2.173  }
   2.174  
   2.175 +void
   2.176 +SDL_WarpMouseInWindow(SDL_WindowID windowID, int x, int y)
   2.177 +{
   2.178 +    SDL_Mouse *mouse = SDL_GetMouse(SDL_current_mouse);
   2.179 +
   2.180 +    if (!mouse) {
   2.181 +        return;
   2.182 +    }
   2.183 +
   2.184 +    if (mouse->WarpMouse) {
   2.185 +        mouse->WarpMouse(mouse, windowID, x, y);
   2.186 +    } else {
   2.187 +        SDL_SendMouseMotion(SDL_current_mouse, windowID, 0, x, y);
   2.188 +    }
   2.189 +}
   2.190 +
   2.191 +SDL_Cursor *
   2.192 +SDL_CreateCursor(const Uint8 * data, const Uint8 * mask,
   2.193 +                 int w, int h, int hot_x, int hot_y)
   2.194 +{
   2.195 +    SDL_Mouse *mouse = SDL_GetMouse(SDL_current_mouse);
   2.196 +    SDL_Surface *surface;
   2.197 +    SDL_Cursor *cursor;
   2.198 +    int x, y;
   2.199 +    Uint32 *pixel;
   2.200 +    Uint8 datab, maskb;
   2.201 +    const Uint32 black = 0xFF000000;
   2.202 +    const Uint32 white = 0xFFFFFFFF;
   2.203 +    const Uint32 transparent = 0x00000000;
   2.204 +
   2.205 +    if (!mouse) {
   2.206 +        SDL_SetError("No mice are initialized");
   2.207 +        return NULL;
   2.208 +    }
   2.209 +
   2.210 +    if (!mouse->CreateCursor) {
   2.211 +        SDL_SetError("Current mouse doesn't have cursor support");
   2.212 +        return NULL;
   2.213 +    }
   2.214 +
   2.215 +    /* Sanity check the hot spot */
   2.216 +    if ((hot_x < 0) || (hot_y < 0) || (hot_x >= w) || (hot_y >= h)) {
   2.217 +        SDL_SetError("Cursor hot spot doesn't lie within cursor");
   2.218 +        return NULL;
   2.219 +    }
   2.220 +
   2.221 +    /* Make sure the width is a multiple of 8 */
   2.222 +    w = ((w + 7) & ~7);
   2.223 +
   2.224 +    /* Create the surface from a bitmap */
   2.225 +    surface =
   2.226 +        SDL_CreateRGBSurface(0, w, h, 32, 0x00FF0000, 0x0000FF00, 0x000000FF,
   2.227 +                             0xFF000000);
   2.228 +    if (!surface) {
   2.229 +        return NULL;
   2.230 +    }
   2.231 +    for (y = 0; y < h; ++y) {
   2.232 +        pixel =
   2.233 +            (Uint32 *) ((Uint8 *) surface->pixels + y * surface->pitch +
   2.234 +                        x * 4);
   2.235 +        for (x = 0; x < w; ++x) {
   2.236 +            if ((x % 8) == 0) {
   2.237 +                datab = *data++;
   2.238 +                maskb = *mask++;
   2.239 +            }
   2.240 +            if (maskb & 0x80) {
   2.241 +                *pixel++ = (datab & 0x80) ? black : white;
   2.242 +            } else {
   2.243 +                *pixel++ = (datab & 0x80) ? black : transparent;
   2.244 +            }
   2.245 +            datab <<= 1;
   2.246 +            maskb <<= 1;
   2.247 +        }
   2.248 +    }
   2.249 +
   2.250 +    cursor = mouse->CreateCursor(surface, hot_x, hot_y);
   2.251 +    if (cursor) {
   2.252 +        cursor->mouse = mouse;
   2.253 +        cursor->next = mouse->cursors;
   2.254 +        mouse->cursors = cursor;
   2.255 +    }
   2.256 +
   2.257 +    SDL_FreeSurface(surface);
   2.258 +
   2.259 +    return cursor;
   2.260 +}
   2.261 +
   2.262 +/* SDL_SetCursor(NULL) can be used to force the cursor redraw,
   2.263 +   if this is desired for any reason.  This is used when setting
   2.264 +   the video mode and when the SDL window gains the mouse focus.
   2.265 + */
   2.266 +void
   2.267 +SDL_SetCursor(SDL_Cursor * cursor)
   2.268 +{
   2.269 +    SDL_Mouse *mouse = SDL_GetMouse(SDL_current_mouse);
   2.270 +
   2.271 +    if (!mouse) {
   2.272 +        SDL_SetError("No mice are initialized");
   2.273 +        return;
   2.274 +    }
   2.275 +
   2.276 +    /* Set the new cursor */
   2.277 +    if (cursor) {
   2.278 +        /* Make sure the cursor is still valid for this mouse */
   2.279 +        SDL_Cursor *found;
   2.280 +        for (found = mouse->cursors; found; found = found->next) {
   2.281 +            if (found == cursor) {
   2.282 +                break;
   2.283 +            }
   2.284 +        }
   2.285 +        if (!found) {
   2.286 +            SDL_SetError("Cursor not associated with the current mouse");
   2.287 +            return;
   2.288 +        }
   2.289 +        mouse->cur_cursor = cursor;
   2.290 +    } else {
   2.291 +        cursor = mouse->cur_cursor;
   2.292 +    }
   2.293 +
   2.294 +    if (cursor && mouse->cursor_shown) {
   2.295 +        if (mouse->ShowCursor) {
   2.296 +            mouse->ShowCursor(cursor);
   2.297 +        }
   2.298 +    } else {
   2.299 +        if (mouse->ShowCursor) {
   2.300 +            mouse->ShowCursor(NULL);
   2.301 +        }
   2.302 +    }
   2.303 +}
   2.304 +
   2.305 +SDL_Cursor *
   2.306 +SDL_GetCursor(void)
   2.307 +{
   2.308 +    SDL_Mouse *mouse = SDL_GetMouse(SDL_current_mouse);
   2.309 +
   2.310 +    if (!mouse) {
   2.311 +        return NULL;
   2.312 +    }
   2.313 +    return mouse->cur_cursor;
   2.314 +}
   2.315 +
   2.316 +void
   2.317 +SDL_FreeCursor(SDL_Cursor * cursor)
   2.318 +{
   2.319 +    SDL_Mouse *mouse;
   2.320 +    SDL_Cursor *curr, *prev;
   2.321 +
   2.322 +    if (!cursor) {
   2.323 +        return;
   2.324 +    }
   2.325 +    mouse = cursor->mouse;
   2.326 +
   2.327 +    if (cursor == mouse->def_cursor) {
   2.328 +        return;
   2.329 +    }
   2.330 +    if (cursor == mouse->cur_cursor) {
   2.331 +        SDL_SetCursor(mouse->def_cursor);
   2.332 +    }
   2.333 +
   2.334 +    for (prev = NULL, curr = mouse->cursors; curr;
   2.335 +         prev = curr, curr = curr->next) {
   2.336 +        if (curr == cursor) {
   2.337 +            if (prev) {
   2.338 +                prev->next = curr->next;
   2.339 +            } else {
   2.340 +                mouse->cursors = curr->next;
   2.341 +            }
   2.342 +
   2.343 +            if (mouse->FreeCursor) {
   2.344 +                mouse->FreeCursor(curr);
   2.345 +            }
   2.346 +            return;
   2.347 +        }
   2.348 +    }
   2.349 +}
   2.350 +
   2.351 +int
   2.352 +SDL_ShowCursor(int toggle)
   2.353 +{
   2.354 +    SDL_Mouse *mouse = SDL_GetMouse(SDL_current_mouse);
   2.355 +    SDL_bool shown;
   2.356 +
   2.357 +    if (!mouse) {
   2.358 +        return 0;
   2.359 +    }
   2.360 +
   2.361 +    shown = mouse->cursor_shown;
   2.362 +    if (toggle >= 0) {
   2.363 +        if (toggle) {
   2.364 +            mouse->cursor_shown = SDL_TRUE;
   2.365 +        } else {
   2.366 +            mouse->cursor_shown = SDL_FALSE;
   2.367 +        }
   2.368 +        if (mouse->cursor_shown != shown) {
   2.369 +            SDL_SetCursor(NULL);
   2.370 +        }
   2.371 +    }
   2.372 +    return shown;
   2.373 +}
   2.374 +
   2.375  /* vi: set ts=4 sw=4 expandtab: */
     3.1 --- a/src/events/SDL_mouse_c.h	Wed Jun 07 16:10:28 2006 +0000
     3.2 +++ b/src/events/SDL_mouse_c.h	Fri Jun 09 06:42:42 2006 +0000
     3.3 @@ -24,23 +24,81 @@
     3.4  #ifndef _SDL_mouse_c_h
     3.5  #define _SDL_mouse_c_h
     3.6  
     3.7 -typedef struct
     3.8 +typedef struct SDL_Mouse SDL_Mouse;
     3.9 +
    3.10 +struct SDL_Cursor
    3.11  {
    3.12 +    SDL_Mouse *mouse;
    3.13 +
    3.14 +    SDL_Cursor *next;
    3.15 +
    3.16 +    void *driverdata;
    3.17 +};
    3.18 +
    3.19 +struct SDL_Mouse
    3.20 +{
    3.21 +    /* Create a cursor from a surface */
    3.22 +    SDL_Cursor *(*CreateCursor) (SDL_Surface * surface, int hot_x, int hot_y);
    3.23 +
    3.24 +    /* Show the specified cursor, or hide if cursor is NULL */
    3.25 +    int (*ShowCursor) (SDL_Cursor * cursor);
    3.26 +
    3.27 +    /* This is called when a mouse motion event occurs */
    3.28 +    void (*MoveCursor) (SDL_Cursor * cursor);
    3.29 +
    3.30 +    /* Free a window manager cursor */
    3.31 +    void (*FreeCursor) (SDL_Cursor * cursor);
    3.32 +
    3.33 +    /* Warp the mouse to (x,y) */
    3.34 +    void (*WarpMouse) (SDL_Mouse * mouse, SDL_WindowID windowID, int x,
    3.35 +                       int y);
    3.36 +
    3.37 +    /* Free the mouse when it's time */
    3.38 +    void (*FreeMouse) (SDL_Mouse * mouse);
    3.39 +
    3.40 +    /* Data common to all mice */
    3.41      SDL_WindowID focus;
    3.42      int x;
    3.43      int y;
    3.44      int xdelta;
    3.45      int ydelta;
    3.46      Uint8 buttonstate;
    3.47 -} SDL_Mouse;
    3.48  
    3.49 +    SDL_Cursor *cursors;
    3.50 +    SDL_Cursor *def_cursor;
    3.51 +    SDL_Cursor *cur_cursor;
    3.52 +    SDL_bool cursor_shown;
    3.53 +
    3.54 +    void *driverdata;
    3.55 +};
    3.56 +
    3.57 +
    3.58 +/* Initialize the mouse subsystem */
    3.59  extern int SDL_MouseInit(void);
    3.60 -extern int SDL_AddMouse(SDL_WindowID focus, int x, int y, Uint8 buttonstate);
    3.61 +
    3.62 +/* Get the mouse at an index */
    3.63  extern SDL_Mouse *SDL_GetMouse(int index);
    3.64 +
    3.65 +/* Add a mouse, possibly reattaching at a particular index (or -1),
    3.66 +   returning the index of the mouse, or -1 if there was an error.
    3.67 + */
    3.68 +extern int SDL_AddMouse(const SDL_Mouse * mouse, int index);
    3.69 +
    3.70 +/* Remove a mouse at an index, clearing the slot for later */
    3.71 +extern void SDL_DelMouse(int index);
    3.72 +
    3.73 +/* Clear the button state of a mouse at an index */
    3.74 +extern void SDL_ResetMouse(int index);
    3.75 +
    3.76 +/* Send a mouse motion event for a mouse at an index */
    3.77  extern int SDL_SendMouseMotion(int index, SDL_WindowID windowID, int relative,
    3.78                                 int x, int y);
    3.79 +
    3.80 +/* Send a mouse button event for a mouse at an index */
    3.81  extern int SDL_SendMouseButton(int index, SDL_WindowID windowID, Uint8 state,
    3.82                                 Uint8 button);
    3.83 +
    3.84 +/* Shutdown the mouse subsystem */
    3.85  extern void SDL_MouseQuit(void);
    3.86  
    3.87  #endif /* _SDL_mouse_c_h */
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/src/events/blank_cursor.h	Fri Jun 09 06:42:42 2006 +0000
     4.3 @@ -0,0 +1,34 @@
     4.4 +/*
     4.5 +    SDL - Simple DirectMedia Layer
     4.6 +    Copyright (C) 1997-2006 Sam Lantinga
     4.7 +
     4.8 +    This library is free software; you can redistribute it and/or
     4.9 +    modify it under the terms of the GNU Lesser General Public
    4.10 +    License as published by the Free Software Foundation; either
    4.11 +    version 2.1 of the License, or (at your option) any later version.
    4.12 +
    4.13 +    This library is distributed in the hope that it will be useful,
    4.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    4.16 +    Lesser General Public License for more details.
    4.17 +
    4.18 +    You should have received a copy of the GNU Lesser General Public
    4.19 +    License along with this library; if not, write to the Free Software
    4.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    4.21 +
    4.22 +    Sam Lantinga
    4.23 +    slouken@libsdl.org
    4.24 +*/
    4.25 +
    4.26 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
    4.27 + * A default blank 8x8 cursor                                                */
    4.28 +
    4.29 +#define BLANK_CWIDTH	8
    4.30 +#define BLANK_CHEIGHT	8
    4.31 +#define BLANK_CHOTX	0
    4.32 +#define BLANK_CHOTY	0
    4.33 +
    4.34 +static unsigned char blank_cdata[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
    4.35 +static unsigned char blank_cmask[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
    4.36 +
    4.37 +/* vi: set ts=4 sw=4 expandtab: */
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/src/events/default_cursor.h	Fri Jun 09 06:42:42 2006 +0000
     5.3 @@ -0,0 +1,113 @@
     5.4 +/*
     5.5 +    SDL - Simple DirectMedia Layer
     5.6 +    Copyright (C) 1997-2006 Sam Lantinga
     5.7 +
     5.8 +    This library is free software; you can redistribute it and/or
     5.9 +    modify it under the terms of the GNU Lesser General Public
    5.10 +    License as published by the Free Software Foundation; either
    5.11 +    version 2.1 of the License, or (at your option) any later version.
    5.12 +
    5.13 +    This library is distributed in the hope that it will be useful,
    5.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    5.16 +    Lesser General Public License for more details.
    5.17 +
    5.18 +    You should have received a copy of the GNU Lesser General Public
    5.19 +    License along with this library; if not, write to the Free Software
    5.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    5.21 +
    5.22 +    Sam Lantinga
    5.23 +    slouken@libsdl.org
    5.24 +*/
    5.25 +
    5.26 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
    5.27 + * Default cursor - it happens to be the Mac cursor, but could be anything   */
    5.28 +
    5.29 +#define DEFAULT_CWIDTH	16
    5.30 +#define DEFAULT_CHEIGHT	16
    5.31 +#define DEFAULT_CHOTX	0
    5.32 +#define DEFAULT_CHOTY	0
    5.33 +
    5.34 +/* Added a real MacOS cursor, at the request of Luc-Olivier de Charrière */
    5.35 +#define USE_MACOS_CURSOR
    5.36 +
    5.37 +#ifdef USE_MACOS_CURSOR
    5.38 +
    5.39 +static unsigned char default_cdata[] = {
    5.40 +    0x00, 0x00,
    5.41 +    0x40, 0x00,
    5.42 +    0x60, 0x00,
    5.43 +    0x70, 0x00,
    5.44 +    0x78, 0x00,
    5.45 +    0x7C, 0x00,
    5.46 +    0x7E, 0x00,
    5.47 +    0x7F, 0x00,
    5.48 +    0x7F, 0x80,
    5.49 +    0x7C, 0x00,
    5.50 +    0x6C, 0x00,
    5.51 +    0x46, 0x00,
    5.52 +    0x06, 0x00,
    5.53 +    0x03, 0x00,
    5.54 +    0x03, 0x00,
    5.55 +    0x00, 0x00
    5.56 +};
    5.57 +static unsigned char default_cmask[] = {
    5.58 +    0xC0, 0x00,
    5.59 +    0xE0, 0x00,
    5.60 +    0xF0, 0x00,
    5.61 +    0xF8, 0x00,
    5.62 +    0xFC, 0x00,
    5.63 +    0xFE, 0x00,
    5.64 +    0xFF, 0x00,
    5.65 +    0xFF, 0x80,
    5.66 +    0xFF, 0xC0,
    5.67 +    0xFF, 0xE0,
    5.68 +    0xFE, 0x00,
    5.69 +    0xEF, 0x00,
    5.70 +    0xCF, 0x00,
    5.71 +    0x87, 0x80,
    5.72 +    0x07, 0x80,
    5.73 +    0x03, 0x00
    5.74 +};
    5.75 +
    5.76 +#else
    5.77 +
    5.78 +static unsigned char default_cdata[] = {
    5.79 +    0x00, 0x00,
    5.80 +    0x40, 0x00,
    5.81 +    0x60, 0x00,
    5.82 +    0x70, 0x00,
    5.83 +    0x78, 0x00,
    5.84 +    0x7C, 0x00,
    5.85 +    0x7E, 0x00,
    5.86 +    0x7F, 0x00,
    5.87 +    0x7F, 0x80,
    5.88 +    0x7C, 0x00,
    5.89 +    0x6C, 0x00,
    5.90 +    0x46, 0x00,
    5.91 +    0x06, 0x00,
    5.92 +    0x03, 0x00,
    5.93 +    0x03, 0x00,
    5.94 +    0x00, 0x00
    5.95 +};
    5.96 +static unsigned char default_cmask[] = {
    5.97 +    0x40, 0x00,
    5.98 +    0xE0, 0x00,
    5.99 +    0xF0, 0x00,
   5.100 +    0xF8, 0x00,
   5.101 +    0xFC, 0x00,
   5.102 +    0xFE, 0x00,
   5.103 +    0xFF, 0x00,
   5.104 +    0xFF, 0x80,
   5.105 +    0xFF, 0xC0,
   5.106 +    0xFF, 0x80,
   5.107 +    0xFE, 0x00,
   5.108 +    0xEF, 0x00,
   5.109 +    0x4F, 0x00,
   5.110 +    0x07, 0x80,
   5.111 +    0x07, 0x80,
   5.112 +    0x03, 0x00
   5.113 +};
   5.114 +
   5.115 +#endif /* TRUE_MACINTOSH_CURSOR */
   5.116 +/* vi: set ts=4 sw=4 expandtab: */
     6.1 --- a/src/video/SDL_cursor.c	Wed Jun 07 16:10:28 2006 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,204 +0,0 @@
     6.4 -/*
     6.5 -    SDL - Simple DirectMedia Layer
     6.6 -    Copyright (C) 1997-2006 Sam Lantinga
     6.7 -
     6.8 -    This library is free software; you can redistribute it and/or
     6.9 -    modify it under the terms of the GNU Lesser General Public
    6.10 -    License as published by the Free Software Foundation; either
    6.11 -    version 2.1 of the License, or (at your option) any later version.
    6.12 -
    6.13 -    This library is distributed in the hope that it will be useful,
    6.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    6.16 -    Lesser General Public License for more details.
    6.17 -
    6.18 -    You should have received a copy of the GNU Lesser General Public
    6.19 -    License along with this library; if not, write to the Free Software
    6.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    6.21 -
    6.22 -    Sam Lantinga
    6.23 -    slouken@libsdl.org
    6.24 -*/
    6.25 -#include "SDL_config.h"
    6.26 -
    6.27 -/* General cursor handling code for SDL */
    6.28 -
    6.29 -#include "SDL_video.h"
    6.30 -#include "SDL_mouse.h"
    6.31 -#include "SDL_sysvideo.h"
    6.32 -#include "SDL_cursor_c.h"
    6.33 -#include "default_cursor.h"
    6.34 -
    6.35 -/* These are static for our cursor handling code */
    6.36 -/* FIXME: Add support for multiple simultaneous cursors */
    6.37 -volatile int SDL_cursorstate = CURSOR_VISIBLE;
    6.38 -SDL_Cursor *SDL_cursor = NULL;
    6.39 -static SDL_Cursor *SDL_defcursor = NULL;
    6.40 -
    6.41 -/* Public functions */
    6.42 -void
    6.43 -SDL_CursorQuit(void)
    6.44 -{
    6.45 -    if (SDL_cursor != NULL) {
    6.46 -        SDL_Cursor *cursor;
    6.47 -
    6.48 -        SDL_cursorstate &= ~CURSOR_VISIBLE;
    6.49 -        if (SDL_cursor != SDL_defcursor) {
    6.50 -            SDL_FreeCursor(SDL_cursor);
    6.51 -        }
    6.52 -        SDL_cursor = NULL;
    6.53 -        if (SDL_defcursor != NULL) {
    6.54 -            cursor = SDL_defcursor;
    6.55 -            SDL_defcursor = NULL;
    6.56 -            SDL_FreeCursor(cursor);
    6.57 -        }
    6.58 -    }
    6.59 -}
    6.60 -
    6.61 -int
    6.62 -SDL_CursorInit(void)
    6.63 -{
    6.64 -    /* We don't have mouse focus, and the cursor isn't drawn yet */
    6.65 -#ifndef IPOD
    6.66 -    SDL_cursorstate = CURSOR_VISIBLE;
    6.67 -#endif
    6.68 -
    6.69 -    /* Create the default cursor */
    6.70 -    if (SDL_defcursor == NULL) {
    6.71 -        SDL_defcursor = SDL_CreateCursor(default_cdata, default_cmask,
    6.72 -                                         DEFAULT_CWIDTH, DEFAULT_CHEIGHT,
    6.73 -                                         DEFAULT_CHOTX, DEFAULT_CHOTY);
    6.74 -        SDL_SetCursor(SDL_defcursor);
    6.75 -    }
    6.76 -
    6.77 -    /* That's it! */
    6.78 -    return (0);
    6.79 -}
    6.80 -
    6.81 -SDL_Cursor *
    6.82 -SDL_CreateCursor(Uint8 * data, Uint8 * mask,
    6.83 -                 int w, int h, int hot_x, int hot_y)
    6.84 -{
    6.85 -    SDL_VideoDevice *_this = SDL_GetVideoDevice();
    6.86 -    SDL_Cursor *cursor;
    6.87 -
    6.88 -    /* Make sure the width is a multiple of 8 */
    6.89 -    w = ((w + 7) & ~7);
    6.90 -
    6.91 -    /* Sanity check the hot spot */
    6.92 -    if ((hot_x < 0) || (hot_y < 0) || (hot_x >= w) || (hot_y >= h)) {
    6.93 -        SDL_SetError("Cursor hot spot doesn't lie within cursor");
    6.94 -        return (NULL);
    6.95 -    }
    6.96 -
    6.97 -    if (_this->CreateWMCursor) {
    6.98 -        cursor = _this->CreateWMCursor(_this, data, mask, w, h, hot_x, hot_y);
    6.99 -    } else {
   6.100 -        cursor = NULL;
   6.101 -    }
   6.102 -    return (cursor);
   6.103 -}
   6.104 -
   6.105 -/* SDL_SetCursor(NULL) can be used to force the cursor redraw,
   6.106 -   if this is desired for any reason.  This is used when setting
   6.107 -   the video mode and when the SDL window gains the mouse focus.
   6.108 - */
   6.109 -void
   6.110 -SDL_SetCursor(SDL_Cursor * cursor)
   6.111 -{
   6.112 -    SDL_VideoDevice *_this = SDL_GetVideoDevice();
   6.113 -
   6.114 -    /* Make sure that the video subsystem has been initialized */
   6.115 -    if (!_this) {
   6.116 -        return;
   6.117 -    }
   6.118 -
   6.119 -    /* Set the new cursor */
   6.120 -    if (cursor && (cursor != SDL_cursor)) {
   6.121 -        SDL_cursor = cursor;
   6.122 -    }
   6.123 -
   6.124 -    /* Draw the new mouse cursor */
   6.125 -    if (SDL_cursor && (SDL_cursorstate & CURSOR_VISIBLE)) {
   6.126 -        if (_this->ShowWMCursor) {
   6.127 -            _this->ShowWMCursor(_this, SDL_cursor);
   6.128 -        }
   6.129 -    } else {
   6.130 -        /* Erase window manager mouse (cursor not visible) */
   6.131 -        if (_this->ShowWMCursor) {
   6.132 -            _this->ShowWMCursor(_this, NULL);
   6.133 -        }
   6.134 -    }
   6.135 -}
   6.136 -
   6.137 -SDL_Cursor *
   6.138 -SDL_GetCursor(void)
   6.139 -{
   6.140 -    return (SDL_cursor);
   6.141 -}
   6.142 -
   6.143 -void
   6.144 -SDL_FreeCursor(SDL_Cursor * cursor)
   6.145 -{
   6.146 -    if (cursor) {
   6.147 -        if (cursor == SDL_cursor) {
   6.148 -            SDL_SetCursor(SDL_defcursor);
   6.149 -        }
   6.150 -        if (cursor != SDL_defcursor) {
   6.151 -            SDL_VideoDevice *_this = SDL_GetVideoDevice();
   6.152 -
   6.153 -            if (_this && _this->FreeWMCursor) {
   6.154 -                _this->FreeWMCursor(_this, cursor);
   6.155 -            }
   6.156 -        }
   6.157 -    }
   6.158 -}
   6.159 -
   6.160 -int
   6.161 -SDL_ShowCursor(int toggle)
   6.162 -{
   6.163 -    int showing;
   6.164 -
   6.165 -    showing = (SDL_cursorstate & CURSOR_VISIBLE);
   6.166 -    if (toggle >= 0) {
   6.167 -        if (toggle) {
   6.168 -            SDL_cursorstate |= CURSOR_VISIBLE;
   6.169 -        } else {
   6.170 -            SDL_cursorstate &= ~CURSOR_VISIBLE;
   6.171 -        }
   6.172 -        if ((SDL_cursorstate & CURSOR_VISIBLE) != showing) {
   6.173 -            SDL_VideoDevice *_this = SDL_GetVideoDevice();
   6.174 -
   6.175 -            SDL_SetCursor(NULL);
   6.176 -            if (_this && _this->CheckMouseMode) {
   6.177 -                _this->CheckMouseMode(_this);
   6.178 -            }
   6.179 -        }
   6.180 -    } else {
   6.181 -        /* Query current state */ ;
   6.182 -    }
   6.183 -    return (showing ? 1 : 0);
   6.184 -}
   6.185 -
   6.186 -void
   6.187 -SDL_WarpMouseInWindow(SDL_WindowID windowID, int x, int y)
   6.188 -{
   6.189 -    SDL_VideoDevice *_this = SDL_GetVideoDevice();
   6.190 -
   6.191 -    /* FIXME: This should specify the target window */
   6.192 -    if (!_this || !SDL_CurrentDisplay.num_windows) {
   6.193 -        SDL_SetError("A window must be created before warping mouse");
   6.194 -        return;
   6.195 -    }
   6.196 -
   6.197 -    if (!windowID) {
   6.198 -        windowID = SDL_CurrentWindow;
   6.199 -    }
   6.200 -
   6.201 -    /* This generates a mouse motion event */
   6.202 -    if (_this->WarpWMCursor) {
   6.203 -        _this->WarpWMCursor(_this, windowID, x, y);
   6.204 -    }
   6.205 -}
   6.206 -
   6.207 -/* vi: set ts=4 sw=4 expandtab: */
     7.1 --- a/src/video/SDL_sysvideo.h	Wed Jun 07 16:10:28 2006 +0000
     7.2 +++ b/src/video/SDL_sysvideo.h	Fri Jun 09 06:42:42 2006 +0000
     7.3 @@ -291,30 +291,6 @@
     7.4      int is_32bit;
     7.5  #endif
     7.6  
     7.7 -    /* * * */
     7.8 -    /* Cursor manager functions */
     7.9 -
    7.10 -    /* Free a window manager cursor
    7.11 -       This function can be NULL if CreateWMCursor is also NULL.
    7.12 -     */
    7.13 -    void (*FreeCursor) (_THIS, SDL_Cursor * cursor);
    7.14 -
    7.15 -    /* If not NULL, create a black/white window manager cursor */
    7.16 -    SDL_Cursor *(*CreateCursor) (_THIS,
    7.17 -                                 Uint8 * data, Uint8 * mask, int w, int h,
    7.18 -                                 int hot_x, int hot_y);
    7.19 -
    7.20 -    /* Show the specified cursor, or hide if cursor is NULL */
    7.21 -    int (*ShowCursor) (_THIS, SDL_Cursor * cursor);
    7.22 -
    7.23 -    /* Warp the window manager cursor to (x,y)
    7.24 -       If NULL, a mouse motion event is posted internally.
    7.25 -     */
    7.26 -    void (*WarpCursor) (_THIS, SDL_WindowID windowID, int x, int y);
    7.27 -
    7.28 -    /* If not NULL, this is called when a mouse motion event occurs */
    7.29 -    void (*MoveCursor) (_THIS, int x, int y);
    7.30 -
    7.31      /* Determine whether the mouse should be in relative mode or not.
    7.32         This function is called when the input grab state or cursor
    7.33         visibility state changes.
     8.1 --- a/src/video/blank_cursor.h	Wed Jun 07 16:10:28 2006 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,34 +0,0 @@
     8.4 -/*
     8.5 -    SDL - Simple DirectMedia Layer
     8.6 -    Copyright (C) 1997-2006 Sam Lantinga
     8.7 -
     8.8 -    This library is free software; you can redistribute it and/or
     8.9 -    modify it under the terms of the GNU Lesser General Public
    8.10 -    License as published by the Free Software Foundation; either
    8.11 -    version 2.1 of the License, or (at your option) any later version.
    8.12 -
    8.13 -    This library is distributed in the hope that it will be useful,
    8.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    8.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    8.16 -    Lesser General Public License for more details.
    8.17 -
    8.18 -    You should have received a copy of the GNU Lesser General Public
    8.19 -    License along with this library; if not, write to the Free Software
    8.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    8.21 -
    8.22 -    Sam Lantinga
    8.23 -    slouken@libsdl.org
    8.24 -*/
    8.25 -
    8.26 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
    8.27 - * A default blank 8x8 cursor                                                */
    8.28 -
    8.29 -#define BLANK_CWIDTH	8
    8.30 -#define BLANK_CHEIGHT	8
    8.31 -#define BLANK_CHOTX	0
    8.32 -#define BLANK_CHOTY	0
    8.33 -
    8.34 -static unsigned char blank_cdata[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
    8.35 -static unsigned char blank_cmask[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
    8.36 -
    8.37 -/* vi: set ts=4 sw=4 expandtab: */
     9.1 --- a/src/video/default_cursor.h	Wed Jun 07 16:10:28 2006 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,113 +0,0 @@
     9.4 -/*
     9.5 -    SDL - Simple DirectMedia Layer
     9.6 -    Copyright (C) 1997-2006 Sam Lantinga
     9.7 -
     9.8 -    This library is free software; you can redistribute it and/or
     9.9 -    modify it under the terms of the GNU Lesser General Public
    9.10 -    License as published by the Free Software Foundation; either
    9.11 -    version 2.1 of the License, or (at your option) any later version.
    9.12 -
    9.13 -    This library is distributed in the hope that it will be useful,
    9.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    9.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    9.16 -    Lesser General Public License for more details.
    9.17 -
    9.18 -    You should have received a copy of the GNU Lesser General Public
    9.19 -    License along with this library; if not, write to the Free Software
    9.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    9.21 -
    9.22 -    Sam Lantinga
    9.23 -    slouken@libsdl.org
    9.24 -*/
    9.25 -
    9.26 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
    9.27 - * Default cursor - it happens to be the Mac cursor, but could be anything   */
    9.28 -
    9.29 -#define DEFAULT_CWIDTH	16
    9.30 -#define DEFAULT_CHEIGHT	16
    9.31 -#define DEFAULT_CHOTX	0
    9.32 -#define DEFAULT_CHOTY	0
    9.33 -
    9.34 -/* Added a real MacOS cursor, at the request of Luc-Olivier de Charrière */
    9.35 -#define USE_MACOS_CURSOR
    9.36 -
    9.37 -#ifdef USE_MACOS_CURSOR
    9.38 -
    9.39 -static unsigned char default_cdata[] = {
    9.40 -    0x00, 0x00,
    9.41 -    0x40, 0x00,
    9.42 -    0x60, 0x00,
    9.43 -    0x70, 0x00,
    9.44 -    0x78, 0x00,
    9.45 -    0x7C, 0x00,
    9.46 -    0x7E, 0x00,
    9.47 -    0x7F, 0x00,
    9.48 -    0x7F, 0x80,
    9.49 -    0x7C, 0x00,
    9.50 -    0x6C, 0x00,
    9.51 -    0x46, 0x00,
    9.52 -    0x06, 0x00,
    9.53 -    0x03, 0x00,
    9.54 -    0x03, 0x00,
    9.55 -    0x00, 0x00
    9.56 -};
    9.57 -static unsigned char default_cmask[] = {
    9.58 -    0xC0, 0x00,
    9.59 -    0xE0, 0x00,
    9.60 -    0xF0, 0x00,
    9.61 -    0xF8, 0x00,
    9.62 -    0xFC, 0x00,
    9.63 -    0xFE, 0x00,
    9.64 -    0xFF, 0x00,
    9.65 -    0xFF, 0x80,
    9.66 -    0xFF, 0xC0,
    9.67 -    0xFF, 0xE0,
    9.68 -    0xFE, 0x00,
    9.69 -    0xEF, 0x00,
    9.70 -    0xCF, 0x00,
    9.71 -    0x87, 0x80,
    9.72 -    0x07, 0x80,
    9.73 -    0x03, 0x00
    9.74 -};
    9.75 -
    9.76 -#else
    9.77 -
    9.78 -static unsigned char default_cdata[] = {
    9.79 -    0x00, 0x00,
    9.80 -    0x40, 0x00,
    9.81 -    0x60, 0x00,
    9.82 -    0x70, 0x00,
    9.83 -    0x78, 0x00,
    9.84 -    0x7C, 0x00,
    9.85 -    0x7E, 0x00,
    9.86 -    0x7F, 0x00,
    9.87 -    0x7F, 0x80,
    9.88 -    0x7C, 0x00,
    9.89 -    0x6C, 0x00,
    9.90 -    0x46, 0x00,
    9.91 -    0x06, 0x00,
    9.92 -    0x03, 0x00,
    9.93 -    0x03, 0x00,
    9.94 -    0x00, 0x00
    9.95 -};
    9.96 -static unsigned char default_cmask[] = {
    9.97 -    0x40, 0x00,
    9.98 -    0xE0, 0x00,
    9.99 -    0xF0, 0x00,
   9.100 -    0xF8, 0x00,
   9.101 -    0xFC, 0x00,
   9.102 -    0xFE, 0x00,
   9.103 -    0xFF, 0x00,
   9.104 -    0xFF, 0x80,
   9.105 -    0xFF, 0xC0,
   9.106 -    0xFF, 0x80,
   9.107 -    0xFE, 0x00,
   9.108 -    0xEF, 0x00,
   9.109 -    0x4F, 0x00,
   9.110 -    0x07, 0x80,
   9.111 -    0x07, 0x80,
   9.112 -    0x03, 0x00
   9.113 -};
   9.114 -
   9.115 -#endif /* TRUE_MACINTOSH_CURSOR */
   9.116 -/* vi: set ts=4 sw=4 expandtab: */