1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Filesystem utilities</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
8
<link rel="up" href="gtkbase.html" title="Part II. GTK+ Core Reference">
9
<link rel="prev" href="gtk2-Testing.html" title="Testing">
10
<link rel="next" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
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">
17
<td><a accesskey="p" href="gtk2-Testing.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="gtkbase.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">GTK+ 2 Reference Manual</th>
21
<td><a accesskey="n" href="gtkobjects.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#gtk2-Filesystem-utilities.synopsis" class="shortcut">Top</a>
26
<a href="#gtk2-Filesystem-utilities.description" class="shortcut">Description</a>
28
<a href="#gtk2-Filesystem-utilities.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#gtk2-Filesystem-utilities.properties" class="shortcut">Properties</a>
33
<div class="refentry">
34
<a name="gtk2-Filesystem-utilities"></a><div class="titlepage"></div>
35
<div class="refnamediv"><table width="100%"><tr>
37
<h2><span class="refentrytitle"><a name="gtk2-Filesystem-utilities.top_of_page"></a>Filesystem utilities</span></h2>
38
<p>Filesystem utilities — Functions for working with GIO</p>
40
<td valign="top" align="right"></td>
42
<div class="refsynopsisdiv">
43
<a name="gtk2-Filesystem-utilities.synopsis"></a><h2>Synopsis</h2>
44
<a name="GtkMountOperation"></a><pre class="synopsis">
45
#include <gtk/gtk.h>
47
struct <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation-struct" title="struct GtkMountOperation">GtkMountOperation</a>;
48
<span class="returnvalue">GMountOperation</span> * <a class="link" href="gtk2-Filesystem-utilities.html#gtk-mount-operation-new" title="gtk_mount_operation_new ()">gtk_mount_operation_new</a> (<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>);
49
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Filesystem-utilities.html#gtk-mount-operation-is-showing" title="gtk_mount_operation_is_showing ()">gtk_mount_operation_is_showing</a> (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>);
50
<span class="returnvalue">void</span> <a class="link" href="gtk2-Filesystem-utilities.html#gtk-mount-operation-set-parent" title="gtk_mount_operation_set_parent ()">gtk_mount_operation_set_parent</a> (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>,
51
<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>);
52
<a class="link" href="GtkWindow.html" title="GtkWindow"><span class="returnvalue">GtkWindow</span></a> * <a class="link" href="gtk2-Filesystem-utilities.html#gtk-mount-operation-get-parent" title="gtk_mount_operation_get_parent ()">gtk_mount_operation_get_parent</a> (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>);
53
<span class="returnvalue">void</span> <a class="link" href="gtk2-Filesystem-utilities.html#gtk-mount-operation-set-screen" title="gtk_mount_operation_set_screen ()">gtk_mount_operation_set_screen</a> (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>,
54
<em class="parameter"><code><a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a> *screen</code></em>);
55
<a href="../gdk2/GdkScreen.html"><span class="returnvalue">GdkScreen</span></a> * <a class="link" href="gtk2-Filesystem-utilities.html#gtk-mount-operation-get-screen" title="gtk_mount_operation_get_screen ()">gtk_mount_operation_get_screen</a> (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>);
56
<span class="returnvalue">gboolean</span> <a class="link" href="gtk2-Filesystem-utilities.html#gtk-show-uri" title="gtk_show_uri ()">gtk_show_uri</a> (<em class="parameter"><code><a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a> *screen</code></em>,
57
<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>,
58
<em class="parameter"><code><span class="type">guint32</span> timestamp</code></em>,
59
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
62
<div class="refsect1">
63
<a name="gtk2-Filesystem-utilities.object-hierarchy"></a><h2>Object Hierarchy</h2>
64
<pre class="synopsis">
67
+----GtkMountOperation
70
<div class="refsect1">
71
<a name="gtk2-Filesystem-utilities.properties"></a><h2>Properties</h2>
72
<pre class="synopsis">
73
"<a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation--is-showing" title='The "is-showing" property'>is-showing</a>" <span class="type">gboolean</span> : Read
74
"<a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation--parent" title='The "parent" property'>parent</a>" <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>* : Read / Write
75
"<a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation--screen" title='The "screen" property'>screen</a>" <a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a>* : Read / Write
78
<div class="refsect1">
79
<a name="gtk2-Filesystem-utilities.description"></a><h2>Description</h2>
81
The functions and objects described here make working with GTK+ and
85
<a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> is needed when mounting volumes:
86
It is an implementation of <span class="type">GMountOperation</span> that can be used with
87
GIO functions for mounting volumes such as
88
<code class="function">g_file_mount_enclosing_volume()</code>, <code class="function">g_file_mount_mountable()</code>,
89
<code class="function">g_volume_mount()</code>, <code class="function">g_mount_unmount_with_operation()</code> and others.
92
When necessary, <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> shows dialogs to ask for
93
passwords, questions or show processes blocking unmount.
96
<a class="link" href="gtk2-Filesystem-utilities.html#gtk-show-uri" title="gtk_show_uri ()"><code class="function">gtk_show_uri()</code></a> is a convenient way to launch applications for URIs.
99
Another object that is worth mentioning in this context is
100
<a href="../gdk2/gdk2-Application-launching.html#GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a>, which provides visual feedback when lauching
104
<div class="refsect1">
105
<a name="gtk2-Filesystem-utilities.details"></a><h2>Details</h2>
106
<div class="refsect2">
107
<a name="GtkMountOperation-struct"></a><h3>struct GtkMountOperation</h3>
108
<pre class="programlisting">struct GtkMountOperation;</pre>
110
This should not be accessed directly. Use the accessor functions below.
114
<div class="refsect2">
115
<a name="gtk-mount-operation-new"></a><h3>gtk_mount_operation_new ()</h3>
116
<pre class="programlisting"><span class="returnvalue">GMountOperation</span> * gtk_mount_operation_new (<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>);</pre>
118
Creates a new <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>
120
<div class="variablelist"><table border="0" class="variablelist">
122
<col align="left" valign="top">
127
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
128
<td>transient parent of the window, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
132
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
133
<td>a new <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>
138
<p class="since">Since 2.14</p>
141
<div class="refsect2">
142
<a name="gtk-mount-operation-is-showing"></a><h3>gtk_mount_operation_is_showing ()</h3>
143
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_mount_operation_is_showing (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>);</pre>
145
Returns whether the <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> is currently displaying
148
<div class="variablelist"><table border="0" class="variablelist">
150
<col align="left" valign="top">
155
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
156
<td>a <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>
160
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
162
<code class="literal">TRUE</code> if <em class="parameter"><code>op</code></em> is currently displaying a window</td>
166
<p class="since">Since 2.14</p>
169
<div class="refsect2">
170
<a name="gtk-mount-operation-set-parent"></a><h3>gtk_mount_operation_set_parent ()</h3>
171
<pre class="programlisting"><span class="returnvalue">void</span> gtk_mount_operation_set_parent (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>,
172
<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>);</pre>
174
Sets the transient parent for windows shown by the
175
<a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>.
177
<div class="variablelist"><table border="0" class="variablelist">
179
<col align="left" valign="top">
184
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
185
<td>a <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>
189
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
190
<td>transient parent of the window, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
195
<p class="since">Since 2.14</p>
198
<div class="refsect2">
199
<a name="gtk-mount-operation-get-parent"></a><h3>gtk_mount_operation_get_parent ()</h3>
200
<pre class="programlisting"><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="returnvalue">GtkWindow</span></a> * gtk_mount_operation_get_parent (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>);</pre>
202
Gets the transient parent used by the <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>
204
<div class="variablelist"><table border="0" class="variablelist">
206
<col align="left" valign="top">
211
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
212
<td>a <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>
216
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
217
<td>the transient parent for windows shown by <em class="parameter"><code>op</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
222
<p class="since">Since 2.14</p>
225
<div class="refsect2">
226
<a name="gtk-mount-operation-set-screen"></a><h3>gtk_mount_operation_set_screen ()</h3>
227
<pre class="programlisting"><span class="returnvalue">void</span> gtk_mount_operation_set_screen (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>,
228
<em class="parameter"><code><a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
230
Sets the screen to show windows of the <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> on.
232
<div class="variablelist"><table border="0" class="variablelist">
234
<col align="left" valign="top">
239
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
240
<td>a <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>
244
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
245
<td>a <a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a>
250
<p class="since">Since 2.14</p>
253
<div class="refsect2">
254
<a name="gtk-mount-operation-get-screen"></a><h3>gtk_mount_operation_get_screen ()</h3>
255
<pre class="programlisting"><a href="../gdk2/GdkScreen.html"><span class="returnvalue">GdkScreen</span></a> * gtk_mount_operation_get_screen (<em class="parameter"><code><a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a> *op</code></em>);</pre>
257
Gets the screen on which windows of the <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>
260
<div class="variablelist"><table border="0" class="variablelist">
262
<col align="left" valign="top">
267
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
268
<td>a <a class="link" href="gtk2-Filesystem-utilities.html#GtkMountOperation"><span class="type">GtkMountOperation</span></a>
272
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
273
<td>the screen on which windows of <em class="parameter"><code>op</code></em> are shown. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
278
<p class="since">Since 2.14</p>
281
<div class="refsect2">
282
<a name="gtk-show-uri"></a><h3>gtk_show_uri ()</h3>
283
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_show_uri (<em class="parameter"><code><a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a> *screen</code></em>,
284
<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>,
285
<em class="parameter"><code><span class="type">guint32</span> timestamp</code></em>,
286
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
288
This is a convenience function for launching the default application
289
to show the uri. The uri must be of a form understood by GIO (i.e. you
290
need to install gvfs to get support for uri schemes such as http://
291
or ftp://, as only local files are handled by GIO itself).
294
<table border="0" summary="Simple list" class="simplelist">
295
<tr><td><code class="filename">file:///home/gnome/pict.jpg</code></td></tr>
296
<tr><td><code class="filename">http://www.gnome.org</code></td></tr>
297
<tr><td><code class="filename">mailto:me@gnome.org</code></td></tr>
300
Ideally the timestamp is taken from the event triggering
301
the <a class="link" href="gtk2-Filesystem-utilities.html#gtk-show-uri" title="gtk_show_uri ()"><code class="function">gtk_show_uri()</code></a> call. If timestamp is not known you can take
302
<a href="../gdk2/gdk2-Events.html#GDK-CURRENT-TIME:CAPS"><code class="literal">GDK_CURRENT_TIME</code></a>.
305
This function can be used as a replacement for <code class="function">gnome_vfs_url_show()</code>
306
and <code class="function">gnome_url_show()</code>.
308
<div class="variablelist"><table border="0" class="variablelist">
310
<col align="left" valign="top">
315
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
316
<td>screen to show the uri on or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for the default screen. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
320
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
321
<td>the uri to show</td>
324
<td><p><span class="term"><em class="parameter"><code>timestamp</code></em> :</span></p></td>
325
<td>a timestamp to prevent focus stealing.</td>
328
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
329
<td>a <span class="type">GError</span> that is returned in case of errors</td>
332
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
334
<code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> on error.</td>
338
<p class="since">Since 2.14</p>
341
<div class="refsect1">
342
<a name="gtk2-Filesystem-utilities.property-details"></a><h2>Property Details</h2>
343
<div class="refsect2">
344
<a name="GtkMountOperation--is-showing"></a><h3>The <code class="literal">"is-showing"</code> property</h3>
345
<pre class="programlisting"> "is-showing" <span class="type">gboolean</span> : Read</pre>
346
<p>Are we showing a dialog.</p>
347
<p>Default value: FALSE</p>
350
<div class="refsect2">
351
<a name="GtkMountOperation--parent"></a><h3>The <code class="literal">"parent"</code> property</h3>
352
<pre class="programlisting"> "parent" <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>* : Read / Write</pre>
353
<p>The parent window.</p>
356
<div class="refsect2">
357
<a name="GtkMountOperation--screen"></a><h3>The <code class="literal">"screen"</code> property</h3>
358
<pre class="programlisting"> "screen" <a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a>* : Read / Write</pre>
359
<p>The screen where this window will be displayed.</p>
365
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'