Getting hold of Wimp task handles

Getting hold of Wimp task handles

Post by Tom Tanne » Fri, 29 Mar 2002 07:02:06



When buried deep in the bowels of a module implementing a toolbox gadget,
is there any way of getting hold of the wimp task handle for the current
task?

I'd like to register some postfilters in an efficient manner and I can't
work out how.

Regards

Tom
--
T. R. Tanner             email: T, T, E and H Tann(er), who use Argonet,
StrongArmed & Dangerous  a UK Company,to supply their internet access
Clanorak                 web page: http://www.argonet.co.uk/users/ttehtann
Warning: Here be random taglines!

... CERN : Could Eventually Reveal Nothing

 
 
 

Getting hold of Wimp task handles

Post by Darren Sal » Fri, 29 Mar 2002 08:21:29


I demand that Tom Tanner may or may not have written...

Quote:> When buried deep in the bowels of a module implementing a toolbox gadget,
> is there any way of getting hold of the wimp task handle for the current
> task?

Wimp_ReadSysInfo 5. The fact that this is deep within a Toolbox gadget
shouldn't matter.

--
| Darren Salt        | Acorn | d youmustbejoking,demon,co,uk | nr. Ashington,
| RPC, Spec+3, A3010 | Club  | s zap,tartarus,org            | Northumberland

|   I don't ask for much, just untold riches...

An atom blaster is a good weapon, but it can point both ways.

 
 
 

Getting hold of Wimp task handles

Post by Tom Tanne » Sat, 30 Mar 2002 03:24:46




Quote:> I demand that Tom Tanner may or may not have written...
> > When buried deep in the bowels of a module implementing a toolbox
> > gadget, is there any way of getting hold of the wimp task handle for
> > the current task?
> Wimp_ReadSysInfo 5. The fact that this is deep within a Toolbox gadget
> shouldn't matter.

Thanks.  ... Thinks - When will I learn how to read manuals properly??

Regards

Tom
--
T. R. Tanner             email: T, T, E and H Tann(er), who use Argonet,
StrongArmed & Dangerous  a UK Company,to supply their internet access
Clanorak                 web page: http://www.argonet.co.uk/users/ttehtann
Warning: Here be random taglines!

... Be *excellent* to each other

 
 
 

1. window handle --> task handle ?

I'd like to know the handle of the task that owns a given window.

The only method I've found is to send a message with the R2 = window
handle, and I get the task handle. I use the reason code 0. This
seems to work with all the applications... except the filer (or
it's due to drag-n-drop...). I can't copy files any longer: nothing
happens. Why???

More precisely, I first post-trap Wimp_CreateWindow thanks to WimpSWIVe
module. Here's the routine:

window_create   STMFD   SP!, {R0-R1,LR}
                STRVC   R0, [R12, #BUFFER] ;[BUFFER] = window handle.
                MOVVC   R1, R12
                ADRVC   R0, add_window
                SWIVC   XOS_AddCallBack
                LDMFD   SP!, {R0-R1,PC}^

and here's the callback routine:

add_window      STMFD   SP!, {R0-R4,LR}
                ADD     R1, R12, #BUFFER
                LDR     R2, [R1]        ;Window handle.
                MOV     R0, #0
                SWI     XWimp_SendMessage ;R2 = owner of the window.
                LDMFD   SP!, {R0-R4,PC}

(Normally, there's something between the SWI and the LDMFD, but here
it is a test routine. If I remove the SWI, there's no problem any
longer with the filer.)

Is there something wrong?

Also, I'd like to know if there is another method.

TIA,

--

http://www.ens-lyon.fr/~vlefevre      | Apple CD-300, SyQuest 270MB
PhD in Computer Science, 1st year     | Atari Falcon030, 4MB RAM
------------------------------------------------------------------------------

2. Configuration error

3. Getting hold of Acorn User

4. Paging Software

5. Makeup of Task Handles

6. Compaq Server Article, EE Times 5/17

7. Retrieving a task handle

8. Telephone number in Contacts

9. Getting a handle ...

10. Disabling Wimp events to be "queued for later handling"

11. Problem reading wimp window handle for toolbox objects

12. Wimp handle 16 or 32bit?

13. Getting window handle....