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-icon.xml | 99 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 3 deletions(-) (limited to 'docs/reference/pygio-icon.xml') 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(). + + -- cgit