LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Catching events from system? (https://www.linuxquestions.org/questions/programming-9/catching-events-from-system-152170/)

kalleanka 03-01-2004 07:45 AM

Catching events from system?
 
I need to catch events like close, open, exit for windows etc to keep track of windows on my desktop. I want to do this in C++. Shall I look in X11 or is there a class for this?

Any ideas are appreciated.

Hko 03-01-2004 10:43 AM

Have a look at the sources for some window-manager to see how thay update their taskbar or the like.

andzerger 03-02-2004 07:51 AM

or you can track down the 'strace' and see how they do it there too

kalleanka 03-02-2004 12:09 PM

I did that in KDE and its pretty well commentated especially the header files for WM, Desktop etc. I am impressed by all the work they done and its a complex task writing a WM that have all things like in KDE. I will catch the Xevent from X11. This will solve it. It just take some time to read the code and its not that simple to even write the simplest WM at least not for me but I'm confident and I like the task. Basically what
I am doing is a bar on the bottom of the desktop that have flexible program Icons (as in KDE) and a credit counter. It has to be small because my hole system with program must be less then 16 MB so I can use a cheap flash memory(diskonchip) as a hard disk.

Thanks for the showed interested.

andzerger 03-02-2004 04:08 PM

id like to write a program that initiates init and displays all the info on all the child processes, including (at option) IP of initiating user, CPU usage, system calls called, files accessed, files presently accessed .. i dont know if its even plausible

the program im writing before that is a shell interpretation of the kde gear or the gnome 'hat' (or the windows start menu) .. (imagine graphics) -- |/| --->|/codin/ADM8211/| -->"cd .. cp .. rm .. exec .. etc, displayed vertically ..
and of course a shell prompt for the XDM that will stay put as you use it to run commands

really i dont want it for linux, total newbs might be able to use it to learn the shell.. more what i want to do with it is take it to windows XP and teach everyone how to use a dos prompt again, then theyll be more ready for linux ;)


All times are GMT -5. The time now is 07:35 PM.