"Initial commit to Gerrit"
[profile/ivi/libgsf.git] / doc / html / gsf-clip-data.html
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>GsfClipData</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GSF Reference Manual">
8 <link rel="up" href="parsers.html" title="Stream Parsers">
9 <link rel="prev" href="gsf-blobs.html" title="GsfBlob">
10 <link rel="next" href="misc.html" title="Miscellaneous">
11 <meta name="generator" content="GTK-Doc V1.14 (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="gsf-blobs.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="parsers.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">GSF Reference Manual</th>
21 <td><a accesskey="n" href="misc.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="#gsf-clip-data.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gsf-clip-data.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gsf-clip-data.object-hierarchy" class="shortcut">Object Hierarchy</a>
29 </td></tr>
30 </table>
31 <div class="refentry" title="GsfClipData">
32 <a name="gsf-clip-data"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
34 <td valign="top">
35 <h2><span class="refentrytitle"><a name="gsf-clip-data.top_of_page"></a>GsfClipData</span></h2>
36 <p>GsfClipData</p>
37 </td>
38 <td valign="top" align="right"></td>
39 </tr></table></div>
40 <div class="refsynopsisdiv" title="Synopsis">
41 <a name="gsf-clip-data.synopsis"></a><h2>Synopsis</h2>
42 <a name="GsfClipData"></a><pre class="synopsis">enum                <a class="link" href="gsf-clip-data.html#GsfClipFormat" title="enum GsfClipFormat">GsfClipFormat</a>;
43 enum                <a class="link" href="gsf-clip-data.html#GsfClipFormatWindows" title="enum GsfClipFormatWindows">GsfClipFormatWindows</a>;
44                     <a class="link" href="gsf-clip-data.html#GsfClipData-struct" title="GsfClipData">GsfClipData</a>;
45                     <a class="link" href="gsf-clip-data.html#GsfClipDataClass" title="GsfClipDataClass">GsfClipDataClass</a>;
46 <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="returnvalue">GsfClipData</span></a> *       <a class="link" href="gsf-clip-data.html#gsf-clip-data-new" title="gsf_clip_data_new ()">gsf_clip_data_new</a>                   (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipFormat" title="enum GsfClipFormat"><span class="type">GsfClipFormat</span></a> format</code></em>,
47                                                          <em class="parameter"><code><a class="link" href="gsf-blobs.html#GsfBlob"><span class="type">GsfBlob</span></a> *data_blob</code></em>);
48 <a class="link" href="gsf-clip-data.html#GsfClipFormat" title="enum GsfClipFormat"><span class="returnvalue">GsfClipFormat</span></a>       <a class="link" href="gsf-clip-data.html#gsf-clip-data-get-format" title="gsf_clip_data_get_format ()">gsf_clip_data_get_format</a>            (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a> *clip_data</code></em>);
49 <a class="link" href="gsf-blobs.html#GsfBlob"><span class="returnvalue">GsfBlob</span></a> *           <a class="link" href="gsf-clip-data.html#gsf-clip-data-get-data-blob" title="gsf_clip_data_get_data_blob ()">gsf_clip_data_get_data_blob</a>         (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a> *clip_data</code></em>);
50 <a class="link" href="gsf-clip-data.html#GsfClipFormatWindows" title="enum GsfClipFormatWindows"><span class="returnvalue">GsfClipFormatWindows</span></a>  <a class="link" href="gsf-clip-data.html#gsf-clip-data-get-windows-clipboard-format" title="gsf_clip_data_get_windows_clipboard_format ()">gsf_clip_data_get_windows_clipboard_format</a>
51                                                         (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a> *clip_data</code></em>,
52                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
53 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="returnvalue">gconstpointer</span></a>       <a class="link" href="gsf-clip-data.html#gsf-clip-data-peek-real-data" title="gsf_clip_data_peek_real_data ()">gsf_clip_data_peek_real_data</a>        (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a> *clip_data</code></em>,
54                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *ret_size</code></em>,
55                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
56 </pre>
57 </div>
58 <div class="refsect1" title="Object Hierarchy">
59 <a name="gsf-clip-data.object-hierarchy"></a><h2>Object Hierarchy</h2>
60 <pre class="synopsis">
61   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
62    +----GsfClipData
63 </pre>
64 </div>
65 <div class="refsect1" title="Description">
66 <a name="gsf-clip-data.description"></a><h2>Description</h2>
67 <p>
68 </p>
69 </div>
70 <div class="refsect1" title="Details">
71 <a name="gsf-clip-data.details"></a><h2>Details</h2>
72 <div class="refsect2" title="enum GsfClipFormat">
73 <a name="GsfClipFormat"></a><h3>enum GsfClipFormat</h3>
74 <pre class="programlisting">typedef enum {
75         GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD = -1,
76         GSF_CLIP_FORMAT_MACINTOSH_CLIPBOARD = -2,
77         GSF_CLIP_FORMAT_GUID = -3,
78         GSF_CLIP_FORMAT_NO_DATA = 0,
79         GSF_CLIP_FORMAT_CLIPBOARD_FORMAT_NAME = 1, /* in the file it's actually any positive integer */
80         GSF_CLIP_FORMAT_UNKNOWN /* this is our own value for unknown types or invalid data */
81 } GsfClipFormat;
82 </pre>
83 <div class="variablelist"><table border="0">
84 <col align="left" valign="top">
85 <tbody>
86 <tr>
87 <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>
88 <td>Windows clipboard format
89 </td>
90 </tr>
91 <tr>
92 <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>
93 <td>Macintosh clipboard format
94 </td>
95 </tr>
96 <tr>
97 <td><p><a name="GSF-CLIP-FORMAT-GUID:CAPS"></a><span class="term"><code class="literal">GSF_CLIP_FORMAT_GUID</code></span></p></td>
98 <td>GUID that contains a format identifier
99 </td>
100 </tr>
101 <tr>
102 <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>
103 <td>No clipboard data
104 </td>
105 </tr>
106 <tr>
107 <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>
108 <td>Custom clipboard format
109 </td>
110 </tr>
111 <tr>
112 <td><p><a name="GSF-CLIP-FORMAT-UNKNOWN:CAPS"></a><span class="term"><code class="literal">GSF_CLIP_FORMAT_UNKNOWN</code></span></p></td>
113 <td>Unknown clipboard type or invalid data
114 </td>
115 </tr>
116 </tbody>
117 </table></div>
118 </div>
119 <hr>
120 <div class="refsect2" title="enum GsfClipFormatWindows">
121 <a name="GsfClipFormatWindows"></a><h3>enum GsfClipFormatWindows</h3>
122 <pre class="programlisting">typedef enum {
123         GSF_CLIP_FORMAT_WINDOWS_ERROR = -1,             /* our own value */
124         GSF_CLIP_FORMAT_WINDOWS_UNKNOWN = -2,           /* our own value */
125         GSF_CLIP_FORMAT_WINDOWS_METAFILE = 3,           /* CF_METAFILEPICT */
126         GSF_CLIP_FORMAT_WINDOWS_DIB = 8,                /* CF_DIB */
127         GSF_CLIP_FORMAT_WINDOWS_ENHANCED_METAFILE = 14 /* CF_ENHMETAFILE */
128 } GsfClipFormatWindows;
129 </pre>
130 <p>
131 </p>
132 </div>
133 <hr>
134 <div class="refsect2" title="GsfClipData">
135 <a name="GsfClipData-struct"></a><h3>GsfClipData</h3>
136 <pre class="programlisting">typedef struct _GsfClipData GsfClipData;</pre>
137 <p>
138 </p>
139 </div>
140 <hr>
141 <div class="refsect2" title="GsfClipDataClass">
142 <a name="GsfClipDataClass"></a><h3>GsfClipDataClass</h3>
143 <pre class="programlisting">typedef struct {
144         GObjectClass parent_class;
145 } GsfClipDataClass;
146 </pre>
147 <p>
148 </p>
149 </div>
150 <hr>
151 <div class="refsect2" title="gsf_clip_data_new ()">
152 <a name="gsf-clip-data-new"></a><h3>gsf_clip_data_new ()</h3>
153 <pre class="programlisting"><a class="link" href="gsf-clip-data.html#GsfClipData"><span class="returnvalue">GsfClipData</span></a> *       gsf_clip_data_new                   (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipFormat" title="enum GsfClipFormat"><span class="type">GsfClipFormat</span></a> format</code></em>,
154                                                          <em class="parameter"><code><a class="link" href="gsf-blobs.html#GsfBlob"><span class="type">GsfBlob</span></a> *data_blob</code></em>);</pre>
155 <p>
156 Creates a new <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a> object.  This function acquires a reference to the
157 <em class="parameter"><code>data_blob</code></em>, so you should unref the blob on your own if you no longer need it
158 directly.
159 </p>
160 <div class="variablelist"><table border="0">
161 <col align="left" valign="top">
162 <tbody>
163 <tr>
164 <td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
165 <td>Format for the data inside the <em class="parameter"><code>data_blob</code></em>
166 </td>
167 </tr>
168 <tr>
169 <td><p><span class="term"><em class="parameter"><code>data_blob</code></em> :</span></p></td>
170 <td>Object which holds the binary contents for the <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>
171 </td>
172 </tr>
173 <tr>
174 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
175 <td> A newly-created <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>.
176 </td>
177 </tr>
178 </tbody>
179 </table></div>
180 </div>
181 <hr>
182 <div class="refsect2" title="gsf_clip_data_get_format ()">
183 <a name="gsf-clip-data-get-format"></a><h3>gsf_clip_data_get_format ()</h3>
184 <pre class="programlisting"><a class="link" href="gsf-clip-data.html#GsfClipFormat" title="enum GsfClipFormat"><span class="returnvalue">GsfClipFormat</span></a>       gsf_clip_data_get_format            (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a> *clip_data</code></em>);</pre>
185 <p>
186 Queries the clipboard data format of a <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>.  The format refers to the data
187 blob inside the <em class="parameter"><code>clip_data</code></em>; use <a class="link" href="gsf-clip-data.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.
188 </p>
189 <div class="variablelist"><table border="0">
190 <col align="left" valign="top">
191 <tbody>
192 <tr>
193 <td><p><span class="term"><em class="parameter"><code>clip_data</code></em> :</span></p></td>
194 <td>A <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>.
195 </td>
196 </tr>
197 <tr>
198 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
199 <td> The format in which the <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>'s data blob is stored.
200 </td>
201 </tr>
202 </tbody>
203 </table></div>
204 </div>
205 <hr>
206 <div class="refsect2" title="gsf_clip_data_get_data_blob ()">
207 <a name="gsf-clip-data-get-data-blob"></a><h3>gsf_clip_data_get_data_blob ()</h3>
208 <pre class="programlisting"><a class="link" href="gsf-blobs.html#GsfBlob"><span class="returnvalue">GsfBlob</span></a> *           gsf_clip_data_get_data_blob         (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a> *clip_data</code></em>);</pre>
209 <p>
210 Queries the data blob that actually stores a <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>'s binary data.
211 </p>
212 <div class="variablelist"><table border="0">
213 <col align="left" valign="top">
214 <tbody>
215 <tr>
216 <td><p><span class="term"><em class="parameter"><code>clip_data</code></em> :</span></p></td>
217 <td>A <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>.
218 </td>
219 </tr>
220 <tr>
221 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
222 <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
223 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
224 you are done with it.
225 </td>
226 </tr>
227 </tbody>
228 </table></div>
229 </div>
230 <hr>
231 <div class="refsect2" title="gsf_clip_data_get_windows_clipboard_format ()">
232 <a name="gsf-clip-data-get-windows-clipboard-format"></a><h3>gsf_clip_data_get_windows_clipboard_format ()</h3>
233 <pre class="programlisting"><a class="link" href="gsf-clip-data.html#GsfClipFormatWindows" title="enum GsfClipFormatWindows"><span class="returnvalue">GsfClipFormatWindows</span></a>  gsf_clip_data_get_windows_clipboard_format
234                                                         (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a> *clip_data</code></em>,
235                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
236 <p>
237 Queries the Windows clipboard data format for a <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>.  The <em class="parameter"><code>clip_data</code></em> must
238 have been created with <a class="link" href="gsf-clip-data.html#GSF-CLIP-FORMAT-WINDOWS-CLIPBOARD:CAPS"><span class="type">GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD</span></a>.
239 </p>
240 <div class="variablelist"><table border="0">
241 <col align="left" valign="top">
242 <tbody>
243 <tr>
244 <td><p><span class="term"><em class="parameter"><code>clip_data</code></em> :</span></p></td>
245 <td>A <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>.
246 </td>
247 </tr>
248 <tr>
249 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
250 <td>Location to store error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
251 </td>
252 </tr>
253 <tr>
254 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
255 <td> A <a class="link" href="gsf-clip-data.html#GsfClipFormatWindows" title="enum GsfClipFormatWindows"><span class="type">GsfClipFormatWindows</span></a> value.
256
257 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
258 smaller than it should be; in this case GSF_CLIP_FORMAT_WINDOWS_ERROR will be returned.
259 </td>
260 </tr>
261 </tbody>
262 </table></div>
263 </div>
264 <hr>
265 <div class="refsect2" title="gsf_clip_data_peek_real_data ()">
266 <a name="gsf-clip-data-peek-real-data"></a><h3>gsf_clip_data_peek_real_data ()</h3>
267 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="returnvalue">gconstpointer</span></a>       gsf_clip_data_peek_real_data        (<em class="parameter"><code><a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a> *clip_data</code></em>,
268                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *ret_size</code></em>,
269                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
270 <p>
271 Queries a pointer directly to the clipboard data of a <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>.  The
272 resulting pointer is not necessarily the same data pointer that was passed to
273 <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
274 in <a class="link" href="gsf-clip-data.html#GSF-CLIP-FORMAT-WINDOWS-CLIPBOARD:CAPS"><span class="type">GSF_CLIP_FORMAT_WINDOWS_CLIPBOARD</span></a> format, then it will have extra header
275 bytes in front of the actual metafile data.  This function will skip over
276 those header bytes if necessary and return a pointer to the "real" data.
277 </p>
278 <div class="variablelist"><table border="0">
279 <col align="left" valign="top">
280 <tbody>
281 <tr>
282 <td><p><span class="term"><em class="parameter"><code>clip_data</code></em> :</span></p></td>
283 <td>A <a class="link" href="gsf-clip-data.html#GsfClipData"><span class="type">GsfClipData</span></a>.
284 </td>
285 </tr>
286 <tr>
287 <td><p><span class="term"><em class="parameter"><code>ret_size</code></em> :</span></p></td>
288 <td>Location to return the size of the returned data buffer.
289 </td>
290 </tr>
291 <tr>
292 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
293 <td>Location to store error, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
294 </td>
295 </tr>
296 <tr>
297 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
298 <td> Pointer to the real clipboard data.  The size in bytes of this
299 buffer is returned in the <em class="parameter"><code>ret_size</code></em> argument.
300 </td>
301 </tr>
302 </tbody>
303 </table></div>
304 </div>
305 </div>
306 </div>
307 <div class="footer">
308 <hr>
309           Generated by GTK-Doc V1.14</div>
310 </body>
311 </html>