The only way I have found to do this is with the gadget-structure of intuition.
It's a bit more difficult than gadtools, but it works.
It is not recommended. It works but images are limited to 256 colors and gfx must be always in planar format. Users with gfx boards suffer a lot!