home *** CD-ROM | disk | FTP | other *** search
- DeskLib Bugs and Features
- ~~~~~~~~~~~~~~~~~~~~~~~~~
- Here are a few things I found out about DeskLib while using it which would
- be useful to know in advance! Not many bugs - only a couple of nasty ones
- (in Coord and Event). Some are just 'I wish it could do this...'.
- You'll see a lot of my comments are suffixed by " - fixed" which means I've
- hacked my copy of DeskLib to fix the bug / do what I want. However I can't
- pass on hacked versions of DeskLib modules as that's against the distribution
- conditions.
- There's usually enough information to fix it yourself though. If you have
- trouble ask me for hints...
-
- DeskLib isn't perfect; it's just a lot better than RISCOS_lib.
-
- Wimp.h
- ======
- window_ICONBAR defined as -1 - should be -2. (Background is -1)
- No equivalent to wimp_IFONTH.
-
- No nice constants for accessing the colour array in window_block.
- No nice constants for accessing window flags - and a real pain because
- window_flags is declared as a struct - you can't even cast it to int. - now
- fixed - declared as union of value and struct like icon_flags.
- sprite area in the window_block should be declared as a 'sprite_area' !!!
-
- LinkList.h
- ==========
- Macro specified as LinkList_ItemInit() actually defined as LinkList_Item().
-
- No nice macros so you can use LinkList_NextItem(&node) instead of
- LinkList_NextItem(&node->header) - fixed - created as LinkList_Next &
- LinkList_Prev. Done the same with First and Last too.
-
- LinkList_Length is not included in the LinkList libfile - it just hasn't
- been compiled and added to the archive.
-
- Handler.h
- =========
- Handler_ClickOk() shouldn't indent the icon for MENU clicks.
- Also, a good idea would be to make it never return TRUE - if it always
- returns FALSE you can hang it on an icon, and then hang a callback on it on
- top. That way you get the 3d click, and then the call-back proper is called.
- Hmm...have to think about that one. (Well easy to do, of course).
-
- Sprite.h
- ========
-
- Typedefs a wee bit dodgy - fixed.
-
-
- Coord.h
- =======
-
- Some functions missing Coord_ prefix - added.
-
- Coord_YToWorkArea is just plain wrong! cf PRMs p.1133
- So is Coord_YToScreen!
-
-
- Window.h
- ========
-
- Window_GetInfo() - bit of a classic error in this one - the address of an
- array is taken as '&block' instead of just 'block'. Whoops! Fixed...
-
- Template.h
- ==========
-
- Added a bodge to Template__Find() so that window templates created by
- FormEd/Glazier have the sprite area set to be the local area. (used Wimp
- area otherwise).
- This is because FormEd uses '1' to mea the local sprite area whereas it
- means the Wimp area. Glazier follows this standard in the absence of
- anything else.
-
- Event.h
- =======
-
- Error in NULL handling:
-
- Claiming event_ANY should not cause NULLs to be enabled - they should be
- claimed explicitly. This is what happens, but:
-
- Releasing event_ANY should not cause NULLs to be disabled - but they are!
-
- DecrementUsage() is called for all events in LoseClaim() instead of for all
- events *except* NULLs.
- Fixed so LoseClaim() doesn't disable NULLs (changed loop to start from 1
- instead of 0).
-
- Icon.h
- ======
-
- SetDouble's format specifier string is wrong:
- It should be %%.%df whereas it is %%f.%d
-