AminetAminet
Search:
84475 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/sys/layers.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Layers Library V45 for Os 3.9
Author:thor at math.tu-berlin.de (Thomas Richter)
Uploader:thor math tu-berlin de (Thomas Richter)
Type:util/sys
Version:45.27
Requires:Os 3.1
Architecture:m68k-amigaos
Date:2014-12-20
Download:http://aminet.net/util/sys/layers.lha - View contents
Readme:http://aminet.net/util/sys/layers.readme
Downloads:3536

--------------------------------------------------------------------------------
-----------------

This is release 45.27 of the layers.library. One minor bug was
fixed, see the release notes for details, and the code got cleaned
up. Otherwise, no changes.

The NOTES directory contains additional information on the internal
workings of layers V45.


--------------------------------------------------------------------------------
-----------------

..with special thanks for the permission to redistribute to Ben Hermans.


What is this:

This archive contains the V45.24 of the layers.library. The layers library 
is the part of the operating system that performs the "slice and dice" 
operations when windows partially overlap, it prepares all the information 
on the clipping regions that are used by the graphics.library to draw lines, 
rectangles or text. It is also responsible for saving back graphics if 
windows get occluded, and restore their content as soon as they are moved 
back to front.


How official is this? 

This publication has been agreed upon by Hyperion; it is free for owners
of the classic AmigaOs and released here hoping that it may be useful for
at least some. Since the source code of this library version formed the
basis of the Os 4.x layers.library, users of newer versions will get the
benefit of this software anyhow, and owners of the classic system at least
some of the benefits of the new layers in Os 4. I just considered it fair 
to release what I still have (with permission) for the classic Amigas.


Why a new release:

Essentially, the V40 layers.library that is in the Os ROM is in quite
a bad shape. At first, it does not behave well with graphics cards,
which is why P96 and Cybergraphics patch it heavily. The graphics swap
logic that exchanges the background with the foreground uses a double-
XOR trick that works nice with the blitter, but not with rtg graphics.

Second, V40 layers is highly inefficient. If the window order is re-
organized on a screen with many overlapping windows, the amount of
swaps required for a single window arrangement grows linear in the
number of windows, even though it could be constant.

Third, V40 layers is the number one reason why memory fragments. It
allocates a lot of tiny structures, but does not attempt to pool them,
throwing a fragmentation bomb on the memory manager if many windows
are rearranged.

Fourth, V40 layers contains a couple of bugs that break window arrange-
ment in low memory situations. It does not attempt to fail properly if
it runs out of memory, and then leaves the window order in a desolate
state.


How was it made:

V45 layers was created as a contribution to AmigaOs 4.0, but since my
Amiga failed back then, it never became part of the Os, and not of the
classic system by any means. Layers V45 is based on the V40 ROM version
of layers, but with many bug fixes. Many parts of the code have been
re-written to compile and built with the latest version of SAS/C.


How to install it:

1) Copy Workbench/LIBS/layers.library to the LIBS: directory.
2) If you are not already using "LoadModule": 
	Copy Workbench/LIBS/C/LoadModule to C:
   Edit the Startup-Sequence to include the following line
   above SetPatch:
	LoadModule LIBS:layers.library
3) If you are already using LoadModule, edit the startup sequence
   such that LIBS:layers.library is included, i.e. add the single
   argument "LIBS:layers.library". On my system, the line reads as
   follows:

LoadModule LIBS:icon.library LIBS:workbench.library DEVS:console.device
L:Ram-Handler L:FastFileSystem L:Shell-Seg LIBS:layers.library DEVS:audio.device
LIBS:keymap.library DEVS:keyboard.device

4) If you are using Picasso96, go into the directory "LIBS:Picasso96"
   It should contain a file named "newlayers.library" (or similar). Rename
   or delete this file. This library is no longer required.

4.1) I do not know what to do with cybergraphics. I do not use it. If
     you use version 4 of CGfx, rumors say that it is enough if
     ENVARC:CyberGraphX/SUPERLAYERS is *not* set. Delete this file if
     it exists. Or maybe not, who knows. In case of doubt, copy the
     file "LayersAntiHack" from Workbench/C to C:, and insert it into the
     Startup-Sequence. This file will prevent patches into layers.library.

5) Reboot the system.

6) If you want to, try the "Examples". Probably "AmiSnap", see below.



How stable is it:

Well, this is actually beta software. But, given that it was installed on my
Amiga for 12 years now, and even though I only use the Amiga occasionally
(whenever the hardware is in the right mood), it seems to work pretty well.
I did not notice any negative side effects, except better speed.



What is new:

Despite the code cleanup, you mean? Well, layers is more lean and clean 
than before, uses less memory and is hopefully more tolerant in low-memory
situations.

Yes, a couple of functions in layers.

First, Layers V45 includes a function to test whether a layer is partially
occluded. This is important for picture-in-picture functions (nowadays
called "video overlays") offered by some graphics functions.

Second, V45 layers allows programs to hide layers completely. Hidden layers
can still be drawn into, but nothing appears on the screen. The AmiSnap
utility demonstrates this by implementing a "Window Iconification" 
commodity.

Third, V45 layers implements layer_info clipping of layers. Together with a
new revision of intuition, this feature would allow users to drag windows
partially off the screen. "Clippy" demonstrates this feature (though without
modifying intuition).



Developer Documentation:

Is in the NDK directory. It contains the includes and autodocs for V45
layers, including the new functions.



Examples:

To demonstrate the V45 layers, this archive contains two example programs.
These are *NOT* in production quality, but are rather "tech demos". Since the
examples come completely with source code, you are invited to enhance them and
complete them, problably make them full programs.

"AmiSnap" is a window-iconifying program. Press Left-Alt and click on *any*
window, and it will turn the window into an icon on the workbench. Double-click
on the icon, and the window will re-appear. While this program demonstrates V45
layers and is in this respect os-friendly, grabbing the window without locking
intuition properly is *not* good practise and should be avoided. I said it is
a "tech demo" and not a good program, didn't I? It has known bugs. For example,
it does not handle the situation correctly in case an iconified window is closed
under its feet. Enjoy, but do not use.

"Clippy" installs a clip rect onto the workbench screen. Another new feature
of V45 layers. Which means that anything outside this cliprect will not be
updated. Means, your workbench will behaive weird as it will only update
content in the middle of the screen. This is intentional.


What is the future of this code?

Probably none. I will likely not have the time to keep it updated. Bug reports
welcome, of course, but without promise that I will provide fixes. If you find
problems, you are on your own. De-install by removing layers.library from LIBS:
and remove the corresponding argument from LoadModule, you should be fine again.


Thomas Richter,	December 2014


Contents of util/sys/layers.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[generic]                  275     628  43.8% -lh5- cac6 Apr  3  2002 Examples.info
[generic]                 2260    4785  47.2% -lh5- 8ff3 Dec 16  1980 History
[generic]                 3363    7529  44.7% -lh5- 84d8 Dec 16  1980 layers.readme
[generic]                  375     852  44.0% -lh5- d5c8 Apr  3  2002 layers.readme.info
[generic]                  277     628  44.1% -lh5- 1ae3 Apr  3  2002 NDK.info
[generic]                  274     628  43.6% -lh5- d6eb Apr  3  2002 NOTES.info
[generic]                  274     628  43.6% -lh5- 0e00 Apr  3  2002 SaferPatches.info
[generic]                  274     628  43.6% -lh5- a01f Apr  3  2002 Workbench.info
[generic]                 3410    6532  52.2% -lh5- c906 Jun 27  1980 Examples/AmiSnap/AmiSnap
[generic]                 4327   20457  21.2% -lh5- a725 Jun 27  1980 Examples/AmiSnap/AmiSnap.c
[generic]                  233     373  62.5% -lh5- 8816 Mar 30  2002 Examples/AmiSnap/SCOPTIONS
[generic]                  549     904  60.7% -lh5- e621 Mar 30  2002 Examples/clippy/clippy
[generic]                  693    2583  26.8% -lh5- 474f Mar 30  2002 Examples/clippy/clippy.c
[generic]                  222     358  62.0% -lh5- f481 Mar 30  2002 Examples/clippy/SCOPTIONS
[generic]                 1194    2434  49.1% -lh5- c94f Jun 27  1980 Examples/ReadMe
[generic]                  374     852  43.9% -lh5- a560 Mar 30  2002 Examples/ReadMe.info
[generic]                  274     628  43.6% -lh5- da6f Mar 30  2002 NDK/Autodocs.info
[generic]                12330   49676  24.8% -lh5- 7dbd Apr 10  2002 NDK/Autodocs/layers.doc
[generic]                  279     628  44.4% -lh5- bbcf Mar 30  2002 NDK/clib.info
[generic]                  869    3299  26.3% -lh5- aeb5 Mar 30  2002 NDK/clib/layers_protos.h
[generic]                  278     628  44.3% -lh5- 9c63 May  1  2002 NDK/fd.info
[generic]                  535    1510  35.4% -lh5- b030 May  1  2002 NDK/fd/layers_lib.fd
[generic]                  280     628  44.6% -lh5- 36ee Mar 30  2002 NDK/graphics.info
[generic]                 2225    6382  34.9% -lh5- 0a85 Oct 29  1980 NDK/graphics/clip.h
[generic]                 1420    4091  34.7% -lh5- 825e Oct 31  1980 NDK/graphics/layers.h
[generic]                  278     628  44.3% -lh5- 2633 Mar 30  2002 NDK/pramgas.info
[generic]                  469    1911  24.5% -lh5- af85 Mar 30  2002 NDK/pramgas/layers_pragmas.h
[generic]                  423     790  53.5% -lh5- 9d22 Jun 27  1980 NDK/ReadMe
[generic]                13008   38710  33.6% -lh5- 82be Oct 29  1980 NOTES/layers-internals.readme
[generic]                 4801   11352  42.3% -lh5- 6ab8 Oct 29  1980 NOTES/Layers_RelNotes
[generic]                  369     852  43.3% -lh5- a5dc Mar 18  2002 NOTES/Layers_RelNotes.info
[generic]                 2360    3612  65.3% -lh5- cb57 Jan 16  2000 SaferPatches/SaferPatches
[generic]                12070   34062  35.4% -lh5- c9d8 Jan 16  2000 SaferPatches/SaferPatches.guide
[generic]                  284     537  52.9% -lh5- f50a Sep 28  1999 SaferPatches/SaferPatches.guide.info
[generic]                  906    2120  42.7% -lh5- 7f81 Oct 14  2001 SaferPatches/SaferPatches.readme
[generic]                  383     856  44.7% -lh5- f9c0 Sep 28  1999 SaferPatches/SaferPatches.readme.info
[generic]                 7325   12084  60.6% -lh5- b7fb Oct 12  2001 SaferPatches/ShowPatch
[generic]                  586    1124  52.1% -lh5- 9ea4 Sep 28  1999 SaferPatches/ShowPatch.info
[generic]                  278     628  44.3% -lh5- 95e8 Apr  6  2002 Workbench/C.info
[generic]                  375     612  61.3% -lh5- 4eda Apr  6  2002 Workbench/C/LayersAntiHack
[generic]                  276     628  43.9% -lh5- 0457 Apr  6  2002 Workbench/LIBS.info
[generic]                 8041   13748  58.5% -lh5- 879e Dec 16  1980 Workbench/LIBS/layers.library
[generic]               108886  219004  49.7% -lh5- f596 Oct 29  1980 Workbench/LIBS/rtg.library
[generic]                  276     628  43.9% -lh5- a259 Mar 18  2002 Workbench/LoadModule.info
[generic]                 4526    6856  66.0% -lh5- 1586 Jun 27  1980 Workbench/LoadModule/LoadModule
[generic]                 5287   13024  40.6% -lh5- fc65 May 31  1980 Workbench/LoadModule/LoadModule.readme
[generic]                  370     852  43.4% -lh5- 27fd Aug 12  2002 Workbench/LoadModule/LoadModule.readme.info
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        47 files  208441  482887  43.2%            Dec 20 20:25

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>