📄 gdk-visuals.html
字号:
<tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>green_shift</code></em>;</span></p></td><td>The <em class="structfield"><code>green_shift</code></em> and <em class="structfield"><code>green_prec</code></em> give an alternate presentation of the information in <em class="structfield"><code>green_mask</code></em>.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>green_prec</code></em>;</span></p></td><td>See above.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> <em class="structfield"><code>blue_mask</code></em>;</span></p></td><td>A mask giving the bits in a pixel value that correspond to the blue field.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>blue_shift</code></em>;</span></p></td><td>The <em class="structfield"><code>blue_shift</code></em> and <em class="structfield"><code>blue_prec</code></em> give an alternate presentation of the information in <em class="structfield"><code>blue_mask</code></em>.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>blue_prec</code></em>;</span></p></td><td>See above.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3155320"></a><h3><a name="GdkVisualType"></a>enum GdkVisualType</h3><a class="indexterm" name="id3155332"></a><pre class="programlisting">typedef enum{ GDK_VISUAL_STATIC_GRAY, GDK_VISUAL_GRAYSCALE, GDK_VISUAL_STATIC_COLOR, GDK_VISUAL_PSEUDO_COLOR, GDK_VISUAL_TRUE_COLOR, GDK_VISUAL_DIRECT_COLOR} GdkVisualType;</pre><p>A set of values that describe the manner in which thepixel values for a visual are converted into RGBvalues for display.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GDK-VISUAL-STATIC-GRAY:CAPS"></a><code class="literal">GDK_VISUAL_STATIC_GRAY</code></span></p></td><td>Each pixel value indexes a grayscale value directly.</td></tr><tr><td><p><span class="term"><a name="GDK-VISUAL-GRAYSCALE:CAPS"></a><code class="literal">GDK_VISUAL_GRAYSCALE</code></span></p></td><td>Each pixel is an index into a color map that maps pixel values into grayscale values. The color map can be changed by an application.</td></tr><tr><td><p><span class="term"><a name="GDK-VISUAL-STATIC-COLOR:CAPS"></a><code class="literal">GDK_VISUAL_STATIC_COLOR</code></span></p></td><td>Each pixel value is an index into a predefined, unmodifiable color map that maps pixel values into RGB values.</td></tr><tr><td><p><span class="term"><a name="GDK-VISUAL-PSEUDO-COLOR:CAPS"></a><code class="literal">GDK_VISUAL_PSEUDO_COLOR</code></span></p></td><td>Each pixel is an index into a color map that maps pixel values into rgb values. The color map can be changed by an application.</td></tr><tr><td><p><span class="term"><a name="GDK-VISUAL-TRUE-COLOR:CAPS"></a><code class="literal">GDK_VISUAL_TRUE_COLOR</code></span></p></td><td>Each pixel value directly contains red, green, and blue components. The <em class="structfield"><code>red_mask</code></em>, <em class="structfield"><code>green_mask</code></em>, and <em class="structfield"><code>blue_mask</code></em> fields of the <a class="link" href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> structure describe how the components are assembled into a pixel value.</td></tr><tr><td><p><span class="term"><a name="GDK-VISUAL-DIRECT-COLOR:CAPS"></a><code class="literal">GDK_VISUAL_DIRECT_COLOR</code></span></p></td><td>Each pixel value contains red, green, and blue components as for <a class="link" href="gdk-Visuals.html#GDK-VISUAL-TRUE-COLOR:CAPS"><code class="literal">GDK_VISUAL_TRUE_COLOR</code></a>, but the components are mapped via a color table into the final output table instead of being converted directly.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3155533"></a><h3><a name="GdkByteOrder"></a>enum GdkByteOrder</h3><a class="indexterm" name="id3155546"></a><pre class="programlisting">typedef enum{ GDK_LSB_FIRST, GDK_MSB_FIRST} GdkByteOrder;</pre><p>A set of values describing the possible byte-ordersfor storing pixel values in memory.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GDK-LSB-FIRST:CAPS"></a><code class="literal">GDK_LSB_FIRST</code></span></p></td><td>The values are stored with the least-significant byte first. For instance, the 32-bit value 0xffeecc would be stored in memory as 0xcc, 0xee, 0xff, 0x00.</td></tr><tr><td><p><span class="term"><a name="GDK-MSB-FIRST:CAPS"></a><code class="literal">GDK_MSB_FIRST</code></span></p></td><td>The values are stored with the most-significant bytefirst. For instance, the 32-bit value 0xffeecc would be storedin memory as 0x00, 0xcc, 0xee, 0xff.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3155617"></a><h3><a name="gdk-query-depths"></a>gdk_query_depths ()</h3><a class="indexterm" name="id3155630"></a><pre class="programlisting">void gdk_query_depths (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> **depths, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> *count);</pre><p>This function returns the available bit depths for the defaultscreen. It's equivalent to listing the visuals(<a class="link" href="gdk-Visuals.html#gdk-list-visuals"><code class="function">gdk_list_visuals()</code></a>) and then looking at the depth field in eachvisual, removing duplicates.</p><p>The array returned by this function should not be freed.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>depths</code></em> :</span></p></td><td> return location for available depths </td></tr><tr><td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td><td> return location for number of available depths</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3155720"></a><h3><a name="gdk-query-visual-types"></a>gdk_query_visual_types ()</h3><a class="indexterm" name="id3155733"></a><pre class="programlisting">void gdk_query_visual_types (<a class="link" href="gdk-Visuals.html#GdkVisualType">GdkVisualType</a> **visual_types, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> *count);</pre><p>This function returns the available visual types for the defaultscreen. It's equivalent to listing the visuals(<a class="link" href="gdk-Visuals.html#gdk-list-visuals"><code class="function">gdk_list_visuals()</code></a>) and then looking at the type field in eachvisual, removing duplicates.</p><p>The array returned by this function should not be freed.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>visual_types</code></em> :</span></p></td><td> return location for the available visual types</td></tr><tr><td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td><td> return location for the number of available visual types</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3155825"></a><h3><a name="gdk-list-visuals"></a>gdk_list_visuals ()</h3><a class="indexterm" name="id3155838"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a>* gdk_list_visuals (void);</pre><p>Lists the available visuals for the default screen.(See <a class="link" href="GdkScreen.html#gdk-screen-list-visuals"><code class="function">gdk_screen_list_visuals()</code></a>)A visual describes a hardware image data format.For example, a visual might support 24-bit color, or 8-bit color,and might expect pixels to be in a certain format.</p><p>Call <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a> on the return value when you're finished with it.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a list of visuals; the list must be freed, but not its contents</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3155907"></a><h3><a name="gdk-visual-get-best-depth"></a>gdk_visual_get_best_depth ()</h3><a class="indexterm" name="id3155921"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> gdk_visual_get_best_depth (void);</pre><p>Get the best available depth for the default GDK screen. "Best"means "largest," i.e. 32 preferred over 24 preferred over 8 bitsper pixel.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> best available depth</td></tr></tbody>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -