常用函数
1.Display XOpenDisplay(char display_name);
用途:connect to X server
参数display_name指明将X window窗口显示到哪个硬件(Specifies the hardware display name)。为空(NULL)时,默认值为当前系统的DISPLAY环境变量。
详见:http://www.x.org/releases/X11R7.5/doc/man/man3/XOpenDisplay.3.html
1.Display XOpenDisplay(char display_name);
用途:connect to X server
参数display_name指明将X window窗口显示到哪个硬件(Specifies the hardware display name)。为空(NULL)时,默认值为当前系统的DISPLAY环境变量。
详见:http://www.x.org/releases/X11R7.5/doc/man/man3/XOpenDisplay.3.html
Keyboard events | KeyPress, KeyRelease
Pointer events | ButtonPress, ButtonRelease, MotionNotify
Window crossing events | EnterNotify, LeaveNotify
Input focus events | FocusIn, FocusOut
参考资料:(X Window学习xlib—-X Event)[http://blog.csdn.net/unailbobo/article/details/3036618]