⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 context-manager.html

📁 linux图形界面x liberary手册
💻 HTML
字号:
<HTML><HEAD><TITLE>Xlib Programming Manual: Using the Context Manager</TITLE></HEAD><BODY><H1 ALIGN=center>16.10 Using the Context Manager</H1>The context manager provides a way of associating data with an X resource ID(mostly typically a window) in your program.  Note that this is local to your program;the data is not stored in the server on a property list.Any amount of data in any number of pieces can be associated with aresource ID,and each piece of data has a type associated with it.  The context manager requires knowledge of the resource IDand type to store or retrieve data.<P>Essentially, the context manager can be viewed as a two-dimensional, sparse array:  one dimension is subscripted by the X resource IDand the other by a context type field.Each entry in the array contains a pointer to the data.Xlib provides context management functions with which you cansave data values, get data values, delete entries, and create a uniquecontext type.The symbols used are in<B><TT>X11/Xutil.h.</TT></B><P>To save a data value that corresponds to a resource ID and context type, use<B><A HREF="XSaveContext.html">XSaveContext()</A></B>.<P>To get the data associated with a resource ID and type, use<B><A HREF="XFindContext.html">XFindContext()</A></B>.<P>To delete an entry for a given resource ID and type, use<B><A HREF="XDeleteContext.html">XDeleteContext()</A></B>.<P>To create a unique context type that may be used in subsequent calls to<B><A HREF="XSaveContext.html">XSaveContext()</A></B>and<B><A HREF="XFindContext.html">XFindContext()</A></B>,use<B><A HREF="XUniqueContext.html">XUniqueContext()</A></B>.<P><HR><ADDRESS><A HREF="http://tronche.com/">Christophe Tronche</A>, <A HREF="mailto:ch.tronche@computer.org">ch.tronche@computer.org</A></ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -