`
阿尔萨斯
  • 浏览: 4556333 次
社区版块
存档分类
最新评论

X Window研究笔记(20)

 
阅读更多
<iframe align="center" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog336280.html" frameborder="0" width="336" scrolling="no" height="280"></iframe>
X Window研究笔记(20)

转载时请注明出处和作者联系方式
作者联系方式:李先静 <xianjimli at hotmail dot com><br><br><font size="4" style="font-weight: bold;">20.X Window资源管理</font><br><br>在X Window中,资源是一个广泛使用的概念。它包括图片、光标和窗口等对象,可以是内置的,也可以是注册的。每个资源都有一个ID,这个ID是唯一的,在各个客户端之间相同的ID引用相同的资源。这不但提高了传输性能,也是解决了在不同进程,甚至不同机器之间资源共享的问题。<br><br>对资源管理的主要函数有:<br><br><div style="border: 0.5pt solid windowtext; padding: 4px 5.4pt; background: rgb(230, 230, 230) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 95%;"><div><font><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif"><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">RegisterResourceName(RESTYPEtype,</span><span style="color: rgb(0, 0, 255);">char</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">name)<br><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">RESTYPE<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">CreateNewResourceType(deleteFunc)<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">DeleteTypedeleteFunc;<br><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">RESTYPE<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">CreateNewResourceClass()<br><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">Bool<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">InitClientResources(client)<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">ClientPtrclient;<br><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif"></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">GetXIDRange(client,server,minp,maxp)<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif"></span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">client;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">Boolserver;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">XID</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">minp,</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">maxp;<br><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">Bool<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">AddResource(id,type,value)<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">XIDid;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">RESTYPEtype;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">pointervalue;<br><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif"></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">FreeResource(id,skipDeleteFuncType)<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">XIDid;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">RESTYPEskipDeleteFuncType;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif"></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> <br><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">FreeResourceByType(id,type,skipFree)<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">XIDid;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">RESTYPEtype;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">BoolskipFree;<br><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">Bool<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">ChangeResourceValue(id,rtype,value)<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">XIDid;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">RESTYPErtype;<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">pointervalue;<br><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif"></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"><br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">FindClientResourcesByType(<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">ClientPtrclient,<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">RESTYPEtype,<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">FindResTypefunc,<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">pointercdata<br><img align="top" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif">)</span></font></div></div> <br><br>(待续)<br></xianjimli>


分享到:
评论

相关推荐

    X Window研究笔记

    X Window研究笔记 虽然X Window是一个非常复杂的系统,但只要静下心来分析,通常遇到的问题也是很容易解决的,前年我花了一段时间去研究X Window的实现,我发现了解它的实现后,很多问题都迎刃而解了

    Linux下X-Window系统程序设计简介.pdf

    Linux下X-Window系统程序设计简介 本文将详细介绍Linux下X-Window系统的程序设计,涵盖X-Window系统的结构、组成部分、编程接口、图形用户界面设计等方面。 一、X-Window系统结构 X-Window系统是Linux和其他UNIX...

    trilium笔记开源工具安装包

    在给定的文件列表中,我们看到有一个名为"trilium-windows-x64"的文件,这显然是Windows 64位系统的安装包。下载这个文件后,双击运行,按照安装向导的提示进行操作,选择安装路径,确认许可协议,最后点击“安装”...

    VNC源代码及代码笔记 RFB协议分

    VNC最初是基于AT&T的X Window System的Xvnc项目发展而来的,它支持多种操作系统,如Windows、Linux、macOS等。VNC的核心是RFB协议,这是一种轻量级的、高效的远程桌面协议,它将远程桌面的图形内容以帧缓冲的形式...

    Cygwin2.416+NS2.28安装笔记

    保存并关闭文件后,再次启动Cygwin,运行`startxwin.bat`以启动X Window System。然后,进入NS2的示例目录并运行一个示例脚本,如: ``` cd /home/administrator/ns-allinone-2.28/ns-2.28/ns-tutorial/examples ns ...

    Linux学习笔记.doc

    X Window是Linux图形界面的基础,它提供了一个窗口管理框架,使得用户可以通过鼠标和图形化界面操作系统。Linux的应用领域广泛,包括服务器、云计算、物联网、嵌入式设备、移动设备(如Android系统)等。 选择Linux...

    linux系统XrandR工具源码

    XrandR是X Window System的一个扩展,主要用于处理显示设备的配置和状态。它支持多种显示器硬件,包括内置屏幕、外接显示器,甚至多显示器的扩展桌面。通过XrandR,用户可以实现以下操作: 1. **查询显示器信息**:...

    Python学习笔记之视频人脸检测识别实例教程

    在现代计算机视觉领域中,人脸识别技术是一项重要的研究方向,广泛应用于安防监控、门禁考勤等场景。本篇文章将基于一个具体的Python视频人脸检测识别实例,深入探讨相关的核心概念和技术细节。 #### 二、基础知识...

    Anaconda3-5.3.1-Windows-x86-64.exe.rar

    总的来说,Anaconda为数据科学家和开发者提供了便捷的一站式解决方案,无论是在教学、研究还是工作中,都能大大提高数据处理和分析的效率。通过这个压缩包,用户可以在Windows系统上快速部署并开始使用这一强大的...

    mons:POSIX Shell脚本,用于快速管理X上的监视器

    mons是一个基于POSIX Shell脚本的工具,专为Linux用户设计,用于便捷地管理X Window系统(X)上的显示器设置。在Linux环境中,特别是在多显示器配置中,调整显示器布局、分辨率和旋转等设置通常需要使用命令行工具如...

    嵌入式 Arm 培訓教材.pdf

    - **XWindow简介** - **X服务器** - **窗口管理器** #### 三、嵌入式Linux **3.1 嵌入式Linux内核** - **嵌入式Linux综述** - **uCLinux** - **uCLinux的内存管理** - **uCLinux内核结构** 以上内容概括了...

    软件工程案例图书馆里系统.pdf

    描述中“软件工程案例图书馆里系统.pdf”表明了文档的性质,即它是一个关于图书馆管理系统软件工程实践的案例研究文档。这可能包括了系统设计的细节、实施过程中的挑战、解决方案以及最终的系统功能和性能评估。 ...

    debumblebee:已弃用。 不再使用它-通过VirtualGL对Debian的Optimus图形支持

    标题中的“debumblebee:已弃...这可能涉及到深入研究Linux驱动程序、X Window系统、以及如何在不支持的硬件上优化OpenGL性能。同时,关注开源社区的发展,如 mesa 和 prime 技术的进步,以获取最新的解决方案和更新。

    博客:New Wayland新闻和观点

    首先,Wayland的出现是为了解决X Window System(X11)的一些固有问题,如安全性、性能和现代化的需求。在X11中,窗口管理器和应用程序共享了对显示设备的直接控制,这可能导致潜在的安全风险。Wayland通过引入更...

    dot-emacs:Emacs配置

    1. **快捷键绑定**:Emacs使用Lisp脚本来定义快捷键,使得用户可以快速执行命令,例如`C-x C-s`保存文件,`C-x C-f`打开文件等。 2. **模式设置**:Emacs支持多种编辑模式,如Python模式、JavaScript模式等,每种...

    dotemacs:我的emacs配置

    Org模式是Emacs内建的一种文本格式,它不仅适合编写笔记,还支持结构化组织和导出,包括代码块的执行,这使得在Org文件中管理Emacs配置变得直观且方便。 `init.org`文件可能会包含以下内容: 1. **基本设置**:如...

    基于hhww改进版的传统五笔输入法(新版支持WIN7)

    IME Tool 让你可以自由地设置各种热键,基本键(ctrl、alt、shift)共有六种组合,辅助键有 91 个可选,如用左 Alt+左 Window 键激活龙文五笔,shift+down 激活紫光拼音。当然,有些热键组合是不能用的,如 shift+...

    基于hhww改进版的传统五笔输入法

    3、使用安装包内的Imegen9x.exe时(win98环境),请先将sw9x.ime复制到windows\system目录,并改名为Imegen.tpl 20081201更新: *修正反查编码一定要启动一次才生效的BUG *修正设置“繁体输出”和“词组联想”程序...

Global site tag (gtag.js) - Google Analytics