yes it is posssible
but not easy.
you literally would have to capture the signals being sent to the windows and process them for content humanly readable to display it.
most windowed apps on *x systems are just wrappers for cli apps.
the most heavily used windowed apps aren't though.
the wrapped cli apps are much easier to interface with, since they are designed to work with bash already.