File: GsfClipData.html

package info (click to toggle)
libgsf 1.14.18-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 5,444 kB
  • ctags: 2,831
  • sloc: ansic: 19,500; sh: 10,358; xml: 7,504; makefile: 494; perl: 35; python: 13
file content (351 lines) | stat: -rw-r--r-- 18,311 bytes parent folder | download
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GsfClipData</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GSF Reference Manual">
<link rel="up" href="parsers.html" title="Stream Parsers">
<link rel="prev" href="gsf-blobs.html" title="GsfBlob">
<link rel="next" href="misc.html" title="Miscellaneous">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="intro.html" title="Part I. GSF: Introduction">
<link rel="part" href="history.html" title="Part II. GSF: History">
<link rel="part" href="dependencies.html" title="Part III. GSF: Dependencies">
<link rel="part" href="gsf-users.html" title="Part IV. Projects using GSF">
<link rel="part" href="api.html" title="Part V. API Reference">
<link rel="chapter" href="io.html" title="Basic Input/Output">
<link rel="chapter" href="sources.html" title="Stream Sources">
<link rel="chapter" href="parsers.html" title="Stream Parsers">
<link rel="chapter" href="misc.html" title="Miscellaneous">
<link rel="index" href="gsf-index.html" title="Index">
</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="2">
<tr valign="middle">
<td><a accesskey="p" href="gsf-blobs.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="parsers.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GSF Reference Manual</th>
<td><a accesskey="n" href="misc.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GsfClipData.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#GsfClipData.description" class="shortcut">Description</a>
                 | 
                <a href="#GsfClipData.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry" title="GsfClipData">
<a name="GsfClipData"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GsfClipData.top_of_page"></a>GsfClipData</span></h2>
<p>GsfClipData</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="GsfClipData.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
enum                <a class="link" href="GsfClipData.html#GsfClipFormat" title="enum GsfClipFormat">GsfClipFormat</a>;
enum                <a class="link" href="GsfClipData.html#GsfClipFormatWindows" title="enum GsfClipFormatWindows">GsfClipFormatWindows</a>;
                    <a class="link" href="GsfClipData.html#GsfClipData-struct" title="GsfClipData">GsfClipData</a>;
                    <a class="link" href="GsfClipData.html#GsfClipDataClass" title="GsfClipDataClass">GsfClipDataClass</a>;
<a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *       <a class="link" href="GsfClipData.html#gsf-clip-data-new" title="gsf_clip_data_new ()">gsf_clip_data_new</a>                   (<a class="link" href="GsfClipData.html#GsfClipFormat" title="enum GsfClipFormat">GsfClipFormat</a> format,
                                                         <a class="link" href="gsf-blobs.html#GsfBlob">GsfBlob</a> *data_blob);
<a class="link" href="GsfClipData.html#GsfClipFormat" title="enum GsfClipFormat">GsfClipFormat</a>       <a class="link" href="GsfClipData.html#gsf-clip-data-get-format" title="gsf_clip_data_get_format ()">gsf_clip_data_get_format</a>            (<a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *clip_data);
<a class="link" href="gsf-blobs.html#GsfBlob">GsfBlob</a> *           <a class="link" href="GsfClipData.html#gsf-clip-data-get-data-blob" title="gsf_clip_data_get_data_blob ()">gsf_clip_data_get_data_blob</a>         (<a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *clip_data);
<a class="link" href="GsfClipData.html#GsfClipFormatWindows" title="enum GsfClipFormatWindows">GsfClipFormatWindows</a>  <a class="link" href="GsfClipData.html#gsf-clip-data-get-windows-clipboard-format" title="gsf_clip_data_get_windows_clipboard_format ()">gsf_clip_data_get_windows_clipboard_format</a>
                                                        (<a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *clip_data,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **error);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a>       <a class="link" href="GsfClipData.html#gsf-clip-data-peek-real-data" title="gsf_clip_data_peek_real_data ()">gsf_clip_data_peek_real_data</a>        (<a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *clip_data,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"
>gsize</a> *ret_size,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **error);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="GsfClipData.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----GsfClipData
</pre>
</div>
<div class="refsect1" title="Description">
<a name="GsfClipData.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="GsfClipData.details"></a><h2>Details</h2>
<div class="refsect2" title="enum GsfClipFormat">
<a name="GsfClipFormat"></a><h3>enum GsfClipFormat</h3>
<pre class="programlisting">typedef enum {
	GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD = -1,
	GSF_CLIP_FORMAT_MACINTOSH_CLIPBOARD = -2,
	GSF_CLIP_FORMAT_GUID = -3,
	GSF_CLIP_FORMAT_NO_DATA = 0,
	GSF_CLIP_FORMAT_CLIPBOARD_FORMAT_NAME = 1, /* in the file it's actually any positive integer */
	GSF_CLIP_FORMAT_UNKNOWN /* this is our own value for unknown types or invalid data */
} GsfClipFormat;
</pre>
<p>
</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GSF-CLIP-FORMAT-WINDOWS-CLIPBOARD--CAPS"></a><span class="term"><code class="literal">GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD</code></span></p></td>
<td> Windows clipboard format
</td>
</tr>
<tr>
<td><p><a name="GSF-CLIP-FORMAT-MACINTOSH-CLIPBOARD--CAPS"></a><span class="term"><code class="literal">GSF_CLIP_FORMAT_MACINTOSH_CLIPBOARD</code></span></p></td>
<td> Macintosh clipboard format
</td>
</tr>
<tr>
<td><p><a name="GSF-CLIP-FORMAT-GUID--CAPS"></a><span class="term"><code class="literal">GSF_CLIP_FORMAT_GUID</code></span></p></td>
<td> GUID that contains a format identifier
</td>
</tr>
<tr>
<td><p><a name="GSF-CLIP-FORMAT-NO-DATA--CAPS"></a><span class="term"><code class="literal">GSF_CLIP_FORMAT_NO_DATA</code></span></p></td>
<td> No clipboard data
</td>
</tr>
<tr>
<td><p><a name="GSF-CLIP-FORMAT-CLIPBOARD-FORMAT-NAME--CAPS"></a><span class="term"><code class="literal">GSF_CLIP_FORMAT_CLIPBOARD_FORMAT_NAME</code></span></p></td>
<td> Custom clipboard format
</td>
</tr>
<tr>
<td><p><a name="GSF-CLIP-FORMAT-UNKNOWN--CAPS"></a><span class="term"><code class="literal">GSF_CLIP_FORMAT_UNKNOWN</code></span></p></td>
<td> Unknown clipboard type or invalid data
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum GsfClipFormatWindows">
<a name="GsfClipFormatWindows"></a><h3>enum GsfClipFormatWindows</h3>
<pre class="programlisting">typedef enum {
	GSF_CLIP_FORMAT_WINDOWS_ERROR = -1,		/* our own value */
	GSF_CLIP_FORMAT_WINDOWS_UNKNOWN = -2,		/* our own value */
	GSF_CLIP_FORMAT_WINDOWS_METAFILE = 3,		/* CF_METAFILEPICT */
	GSF_CLIP_FORMAT_WINDOWS_DIB = 8,		/* CF_DIB */
	GSF_CLIP_FORMAT_WINDOWS_ENHANCED_METAFILE = 14	/* CF_ENHMETAFILE */
} GsfClipFormatWindows;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="GsfClipData">
<a name="GsfClipData-struct"></a><h3>GsfClipData</h3>
<pre class="programlisting">typedef struct _GsfClipData GsfClipData;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="GsfClipDataClass">
<a name="GsfClipDataClass"></a><h3>GsfClipDataClass</h3>
<pre class="programlisting">typedef struct {
	GObjectClass parent_class;
} GsfClipDataClass;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="gsf_clip_data_new ()">
<a name="gsf-clip-data-new"></a><h3>gsf_clip_data_new ()</h3>
<pre class="programlisting"><a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *       gsf_clip_data_new                   (<a class="link" href="GsfClipData.html#GsfClipFormat" title="enum GsfClipFormat">GsfClipFormat</a> format,
                                                         <a class="link" href="gsf-blobs.html#GsfBlob">GsfBlob</a> *data_blob);</pre>
<p>
Creates a new <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a> object.  This function acquires a reference to the
<em class="parameter"><code>data_blob</code></em>, so you should unref the blob on your own if you no longer need it
directly.</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>format</code></em> :</span></p></td>
<td> Format for the data inside the <em class="parameter"><code>data_blob</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data_blob</code></em> :</span></p></td>
<td> Object which holds the binary contents for the <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A newly-created <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gsf_clip_data_get_format ()">
<a name="gsf-clip-data-get-format"></a><h3>gsf_clip_data_get_format ()</h3>
<pre class="programlisting"><a class="link" href="GsfClipData.html#GsfClipFormat" title="enum GsfClipFormat">GsfClipFormat</a>       gsf_clip_data_get_format            (<a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *clip_data);</pre>
<p>
Queries the clipboard data format of a <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>.  The format refers to the data
blob inside the <em class="parameter"><code>clip_data</code></em>; use <a class="link" href="GsfClipData.html#gsf-clip-data-get-data-blob" title="gsf_clip_data_get_data_blob ()"><code class="function">gsf_clip_data_get_data_blob()</code></a> to get that data blob.</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>clip_data</code></em> :</span></p></td>
<td> A <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The format in which the <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>'s data blob is stored.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gsf_clip_data_get_data_blob ()">
<a name="gsf-clip-data-get-data-blob"></a><h3>gsf_clip_data_get_data_blob ()</h3>
<pre class="programlisting"><a class="link" href="gsf-blobs.html#GsfBlob">GsfBlob</a> *           gsf_clip_data_get_data_blob         (<a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *clip_data);</pre>
<p>
Queries the data blob that actually stores a <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>'s binary data.</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>clip_data</code></em> :</span></p></td>
<td> A <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A new reference to the <a class="link" href="gsf-blobs.html#GsfBlob"><span class="type">GsfBlob</span></a> that stores this <em class="parameter"><code>clip_data</code></em>'s
binary data.  You must use <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a> to dispose of that data blob when
you are done with it.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gsf_clip_data_get_windows_clipboard_format ()">
<a name="gsf-clip-data-get-windows-clipboard-format"></a><h3>gsf_clip_data_get_windows_clipboard_format ()</h3>
<pre class="programlisting"><a class="link" href="GsfClipData.html#GsfClipFormatWindows" title="enum GsfClipFormatWindows">GsfClipFormatWindows</a>  gsf_clip_data_get_windows_clipboard_format
                                                        (<a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *clip_data,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<p>
Queries the Windows clipboard data format for a <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>.  The <em class="parameter"><code>clip_data</code></em> must
have been created with <a class="link" href="GsfClipData.html#GSF-CLIP-FORMAT-WINDOWS-CLIPBOARD--CAPS"><span class="type">GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD</span></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>clip_data</code></em> :</span></p></td>
<td> A <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td> Location to store error, or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="GsfClipData.html#GsfClipFormatWindows" title="enum GsfClipFormatWindows"><span class="type">GsfClipFormatWindows</span></a> value.

Possible errors: <a class="link" href="gsf-utils.html#GSF-ERROR-INVALID-DATA--CAPS"><span class="type">GSF_ERROR_INVALID_DATA</span></a> if the data blob in the <em class="parameter"><code>clip_data</code></em> is
smaller than it should be; in this case GSF_CLIP_FORMAT_WINDOWS_ERROR will be returned.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gsf_clip_data_peek_real_data ()">
<a name="gsf-clip-data-peek-real-data"></a><h3>gsf_clip_data_peek_real_data ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a>       gsf_clip_data_peek_real_data        (<a class="link" href="GsfClipData.html" title="GsfClipData">GsfClipData</a> *clip_data,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"
>gsize</a> *ret_size,
                                                         <a
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<p>
Queries a pointer directly to the clipboard data of a <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>.  The
resulting pointer is not necessarily the same data pointer that was passed to
<a class="link" href="gsf-blobs.html#gsf-blob-new" title="gsf_blob_new ()"><code class="function">gsf_blob_new()</code></a> prior to creating the <em class="parameter"><code>clip_data</code></em>.  For example, if the data is
in <a class="link" href="GsfClipData.html#GSF-CLIP-FORMAT-WINDOWS-CLIPBOARD--CAPS"><span class="type">GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD</span></a> format, then it will have extra header
bytes in front of the actual metafile data.  This function will skip over
those header bytes if necessary and return a pointer to the "real" data.</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>clip_data</code></em> :</span></p></td>
<td> A <a class="link" href="GsfClipData.html" title="GsfClipData"><span class="type">GsfClipData</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ret_size</code></em> :</span></p></td>
<td> Location to return the size of the returned data buffer.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td> Location to store error, or <code class="literal">NULL</code>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Pointer to the real clipboard data.  The size in bytes of this
buffer is returned in the <em class="parameter"><code>ret_size</code></em> argument.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>