1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GimpWidgetsUtils: GIMP Widgets Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GIMP Widgets Library Reference Manual">
<link rel="up" href="libgimpwidgets-utils.html" title="Part VI. GIMP Widgets Utilities">
<link rel="prev" href="libgimpwidgets-GimpWidgets.html" title="GimpWidgets">
<link rel="next" href="libgimpwidgets-deprecated.html" title="Part VII. Deprecated API">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libgimpwidgets-GimpWidgetsUtils.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libgimpwidgets-utils.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libgimpwidgets-GimpWidgets.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgimpwidgets-deprecated.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgimpwidgets-GimpWidgetsUtils"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgimpwidgets-GimpWidgetsUtils.top_of_page"></a>GimpWidgetsUtils</span></h2>
<p>GimpWidgetsUtils — A collection of helper functions.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgimpwidgets-GimpWidgetsUtils.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">GtkWidget</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpwidgets-GimpWidgetsUtils.html#gimp-table-attach-aligned" title="gimp_table_attach_aligned ()">gimp_table_attach_aligned</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpwidgets-GimpWidgetsUtils.html#gimp-label-set-attributes" title="gimp_label_set_attributes ()">gimp_label_set_attributes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="libgimpwidgets-GimpWidgetsUtils.html#gimp-widget-get-monitor" title="gimp_widget_get_monitor ()">gimp_widget_get_monitor</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="libgimpwidgets-GimpWidgetsUtils.html#gimp-get-monitor-at-pointer" title="gimp_get_monitor_at_pointer ()">gimp_get_monitor_at_pointer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpwidgets-GimpWidgetsUtils.html#gimp-widget-track-monitor" title="gimp_widget_track_monitor ()">gimp_widget_track_monitor</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GimpColorProfile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpwidgets-GimpWidgetsUtils.html#gimp-screen-get-color-profile" title="gimp_screen_get_color_profile ()">gimp_screen_get_color_profile</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GimpColorProfile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpwidgets-GimpWidgetsUtils.html#gimp-widget-get-color-profile" title="gimp_widget_get_color_profile ()">gimp_widget_get_color_profile</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GimpColorTransform</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpwidgets-GimpWidgetsUtils.html#gimp-widget-get-color-transform" title="gimp_widget_get_color_transform ()">gimp_widget_get_color_transform</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgimpwidgets-GimpWidgetsUtils.description"></a><h2>Description</h2>
<p>A collection of helper functions.</p>
</div>
<div class="refsect1">
<a name="libgimpwidgets-GimpWidgetsUtils.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-table-attach-aligned"></a><h3>gimp_table_attach_aligned ()</h3>
<pre class="programlisting"><span class="returnvalue">GtkWidget</span> *
gimp_table_attach_aligned (<em class="parameter"><code><span class="type">GtkTable</span> *table</code></em>,
<em class="parameter"><code><span class="type">gint</span> column</code></em>,
<em class="parameter"><code><span class="type">gint</span> row</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *label_text</code></em>,
<em class="parameter"><code><span class="type">gfloat</span> xalign</code></em>,
<em class="parameter"><code><span class="type">gfloat</span> yalign</code></em>,
<em class="parameter"><code><span class="type">GtkWidget</span> *widget</code></em>,
<em class="parameter"><code><span class="type">gint</span> colspan</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> left_align</code></em>);</pre>
<p>Note that the <em class="parameter"><code>label_text</code></em>
can be <code class="literal">NULL</code> and that the widget will be
attached starting at (<em class="parameter"><code>column</code></em>
+ 1) in this case, too.</p>
<div class="refsect3">
<a name="gimp-table-attach-aligned.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>table</p></td>
<td class="parameter_description"><p>The <span class="type">GtkTable</span> the widgets will be attached to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>column</p></td>
<td class="parameter_description"><p>The column to start with.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row</p></td>
<td class="parameter_description"><p>The row to attach the widgets.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>label_text</p></td>
<td class="parameter_description"><p>The text for the <span class="type">GtkLabel</span> which will be attached left of
the widget.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>xalign</p></td>
<td class="parameter_description"><p>The horizontal alignment of the <span class="type">GtkLabel</span>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>yalign</p></td>
<td class="parameter_description"><p>The vertical alignment of the <span class="type">GtkLabel</span>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>widget</p></td>
<td class="parameter_description"><p>The <span class="type">GtkWidget</span> to attach right of the label.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>colspan</p></td>
<td class="parameter_description"><p>The number of columns the widget will use.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>left_align</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> if the widget should be left-aligned.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-table-attach-aligned.returns"></a><h4>Returns</h4>
<p> The created <span class="type">GtkLabel</span>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-label-set-attributes"></a><h3>gimp_label_set_attributes ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_label_set_attributes (<em class="parameter"><code><span class="type">GtkLabel</span> *label</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Sets Pango attributes on a <span class="type">GtkLabel</span> in a more convenient way than
<code class="function">gtk_label_set_attributes()</code>.</p>
<p>This function is useful if you want to change the font attributes
of a <span class="type">GtkLabel</span>. This is an alternative to using PangoMarkup which
is slow to parse and awkward to handle in an i18n-friendly way.</p>
<p>The attributes are set on the complete label, from start to end. If
you need to set attributes on part of the label, you will have to
use the PangoAttributes API directly.</p>
<div class="refsect3">
<a name="gimp-label-set-attributes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>label</p></td>
<td class="parameter_description"><p>a <span class="type">GtkLabel</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a list of PangoAttrType and value pairs terminated by -1.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-widget-get-monitor"></a><h3>gimp_widget_get_monitor ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gimp_widget_get_monitor (<em class="parameter"><code><span class="type">GtkWidget</span> *widget</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gimp-get-monitor-at-pointer"></a><h3>gimp_get_monitor_at_pointer ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gimp_get_monitor_at_pointer (<em class="parameter"><code><span class="type">GdkScreen</span> **screen</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gimp-widget-track-monitor"></a><h3>gimp_widget_track_monitor ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_widget_track_monitor (<em class="parameter"><code><span class="type">GtkWidget</span> *widget</code></em>,
<em class="parameter"><code><span class="type">GCallback</span> monitor_changed_callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>This function behaves as if <span class="type">GtkWidget</span> had a signal</p>
<p>GtkWidget::monitor_changed(GtkWidget *widget, gpointer user_data)</p>
<p>That is emitted whenever <em class="parameter"><code>widget</code></em>
's toplevel window is moved from
one monitor to another. This function automatically connects to
the right toplevel <span class="type">GtkWindow</span>, even across moving <em class="parameter"><code>widget</code></em>
between
toplevel windows.</p>
<p>Note that this function tracks the toplevel, not <em class="parameter"><code>widget</code></em>
itself, so
all a window's widgets are always considered to be on the same
monitor. This is because this function is mainly used for fetching
the new monitor's color profile, and it makes little sense to use
different profiles for the widgets of one window.</p>
<div class="refsect3">
<a name="gimp-widget-track-monitor.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>widget</p></td>
<td class="parameter_description"><p>a <span class="type">GtkWidget</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>monitor_changed_callback</p></td>
<td class="parameter_description"><p>the callback when <em class="parameter"><code>widget</code></em>
's monitor changes</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>data passed to <em class="parameter"><code>monitor_changed_callback</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-screen-get-color-profile"></a><h3>gimp_screen_get_color_profile ()</h3>
<pre class="programlisting"><span class="returnvalue">GimpColorProfile</span> *
gimp_screen_get_color_profile (<em class="parameter"><code><span class="type">GdkScreen</span> *screen</code></em>,
<em class="parameter"><code><span class="type">gint</span> monitor</code></em>);</pre>
<p>This function returns the <span class="type">GimpColorProfile</span> of monitor number <em class="parameter"><code>monitor</code></em>
of <em class="parameter"><code>screen</code></em>
, or <code class="literal">NULL</code> if there is no profile configured.</p>
<div class="refsect3">
<a name="gimp-screen-get-color-profile.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>screen</p></td>
<td class="parameter_description"><p>a <span class="type">GdkScreen</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>monitor</p></td>
<td class="parameter_description"><p>the monitor number</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-screen-get-color-profile.returns"></a><h4>Returns</h4>
<p> the monitor's <span class="type">GimpColorProfile</span>, or <code class="literal">NULL</code>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-widget-get-color-profile"></a><h3>gimp_widget_get_color_profile ()</h3>
<pre class="programlisting"><span class="returnvalue">GimpColorProfile</span> *
gimp_widget_get_color_profile (<em class="parameter"><code><span class="type">GtkWidget</span> *widget</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gimp-widget-get-color-transform"></a><h3>gimp_widget_get_color_transform ()</h3>
<pre class="programlisting"><span class="returnvalue">GimpColorTransform</span> *
gimp_widget_get_color_transform (<em class="parameter"><code><span class="type">GtkWidget</span> *widget</code></em>,
<em class="parameter"><code><span class="type">GimpColorConfig</span> *config</code></em>,
<em class="parameter"><code><span class="type">GimpColorProfile</span> *src_profile</code></em>,
<em class="parameter"><code>const <span class="type">Babl</span> *src_format</code></em>,
<em class="parameter"><code>const <span class="type">Babl</span> *dest_format</code></em>);</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>
|