From 76e9dc74ac706a9207f9d31f887d6e38df2a678f Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Mon, 25 May 2009 20:20:38 +0200 Subject: Update the docs with new 2.20 API --- docs/reference/pygio-appinfo.xml | 115 +++++++++++++++++++++++++++++ docs/reference/pygio-icon.xml | 99 ++++++++++++++++++++++++- docs/reference/pygio-mount.xml | 156 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 367 insertions(+), 3 deletions(-) diff --git a/docs/reference/pygio-appinfo.xml b/docs/reference/pygio-appinfo.xml index 1e0ea95..eaeb060 100644 --- a/docs/reference/pygio-appinfo.xml +++ b/docs/reference/pygio-appinfo.xml @@ -26,10 +26,18 @@ add_supports_type content_type + + can_delete + + can_remove_supports_type + + delete + + dup @@ -38,6 +46,10 @@ equal appinfo2 + + get_commandline + + get_description @@ -111,6 +123,9 @@ gio.app_info_get_default_for_uri_scheme uri_scheme + + gio.app_info_reset_type_association + content_type @@ -233,6 +248,30 @@ + + gio.AppInfo.can_delete + + + can_delete + + + + + + Returns : + True if appinfo can be deleted. + + + + + + The can_delete() method obtains the information + whether the gio.AppInfo + can be deleted. See + gio.AppInfo.delete(). + + + gio.AppInfo.can_remove_supports_type @@ -256,6 +295,34 @@ + + gio.AppInfo.delete + + + delete + + + + + + Returns : + True if appinfo has been deleted. + + + + + + The delete() method tries to delete an + gio.AppInfo. + + + On some platforms, there may be a difference between user-defined + gio.AppInfos + which can be deleted, and system-wide ones which cannot. See + gio.AppInfo.can_delete(). + + + gio.AppInfo.dup @@ -305,6 +372,29 @@ + + gio.AppInfo.get_commandline + + + get_commandline + + + + + + Returns : + a string containing the appinfo's commandline, or + None if this information is not available. + + + + + + The get_commandline() method gets the + commandline with which the application will be started. + + + gio.AppInfo.get_description @@ -775,5 +865,30 @@ ':', e.g. "http", "ftp" or "sip". + + + gio.app_info_reset_type_association + + + app_info_reset_type_association + content_type + + + + + content_type : + a content type + + + + + The app_info_reset_type_association() function + removes all changes to the type associations done by + set_as_default_for_type(), + set_as_default_for_extension(), + add_supports_type() or + remove_supports_type(). + + diff --git a/docs/reference/pygio-icon.xml b/docs/reference/pygio-icon.xml index 2e3c285..5a32d28 100644 --- a/docs/reference/pygio-icon.xml +++ b/docs/reference/pygio-icon.xml @@ -19,9 +19,21 @@ equal icon2 + + to_string + + + +Functions + + + gio.icon_new_from_string + + + @@ -80,7 +92,6 @@ To check if two GIcons are equal, see gio.Icon.equal(). - @@ -120,5 +130,88 @@ The equal() method checks if two icons are equal. + + + gio.Icon.to_string + + + to_string + + + + + + Returns : + An UTF8 string or None + if icon can't be serialized. + + + + + + The to_string() method generates a textual + representation of icon that can be used for serialization such as when + passing icon to a different process or saving it to persistent storage. Use + gio.icon_new_from_string() + to get icon back from the returned string. + + + The encoding of the returned string is proprietary to GIcon except in the following two cases + + + If icon is a gio.FileIcon, + the returned string is a native path (such as /path/to/my icon.png) without escaping + if the gio.File + for icon is a native file. If the file is not native, the returned string is the result of + gio.File.get_uri() + (such as sftp://path/to/my%20icon.png). + + + If icon is a gio.ThemedIcon + with exactly one name, the encoding is simply the name (such as network-server). + + + + + + Functions + + + gio.icon_new_from_string + + + icon_new_from_string + str + + + + + str : + A string obtained via + gio.Icon.to_string(). + + + + Returns : + An object implementing the + gio.Icon + interface or None if error is set. + + + + + + The icon_new_from_string() function generate a + gio.Icon + instance from str. This function can fail if str is not valid - see + gio.Icon.to_string() + for discussion. + + + If your application or library provides one or more GIcon implementations you need + to ensure that each GType is registered with the type system prior to calling + gio.icon_new_from_string(). + + diff --git a/docs/reference/pygio-mount.xml b/docs/reference/pygio-mount.xml index f5688c5..f4b1c99 100644 --- a/docs/reference/pygio-mount.xml +++ b/docs/reference/pygio-mount.xml @@ -73,6 +73,10 @@ force_rescan cancellableNone + + is_shadowed + + remount callback @@ -85,6 +89,10 @@ remount_finish result + + shadow + + unmount callback @@ -96,6 +104,10 @@ unmount_finish result + + unshadow + + @@ -124,6 +136,16 @@ gobject.GObject Signal Prototypes + + "aborted" + + callback + mount + user_param1 + ... + + + "changed" @@ -565,6 +587,58 @@ for the asynchronous version. + + + gio.Mount.is_shadowed + + + is_shadowed + + + + + + Returns : + True if mount is shadowed. + + + + + + The is_shadowed() method determines if mount + is shadowed. Applications or libraries should avoid displaying mount + in the user interface if it is shadowed. + + + A mount is said to be shadowed if there exists one or more user visible + objects (currently + gio.Mount + objects) with a root that is inside the root of mount. + + + One application of shadow mounts is when exposing a single file system + that is used to address several logical volumes. In this situation, a + gio.VolumeMonitor + implementation would create two + gio.Volume + objects (for example, one for the camera functionality of the device + and one for a SD card reader on the device) with activation URIs + gphoto2://[usb:001,002]/store1/ and gphoto2://[usb:001,002]/store2/. + When the underlying mount (with root gphoto2://[usb:001,002]/) is + mounted, said + gio.VolumeMonitor + implementation would create two + gio.Mount + objects (each with their root matching the corresponding volume + activation root) that would shadow the original mount. + + + The proxy monitor in GVfs 2.26 and later, automatically creates and + manage shadow mounts (and shadows the underlying mount) if the activation + root on a gio.Volume + is set. + + gio.Mount.remount @@ -651,6 +725,29 @@ The remount_finish() method finishes remounting a mount. + + + gio.Mount.shadow + + + shadow + + + + + + + + The shadow() method increments the shadow + count on mount. Usually used by + gio.VolumeMonitor + implementations when creating a shadow mount for mount, see + gio.Mount.is_shadowed() + for more information. The caller will need to emit the "changed" + signal on mount manually. + + + gio.Mount.unmount @@ -730,11 +827,70 @@ The unmount_finish() method finishes unmounting a mount. + + + gio.Mount.unshadow + + + unshadow + + + + + + + + The unshadow() method decrements the shadow + count on mount. Usually used by + gio.VolumeMonitor + implementations when destroying a shadow mount for mount, see + gio.Mount.is_shadowed() + for more information. The caller will need to emit the "changed" + signal on mount manually. + + + Signals + + The "aborted" gio.Mount Signal + + callback + mount + user_param1 + ... + + + + + mount : + the mount + + + user_param1 : + the first user parameter (if any) specified + with the connect() + method + + + ... : + additional user parameters (if any) + + + + + Emitted by the backend when e.g. a device becomes unavailable while a + mount operation is in progress. + + + Implementations of gio.MountOperation + should handle this signal by dismissing open password dialogs. + + The "changed" gio.Mount Signal -- cgit