[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: X Window programming query
On Mon, Feb 05, 2001 at 12:40:04PM -0000, Karthika Sivaramakrishnan wrote:
> I am developing a monitoring project in X Window. For a particular window whose ID I have obtained, I would like to know
Programming for X using Xt is painful. If you still want to do it, look
However, if you decide to use a widget toolkit like Qt/KDE, things are
a lot more easy.
> 1. When that window was opened (created). Can I find this by looking out for some specific event? How can I conclude that the window was opened as the result of some command (or click on an icon)?
Look at a QApplication and QMainWindow man pages or their KDE equivalents,
which are basically sub classes of the above classes.
> 2. How can I associate a window to the program that runs it? For example, for the caption "Media Player", the corresponding program is "kmidi". Will these details be available in some system file?
This can be configured from the KDE control panel. You basically associate
a "file extension" with an application. In the above case, you'd go by
".mid" extension. In some cases where the file comes over HTTP, you could
use the content-type header. KDE has some built in support for doing this.
(So should Gnome - but I'm no expert).