home *** CD-ROM | disk | FTP | other *** search
- Updates between DeskLib versions:
-
- 2.03 (July 1993) -------------------------------------------------------------
-
- Important - Please note that Event_ and Wimp.h now support more RISC OS 3
- functionality. Specifically, Wimp_Initialise has a new parameter (message
- list) on the end - to re-link with this version of the library, you will need
- to upgrade any Wimp_Initialise calls in your code (add a NULL onto the end of
- the list of parameters to Wimp_Initialise). You can of course take this
- opportunity to upgrade your code to use the new features the RISC OS 3
- makes available. Note that you'll also need to use LibFile to re-make the
- WimpLib if you use it separately.
-
- Along similar lines, you can now call Event_Initialise3() in place of
- Event_Initialise to do a proper RISC OS 3 Wimp_Initialise, passing in a
- list of accepted messages, etc. Event_Initialise provides the same (RISC OS 2)
- functionality as before.
-
-
- MISCELLANEOUS modifications
- Modified the Libraries.!MakeDLib obey file. Each sublibrary is now compiled
- by invoking an alias 'DLibMake', which makes the file shorter and more
- readable, and also allows you to more easily modify the way in which
- sublibraries are compiled.
-
- Modified the Clean obey files - they now won't abort if a file is missing.
-
- Modified the Makefiles to make everything tidier.
- Now, in the obey file Libraries.!MakeDLib, you can set 3 amu variables:
- x_cflags - c compiler extra flags
- x_aflags - objasm extra flags
- do - What to do to create the sublibrary
-
- This allows you to do some important things:
- x_cflags=-Ff
- This is the new default, which reduces the library code size by about 5%.
- However, when debugging, you may like to recompile the library with the
- 'f' removed, so that you can find the names of the functions being
- called as you debug.
-
- do="Create $@ 1"
- This will minimise disc space used by the library (by creating 1-byte
- 'sublibraries' instead of compiling them properly - the file is needed
- so amu knows the sublibrary is up to date)
-
- do="LibFile -c -o $@ @.o.*"
- This will create each sublibrary - you can then use the sublibrary files
- to link with instead of the main DeskLib library (eg WimpLib is quite
- handy on its own, and is only 18kB rather than DeskLib's >100kB, a very
- useful thing if you're developing of floppies!)
-
-
- Updated the TestApp- now does the following extra things:
- * Uses outline fonts, and gets them right if you change screen modes
- * Changes the window title if you click the menu item 'Change title'
- when you brought the menu up from a window (else that item is shaded)
-
-
- BUGS which have been fixed:
- Font
- Fixed a major set of bugs due to a small and harmless-looking typo in the
- Font sublibrary - most of the font calls would return a non-zero value
- if no error occurred, and a zero value if an error occurred (i.e. the
- opposite of what they should have been doing: MOVVS r0, #0 instead of
- MOVVC r0, #0)
- This affects most font calls, but you'll only notice a difference if you
- check the returned error - the SWIs worked fine, but returned incorrect
- error-return-values - all other return values were unaffected.
-
- ColourTrans, DragASprite
- Similar problems were also removed from the assembler veneers for the
- ColourTrans, DragASprite, and PopUp sublibraries - namely that the return
- values were not consistent with the definitions given in the headers.
- I'll keep a closer eye on this in future!
-
- Icon
- Icon_BarIcon, Icon_GetText, Icon_Set(Integer/Double/Text), Icon_printf
- previously did not correctly terminate strings correctly if they were too
- long to fit in the icon.
- Icon_BarIcon now uses sprite_MAXNAME rather than wimp_MAXNAME for copying
- the sprite name (though these constants are both 12, so there is no
- effective difference)
-
- Menu
- No longer trashes your machine with indirected menu items (Menu_New)
-
- PopUps
- 'bugs' removed from the PopUp.h header file's example code segments
- SWI veneers fixed up - they didn't quite correspond to the prototypes
- given in the headers.
-
- Template_Clone
- Now terminates copied strings properly.
-
-
- MODIFICATIONS
- Error
- Upgraded OtherSrc.c.Error and Error.h to new code submitted by P.Colmer.
- Now Error_Report and Error_ReportFatal (and "Internal" versions of these)
- take variable arguments - they can still be used exactly as before, but
- you can now include any 'printf' style arguments to save having to
- pre-assemble a string to pass in.
-
- Event
- Upgraded Event_Initialise to call the new function Event_Initialise3
- with a required WIMP version of 200 (RISC OS 2 WIMP), to add support
- for RISC OS 3, and the new non-zero-pollword events.
-
- Resource
- This has now been moved from Misc to its own (Resource) sublibrary.
- Also added replacement call for Resource_Initialise,
- Resource_InitialisePath, which allows you to use DeskLib functions
- to load Templates, messages, etc. from a path ("AppName:Templates")
- rather than a directory ("<AppName$Dir>.Templates") - useful for adding
- support for internationalisation.
-
- Template
- Added support into Template_Clone for a new 'maxtitlesize' value of
- template_TITLEMIN (-1) which will allocate as much room for the title
- as declared in the template definition.
-
- Added support for outline fonts into Template loading.
- (See the end of Template.h for details of the new calls)
-
- Template, Handler, Window
- Added code to fix any windows/templates you are using which contain icons
- using outline fonts whenever a mode change necessitates it (On some mode
- changes outline fonts will otherwise become the wrong size as the font
- manager doesn't re-cache them).
-
- This functionality required addition of:
- Font.c.LoseAll Lose all fonts in a Template_Load style font
- usage array
- Handler.c.ModeChange Replacement for old ModeChange handler - does the
- same as before, but if you are using outline fonts
- (you have called Template_UseOutlineFonts()) it
- fixes all your fonts if necessary. Note that this
- only works on templates loaded with Template_ calls
- and windows opened with Window_ calls.
- Template.c.UseOutFont Function to call BEFORE Template_LoadFile to set up
- a font usage array and exit-handler to lose any fonts
- you were using.
- Window.c.ModeChange Function to call to fix outline fonts in all windows
- and templates. Called by Handler_ModeChange()
-
- Appropriate changes have been made to the relevant header files.
-
- Wimp SWI veneers
- WimpSWIs.s.Wimp01 (Wimp_Initialise) has now been modified to support
- the new RISC OS 3 parameter (the message list). This call is still
- RISC OS 2 compatible, but those of you calling Wimp_Initialise directly
- will need to add a NULL onto the end of your initialise call, e.g.
- Wimp_Initialise(&version, "MyTask", &taskhandle);
- will become:
- Wimp_Initialise(&version, "MyTask", &taskhandle, NULL);
-
- Window
- As well as the additions mentioned in the bit above,
- changes have also been made to the internal window information structure
- as used by the Window.c files. (The window template name is now
- WIMP_MAXNAME+1 characters long (13) rather than 9 characters long)
-
-
-
- ADDITIONS
- Event
- Added Event_Initialise3() to Event.c.Event. This more or less replaces
- Event_Initialise with a new call that will initialise the RISC OS 3 WIMP
- and allow you to pass in the list of desired messages. You should not use
- Event_Initialise with WIMP version numbers greater than 200 - use
- Initialise3 instead. [If you desire RISC OS 2 compatability, you MUST
- call Event_Initialise]
- This also allows the support for non-zero pollword events now available
- under RISC OS 3. Thanks to P.Colmer.
-
- File
- Added File sublibrary, which gives calls for opening, closing, reading and
- writing (bytes, words, words with endian-conversion, chunks),
- getting/setting the file position, and misc operations (reading file size,
- deleting a file, checking if a file exists). These are all veneers for
- OS_File/GBPB/BGet SWIs, and may be preferable to stdio functions in some
- circumstances, as they are faster than stdio calls, and also are easier
- to use in conjunction with other systems that work with RISC OS file
- handles (rather than C's (FILE *))
-
- Added some test code for File_ calls to TestApp. This test code can be
- found in "!TestApp.Test c" - you can add it back into the test app if you
- feel keen to try it out! It also might be of use as an example of use of
- the file calls, though they're pretty simple!
-
- GFX
- Added GFX_VDU (and alias VDU), an OS_WriteC veneer
-
- Mem
- Added Mem_MoveAnchor, which allows you to move the anchor for a memory
- chunk into another variable. Very convenient in some circumstances
- (i.e. I had an anchor in an array, and wanted to allocate a new chunk,
- and some time later replace the old chunk with it in the array - this is
- now possible by simply moving the anchors for the two blocks into new
- storage locations as appropriate)
-
- PopUps
- Added Docs.ModuleNote.PopUps which gives a bit more help and example code
- on using PopUp windows from DeskLib C code.
-
- Sprite
- Added 3 new Sprite functions - a veneer for SpriteOp 62 (read save area
- size) and functions to return the size (in bytes) of a sprite, given its
- vital parameters, and the size of a sprite needed to fill a window's icon.
- Thanks to Tom Kirby-Green for this submission.
-
- Wimp.h
- Wimp.h has been upgraded: icon_flags now include a third struct in
- the union which allows you to directly access the font handle with
- icon.font.handle instead of having to mask it out of icon.value
-
- Wimp.h now has extra support for RISC OS 3, relating mainly to wimp
- pollwords and non-zero pollword events. Some new event mask bit
- definitions have been added.
-
- Window
- Added Window.c.SetTitle, which allows you to set the text of a window title
- and update the correct bit of the screen, even when using odd sized
- toolsprites, etc. (And better than win_settitle because it doesn't crash if
- the icon is non-indirected, it bothers to terminate the string if it had
- to truncate it to make it fit, and it doesn't try to force redraw part of
- the screen if the window isn't actually OPEN!)
-
- Also added Window_ModeChange, as described above (Modifications to
- Template)
-
-
- 2.01 (May 1993) --------------------------------------------------------------
- Apologies to all DeskLib users out there for the long (1 year) delay between
- releases, and for all the bugs and missing bits in the library. This delay
- was caused by my thesis and other things taking too much of my time. I hope
- that I will be able to continue DeskLib updates at a more reasonable pace
- in the future... I have jumped from version 1.04 to version 2.00 to reflect
- the reasonably large update, to stress the newness of this version, and
- to make you feel as if something must have been done between this and the
- last release! ;-)
-
- Note that although DeskLib is now supporting RISC OS 3 functions, it is still
- RISC OS 2 compatible. Also, some things (such as Wimp_Initialise under RISC
- OS 3) have not yet been implemented, mainly due to a total lack of any
- documentation on the subject. This will hopefully change for the better in
- the not too distant future...)
-
- Apologies to anyone who needs to adjust their code because of changes to the
- library headers. These changes were deemed necessary for one or more of the
- following reasons in each case:
- * To make it work!
- * To remove unnecessary incompatabilities with compilers other than Desktop C
- * (as a side effect) To improve consistency/readability
-
- You can, of course, stick with the old definitions in the headers if you
- prefer them. Most people I know have their own random perturbations of the
- original header files anyway!
-
-
- Additions
- Added sublibraries:
- ColTrans Assembler interfaces to 4 ColourTrans SWIs
-
- DragASpr 3 Routines for using DragASprite
- I especially direct your attention to
- DragASprite_DragIcon() which is excellent!
- (c.f. macro "Icon_StartSolidDrag" defined in icon.h)
-
- Filter Assembler interfaces to RISC OS 3 FilterManager SWIs
-
- Font Assembler interfaces to 23 Font SWIs
-
- Kbd Assembler function to check if a key (e.g SHIFT, CTRL)
- is currently depressed. (No function yet to cheer it
- up if it is, though ;-)
-
- Menu Simple menu creation and manipulation functions along
- similar lines to those in RISC OS lib. (A proper menu
- template system is planned in conjunction with Glazier
- for the future, but I needed to fill this gap NOW!)
-
- Mem 'flex'-like dynamic memory manager for multitasking
- applications. However, 'better' than flex, as it
- compacts its heap much more efficiently than the
- equivalent operation from flex (you call the Mem_Compact
- function just before Wimp_Poll). It also guarantees
- that blocks will not move around to a much higher degree
- than flex does, giving you more freedom.
-
- Sound Routine to sound a system beep (VDU 7!)
-
- Added functions to:
- GFX Added GFX_Write0() and GFX_WriteN()
-
- Icon Added Icon_SetSelect(), Icon_SetShade(), and
- Icon_DisposeIndData()
-
- Misc Added Dispatch(), a generic function dispatcher, and
- new stringcr functions (strcmpcr, strcatcr, strcpycr)
-
- Sprite Added 6 new SWI veneers
-
- Added more definitions to:
- KeyCodes.h
-
- Subtractions
- The REDRAW (3-d icon border redraw) code has been discontinued because:
- a) RISC OS 3.10 includes this feature for you, and
- b) DeskLib actively supports RISC OS 3.10 onwards and no longer has
- any sympathy for people without it! (though all non-RISC-OS-3
- specific portions of it still work fine with RO2, this cannot be
- guaranteed for the future)
- For this reason, Icon_Select3d, Icon_Deselect3d, and Handler_Redraw3d
- have also been removed.
- If you have code which uses any of the above, then either copy them
- forward from your old DeskLib or convert your program to use RISC OS
- 3.10 borders!
-
-
- BugFixes/Modifications
- Generally:
- Touched up the docs. PLEASE NOTE my change of email address!
-
- Rewrote all the makefiles. Now much smaller, tidier, and easier to both
- understand and maintain, as well as more informative during Makes.
- Redirected LibFile through a 'via' file (!Objects).
- (It's wonderful what you can find out by reading the manual ;-)
-
- Moved "Template.c.strlencr" to "Misc.c.strlencr" (see strlencr.h, below)
-
- Slightly improved some of the Docs and quickrefs.
-
- Coord:
- Fixed some stunningly obvious and totally wrong prototypes and
- #defines in Coord.h, particularly the Coord_YTo... macros.
-
- GFX:
- Most GFX commands have been converted to more efficient assembler
- versions. The header reflects slight changes (e.g. GFX calls now no
- longer return os_errors).
- Fixed a harmless bug in GFX_CLG.
- Made some GFX macros in GFX.h a bit nicer to read
- Fixed GFX_Circle and GFX_CircleFill (used to use x+r instead of r!)
-
- Handler.ClickOK.c:
- Now doesn't do anything if icon clicked with MENU.
-
- Icon:
- BarIcon.c fixed to take icon size from the sprite correctly
- Macro Icon_StartSolidDrag added as an alias for DragASprite_DragIcon
- SetDouble modified to correctly fill in the right number of decimal
- places.
- SetCaret will now refuse to place the caret into a shaded icon.
-
- LinkList.h:
- InitItem macros added - now use Init() to init an anchor and InitItem()
- to init an item, which will make it easier to replace the workings of
- the list manager seamlessly.
- Also modified these macros so that they will function corrrectly in the
- following code:
- if (whatever)
- LinkList_InitItem(blah);
- Redefined LinkList_{Next|Previous}Item() to make them nicer to use -
- instead of using LinkList_NextItem(&thing.header), you can now use
- LinkList_NextItem(&thing); (note that both syntaxes are fine now)
- The Makefile for ListLib now also includes ListLength.c
-
- Misc Resource.c:
- Now adds terminator to string after strncat to ensure that the string
- is terminated if you supply too long a name.
-
- **** Important
- strlencr has been moved into the Misc sublibrary.
- strlencr() has been modified to make it functionally equivalent to
- the ANSI function strlen() - that is, it now returns a value 1 LESS
- than it did under 1.04 (i.e. it doesn't include the terminator any more)
- All routines within DeskLib which use this function have been modified
- accordingly.
-
- Sprite:
- Sprite.h tidied up, and parameter types slightly modified. 'sprite' and
- 'sprite_area' pointer typedefs fixed (previously used old names for the
- definitions, so were totally incorrect)
-
- strlencr.h
- This has been renamed to 'stringcr.h', and now includes more than one
- cr-terminated string handling function. (Correspondingly, a slight
- modification of Template.h.TemplDefs to #include this new header)
-
- Wimp.h:
- window_ICONBAR changed from -1 to -2
- message_destinee changed to a 'typedef int' instead of a union
-
- window_block structure used to use shorts for minwidth and minheight.
- This has been changed to minsize.x and minsize.y (both for consistency
- and compatability with the Risc Developments compiler)
-
- window_flags structure modified to use the normal DeskLib form for
- flag-words (flag.value plus flag.data.*)
-
- iconvalid_BORDERTYPE changed from 'B' to 'R' (RISC OS 3, 3.10 onwards)
-
- Added definitions for message_WINDOWINFO (used for iconisation)
- and message_MENUSDELETED (warning when a menu is closed)
-
- Added windowcol_XXXX defines to make accessing a window's colours
- easier (i.e. window->colour[windowcol_WORKBACK] = colour_RED)
-
- Added colour_TRANSPARENT (= 255)
-
- Added message_menuwarn structure definition
-
- WimpSWIS:
- Several function prototypes changed. Some were prototyped as accepting
- a union which contained either a data set or a 'value' int. Unfortunately
- the compiler baulks at this, so these have been changed to 'int's. This
- now means that you need to pass in 'whatever.value' to these functions.
-
- Added Wimp_CommandWindow prototype, which somehow got missed out
- last time!
- Wimp_DeleteWindow fixed (now actually deletes the window! Wow!)
-
- Window:
- GetInfo.c: '&block' changed to '&block[0]'
- Show.c: Showing a window with open_NEARLAST now modified to open
- the very first such window centered. Also, only windows
- opened with NEARLAST will now affect the position of
- succeeding NEARLAST windows.
-
- Template.Clone.c
- Modified to use the new form of strlencr()
-
-
- 1.04 31/05/92 ----------------------------------------------------------------
- BugFixes/Modifications:
- A minus changed to a plus in Coord_Convert routine (should now work!)
- Extra fields added to the menu_flagword struct
- Incorrect definitions of message_Data(Load/Save/SaveAck) fixed
- -replaced incorrect "wimp_box" with "wimp_point"
-