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

📄 xsetrgbcolormaps.html

📁 linux图形界面x liberary手册
💻 HTML
字号:
<HTML><HEAD><TITLE>Xlib Programming Manual: XSetRGBColormaps</TITLE></HEAD><BODY><H1 ALIGN=center>XSetRGBColormaps</H1><H2>Syntax</H2><!.IN "XSetRGBColormaps" "" "@DEF@"><CODE><PRE>void XSetRGBColormaps(<B>display</B>, <B>w</B>, <B>std_colormap</B>, <B>count</B>, <B>property</B>)      <A HREF="../../display/opening.html#Display">Display</A> *<B>display</B>;      Window <B>w</B>;      <B><A HREF="./#XStandardColormap">XStandardColormap</A></B> *<B>std_colormap</B>;      int <B>count</B>;      Atom <B>property</B>;</PRE></CODE><H2>Arguments</H2><TABLE><TR><TD> <B>display</B><TD> Specifies the connection to the X server.<TR><TD> <B>w</B><TD> Specifies the window.<TR><TD> <B>std_colormap</B><TD> Specifies the<B><A HREF="./#XStandardColormap">XStandardColormap</A></B>structure to be used.<TR><TD> <B>count</B><TD> Specifies the number of colormaps.<TR><TD> <B>property</B><TD> Specifies the property name.</TABLE><H2>Description</H2>The <B>XSetRGBColormaps()</B>function replaces the RGB colormap definition in the specified property on the named window.If the property does not already exist,<B>XSetRGBColormaps()</B>sets the RGB colormap definition in the specified propertyon the named window.The property is stored with a type of RGB_COLOR_MAP and a format of 32.Note that it is the caller's responsibility to honor the <A HREF="/gui/x/icccm/">ICCCM</A>restriction that only RGB_DEFAULT_MAP contain more than one definition.<P>The<B>XSetRGBColormaps()</B>function usually is only used by window or session managers.To create a standard colormap, follow this procedure:<OL><P><LI>Open a new connection to the same server.<P><LI>Grab the server.<P><LI>See if the property is on the property list of the root window for the screen.<P><LI>If the desired property is not present:<UL><LI>Create a colormap (unless you are using the default colormap of the screen).<LI>Determine the color characteristics of the visual.<LI>Allocate cells in the colormap (or create it with<B>AllocAll</B>).<LI>Call <B><A HREF="../../color/XStoreColors.html">XStoreColors()</A></B>to store appropriate color values in the colormap.<LI>Fill in the descriptive members in the <B><A HREF="./#XStandardColormap">XStandardColormap</A></B>structure.<LI>Attach the property to the root window.<LI>Use<B><A HREF="../../display/XSetCloseDownMode.html">XSetCloseDownMode()</A></B>to make the resource permanent.</UL><P><LI>Ungrab the server.</UL><P><B>XSetRGBColormaps()</B>can generate<B>BadAlloc</B>,<B>BadAtom</B>,and<B>BadWindow</B>errors.<H2>Diagnostics</H2><TABLE><TR><TD><B>BadAlloc</B><TD> The server failed to allocate the requested     source or server memory.<TR><TD><B>BadAtom</B><TD> A value for an Atom argument does not name a     defined Atom.<TR><TD><B>BadWindow</B><TD>A value for a Window argument does not name a defined Window.</TABLE><H2>See also</H2><B><A HREF="XAllocStandardColormap.html">XAllocStandardColormap()</A></B>,<B><A HREF="XGetRGBColormaps.html">XGetRGBColormaps()</A></B>,<B><A HREF="./#XStandardColormap">XStandardColormap</A></B>,<B><A HREF="../../color/XAllocColor.html">XAllocColor()</A></B>,<B><A HREF="../../color/XCreateColormap.html">XCreateColormap()</A></B>,<B><A HREF="../../display/XFree.html">XFree()</A></B>,<B><A HREF="../../display/XSetCloseDownMode.html">XSetCloseDownMode()</A></B>,"<A HREF="setting-and-obtaining.html">Setting and Obtaining Standard Colormaps</A>".<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 + -