[ql-users] New wman C68

2004-03-09 Thread Christopher Cave

I have downloaded George Gwilt's interface for C68 and the new 
wman calls. All I have used works a treat and Roy Wood's colour 
scheme can now be used on my programs.

For the record, I have made two small changes to the set up:

1) In the file wman.h I have included lines that test for 
_QPTR_H and if it is not defined then include qptr.h. This 
prevents me falling on my face by getting the include order 
wrong!

2) I have set up a file syspal.h with 57 lines of the type:
#define SP_WINBG 0x201. This is in the hope that I will 
eventually remember what SP_INFWINBG is.

Thanks George for all the work on this.

Has anyone given serious thought as to the best way to set up a 
program that will run in QL-mode 4 as well as hi-colour, and 
that will run on the old as well as the new window manager? For 
the moment, I have used a mixture of separate declarations of, 
e.g., WM_wwork_t's and of runtime changes such as:
info[0].attr.t.ink=RED. The simplest solution is to abandon 
historical compatibility for a program with near zero 
circulation but for others?


Christopher Cave



Re: [ql-users] New wman C68

2004-03-09 Thread Wolfgang Lenerz

 Has anyone given serious thought as to the best way to set up a 
 program that will run in QL-mode 4 as well as hi-colour, and 
 that will run on the old as well as the new window manager? For 
 the moment, I have used a mixture of separate declarations of, 
 e.g., WM_wwork_t's and of runtime changes such as:
 info[0].attr.t.ink=RED. The simplest solution is to abandon 
 historical compatibility for a program with near zero 
 circulation but for others?


I have a solution that probably most of you won't like.

I have gone to great pains to make stand alone versions of WMAN  PTR_GEN that 
also incorporate, as much as possible, the corresponding changes in the new versions 
of SMSQ/E.

These can be obtained from the usual sources (e.g. Jochen).

If these are used, you can use the new system palette colours even on machines not 
running SMSQ/E and there is no need to change anything in your code.

Hence you could just test whether the version of WMAN is sufficiently recent and, if 
not 
gracefully give up with a message that the user should get a newer version of 
WMAN/PTR_GEN (this is the part that many won't like)...

(as a reminder; you get the pointer interface (ptr_gen) version returned in D1 from 
trap 
iop.pinf (d0=$70) and you can then check the WMAN version at (a1). Both versions are 
in the form x.xx, and should be at least 2.00 each, current versions are 2.01 - ptr 
int, 
2.03 -- wman).


If you do not want to do that (i.e. give up when the versions are too old), then I 
don't see 
any alternative to setting one colour (e.g. the syspal) in the window definition and 
changing the working (not wdw) definition at run time.

Wolfgang