[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
RE: X Event capturing
>I am developing a software to monitor events in X Window (Linux). I am
using C (and Xlib) only. How >can I detect if an event has occurred for a
particular window?
U shud specify the event mask for the events in which u r interested. for
this try following function in the loop.
XWindowEvent ( display, window, event_mask, &event);
Purpose : Receives the next event that matches a specified event mask and
window.
display can be obtained by
Display *display = XtDisplay( w ); /* w is widget in which u r interested
*/
window can be obtained by
Window *window = XtWindow( w ); /* w is widget in which u r interested */
event_mask can be a list in the form of
(ButtonReleaseMask | Button1MotionMask) etc.
declare event as Xevent event;
if possible buy a book by Nabajyoti Barakakati (X Window System
Programming) 350 Rs. it will help u a lot. if i could get some time i ll
try to give u some small working code.
for advance topics u can visit following site.
http://www.rahul.net/kenton/
http://www.rahul.net/kenton/xsites.framed.html
bye
aseem