LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-01-2004, 07:45 AM   #1
kalleanka
Member
 
Registered: Aug 2003
Location: Mallorca, Spain
Distribution: xubuntu
Posts: 551

Rep: Reputation: 38
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.
 
Old 03-01-2004, 10:43 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Have a look at the sources for some window-manager to see how thay update their taskbar or the like.
 
Old 03-02-2004, 07:51 AM   #3
andzerger
Member
 
Registered: Feb 2004
Location: denver
Distribution: slackware && freeBSD && rh9
Posts: 92

Rep: Reputation: 15
or you can track down the 'strace' and see how they do it there too
 
Old 03-02-2004, 12:09 PM   #4
kalleanka
Member
 
Registered: Aug 2003
Location: Mallorca, Spain
Distribution: xubuntu
Posts: 551

Original Poster
Rep: Reputation: 38
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.
 
Old 03-02-2004, 04:08 PM   #5
andzerger
Member
 
Registered: Feb 2004
Location: denver
Distribution: slackware && freeBSD && rh9
Posts: 92

Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
catching signals alaios Programming 3 11-16-2007 05:05 AM
My Linux system is catching up with my Xp system JBull General 16 07-18-2005 06:49 PM
catching a keypress on X MD3 Programming 0 02-14-2005 02:07 PM
Catching a Hacker... Shr00mBoXx Linux - Security 14 06-30-2004 09:59 PM
Catching first letter. TheRealDeal Linux - General 1 03-28-2004 08:50 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration