Re: [AD] new mouse cursors

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 17 Aug 2009, at 17:29 , Matthew Leverton wrote:
Attached is a patch to add new mouse cursors as discussed previously.

For reference, the standard cursors available on OS X are listed on http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/nscursor_Class/Reference/Reference.html (with images). Unfortunately, they seem to be called after what they look like rather than what they're supposed to be used for.

  ALLEGRO_SYSTEM_MOUSE_CURSOR_MOVE        =  6,

I'm guessing this would correspond to the closed-hand cursor on OS X (with the open hand indicating that something can be dragged). In that case, OS X would want two cursors for this. Maybe ALLEGRO_SYSTEM_MOUSE_CURSOR_CAN_MOVE for the open hand and this one for the closed hand?

  ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_N    =  7,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_W    =  8,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_S    =  9,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E    = 10,

These should map directly - although there is a distinction between being able to resize in both directions or in one direction only. Perhaps RESIZE_NS for the combined operation? They'd default to the same on Windows.

  ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW   = 11,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SW   = 12,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SE   = 13,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE   = 14,

These not, but we can pick either of the others.

  ALLEGRO_SYSTEM_MOUSE_CURSOR_PROGRESS    = 15,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_PRECISION   = 16,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_LINK        = 17,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_ALT_SELECT  = 18,
  ALLEGRO_SYSTEM_MOUSE_CURSOR_UNAVAILABLE = 19,

With the exception of CURSOR_LINK (which would map to Pointing Hand) I don't think any of these have a direct equivalent. OS X also has a "disappearing item" cursor of which I'm not sure what it is or when you see it.


I added "default" which is meant to be the system's default cursor,
which may or may not be an arrow. (And arrow should probably just be
'pointer', but I didn't want to break code that referenced it.) Some
descriptions:

I think "arrow" is maybe a bit more descriptive, but either is fine.

System drivers should translate accordingly. E.g., Windows only has
four resize cursors, so it picks the best one. Likewise, Busy,
Progress, and Unavailable are similar enough concepts that I suppose
some operating systems don't make any distinction among them.

I think my outline above would give us the union of available cursors on Windows and OS X. Would that cover the most basic ones in X11 as well (there are some funky ones that I've never seen in actual use that we can probably leave out, such as the umbrella, the boat and the Enterprise)?

Evert





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/