x11 window 入门Demo2
发布日期:2021-05-10 12:01:19 浏览次数:15 分类:精选文章

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

一、文件创建

创建prog-2.cc文件

// 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: 2nd program
// Make a window appear on the screen and draw a line inside.
// If you don't understand this program, go to
// http://tronche.lri.fr:8000/gui/x/xlib-tutorial/2nd-program-anatomy.html
// #include
// Every Xlib program must include this
// I include this to test return values the lazy way
// So we got the profile for 10 seconds
#define NIL (0)
#define BLACK_COLOR 0x000000
// main {
// // Open the display
// Display *dpy = XOpenDisplay(NIL);
// assert(dpy);
// // Get some colors
// int blackColor = BLACK_COLOR;
// }
上一篇:x11 windows (Mapping Windows)
下一篇:linux服务器通过X11实现图形化界面显示

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2025年04月26日 12时56分39秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章