I am writing a terminal file manager, and I would want that when a user issues a command to open an image file, that the image viewing application use the terminal emulator's x window for rendering and input. While the image viewing application is running, the terminal emulator shouldn't render or receive input. When the image viewer is closed, the terminal emulator should reclaim it's x window.
Is achieving this possible without writing a window manager or a terminal emulator? Would this be easier if I were writing a gui file manager?