[comp.sys.amiga.programmer] Help with gadgets!!

cs_b152@ux.kingston.ac.uk (Vlod Kalicun) (06/06/91)

Hello all,

Im currently writing an assembly program to which will add a few more 
gadgets when windows open, which will perform special 'tricks'.
e.g. Gadget to iconize windows etc.. 

The trouble is that how do I get Intuition to link my gadget to every
window that is opened under workbench?? (using A500 with 1.3 roms)

Do I have to somehow patch the great Intuition or is there a way I can
create my own system gadgets and let Intuition handle that for me??

Please Help as this has had me stumped for ages!!!

Thanks!!

Vlod

cs_b152@ux.king.ac.uk
Kingston Poly, Kingston. ENGLAND

forgeas@swinjm.UUCP (Jean-Michel Forgeas) (06/07/91)

In article <1991Jun6.120504.2624@kingston.ac.uk>, Vlod Kalicun writes:

> The trouble is that how do I get Intuition to link my gadget to every
> window that is opened under workbench?? (using A500 with 1.3 roms)

If I understand well, you want to add a gadget to a window which is not
yours. There is no legal way to do this even with 2.0, "legal" means
that your code can break with a future release of the system, or the
process which have the gadget list modified can call the guru if it was
expecting only its own gadgets and no more, or ...

> Do I have to somehow patch the great Intuition or is there a way I can

Sure, you have to patch (a lot of patches I think). Will you receive
the messages arriving at the other_process_window_user_port ?

> create my own system gadgets and let Intuition handle that for me??

If you want to use system gadgets do not set the SYSGADGET flag, it is
reserved by Intuition. Do:
    Gadget->GadgetType = CLOSE; /* not SYSGADGET|CLOSE */
This will be handled by Intuition nearly as well.
Think about setting the border flags like BORDERTOP to be sure that
your gadget will be redrawn automatically by Intuition.

Best regards,
    Jean-Michel
--
                                     \___/
Jean-Michel Forgeas                   \-/
cbmvax!cbmehq!cbmfra!swinjm!forgeas    |    The Software Winery
                                      -^-
                           And, where is the universe ?