[Bf-committers] Cursor proposal and OSX Cursor size

Robert Wenzlaff bf-committers@blender.org
Mon, 1 Dec 2003 09:37:50 -0500

On Monday 01 December 2003 04:46, Ton Roosendaal wrote:

[Non mac stuff below, skip ahead if you want]

> - Robert Wenzlaff will work on new cursors for 2.32. Discussed was if
> all platforms support 32x32. After meeting was found OSX won't easily
> do this...

That may not be true (Depends what you mean by easy).  From the docs you 
showed me, it depends on what the default state of  
IOFB_ARBITRARY_SIZE_CURSOR is.  It may be set by default (but sounds like it 
If it isn't,  it looks like we can override this by setting the above define 
and calling IOFBCreateSharedCursor() with 32x32 during init.  The predefined 
structs are undef'd (they are now the wrong size) and we then create our own 
structs at the specified height/width (Which we have to do anyway to map the 
data in the Blender Cursor struct to an Apple Cursor struct).  Again, I'd 
probably make them all 32x32 and make a small cursor only fill 1 corner.

If only I had a mac to test it on...

> Robert will come with a further proposal to mailing list later.

************* Proposal ******************

To keep it simple for now, we'll keep the small cursor rule at 16x16, and only 
raise that limit when/if we get OSX working at 32x32.  After that, the 16x16 
rule gets degraded to a "moderately strict guideline".

That said, the rest of the proposal is:

	1) All cursors will become custom cursors so they match across platforms.
	2) Cursors will have a large and small version selectable by a userpref.
		This userpref will be disabled on platforms that cannot support large 	
		cursors.  The data will consist of a bitmap and transparency mask, as it 	
		does now. (My MakeCursor.py is available to paint Cursors. Can this be 
		put on Blender.org?).
	3) Cursors will have definable fg and bg colors.
	4) Cursors will have definable hot-spots.
	5) Each cursor will be a member in a global array of structs defined in 
	6) Each cursor will have a define in cursor.h that is its index number in 		
		the array. 
	7) Cursor setting API code will go in cursor.c  And will be implimented with 
		the existing GHOST custom cursor calls (modified to handle the size 
	8)  API will be: 
			GetBlenderCursor() - returns defined number of current cursor.
			SetBlenderCursor(int i) - sets cursor to the ith cursor.
			Defines will be set so all cursors can be refered to by name. 
	9) Current cursor API will be phased out, but will remain active during 
		changeover so things don't get broken.
Robert Wenzlaff     rwenzlaff@soylent-green.com