home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / acorn / 10576 < prev    next >
Encoding:
Text File  |  1993-01-27  |  5.4 KB  |  117 lines

  1. Path: sparky!uunet!inmos!fulcrum!bham!warwick!doc.ic.ac.uk!doc.ic.ac.uk!not-for-mail
  2. From: ijp@doc.ic.ac.uk (Ian Palmer)
  3. Newsgroups: comp.sys.acorn
  4. Subject: BlibII
  5. Date: 27 Jan 1993 10:54:05 -0000
  6. Organization: Department of Computing, Imperial College, University of London, UK.
  7. Lines: 106
  8. Message-ID: <1k5pkdINNgun@oak46.doc.ic.ac.uk>
  9. NNTP-Posting-Host: oak46.doc.ic.ac.uk
  10.  
  11. I've just sent something to Albert at the Newcastle server which
  12. probably needs a bit of explanation. I hope that it will grow into
  13. something very useful, hopefully with the help of others. I guess it
  14. will become available there in a few days.
  15.  
  16. It is basically in two parts, a Basic linker and a Basic library,
  17. descriptions follow :
  18.  
  19. BlibII - The Linker - allows you to 'link' Basic programs with
  20. libraries of procedures and functions. This has several advantages :
  21.   
  22.    1) A single Basic file can be compressed using Basic compression
  23.       programs which reduce procedure names, etc.
  24.  
  25.    2) A single Basic file can be passed to Basic compilers.
  26.  
  27.    3) I suppose it must be a bit faster.
  28.  
  29.    4) BlibII only extracts the procedures/functions that are needed,
  30.       thus you don't need to have lots of extra bits that a program
  31.       doesn't need.
  32.  
  33. The linker works from special library files, which are basically
  34. normal library files (Basic programs) with extra bits. These extra
  35. bits define the start and end of a procedure block (your going to say
  36. this isn't necessary arn't you), allows a description to be included
  37. with the procedures, but which is not extracted with it, and also
  38. allows conditional extraction (in similar way to #ifdef, etc. in C).
  39.  
  40. When the linker is installed on the iconbar it also traps help
  41. messaged from StongEdII (v1.20) and will provide (in a window) the
  42. descriptions for procedures (or fuinctions) at will. You can also get
  43. access to these help descriptions directly from BlibII (using menus).
  44.  
  45.  
  46. Right, that's the first part, now the library (the bit I'd like to see
  47. grow). At the moment the supplied library contains quite a collection
  48. of routines to provide the following :
  49.  
  50.   -  Dynamic memory allocation (similar to malloc, free, realloc, etc.
  51.      in C). This library can work either on top of Basic's own DIM
  52.      allocation (ie. allocating between LOMEM and HIMEM), or (more
  53.      usefully) by extending the WimpSlot as required. With the latter
  54.      method the WimpSlot will also reduce in size as memory becomes
  55.      available again. This library isn't as fast as using, say,
  56.      OS_HEAP, but I haven't worked out a way of getting OS_HEAP to
  57.      allow reduction in WimpSlot size.
  58.  
  59.   -  Menu construction. Two methods supplied, on where you build up
  60.      an array and say 'make it', the other where you build up entries
  61.      one at a time. Full support for sub-menus, sub-windows, greying
  62.      out, ticking, etc.
  63.  
  64.   -  Template file support. Allows reading of one, or more, template
  65.      files into memory, getting pointers to definitions and also
  66.      making copies of definitions. The only think not supported as
  67.      yet (due to a slight lack of documentation, blame Acorn) is
  68.      fonts.
  69.  
  70.   -  Windows. I have defined my own window structure which allows
  71.      windows to have a 'type' and also data associated with it.
  72.      This allows, for example, a redraw window event handler to
  73.      say 'this is a window of type X, pass it to procedure X which
  74.      then redraws it using it's local data'. There is currently
  75.      only one defined window type (other than plain) which is a
  76.      'Simple Text Window' (or STW) which allows basically text
  77.      in a window (with colours). The STW library contains all
  78.      you need to add text and redraw the windows (it doesn't use
  79.      icons to store the text), but building the text is a bit of
  80.      a bind at the moment.
  81.  
  82.   -  Events. Limited support for POLL events supplied (basically
  83.      default open and close window and task quit. However there is
  84.      a generic Wimp_Poll procedure which performs a wimp poll and then
  85.      calls a different procedure for each reason (event). This
  86.      generic routines uses the BlibII conditional extraction method
  87.      which means that the contents of the Wimp_Poll procedure depend
  88.      upon what handlers you supply (ie. code to call PROCevent_redraw
  89.      is only placied in the linked version if you have defined a
  90.      PROCevent_redraw), etc.
  91.  
  92.   -  Icons. Limited support so far, basically selecting, deselecting,
  93.      deselecting a group, finding which in a group selected, etc.
  94.      Now creating or deleting as yet.
  95.  
  96.   -  General OS stuff like, find the size of the current screen, etc.
  97.  
  98. As I say, I'd like to see this library grow into something really
  99. good, a sort of Basic equivalent of DeskLib. But this will only happen
  100. if other people contribute. Thus I would be happy for anyone to take a
  101. look at what's there and add to, possibly totally re-write bits, etc.
  102. (I don't give any warranty for what's supplied, something might not
  103. even work, but I've tested most of it (the memory allocation has been
  104. very heavily tested and currently has no known bugs or problems)).
  105.  
  106. So if you have any Basic library routines you think would fit in with
  107. the above, and would like them to be freely usable by anyone, send
  108. them to me and I'll try to coordinate a really useful Basic Library.
  109.  
  110. Ian
  111.  
  112. -- 
  113.                             E-mail : ijp@doc.ic.ac.uk
  114.  ___           __       Snail mail : Department of Computing, Huxley Building,
  115.   /  _   _    /_/ _   / _ _   _  _   Imperial College, 180 Queens Gate,
  116. _/_ (_|_| )  /   (_|_(_| ) )_|/_)    London. SW7 2BZ. England.
  117.