
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;// }
发表评论
最新留言
能坚持,总会有不一样的收获!
[***.219.124.196]2025年04月26日 12时56分39秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
开启与配置SMTP服务器
2019-03-11
APP卡片式设计
2019-03-11
GitHub上传时,项目在已有文档时直接push出现错误解决方案
2019-03-11
云数据库
2019-03-11
大数据在不同领域的应用
2019-03-11
页面置换算法
2019-03-11
推荐系统资料
2019-03-11
文件系统的层次结构
2019-03-11
减少磁盘延迟时间的方法
2019-03-11
vue(渐进式前端框架)
2019-03-11
权值初始化和与损失函数
2019-03-11
案例讨论
2019-03-11
传输层基本功能
2019-03-11
问题的计算复杂度:排序问题
2019-03-11
算法的伪码表示
2019-03-11
递推方程与算法分析
2019-03-11
主定理的应用
2019-03-11
最优装载问题
2019-03-11
最大团问题
2019-03-11
圆排列问题
2019-03-11