~ubuntu-branches/ubuntu/trusty/gnome-shell/trusty-proposed

« back to all changes in this revision

Viewing changes to docs/reference/st/html/st-st-theme-context.html

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-03-14 13:47:20 UTC
  • mfrom: (1.1.36) (18.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20120314134720-202sbjbu4a3z1fru
Tags: 3.3.90-0ubuntu1
* Sync with Debian experimental svn packaging (LP: #941755, #937709).
  Remaining changes:
  - debian/gnome-shell.gsettings-override: Update for Ubuntu defaults
  - debian/control.in: Recommend cups-pk-helper
  - debian/patches/10-make-NetworkManager-optional.patch: Disabled
  - Don't run dh-autoreconf

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>st-theme-context</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 
7
<link rel="home" href="index.html" title="St Reference Manual">
 
8
<link rel="up" href="styling.html" title="Styling">
 
9
<link rel="prev" href="st-st-theme.html" title="st-theme">
 
10
<link rel="next" href="st-st-theme-node.html" title="st-theme-node">
 
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
 
17
<td><a accesskey="p" href="st-st-theme.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
18
<td><a accesskey="u" href="styling.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
20
<th width="100%" align="center">St Reference Manual</th>
 
21
<td><a accesskey="n" href="st-st-theme-node.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#st-st-theme-context.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#st-st-theme-context.description" class="shortcut">Description</a>
 
27
</td></tr>
 
28
</table>
 
29
<div class="refentry">
 
30
<a name="st-st-theme-context"></a><div class="titlepage"></div>
 
31
<div class="refnamediv"><table width="100%"><tr>
 
32
<td valign="top">
 
33
<h2><span class="refentrytitle"><a name="st-st-theme-context.top_of_page"></a>st-theme-context</span></h2>
 
34
<p>st-theme-context — holds global information about a tree of styled objects</p>
 
35
</td>
 
36
<td valign="top" align="right"></td>
 
37
</tr></table></div>
 
38
<div class="refsynopsisdiv">
 
39
<a name="st-st-theme-context.synopsis"></a><h2>Synopsis</h2>
 
40
<pre class="synopsis">                    <a class="link" href="st-st-theme-context.html#StThemeContextClass" title="StThemeContextClass">StThemeContextClass</a>;
 
41
const <span class="returnvalue">PangoFontDescription</span> * <a class="link" href="st-st-theme-context.html#st-theme-context-get-font" title="st_theme_context_get_font ()">st_theme_context_get_font</a>  (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);
 
42
<a class="link" href="st-st-theme-node.html#StThemeContext"><span class="returnvalue">StThemeContext</span></a> *    <a class="link" href="st-st-theme-context.html#st-theme-context-get-for-stage" title="st_theme_context_get_for_stage ()">st_theme_context_get_for_stage</a>      (<em class="parameter"><code><span class="type">ClutterStage</span> *stage</code></em>);
 
43
<span class="returnvalue">double</span>              <a class="link" href="st-st-theme-context.html#st-theme-context-get-resolution" title="st_theme_context_get_resolution ()">st_theme_context_get_resolution</a>     (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);
 
44
<a class="link" href="st-st-theme-node.html#StThemeNode"><span class="returnvalue">StThemeNode</span></a> *       <a class="link" href="st-st-theme-context.html#st-theme-context-get-root-node" title="st_theme_context_get_root_node ()">st_theme_context_get_root_node</a>      (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);
 
45
<a class="link" href="st-st-theme-node.html#StTheme"><span class="returnvalue">StTheme</span></a> *           <a class="link" href="st-st-theme-context.html#st-theme-context-get-theme" title="st_theme_context_get_theme ()">st_theme_context_get_theme</a>          (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);
 
46
<a class="link" href="st-st-theme-node.html#StThemeContext"><span class="returnvalue">StThemeContext</span></a> *    <a class="link" href="st-st-theme-context.html#st-theme-context-new" title="st_theme_context_new ()">st_theme_context_new</a>                (<em class="parameter"><code><span class="type">void</span></code></em>);
 
47
<span class="returnvalue">void</span>                <a class="link" href="st-st-theme-context.html#st-theme-context-set-default-resolution" title="st_theme_context_set_default_resolution ()">st_theme_context_set_default_resolution</a>
 
48
                                                        (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);
 
49
<span class="returnvalue">void</span>                <a class="link" href="st-st-theme-context.html#st-theme-context-set-font" title="st_theme_context_set_font ()">st_theme_context_set_font</a>           (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>,
 
50
                                                         <em class="parameter"><code>const <span class="type">PangoFontDescription</span> *font</code></em>);
 
51
<span class="returnvalue">void</span>                <a class="link" href="st-st-theme-context.html#st-theme-context-set-resolution" title="st_theme_context_set_resolution ()">st_theme_context_set_resolution</a>     (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>,
 
52
                                                         <em class="parameter"><code><span class="type">gdouble</span> resolution</code></em>);
 
53
<span class="returnvalue">void</span>                <a class="link" href="st-st-theme-context.html#st-theme-context-set-theme" title="st_theme_context_set_theme ()">st_theme_context_set_theme</a>          (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>,
 
54
                                                         <em class="parameter"><code><a class="link" href="st-st-theme-node.html#StTheme"><span class="type">StTheme</span></a> *theme</code></em>);
 
55
</pre>
 
56
</div>
 
57
<div class="refsect1">
 
58
<a name="st-st-theme-context.description"></a><h2>Description</h2>
 
59
<p>
 
60
<a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> is responsible for managing information global to a tree of styled objects,
 
61
such as the set of stylesheets or the default font. In normal usage, a <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a>
 
62
is bound to a <span class="type">ClutterStage</span>; a singleton <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> can be obtained for a <span class="type">ClutterStage</span>
 
63
by using <a class="link" href="st-st-theme-context.html#st-theme-context-get-for-stage" title="st_theme_context_get_for_stage ()"><code class="function">st_theme_context_get_for_stage()</code></a>.
 
64
</p>
 
65
</div>
 
66
<div class="refsect1">
 
67
<a name="st-st-theme-context.details"></a><h2>Details</h2>
 
68
<div class="refsect2">
 
69
<a name="StThemeContextClass"></a><h3>StThemeContextClass</h3>
 
70
<pre class="programlisting">typedef struct _StThemeContextClass StThemeContextClass;</pre>
 
71
</div>
 
72
<hr>
 
73
<div class="refsect2">
 
74
<a name="st-theme-context-get-font"></a><h3>st_theme_context_get_font ()</h3>
 
75
<pre class="programlisting">const <span class="returnvalue">PangoFontDescription</span> * st_theme_context_get_font  (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);</pre>
 
76
<p>
 
77
Gets the default font for the theme context. See <a class="link" href="st-st-theme-context.html#st-theme-context-set-font" title="st_theme_context_set_font ()"><code class="function">st_theme_context_set_font()</code></a>.
 
78
</p>
 
79
<div class="variablelist"><table border="0">
 
80
<col align="left" valign="top">
 
81
<tbody>
 
82
<tr>
 
83
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
 
84
<td>a <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a>
 
85
</td>
 
86
</tr>
 
87
<tr>
 
88
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
89
<td>the default font for the theme context.</td>
 
90
</tr>
 
91
</tbody>
 
92
</table></div>
 
93
</div>
 
94
<hr>
 
95
<div class="refsect2">
 
96
<a name="st-theme-context-get-for-stage"></a><h3>st_theme_context_get_for_stage ()</h3>
 
97
<pre class="programlisting"><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="returnvalue">StThemeContext</span></a> *    st_theme_context_get_for_stage      (<em class="parameter"><code><span class="type">ClutterStage</span> *stage</code></em>);</pre>
 
98
<p>
 
99
Gets a singleton theme context associated with the stage.
 
100
</p>
 
101
<div class="variablelist"><table border="0">
 
102
<col align="left" valign="top">
 
103
<tbody>
 
104
<tr>
 
105
<td><p><span class="term"><em class="parameter"><code>stage</code></em> :</span></p></td>
 
106
<td>a <span class="type">ClutterStage</span>
 
107
</td>
 
108
</tr>
 
109
<tr>
 
110
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
111
<td>the singleton theme context for the stage. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
112
</td>
 
113
</tr>
 
114
</tbody>
 
115
</table></div>
 
116
</div>
 
117
<hr>
 
118
<div class="refsect2">
 
119
<a name="st-theme-context-get-resolution"></a><h3>st_theme_context_get_resolution ()</h3>
 
120
<pre class="programlisting"><span class="returnvalue">double</span>              st_theme_context_get_resolution     (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);</pre>
 
121
<p>
 
122
Gets the current resolution of the theme context.
 
123
See <a class="link" href="st-st-theme-context.html#st-theme-context-set-resolution" title="st_theme_context_set_resolution ()"><code class="function">st_theme_context_set_resolution()</code></a>.
 
124
</p>
 
125
<div class="variablelist"><table border="0">
 
126
<col align="left" valign="top">
 
127
<tbody>
 
128
<tr>
 
129
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
 
130
<td>a <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a>
 
131
</td>
 
132
</tr>
 
133
<tr>
 
134
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
135
<td>the resolution (in dots-per-"inch")</td>
 
136
</tr>
 
137
</tbody>
 
138
</table></div>
 
139
</div>
 
140
<hr>
 
141
<div class="refsect2">
 
142
<a name="st-theme-context-get-root-node"></a><h3>st_theme_context_get_root_node ()</h3>
 
143
<pre class="programlisting"><a class="link" href="st-st-theme-node.html#StThemeNode"><span class="returnvalue">StThemeNode</span></a> *       st_theme_context_get_root_node      (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);</pre>
 
144
<p>
 
145
Gets the root node of the tree of theme style nodes that associated with this
 
146
context. For the node tree associated with a stage, this node represents
 
147
styles applied to the stage itself.
 
148
</p>
 
149
<div class="variablelist"><table border="0">
 
150
<col align="left" valign="top">
 
151
<tbody>
 
152
<tr>
 
153
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
 
154
<td>a <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a>
 
155
</td>
 
156
</tr>
 
157
<tr>
 
158
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
159
<td>the root node of the context's style tree. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
160
</td>
 
161
</tr>
 
162
</tbody>
 
163
</table></div>
 
164
</div>
 
165
<hr>
 
166
<div class="refsect2">
 
167
<a name="st-theme-context-get-theme"></a><h3>st_theme_context_get_theme ()</h3>
 
168
<pre class="programlisting"><a class="link" href="st-st-theme-node.html#StTheme"><span class="returnvalue">StTheme</span></a> *           st_theme_context_get_theme          (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);</pre>
 
169
<p>
 
170
Gets the default theme for the context. See <a class="link" href="st-st-theme-context.html#st-theme-context-set-theme" title="st_theme_context_set_theme ()"><code class="function">st_theme_context_set_theme()</code></a>
 
171
</p>
 
172
<div class="variablelist"><table border="0">
 
173
<col align="left" valign="top">
 
174
<tbody>
 
175
<tr>
 
176
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
 
177
<td>a <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a>
 
178
</td>
 
179
</tr>
 
180
<tr>
 
181
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
182
<td>the default theme for the context. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
183
</td>
 
184
</tr>
 
185
</tbody>
 
186
</table></div>
 
187
</div>
 
188
<hr>
 
189
<div class="refsect2">
 
190
<a name="st-theme-context-new"></a><h3>st_theme_context_new ()</h3>
 
191
<pre class="programlisting"><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="returnvalue">StThemeContext</span></a> *    st_theme_context_new                (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
192
<p>
 
193
Create a new theme context not associated with any <span class="type">ClutterStage</span>.
 
194
This can be useful in testing scenarios, or if using StThemeContext
 
195
with something other than <span class="type">ClutterActor</span> objects, but you generally
 
196
should use <a class="link" href="st-st-theme-context.html#st-theme-context-get-for-stage" title="st_theme_context_get_for_stage ()"><code class="function">st_theme_context_get_for_stage()</code></a> instead.
 
197
</p>
 
198
</div>
 
199
<hr>
 
200
<div class="refsect2">
 
201
<a name="st-theme-context-set-default-resolution"></a><h3>st_theme_context_set_default_resolution ()</h3>
 
202
<pre class="programlisting"><span class="returnvalue">void</span>                st_theme_context_set_default_resolution
 
203
                                                        (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>);</pre>
 
204
<p>
 
205
Sets the resolution of the theme context to the default value of 96.
 
206
See <a class="link" href="st-st-theme-context.html#st-theme-context-set-resolution" title="st_theme_context_set_resolution ()"><code class="function">st_theme_context_set_resolution()</code></a>.
 
207
</p>
 
208
<div class="variablelist"><table border="0">
 
209
<col align="left" valign="top">
 
210
<tbody><tr>
 
211
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
 
212
<td>a <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a>
 
213
</td>
 
214
</tr></tbody>
 
215
</table></div>
 
216
</div>
 
217
<hr>
 
218
<div class="refsect2">
 
219
<a name="st-theme-context-set-font"></a><h3>st_theme_context_set_font ()</h3>
 
220
<pre class="programlisting"><span class="returnvalue">void</span>                st_theme_context_set_font           (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>,
 
221
                                                         <em class="parameter"><code>const <span class="type">PangoFontDescription</span> *font</code></em>);</pre>
 
222
<p>
 
223
Sets the default font for the theme context. This is the font that
 
224
is inherited by the root node of the tree of theme nodes. If the
 
225
font is not overriden, then this font will be used. If the font is
 
226
partially modified (for example, with 'font-size: 110%', then that
 
227
modification is based on this font.
 
228
</p>
 
229
<div class="variablelist"><table border="0">
 
230
<col align="left" valign="top">
 
231
<tbody>
 
232
<tr>
 
233
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
 
234
<td>a <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a>
 
235
</td>
 
236
</tr>
 
237
<tr>
 
238
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
 
239
<td>the default font for theme context</td>
 
240
</tr>
 
241
</tbody>
 
242
</table></div>
 
243
</div>
 
244
<hr>
 
245
<div class="refsect2">
 
246
<a name="st-theme-context-set-resolution"></a><h3>st_theme_context_set_resolution ()</h3>
 
247
<pre class="programlisting"><span class="returnvalue">void</span>                st_theme_context_set_resolution     (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>,
 
248
                                                         <em class="parameter"><code><span class="type">gdouble</span> resolution</code></em>);</pre>
 
249
<p>
 
250
Sets the resolution of the theme context. This is the scale factor
 
251
used to convert between points and the length units pt, in, and cm.
 
252
This does not necessarily need to correspond to the actual number
 
253
resolution of the device. A value of 72. means that points and
 
254
pixels are identical. The default value is 96.
 
255
</p>
 
256
<div class="variablelist"><table border="0">
 
257
<col align="left" valign="top">
 
258
<tbody>
 
259
<tr>
 
260
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
 
261
<td>a <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a>
 
262
</td>
 
263
</tr>
 
264
<tr>
 
265
<td><p><span class="term"><em class="parameter"><code>resolution</code></em> :</span></p></td>
 
266
<td>resolution of the context (number of pixels in an "inch")</td>
 
267
</tr>
 
268
</tbody>
 
269
</table></div>
 
270
</div>
 
271
<hr>
 
272
<div class="refsect2">
 
273
<a name="st-theme-context-set-theme"></a><h3>st_theme_context_set_theme ()</h3>
 
274
<pre class="programlisting"><span class="returnvalue">void</span>                st_theme_context_set_theme          (<em class="parameter"><code><a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a> *context</code></em>,
 
275
                                                         <em class="parameter"><code><a class="link" href="st-st-theme-node.html#StTheme"><span class="type">StTheme</span></a> *theme</code></em>);</pre>
 
276
<p>
 
277
Sets the default set of theme stylesheets for the context. This theme will
 
278
be used for the root node and for nodes descending from it, unless some other
 
279
style is explicitely specified.
 
280
</p>
 
281
<div class="variablelist"><table border="0">
 
282
<col align="left" valign="top">
 
283
<tbody><tr>
 
284
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
 
285
<td>a <a class="link" href="st-st-theme-node.html#StThemeContext"><span class="type">StThemeContext</span></a>
 
286
</td>
 
287
</tr></tbody>
 
288
</table></div>
 
289
</div>
 
290
</div>
 
291
</div>
 
292
<div class="footer">
 
293
<hr>
 
294
          Generated by GTK-Doc V1.18.1</div>
 
295
</body>
 
296
</html>
 
 
b'\\ No newline at end of file'