x11 windows 入门demo1
发布日期:2021-05-10 12:01:21 浏览次数:25 分类:精选文章

本文共 894 字,大约阅读时间需要 2 分钟。

// Written by Ch. Tronche (http://tronche.lri.fr:8000/)// Copyright by the author. This is unmaintained, no-warranty free software. // Please use freely. It is appreciated (but by no means mandatory) to// acknowledge the author's contribution. Thank you.// Started on Thu Jun 26 23:29:03 1997//// Xlib tutorial: 1st program// Make a window appear on the screen.//#include 
// Every Xlib program must include this#include
// I include this to test return values the lazy way#include
// So we got the profile for 10 seconds#define NIL (0) // A name for the void pointermain(){ Display *dpy = XOpenDisplay(NIL); assert(dpy); Window w = XCreateWindow(dpy, DefaultRootWindow(dpy), 0, 0, 200, 100, 0, CopyFromParent, CopyFromParent, CopyFromParent, NIL, 0); XMapWindow(dpy, w); XFlush(dpy); sleep(10);}

 

上一篇:x11 windows 入门Demo3
下一篇:x11 windows (Mapping Windows)

发表评论

最新留言

第一次来,支持一个
[***.219.124.196]2025年05月05日 06时45分55秒