📄 gdk-visuals.html
字号:
</table></div></div><hr><div class="refsect2" lang="en"><a name="id3155962"></a><h3><a name="gdk-visual-get-best-type"></a>gdk_visual_get_best_type ()</h3><a class="indexterm" name="id3155976"></a><pre class="programlisting"><a class="link" href="gdk-Visuals.html#GdkVisualType">GdkVisualType</a> gdk_visual_get_best_type (void);</pre><p>Return the best available visual type for the default GDK screen.</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 visual type</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3156017"></a><h3><a name="gdk-visual-get-system"></a>gdk_visual_get_system ()</h3><a class="indexterm" name="id3156030"></a><pre class="programlisting"><a class="link" href="gdk-Visuals.html#GdkVisual">GdkVisual</a>* gdk_visual_get_system (void);</pre><p>Get the system'sdefault visual for the default GDK screen.This is the visual for the root window of the display.The return value 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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> system visual</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3156072"></a><h3><a name="gdk-visual-get-best"></a>gdk_visual_get_best ()</h3><a class="indexterm" name="id3156086"></a><pre class="programlisting"><a class="link" href="gdk-Visuals.html#GdkVisual">GdkVisual</a>* gdk_visual_get_best (void);</pre><p>Get the visual with the most available colors for the defaultGDK screen. The return value 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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> best visual</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3156127"></a><h3><a name="gdk-visual-get-best-with-depth"></a>gdk_visual_get_best_with_depth ()</h3><a class="indexterm" name="id3156141"></a><pre class="programlisting"><a class="link" href="gdk-Visuals.html#GdkVisual">GdkVisual</a>* gdk_visual_get_best_with_depth (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> depth);</pre><p>Get the best visual with depth <em class="parameter"><code>depth</code></em> for the default GDK screen.Color visuals and visuals with mutable colormaps are preferredover grayscale or fixed-colormap visuals. The return value should notbe freed. <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> may be returned if no visual supports <em class="parameter"><code>depth</code></em>.</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>depth</code></em> :</span></p></td><td> a bit depth</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> best visual for the given depth</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3156227"></a><h3><a name="gdk-visual-get-best-with-type"></a>gdk_visual_get_best_with_type ()</h3><a class="indexterm" name="id3156241"></a><pre class="programlisting"><a class="link" href="gdk-Visuals.html#GdkVisual">GdkVisual</a>* gdk_visual_get_best_with_type (<a class="link" href="gdk-Visuals.html#GdkVisualType">GdkVisualType</a> visual_type);</pre><p>Get the best visual of the given <em class="parameter"><code>visual_type</code></em> for the default GDK screen.Visuals with higher color depths are considered better. The return valueshould not be freed. <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> may be returned if no visual has type<em class="parameter"><code>visual_type</code></em>.</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_type</code></em> :</span></p></td><td> a visual type</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> best visual of the given type</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3156327"></a><h3><a name="gdk-visual-get-best-with-both"></a>gdk_visual_get_best_with_both ()</h3><a class="indexterm" name="id3156341"></a><pre class="programlisting"><a class="link" href="gdk-Visuals.html#GdkVisual">GdkVisual</a>* gdk_visual_get_best_with_both (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> depth, <a class="link" href="gdk-Visuals.html#GdkVisualType">GdkVisualType</a> visual_type);</pre><p>Combines <a class="link" href="gdk-Visuals.html#gdk-visual-get-best-with-depth"><code class="function">gdk_visual_get_best_with_depth()</code></a> and <a class="link" href="gdk-Visuals.html#gdk-visual-get-best-with-type"><code class="function">gdk_visual_get_best_with_type()</code></a>.</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>depth</code></em> :</span></p></td><td> a bit depth</td></tr><tr><td><p><span class="term"><em class="parameter"><code>visual_type</code></em> :</span></p></td><td> a visual type</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> best visual with both <em class="parameter"><code>depth</code></em> and <em class="parameter"><code>visual_type</code></em>, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3156469"></a><h3><a name="gdk-visual-ref"></a>gdk_visual_ref()</h3><a class="indexterm" name="id3156484"></a><pre class="programlisting">#define gdk_visual_ref(v) g_object_ref(v)</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_visual_ref</code> is deprecated and should not be used in newly-written code.</p></div><p>Deprecated equivalent of <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td><td>a <a class="link" href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the same visual</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3156559"></a><h3><a name="gdk-visual-unref"></a>gdk_visual_unref()</h3><a class="indexterm" name="id3156574"></a><pre class="programlisting">#define gdk_visual_unref(v) g_object_unref(v)</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_visual_unref</code> is deprecated and should not be used in newly-written code.</p></div><p>Deprecated equivalent of <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td><td>a <a class="link" href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3156638"></a><h3><a name="gdk-visual-get-screen"></a>gdk_visual_get_screen ()</h3><a class="indexterm" name="id3156654"></a><pre class="programlisting"><a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a>* gdk_visual_get_screen (<a class="link" href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual);</pre><p>Gets the screen to which this visual belongs</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</code></em> :</span></p></td><td> a <a class="link" href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the screen to which this visual belongs.</td></tr></tbody></table></div><p class="since">Since 2.2</p></div></div><div class="refsect1" lang="en"><a name="id3156730"></a><h2>See Also</h2><p><a class="link" href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a>, <span class="type">GdkRGB</span></p></div><div class="refsect1" lang="en"><a name="id3156764"></a><div class="refsect2" lang="en"><a name="id3156765"></a></div><hr><div class="refsect2" lang="en"><a name="id3156766"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -