New upstream version 3.23.0
This commit is contained in:
@ -3,12 +3,12 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Resource Files: GTK+ 3 Reference Manual</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
|
||||
<link rel="up" href="DeprecatedObjects.html" title="Deprecated">
|
||||
<link rel="prev" href="gtk3-GtkGradient.html" title="GtkGradient">
|
||||
<link rel="next" href="GtkStyle.html" title="GtkStyle">
|
||||
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
|
||||
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -318,17 +318,9 @@ attaches them to particular widgets. The attachment is done
|
||||
by the <code class="literal">widget</code>, <code class="literal">widget_class</code>,
|
||||
and <code class="literal">class</code> declarations. As an example
|
||||
of such a statement:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">widget </span><span class="string">"mywindow.*.GtkEntry"</span><span class="normal"> style </span><span class="string">"my-entry-class"</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
widget "mywindow.*.GtkEntry" style "my-entry-class"
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>attaches the style <code class="literal">"my-entry-class"</code> to all
|
||||
widgets whose “widget path” matches the
|
||||
@ -349,17 +341,9 @@ always used.</p>
|
||||
<p>Since GTK+ 2.10, <code class="literal">widget_class</code> paths can also contain <classname>
|
||||
substrings, which are matching the class with the given name and any
|
||||
derived classes. For instance,</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">widget_class </span><span class="string">"*<GtkMenuItem>.GtkLabel"</span><span class="normal"> style </span><span class="string">"my-style"</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
widget_class "*<GtkMenuItem>.GtkLabel" style "my-style"
|
||||
</pre></div>
|
||||
<p>
|
||||
will match <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widgets which are contained in any kind of menu item.</p>
|
||||
<p>So, if you have a <a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> named <code class="literal">"myentry"</code>, inside of a horizontal
|
||||
@ -369,17 +353,9 @@ box in a window named <code class="literal">"mywindow"</code>, then the widget p
|
||||
<p>Matching against class is a little different. The pattern match is done
|
||||
against all class names in the widgets class hierarchy (not the layout
|
||||
hierarchy) in sequence, so the pattern:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">class </span><span class="string">"GtkButton"</span><span class="normal"> style </span><span class="string">"my-style"</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
class "GtkButton" style "my-style"
|
||||
</pre></div>
|
||||
<p>
|
||||
will match not just <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widgets, but also <a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a> and
|
||||
<a class="link" href="GtkCheckButton.html" title="GtkCheckButton"><span class="type">GtkCheckButton</span></a> widgets, since those classes derive from <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.</p>
|
||||
@ -436,38 +412,18 @@ This reduces the overall amount of RC styles that have to be considered
|
||||
for a match across a group of applications.</p></li>
|
||||
<li class="listitem">
|
||||
<p>Merge multiple styles which use the same matching rule, for instance:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">style </span><span class="string">"Foo"</span><span class="normal"> </span><span class="cbracket">{</span><span class="normal"> foo_content </span><span class="cbracket">}</span>
|
||||
<span class="normal">class </span><span class="string">"X"</span><span class="normal"> style </span><span class="string">"Foo"</span>
|
||||
<span class="normal">style </span><span class="string">"Bar"</span><span class="normal"> </span><span class="cbracket">{</span><span class="normal"> bar_content </span><span class="cbracket">}</span>
|
||||
<span class="normal">class </span><span class="string">"X"</span><span class="normal"> style </span><span class="string">"Bar"</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
style "Foo" { foo_content }
|
||||
class "X" style "Foo"
|
||||
style "Bar" { bar_content }
|
||||
class "X" style "Bar"
|
||||
</pre></div>
|
||||
<p>
|
||||
is faster to match as:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">style </span><span class="string">"FooBar"</span><span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="usertype">foo_content</span><span class="normal"> bar_content </span><span class="cbracket">}</span>
|
||||
<span class="normal">class </span><span class="string">"X"</span><span class="normal"> style </span><span class="string">"FooBar"</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
style "FooBar" { foo_content bar_content }
|
||||
class "X" style "FooBar"
|
||||
</pre></div>
|
||||
<p></p>
|
||||
</li>
|
||||
<li class="listitem"><p>Use of wildcards should be avoided, this can reduce the individual RC style
|
||||
@ -617,9 +573,9 @@ elements are:</p>
|
||||
pixmap</code></p>
|
||||
<p> Sets a background pixmap to be used in place of the <code class="literal">bg</code> color
|
||||
(or for <span class="type">GtkText</span>, in place of the <code class="literal">base</code> color. The special
|
||||
value <code class="literal">"&lt;parent>"</code> may be used to indicate that the widget should
|
||||
value <code class="literal">"<parent>"</code> may be used to indicate that the widget should
|
||||
use the same background pixmap as its parent. The special value
|
||||
<code class="literal">"&lt;none>"</code> may be used to indicate no background pixmap.</p>
|
||||
<code class="literal">"<none>"</code> may be used to indicate no background pixmap.</p>
|
||||
</li>
|
||||
<li class="listitem">
|
||||
<p><code class="literal">font = font</code></p>
|
||||
@ -735,21 +691,11 @@ colors. The following expressions are currently supported:</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
<p>Here are some examples of color expressions:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="function">mix</span><span class="normal"> </span><span class="symbol">(</span><span class="number">0.5</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"red"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"blue"</span><span class="symbol">)</span>
|
||||
<span class="function">shade</span><span class="normal"> </span><span class="symbol">(</span><span class="number">1.5</span><span class="symbol">,</span><span class="normal"> </span><span class="function">mix</span><span class="normal"> </span><span class="symbol">(</span><span class="number">0.3</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"#0abbc0"</span><span class="symbol">,</span><span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="number">0.3</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.5</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.9</span><span class="normal"> </span><span class="cbracket">}</span><span class="symbol">))</span>
|
||||
<span class="function">lighter</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">@foreground</span><span class="symbol">)</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
mix (0.5, "red", "blue")
|
||||
shade (1.5, mix (0.3, "#0abbc0", { 0.3, 0.5, 0.9 }))
|
||||
lighter (@foreground)
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>In a <code class="literal">stock</code> definition, icon sources are specified as a
|
||||
4-tuple of image filename or icon name, text direction, widget state, and size, in that
|
||||
@ -762,96 +708,46 @@ The <code class="literal">*</code> character can be used as a
|
||||
wildcard, and if direction/state/size are omitted they default to
|
||||
<code class="literal">*</code>. So for example, the following specifies different icons to
|
||||
use for left-to-right and right-to-left languages:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">stock</span><span class="symbol">[</span><span class="string">"my-stock-item"</span><span class="symbol">]</span><span class="normal"> </span><span class="symbol">=</span>
|
||||
<span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"itemltr.png"</span><span class="symbol">,</span><span class="normal"> LTR</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="cbracket">}</span><span class="symbol">,</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"itemrtl.png"</span><span class="symbol">,</span><span class="normal"> RTL</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="cbracket">}</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
stock["my-stock-item"] =
|
||||
{
|
||||
{ "itemltr.png", LTR, *, * },
|
||||
{ "itemrtl.png", RTL, *, * }
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>This could be abbreviated as follows:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">stock</span><span class="symbol">[</span><span class="string">"my-stock-item"</span><span class="symbol">]</span><span class="normal"> </span><span class="symbol">=</span>
|
||||
<span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"itemltr.png"</span><span class="symbol">,</span><span class="normal"> LTR </span><span class="cbracket">}</span><span class="symbol">,</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"itemrtl.png"</span><span class="symbol">,</span><span class="normal"> RTL </span><span class="cbracket">}</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
stock["my-stock-item"] =
|
||||
{
|
||||
{ "itemltr.png", LTR },
|
||||
{ "itemrtl.png", RTL }
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>You can specify custom icons for specific sizes, as follows:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">stock</span><span class="symbol">[</span><span class="string">"my-stock-item"</span><span class="symbol">]</span><span class="normal"> </span><span class="symbol">=</span>
|
||||
<span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"itemmenusize.png"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*,</span><span class="normal"> </span><span class="symbol">*,</span><span class="normal"> </span><span class="string">"gtk-menu"</span><span class="normal"> </span><span class="cbracket">}</span><span class="symbol">,</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"itemtoolbarsize.png"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*,</span><span class="normal"> </span><span class="symbol">*,</span><span class="normal"> </span><span class="string">"gtk-large-toolbar"</span><span class="normal"> </span><span class="cbracket">}</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"itemgeneric.png"</span><span class="normal"> </span><span class="cbracket">}</span><span class="normal"> </span><span class="comment">// implicit *, *, * as a fallback</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
stock["my-stock-item"] =
|
||||
{
|
||||
{ "itemmenusize.png", *, *, "gtk-menu" },
|
||||
{ "itemtoolbarsize.png", *, *, "gtk-large-toolbar" }
|
||||
{ "itemgeneric.png" } // implicit *, *, * as a fallback
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>The sizes that come with GTK+ itself are <code class="literal">"gtk-menu"</code>,
|
||||
<code class="literal">"gtk-small-toolbar"</code>, <code class="literal">"gtk-large-toolbar"</code>,
|
||||
<code class="literal">"gtk-button"</code>, <code class="literal">"gtk-dialog"</code>. Applications
|
||||
can define other sizes.</p>
|
||||
<p>It’s also possible to use custom icons for a given state, for example:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">stock</span><span class="symbol">[</span><span class="string">"my-stock-item"</span><span class="symbol">]</span><span class="normal"> </span><span class="symbol">=</span>
|
||||
<span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"itemprelight.png"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*,</span><span class="normal"> PRELIGHT </span><span class="cbracket">}</span><span class="symbol">,</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"iteminsensitive.png"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*,</span><span class="normal"> INSENSITIVE </span><span class="cbracket">}</span><span class="symbol">,</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"itemgeneric.png"</span><span class="normal"> </span><span class="cbracket">}</span><span class="normal"> </span><span class="comment">// implicit *, *, * as a fallback</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
stock["my-stock-item"] =
|
||||
{
|
||||
{ "itemprelight.png", *, PRELIGHT },
|
||||
{ "iteminsensitive.png", *, INSENSITIVE },
|
||||
{ "itemgeneric.png" } // implicit *, *, * as a fallback
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>When selecting an icon source to use, GTK+ will consider text direction most
|
||||
important, state second, and size third. It will select the best match based on
|
||||
@ -867,50 +763,36 @@ match the state and size the user requested.</p>
|
||||
<p>Key bindings allow the user to specify actions to be
|
||||
taken on particular key presses. The form of a binding
|
||||
set declaration is:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="usertype">binding</span><span class="normal"> name </span><span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="usertype">bind</span><span class="normal"> key </span><span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="function">signalname</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">param</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">...)</span>
|
||||
<span class="normal"> </span><span class="symbol">...</span>
|
||||
<span class="normal"> </span><span class="cbracket">}</span>
|
||||
<span class="normal"> </span><span class="symbol">...</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
binding name {
|
||||
bind key {
|
||||
signalname (param, ...)
|
||||
...
|
||||
}
|
||||
...
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p><code class="literal">key</code> is a string consisting of a series of modifiers followed by
|
||||
the name of a key. The modifiers can be:</p>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem"><p><code class="literal">&lt;alt></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;ctl></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;control></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;meta></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;hyper></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;super></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;mod1></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;mod2></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;mod3></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;mod4></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;mod5></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;release></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;shft></code></p></li>
|
||||
<li class="listitem"><p><code class="literal">&lt;shift></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><alt></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><ctl></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><control></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><meta></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><hyper></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><super></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><mod1></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><mod2></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><mod3></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><mod4></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><mod5></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><release></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><shft></code></p></li>
|
||||
<li class="listitem"><p><code class="literal"><shift></code></p></li>
|
||||
</ul></div>
|
||||
<p><code class="literal">&lt;shft></code> is an alias for <code class="literal">&lt;shift></code>, <code class="literal">&lt;ctl></code> is an alias for
|
||||
<code class="literal">&lt;control></code>, and <code class="literal">&lt;alt></code> is an alias for <code class="literal">&lt;mod1></code>.</p>
|
||||
<p><code class="literal"><shft></code> is an alias for <code class="literal"><shift></code>, <code class="literal"><ctl></code> is an alias for
|
||||
<code class="literal"><control></code>, and <code class="literal"><alt></code> is an alias for <code class="literal"><mod1></code>.</p>
|
||||
<p>The action that is bound to the key is a sequence of signal names
|
||||
(strings) followed by parameters for each signal. The signals must
|
||||
be action signals. (See <code class="function">g_signal_new()</code>). Each parameter can be a
|
||||
@ -968,7 +850,7 @@ created.)</p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-get-style.returns"></a><h4>Returns</h4>
|
||||
<p>the resulting style. No refcount is added
|
||||
<p> the resulting style. No refcount is added
|
||||
to the returned style, so if you want to save this style around,
|
||||
you should add a reference yourself. </p>
|
||||
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
@ -992,25 +874,13 @@ when creating pseudo-widgets that should be themed like widgets but
|
||||
don’t actually have corresponding GTK+ widgets. An example of this
|
||||
would be items inside a GNOME canvas widget.</p>
|
||||
<p>The action of <a class="link" href="gtk3-Resource-Files.html#gtk-rc-get-style" title="gtk_rc_get_style ()"><code class="function">gtk_rc_get_style()</code></a> is similar to:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="GtkWidget.html#gtk-widget-path">gtk_widget_path</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span>
|
||||
<span class="function"><a href="GtkWidget.html#gtk-widget-class-path">gtk_widget_class_path</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">class_path</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">);</span>
|
||||
<span class="function"><a href="gtk3-Resource-Files.html#gtk-rc-get-style-by-paths">gtk_rc_get_style_by_paths</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GtkWidget.html#gtk-widget-get-settings">gtk_widget_get_settings</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">),</span>
|
||||
<span class="normal"> path</span><span class="symbol">,</span><span class="normal"> class_path</span><span class="symbol">,</span>
|
||||
<span class="normal"> </span><span class="function">G_OBJECT_TYPE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">));</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
gtk_widget_path (widget, NULL, &path, NULL);
|
||||
gtk_widget_class_path (widget, NULL, &class_path, NULL);
|
||||
gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget),
|
||||
path, class_path,
|
||||
G_OBJECT_TYPE (widget));
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-get-style-by-paths.parameters"></a><h4>Parameters</h4>
|
||||
@ -1028,13 +898,13 @@ would be items inside a GNOME canvas widget.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>widget_path</p></td>
|
||||
<td class="parameter_description"><p>the widget path to use when looking up the
|
||||
<td class="parameter_description"><p> the widget path to use when looking up the
|
||||
style, or <code class="literal">NULL</code> if no matching against the widget path should be done. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>class_path</p></td>
|
||||
<td class="parameter_description"><p>the class path to use when looking up the style,
|
||||
<td class="parameter_description"><p> the class path to use when looking up the style,
|
||||
or <code class="literal">NULL</code> if no matching against the class path should be done. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -1049,7 +919,7 @@ when matching against class styles, or <span class="type">G_TYPE_NONE</span></p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-get-style-by-paths.returns"></a><h4>Returns</h4>
|
||||
<p>A style created by matching
|
||||
<p> A style created by matching
|
||||
with the supplied paths, or <code class="literal">NULL</code> if nothing matching was
|
||||
specified and the default style should be used. The returned
|
||||
value is owned by GTK+ as part of an internal cache, so you
|
||||
@ -1226,7 +1096,7 @@ end of <a class="link" href="gtk3-General.html#gtk-init" title="gtk_init ()"><c
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>filename</p></td>
|
||||
<td class="parameter_description"><p>the pathname to the file. If <em class="parameter"><code>filename</code></em>
|
||||
<td class="parameter_description"><p> the pathname to the file. If <em class="parameter"><code>filename</code></em>
|
||||
is not absolute, it is searched in the current directory. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></td>
|
||||
</tr></tbody>
|
||||
@ -1246,7 +1116,7 @@ gtk_rc_get_default_files (<em class="parameter"><code><span class="type">void</s
|
||||
at the end of <a class="link" href="gtk3-General.html#gtk-init" title="gtk_init ()"><code class="function">gtk_init()</code></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-get-default-files.returns"></a><h4>Returns</h4>
|
||||
<p>A <code class="literal">NULL</code>-terminated array of filenames. This memory is owned
|
||||
<p> A <code class="literal">NULL</code>-terminated array of filenames. This memory is owned
|
||||
by GTK+ and must not be freed by the application. If you want
|
||||
to store this information, you should make a copy. </p>
|
||||
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> filename]</span></p>
|
||||
@ -1273,7 +1143,7 @@ end of <a class="link" href="gtk3-General.html#gtk-init" title="gtk_init ()"><c
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>filenames</p></td>
|
||||
<td class="parameter_description"><p>A
|
||||
<td class="parameter_description"><p> A
|
||||
<code class="literal">NULL</code>-terminated list of filenames. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> filename]</span></td>
|
||||
</tr></tbody>
|
||||
@ -1310,7 +1180,7 @@ order to support symbolic colors.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>color</p></td>
|
||||
<td class="parameter_description"><p>a pointer to a <span class="type">GdkColor</span> in which to store
|
||||
<td class="parameter_description"><p> a pointer to a <span class="type">GdkColor</span> in which to store
|
||||
the result. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -1354,12 +1224,12 @@ references to symbolic colors.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>style</p></td>
|
||||
<td class="parameter_description"><p>a <a class="link" href="gtk3-Resource-Files.html#GtkRcStyle"><span class="type">GtkRcStyle</span></a>, or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_description"><p> a <a class="link" href="gtk3-Resource-Files.html#GtkRcStyle"><span class="type">GtkRcStyle</span></a>, or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>color</p></td>
|
||||
<td class="parameter_description"><p>a pointer to a <span class="type">GdkColor</span> in which to store
|
||||
<td class="parameter_description"><p> a pointer to a <span class="type">GdkColor</span> in which to store
|
||||
the result. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -1401,7 +1271,7 @@ in a RC file.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>state</p></td>
|
||||
<td class="parameter_description"><p>A pointer to a <a class="link" href="GtkWidget.html#GtkStateType" title="enum GtkStateType"><span class="type">GtkStateType</span></a> variable in which to
|
||||
<td class="parameter_description"><p> A pointer to a <a class="link" href="GtkWidget.html#GtkStateType" title="enum GtkStateType"><span class="type">GtkStateType</span></a> variable in which to
|
||||
store the result. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -1483,7 +1353,7 @@ is not useful for applications and should not be used.</p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-find-module-in-path.returns"></a><h4>Returns</h4>
|
||||
<p>The filename, if found (must be
|
||||
<p> The filename, if found (must be
|
||||
freed with <code class="function">g_free()</code>), otherwise <code class="literal">NULL</code>. </p>
|
||||
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></p>
|
||||
</div>
|
||||
@ -1532,7 +1402,7 @@ warning message, or <code class="literal">NULL</code></p></td>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-find-pixmap-in-path.returns"></a><h4>Returns</h4>
|
||||
<p>the filename. </p>
|
||||
<p> the filename. </p>
|
||||
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -1550,7 +1420,7 @@ For full information about the search for theme engines,
|
||||
see the docs for <code class="literal">GTK_PATH</code> in <a class="link" href="gtk-running.html" title="Running GTK+ Applications">Running GTK+ Applications</a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-get-module-dir.returns"></a><h4>Returns</h4>
|
||||
<p>the directory. (Must be freed with <code class="function">g_free()</code>). </p>
|
||||
<p> the directory. (Must be freed with <code class="function">g_free()</code>). </p>
|
||||
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -1570,7 +1440,7 @@ function is useful solely for utilities supplied with GTK+ and should
|
||||
not be used by applications under normal circumstances.</p>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-get-im-module-path.returns"></a><h4>Returns</h4>
|
||||
<p>a newly-allocated string containing the
|
||||
<p> a newly-allocated string containing the
|
||||
path in which to look for IM modules. </p>
|
||||
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></p>
|
||||
</div>
|
||||
@ -1589,7 +1459,7 @@ of the <code class="literal">GTK_IM_MODULE_FILE</code>
|
||||
environment variable for more details.</p>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-get-im-module-file.returns"></a><h4>Returns</h4>
|
||||
<p>a newly-allocated string containing the
|
||||
<p> a newly-allocated string containing the
|
||||
name of the file listing the IM modules available for loading. </p>
|
||||
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename]</span></p>
|
||||
</div>
|
||||
@ -1656,7 +1526,7 @@ derived from <a class="link" href="gtk3-Resource-Files.html#GtkRcStyle"><span cl
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-rc-style-copy.returns"></a><h4>Returns</h4>
|
||||
<p>the resulting <a class="link" href="gtk3-Resource-Files.html#GtkRcStyle"><span class="type">GtkRcStyle</span></a>. </p>
|
||||
<p> the resulting <a class="link" href="gtk3-Resource-Files.html#GtkRcStyle"><span class="type">GtkRcStyle</span></a>. </p>
|
||||
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -2266,6 +2136,6 @@ See also <a class="link" href="gtk3-Bindings.html#gtk-binding-set-add-path" titl
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.27</div>
|
||||
<hr>Generated by GTK-Doc V1.25</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user