In article <[EMAIL PROTECTED]>,
   Nicholas Clark <[EMAIL PROTECTED]> wrote:
> On Sun, Aug 12, 2001 at 07:05:35PM +0100, Tanner Family wrote:
> > Playing round with window SWI calls, how does one use the swi module
> > to do something like Wimp_GetWindowInfo, where R1 contains a pointer
> > to a block (OK so far), but where the bottom bit (bit 0) of R1 is set
> > if you don't want to return all the icons?
> > 
> > I haven't been able to do this and am currently relying on passing a
> > very large buffer to the SWI. Unfortunately, this sort of behaviour
> > appears elsewhere in the OS :-(

> I think that a construction like this 1 liner
> perl -le '$a="x"x256; print unpack "I", pack "P", $a'

> will give the address of the block.
> (ie I see 793480 as the output)

> You can add 1 to that and pass the number to SWI call. (not tested that
> bit)

> Hope that helps,

That works fine thanks. I've ended up with:

 my $buff = pack("Ix92", $window);
 swi 'Wimp_GetWindowInfo', regmask([1]), (unpack "I", pack "P", $buff) + 1;
        (undef, $xmin, $ymin, $xmax, $ymax) = unpack "I5", $buff;

which works as desired (even if obscurely).

Tom

Regards
Thos
-- 
T. R. Tanner    email: [EMAIL PROTECTED]
                web page: http://www.argonet.co.uk/users/ttehtann
Warning: Here be random taglines!

... Behind every succesfull man is woman with nothing to wear

Reply via email to