📄 gtkcolorselection.html
字号:
<p><code class="literal">gtk_color_selection_set_change_palette_hook</code> is deprecated and should not be used in newly-written code. This function is deprecated in favor of <a class="link" href="GtkColorSelection.html#gtk-color-selection-set-change-palette-with-screen-hook"><code class="function">gtk_color_selection_set_change_palette_with_screen_hook()</code></a>, and doesnot work in multihead environments.</p></div><p>Installs a global function to be called whenever the user tries tomodify the palette in a color selection. This function should savethe new palette contents, and update the GtkSettings property"gtk-color-palette" so all GtkColorSelection widgets will be modified.</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>func</code></em> :</span></p></td><td> a function to call when the custom palette needs saving.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the previous change palette hook (that was replaced).</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4004094"></a><h3><a name="GtkColorSelectionChangePaletteFunc"></a>GtkColorSelectionChangePaletteFunc ()</h3><a class="indexterm" name="id4004108"></a><pre class="programlisting">void (*GtkColorSelectionChangePaletteFunc) (const <ahref="/usr/share/gtk-doc/html/gdk/gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *colors, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> n_colors);</pre><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>colors</code></em> :</span></p></td><td></td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_colors</code></em> :</span></p></td><td></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4004177"></a><h3><a name="gtk-color-selection-set-change-palette-with-screen-hook"></a>gtk_color_selection_set_change_palette_with_screen_hook ()</h3><a class="indexterm" name="id4004193"></a><pre class="programlisting"><a class="link" href="GtkColorSelection.html#GtkColorSelectionChangePaletteWithScreenFunc">GtkColorSelectionChangePaletteWithScreenFunc</a> gtk_color_selection_set_change_palette_with_screen_hook (<a class="link" href="GtkColorSelection.html#GtkColorSelectionChangePaletteWithScreenFunc">GtkColorSelectionChangePaletteWithScreenFunc</a> func);</pre><p>Installs a global function to be called whenever the user tries tomodify the palette in a color selection. This function should savethe new palette contents, and update the GtkSettings property"gtk-color-palette" so all GtkColorSelection widgets will be modified.</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>func</code></em> :</span></p></td><td> a function to call when the custom palette needs saving.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the previous change palette hook (that was replaced).</td></tr></tbody></table></div><p class="since">Since 2.2</p></div><hr><div class="refsect2" lang="en"><a name="id4004272"></a><h3><a name="GtkColorSelectionChangePaletteWithScreenFunc"></a>GtkColorSelectionChangePaletteWithScreenFunc ()</h3><a class="indexterm" name="id4004288"></a><pre class="programlisting">void (*GtkColorSelectionChangePaletteWithScreenFunc) (<ahref="/usr/share/gtk-doc/html/gdk/GdkScreen.html">GdkScreen</a> *screen, const <ahref="/usr/share/gtk-doc/html/gdk/gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *colors, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> n_colors);</pre><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td><td></td></tr><tr><td><p><span class="term"><em class="parameter"><code>colors</code></em> :</span></p></td><td></td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_colors</code></em> :</span></p></td><td></td></tr></tbody></table></div><p class="since">Since 2.2</p></div><hr><div class="refsect2" lang="en"><a name="id4004386"></a><h3><a name="gtk-color-selection-set-color"></a>gtk_color_selection_set_color ()</h3><a class="indexterm" name="id4004403"></a><pre class="programlisting">void gtk_color_selection_set_color (<a class="link" href="GtkColorSelection.html" title="GtkColorSelection">GtkColorSelection</a> *colorsel, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> *color);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_color_selection_set_color</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GtkColorSelection.html#gtk-color-selection-set-current-color"><code class="function">gtk_color_selection_set_current_color()</code></a> instead.</p></div><p>Sets the current color to be <em class="parameter"><code>color</code></em>. The first time this is called, it willalso set the original color to be <em class="parameter"><code>color</code></em> too.</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>colorsel</code></em> :</span></p></td><td> a <a class="link" href="GtkColorSelection.html" title="GtkColorSelection"><span class="type">GtkColorSelection</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td><td> an array of 4 doubles specifying the red, green, blue and opacity to set the current color to.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4004523"></a><h3><a name="gtk-color-selection-get-color"></a>gtk_color_selection_get_color ()</h3><a class="indexterm" name="id4004539"></a><pre class="programlisting">void gtk_color_selection_get_color (<a class="link" href="GtkColorSelection.html" title="GtkColorSelection">GtkColorSelection</a> *colorsel, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> *color);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_color_selection_get_color</code> is deprecated and should not be used in newly-written code.</p></div><p>Sets <em class="parameter"><code>color</code></em> to be the current color in the GtkColorSelection widget.</p><p>This function is deprecated, use <a class="link" href="GtkColorSelection.html#gtk-color-selection-get-current-color"><code class="function">gtk_color_selection_get_current_color()</code></a> instead.</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>colorsel</code></em> :</span></p></td><td> a <a class="link" href="GtkColorSelection.html" title="GtkColorSelection"><span class="type">GtkColorSelection</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td><td> an array of 4 <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> to fill in with the current color.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id4004664"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id4004674"></a><h3><a name="GtkColorSelection--current-alpha"></a>The <code class="literal">"current-alpha"</code> property</h3><a class="indexterm" name="id4004692"></a><pre class="programlisting"> "current-alpha" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> : Read / Write</pre><p>The current opacity value (0 fully transparent, 65535 fully opaque).</p><p>Allowed values: <= 65535</p><p>Default value: 65535</p></div><hr><div class="refsect2" lang="en"><a name="id4004723"></a><h3><a name="GtkColorSelection--current-color"></a>The <code class="literal">"current-color"</code> property</h3><a class="indexterm" name="id4004740"></a><pre class="programlisting"> "current-color" <ahref="/usr/share/gtk-doc/html/gdk/gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> : Read / Write</pre><p>The current color.</p></div><hr><div class="refsect2" lang="en"><a name="id4004763"></a><h3><a name="GtkColorSelection--has-opacity-control"></a>The <code class="literal">"has-opacity-control"</code> property</h3><a class="indexterm" name="id4004780"></a><pre class="programlisting"> "has-opacity-control" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>Whether the color selector should allow setting opacity.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id4004808"></a><h3><a name="GtkColorSelection--has-palette"></a>The <code class="literal">"has-palette"</code> property</h3><a class="indexterm" name="id4004824"></a><pre class="programlisting"> "has-palette" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>Whether a palette should be used.</p><p>Default value: FALSE</p></div></div><div class="refsect1" lang="en"><a name="id4004852"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id4004862"></a><h3><a name="GtkColorSelection-color-changed"></a>The <code class="literal">"color-changed"</code> signal</h3><a class="indexterm" name="id4004880"></a><pre class="programlisting">void user_function (<a class="link" href="GtkColorSelection.html" title="GtkColorSelection">GtkColorSelection</a> *colorselection, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data) : Run First</pre><p>This signal is emitted when the color changes in the <a class="link" href="GtkColorSelection.html" title="GtkColorSelection"><span class="type">GtkColorSelection</span></a>according to its update policy.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>colorselection</code></em> :</span></p></td><td>the object which received the signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id4004961"></a><div class="refsect2" lang="en"><a name="id4004962"></a></div><hr><div class="refsect2" lang="en"><a name="id4004963"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -