Re: [Ql-Users] WM_INK etc

2013-04-16 Thread Wolfgang Lenerz

On 16/04/2013 20:59, Dilwyn Jones wrote:

Wolfgang Lenerz  wrote:


100 COLOUR_24
110 WM_PAPER #0,$FF : REM trying to set white
120 WM_INK #0,$FF : REM trying to set blue


In these lines, the top word will be ignored, even though he won't get
blue but some kind of stippled colour in line 120.

Most likely that's incorrect memory on my part - have asked him for the
actual values used.


(the $ff will be trated as $, i.e. a 15 bit rgb colour and the
code for that will, in the end ignore the upper word.

Even though it's a WM_ command? Would they still use the 16 or 24
bit values even though it should have a system palette colour reference
$02xx?


The definitions for the colour word are set out in the documentation

%   exactly as before
%0001   palette
%0010   system palette
%0011   gray scale
%0100cc00tttd   3d border (border calls only!).
%01ssxxyy   palette stipple. see below
%1rgb   15 bit RGB

As you san see, since in $ff bit 15 is set, this will be treaated as 
a 15 bit RGB value. I've looked at the code, this will ignore any value 
in the upper word.





The $00ff will be treated as a normal Ql colour since the the upper byte
of the lower word is 0).


Which is the "exactly as before" above.


If you look at the code (in ee_wman_trap3_asm) you will see that first a 
test is made whether this is a 15 bit rgb colour, then whether this is a 
palette stipple, then whether this is an "old" colour, then a palette 
colour, then a system palette, then gray colour, then 3d border colour.



Have had problems with some 3d borders before (and discussed it with
Marcel some time ago) - usual sympton drawing triangles from top and
bottom which overlap in the centre of the window and freeze the program
instead of just drawing the 3d border.



Well, the format is well-explained.
Without knowing what colour is passed, we can't know happens...

Wolfgang


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] WM_INK etc

2013-04-16 Thread Bob Spelten
Op Tue, 16 Apr 2013 20:59:04 +0200 schreef Dilwyn Jones  
:



(...)


130 WM_BORDER #0,3,??? : REMark a 3D border

(??? because I can’t remember the value used)


Darn - it would be a good idea to find out.

I'd bet that is the problem.
Have had problems with some 3d borders before (and discussed it with  
Marcel
some time ago) - usual sympton drawing triangles from top and bottom  
which overlap in the centre of the window and freeze the program instead  
of just drawing the 3d border.


As far as I know and tested, WMAN2 will produce a red/white stipple (238)  
for any illegal value.

For 24 bit values only the lower 16 bits are seem by WM_XXX.
$239 to $2FF is illegal; undefined System Palette Reference.
The colour defined for a legal reference could itself be out-of-range  
though.

$4C6 to $4FF is illegal; undefined 3D border.
$500 to $3FFF is not defined as anything.
None of these produced a hangup in my tests.

Maybe the 3D border value itself was legal but the window didn't have the  
room for it?

Some of those borders take up more than 3 pixels.

Bob

--
The BSJR QL software site at: http://members.upc.nl/b.spelten/ql/
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Re: [Ql-Users] WM_INK etc

2013-04-16 Thread Dilwyn Jones

Wolfgang Lenerz  wrote:


100 COLOUR_24
110 WM_PAPER #0,$FF : REM trying to set white
120 WM_INK #0,$FF : REM trying to set blue


In these lines, the top word will be ignored, even though he won't get 
blue but some kind of stippled colour in line 120.
Most likely that's incorrect memory on my part - have asked him for the 
actual values used.


(the $ff will be trated as $, i.e. a 15 bit rgb colour and the 
code for that will, in the end ignore the upper word.
Even though it's a WM_ command? Would they still use the 16 or 24 bit 
values even though it should have a system palette colour reference $02xx?


The $00ff will be treated as a normal Ql colour since the the upper byte
of the lower word is 0).
So black/white stipple QL colour 255. Don't remember seeing that so need to 
wait until I hear from him what values were used.



130 WM_BORDER #0,3,??? : REMark a 3D border

(??? because I can’t remember the value used)


Darn - it would be a good idea to find out.

I'd bet that is the problem.
Have had problems with some 3d borders before (and discussed it with Marcel 
some time ago) - usual sympton drawing triangles from top and bottom which 
overlap in the centre of the window and freeze the program instead of just 
drawing the 3d border.


Dilwyn 


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Auto-hide

2013-04-16 Thread Marcel Kilgus
Bob Spelten wrote:
> It's been done before.
> In Cuedark you can assign a corner to act as On switch.
> Move the pointer there and the screen saver will be invoked in a few  
> seconds.
> The principle is the same, don't know how it's done however.

It directly checks pt_pos in the CON linkage block once per second, no
window is involved.

Marcel

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Auto-hide

2013-04-16 Thread George Gwilt

On 16 Apr 2013, at 17:10, Norman Dunbar wrote:

> 
> Does the invisible window cover the whole screen by any chance? If so, what 
> happens to any other program running "beneath" the invisible window when you 
> attempt to click on it with the mouse to pick it to the top of the pile?
> 

The window does, I think, cover the whole screen.

I have just tried picking the program (called 'pic') without any effect. Mind 
you its pointer is invisible as well as the window.

> I remember a program I wrote for Dilwyn some years ago (I can't remember the 
> name of it though!) which opened a full-screen window for some reason, which 
> effectively disabled using the pointer to pick the other running programs.


Other programs remain pickable.

George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Auto-hide

2013-04-16 Thread Ralf Reköndt


- Original Message - 
From: "Norman Dunbar"


I remember a program I wrote for Dilwyn some years ago (I can't remember 
the name of it though!) which opened a full-screen window for some 
reason, which effectively disabled using the pointer to pick the other 
running programs.


Same with Qascade.
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] WM_INK etc

2013-04-16 Thread Wolfgang Lenerz



100 COLOUR_24
110 WM_PAPER #0,$FF : REM trying to set white
120 WM_INK #0,$FF : REM trying to set blue


In these lines, the top word will be ignored, even though he won't get 
blue but some kind of stippled colour in line 120.


(the $ff will be trated as $, i.e. a 15 bit rgb colour and the 
code for that will, in the end ignore the upper word.
The $00ff will be treated as a normal Ql colour since the the upper byte 
of the lower word is 0).



130 WM_BORDER #0,3,??? : REMark a 3D border

(??? because I can’t remember the value used)


Darn - it would be a good idea to find out.

I'd bet that is the problem.




Wolfgang


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Auto-hide

2013-04-16 Thread Norman Dunbar

Hi George,

> By having an invisible window by setting the MSbit of its attributes
> in the window definition. This stops the window being cleared so that
> you see what's beneath it. Ie it's invisible.

Does the invisible window cover the whole screen by any chance? If so, 
what happens to any other program running "beneath" the invisible window 
when you attempt to click on it with the mouse to pick it to the top of 
the pile?


I remember a program I wrote for Dilwyn some years ago (I can't remember 
the name of it though!) which opened a full-screen window for some 
reason, which effectively disabled using the pointer to pick the other 
running programs.


Dilwyn wasn't best pleased! :-)


Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Auto-hide

2013-04-16 Thread Wolfgang Lenerz



By having an invisible window by setting the MSbit of its attributes in the 
window definition. This stops the window being cleared so that you see what's 
beneath it. Ie it's invisible.


Very elegant. A 0 sized window will probably do as well.


Wolfgang

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Auto-hide

2013-04-16 Thread George Gwilt

On 16 Apr 2013, at 16:42, tobias.froesc...@t-online.de wrote:

> how did you manage to detect where the pointer is without a window?

By having an invisible window by setting the MSbit of its attributes in the 
window definition. This stops the window being cleared so that you see what's 
beneath it. Ie it's invisible.

The detection is, of course, by setting D2 to 48 for IOP.RPTR

George


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Auto-hide

2013-04-16 Thread tobias.froesc...@t-online.de


>I've just written a small program which has no window that you can see, has no 
>loose items, or indeed anything at all, except that >it picks master basic (ID 
>= 0) when the pointer is moved to the top band of the screen. So yes it seems 
>simple.

>Of course you would have to supply to this program the ID of the program you 
>want picked.

George,
how did you manage to detect where the pointer is without a window?

Regards,
Tobias


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Auto-hide

2013-04-16 Thread George Gwilt

On 16 Apr 2013, at 14:03, Dilwyn Jones wrote:

> 
> If the pointer rests at the bottom of the screen (or any edge for that 
> matter) for a couple of seconds, the program or taskbar (or whatever you use 
> it for) pops up, even if it was buried under other windows.
> 
> Sounds simple: might be simple, I don’t yet know!

I've just written a small program which has no window that you can see, has no 
loose items, or indeed anything at all, except that it picks master basic (ID = 
0) when the pointer is moved to the top band of the screen. So yes it seems 
simple.

Of course you would have to supply to this program the ID of the program you 
want picked.


George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] WM_INK etc

2013-04-16 Thread Dilwyn Jones
> I was asked to resolve a QPC problem with a boot program at the Quanta event 
> this number...
I meant weekend of course. Dooh!

Dilwyn
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


[Ql-Users] WM_INK etc

2013-04-16 Thread Dilwyn Jones
I was asked to resolve a QPC problem with a boot program at the Quanta event 
this number. We managed to resolve it, but are not sure how.

The member concerned had (mistakenly) used WM_INK and WM_PAPER to try to set 
24-bit colour numbers after using a COLOUR_24 command. The computer concerned 
started up OK, colours looked OK, but after running an executable program, the 
emulator locked up after you quit from the first program executed.

We trimmed the boot program down until all we had left was colour commands and 
this seemed to confirm that the issue lay with the mistakenly used WM_ 
commands.

I can’t remember the exact colour numbers used, but they were 24-bit hex 
values. WM_xxx commands expect a 16-bit value usually, e.g. WM_PAPER #0,$0201 
would set paper colour to the system palette’s main window background colour. 
However, we noticed that if the boot program set something like this:

100 COLOUR_24
110 WM_PAPER #0,$FF : REM trying to set white
120 WM_INK #0,$FF : REM trying to set blue
130 WM_BORDER #0,3,??? : REMark a 3D border

(??? because I can’t remember the value used)

I would probably have expected line 110 in particular to throw up an out of 
range or some such message.

Anyone familiar with SMSQ/E sources able to explain what was going on?

Dilwyn Jones
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Auto-hide

2013-04-16 Thread Bob Spelten
Op Tue, 16 Apr 2013 15:03:28 +0200 schreef Dilwyn Jones  
:


This is a little programming challenge I left with George Gwilt at the  
Quanta workshop this weekend.


I’d like to create something which can behave a bit like an “auto-hide”  
Windows taskbar, using the pointer environment.


If the pointer rests at the bottom of the screen (or any edge for that  
matter) for a couple of seconds, the program or taskbar (or whatever you  
use it for) pops up, even if it was buried under other windows.


Sounds simple: might be simple, I don’t yet know!


It's been done before.
In Cuedark you can assign a corner to act as On switch.
Move the pointer there and the screen saver will be invoked in a few  
seconds.

The principle is the same, don't know how it's done however.
Your "taskbar" program may need to control the whole screen and  
regularly/constantly check the pointer.


Bob

--
The BSJR QL software site at: http://members.upc.nl/b.spelten/ql/
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Re: [Ql-Users] Auto-hide

2013-04-16 Thread George Gwilt

On 16 Apr 2013, at 14:03, Dilwyn Jones wrote:

> This is a little programming challenge I left with George Gwilt at the Quanta 
> workshop this weekend.
> 
> I’d like to create something which can behave a bit like an “auto-hide” 
> Windows taskbar, using the pointer environment.
> 
> If the pointer rests at the bottom of the screen (or any edge for that 
> matter) for a couple of seconds, the program or taskbar (or whatever you use 
> it for) pops up, even if it was buried under other windows.
> 
> Sounds simple: might be simple, I don’t yet know!

Let's see how many different solutions we come up with.

George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


[Ql-Users] Auto-hide

2013-04-16 Thread Dilwyn Jones
This is a little programming challenge I left with George Gwilt at the Quanta 
workshop this weekend.

I’d like to create something which can behave a bit like an “auto-hide” Windows 
taskbar, using the pointer environment.

If the pointer rests at the bottom of the screen (or any edge for that matter) 
for a couple of seconds, the program or taskbar (or whatever you use it for) 
pops up, even if it was buried under other windows.

Sounds simple: might be simple, I don’t yet know!

Dilwyn Jones
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm