z85525006
2012-06-09 17:54 deepin
专心搞好一个,再搞另一个.
学过GTK+的,学xlib非常 快... ..
学几天或者一个晚上, 对照API,就可以干事情啦. 然后看看其它的源码,学习一下, OK.
学过GTK+的,学xlib非常 快... ..
学几天或者一个晚上, 对照API,就可以干事情啦. 然后看看其它的源码,学习一下, OK.
Reply Like 0 View the author
Rankings
Popular Events
More
有鼠标事件,暴露事件,键盘事件等等....
只要看API,就可以一步步的操作.
xlib和window SDK有的一比,写界面都很繁琐,相比之下,我感觉xlib写界面和其它程序要比SDK简单的多.
我感觉学 XLIB 的人也没有什么,就 和学GTK+ 的人没有什么区别.
xlib 可以画 button, listview, treeview, 等等一些常用控件. 一定没有人喜欢这样干.
xlib也可以截图..
XGetWindowAttributes 可以获取窗口的属性.当然也可以获取其它窗口的.
int x, y;
窗口的位置,相对于它的父窗口。
int width, height;
窗口的宽和高(单位,像素)。
int border_width
窗口的边框宽度
Window root;
根窗口,也就是我们的窗口在那个窗口里被显示了。
XQueryTree() 这个函数可以返回一大堆的东西给你.
struct _global_handles{
Display *display;
unsigned int screen;
Window root_win;
};
typedef struct _global_handles Ghandles; 这个是 g 类型结构体.
status = XQueryTree(g->display, rootWindow, &rootWindow, &parent, &children, &nNumChildren);
这个例子 他 实现的是一个递归查询 窗口.
1.tar.gz