pygobject r1031 - in trunk/docs: . reference



Author: gianmt
Date: Tue Mar 24 21:34:13 2009
New Revision: 1031
URL: http://svn.gnome.org/viewvc/pygobject?rev=1031&view=rev

Log:
2009-03-24  Gian Mario Tagliaretti  <gianmt gnome org>

	* docs/Makefile.am:
	* docs/reference/pygio-classes.xml:
	* docs/reference/pygio-appinfo.xml:
	* docs/reference/pygio-constants.xml:
	* docs/reference/pygio-fileattributeinfo.xml: Add gio.AppInfo and
	gio.FileAttributeInfo in docs.



Added:
   trunk/docs/reference/pygio-appinfo.xml
   trunk/docs/reference/pygio-fileattributeinfo.xml
Modified:
   trunk/docs/Makefile.am
   trunk/docs/reference/ChangeLog
   trunk/docs/reference/pygio-classes.xml
   trunk/docs/reference/pygio-constants.xml

Modified: trunk/docs/Makefile.am
==============================================================================
--- trunk/docs/Makefile.am	(original)
+++ trunk/docs/Makefile.am	Tue Mar 24 21:34:13 2009
@@ -17,9 +17,11 @@
 	html/gobject-class-reference.html	\
 	html/glib-class-reference.html		\
 	html/class-gioapplaunchcontext.html	\
+	html/class-gioappinfo.html		\
 	html/class-giocancellable.html		\
 	html/class-gioemblem.html		\
 	html/class-gioemblemedicon.html		\
+	html/class-giofileattributeinfo.html	\
 	html/class-giofileenumerator.html	\
 	html/class-giofileicon.html		\
 	html/class-gioicon.html			\
@@ -51,9 +53,11 @@
 	reference/pygio-classes.xml 		\
 	reference/pygio-constants.xml		\
 	reference/pygio-applaunchcontext.xml 	\
+	reference/pygio-appinfo.xml 		\
 	reference/pygio-emblem.xml		\
 	reference/pygio-emblemedicon.xml	\
 	reference/pygio-icon.xml		\
+	reference/pygio-fileattributeinfo.xml	\
 	reference/pygio-fileenumerator.xml	\
 	reference/pygio-fileicon.xml
 

Added: trunk/docs/reference/pygio-appinfo.xml
==============================================================================
--- (empty file)
+++ trunk/docs/reference/pygio-appinfo.xml	Tue Mar 24 21:34:13 2009
@@ -0,0 +1,737 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd";>
+
+<refentry id="class-gioappinfo">
+    <refnamediv>
+        <refname>gio.AppInfo</refname>
+        <refpurpose>Information about an installed application and methods to launch it (with file arguments).</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.AppInfo</classname></ooclass>
+        <ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+	<methodname><link linkend="constructor-gioappinfo">gio.AppInfo</link></methodname>
+	<methodparam><parameter role="keyword">commandline</parameter></methodparam>
+        <methodparam><parameter role="keyword">application_name</parameter><initializer><literal>None</literal></initializer></methodparam>
+        <methodparam><parameter role="keyword">content_type</parameter><initializer>gio.APP_INFO_CREATE_NONE</initializer></methodparam>
+    </constructorsynopsis>
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--add-supports-type">add_supports_type</link></methodname>
+        <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--can-remove-supports-type">can_remove_supports_type</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--dup">dup</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--equal">equal</link></methodname>
+        <methodparam><parameter role="keyword">appinfo2</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-description">get_description</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-executable">get_executable</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-icon">get_icon</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-id">get_id</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--get-name">get_name</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--launch">launch</link></methodname>
+        <methodparam><parameter role="keyword">files</parameter></methodparam>
+        <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--launch-uris">launch_uris</link></methodname>
+        <methodparam><parameter role="keyword">uris</parameter></methodparam>
+        <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--remove-supports-type">remove_supports_type</link></methodname>
+        <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--set-as-default-for-extension">set_as_default_for_extension</link></methodname>
+        <methodparam><parameter role="keyword">extension</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--set-as-default-for-type">set_as_default_for_type</link></methodname>
+        <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--should-show">should_show</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--supports-files">supports_files</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-gioappinfo--supports-uris">supports_uris</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    
+    </classsynopsis>
+
+<programlisting>
+<emphasis role="bold">Functions</emphasis>
+ 
+<methodsynopsis language="python">
+    <methodname><link linkend="function-gio--app-info-get-all">gio.app_info_get_all</link></methodname>
+    <methodparam></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--app-info-get-all-for-type">gio.app_info_get_all_for_type</link></methodname>
+    <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--app-info-get-default-for-type">gio.app_info_get_default_for_type</link></methodname>
+    <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+    <methodparam><parameter role="keyword">must_support_uris</parameter></methodparam>
+</methodsynopsis><methodsynopsis language="python">
+    <methodname><link linkend="function-gio--app-info-get-default-for-uri-scheme">gio.app_info_get_default_for_uri_scheme</link></methodname>
+    <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+</methodsynopsis></programlisting>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+  +-- <link linkend="class-gioappinfo">gio.AppInfo</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+	<title>Known Implementation</title>
+        <para>
+            <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link> is implemented by
+            <link linkend="class-giodesktopappinfo"><classname>gio.DesktopAppInfo</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+            and <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+            are used for describing and launching applications installed on the system.
+        </para>
+        <para>
+            As of GLib 2.20, URIs will always be converted to POSIX paths (using
+            <methodname><link linkend="method-giofile--get-path">gio.File.get_path</link></methodname>()) when using
+            <methodname><link linkend="method-gioappinfo--launch">gio.AppInfo.launch</link></methodname>()
+            even if the application requested an URI and not a POSIX path. For example for an desktop-file
+            based application with Exec key totem %U and a single URI, sftp://foo/file.avi, then /home/user/.gvfs/sftp
+            on foo/file.avi will be passed. This will only work if a set of suitable GIO extensions (such as gvfs 2.26
+            compiled with FUSE support), is available and operational; if this is not the case, the URI will be passed
+            unmodified to the application. Some URIs, such as mailto:, of course cannot be mapped to a POSIX path
+            (in gvfs there's no FUSE mount for it); such URIs will be passed unmodified to the application. 
+        </para>
+        <para>
+            Specifically for gvfs 2.26 and later, the POSIX URI will be mapped back to the GIO URI in the
+            <link linkend="class-giofile"><classname>gio.File</classname></link> constructors
+            (since gvfs implements the GVfs extension point). As such, if the application needs to examine the URI,
+            it needs to use
+            <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>()
+            or similar on
+            <link linkend="class-giofile"><classname>gio.File</classname></link>.
+            In other words, an application cannot assume that the URI passed to e.g.
+            <methodname><link linkend="constructor-giofile">gio.File</link></methodname>() constructor
+            is equal to the result of
+            <methodname><link linkend="method-giofile--get-uri">gio.File.get_uri</link></methodname>().
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-gioappinfo--add-supports-type">
+            <title>gio.AppInfo.add_supports_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>add_supports_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>A string.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>add_supports_type</methodname>() method adds a content type
+                to the application information to indicate the application is capable of
+                opening files with the given content type.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--can-remove-supports-type">
+            <title>gio.AppInfo.can_remove_supports_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>can_remove_supports_type</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if it is possible to remove
+                    supported content types from a given appinfo, <literal>False</literal>
+                    if not. </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>can_remove_supports_type</methodname>() method checks if a
+                supported content type can be removed from an application.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--dup">
+            <title>gio.AppInfo.dup</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>dup</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A duplicate of appinfo.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>dup</methodname>() method creates a duplicate of a
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--equal">
+            <title>gio.AppInfo.equal</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>equal</methodname>
+                <methodparam><parameter role="keyword">icon2</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>appinfo2</parameter>&nbsp;:</term>
+                    <listitem><simpara>the second
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if appinfo1 is equal to appinfo2.
+                    <literal>False</literal> otherwise.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>equal</methodname>() method checks if two
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s are equal.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-description">
+            <title>gio.AppInfo.get_description</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_description</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A string containing a description of the application
+                    appinfo, or <literal>None</literal> if none.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_description</methodname>() method gets a human-readable
+                description of an installed application.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-executable">
+            <title>gio.AppInfo.get_executable</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_executable</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the appinfo's application
+                    binary's name.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_description</methodname>() method gets the executable's
+                name for the installed application.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-icon">
+            <title>gio.AppInfo.get_icon</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_icon</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the default
+                    <link linkend="class-gioicon"><classname>gio.Icon</classname></link> for appinfo.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_icon</methodname>() method gets the icon for the application.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-id">
+            <title>gio.AppInfo.get_id</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_id</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>a string containing the application's ID.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_id</methodname>() method gets the ID of an application.
+                An id is a string that identifies the application. The exact format of the
+                id is platform dependent. For instance, on Unix this is the desktop file id
+                from the xdg menu specification. 
+            </para>
+            <para>
+                Note that the returned ID may be <literal>None</literal>, depending on
+                how the appinfo has been constructed.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--get-name">
+            <title>gio.AppInfo.get_name</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_name</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the name of the application for appinfo.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_name</methodname>() method gets the installed
+                name of the application.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--launch">
+            <title>gio.AppInfo.launch</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>launch</methodname>
+                <methodparam><parameter role="keyword">files</parameter></methodparam>
+                <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>files</parameter>&nbsp;:</term>
+                    <listitem><simpara>a list of <link linkend="class-giofile"><classname>gio.File</classname></link> objects.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>launch_context</parameter>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+                    or <literal>None</literal>.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on successful launch,
+                    <literal>False</literal> otherwise.                      
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>launch</methodname>() method launches the application.
+                Passes files to the launched application as arguments, using the optional
+                launch_context to get information about the details of the launcher
+                (like what screen it is on). On error, error will be set accordingly. 
+            </para>
+            <para>
+                To lauch the application without arguments pass a <literal>None</literal> for files list. 
+            </para>
+            <para>
+                Note that even if the launch is successful the application launched can fail
+                to start if it runs into problems during startup. There is no way to detect this. 
+            </para>
+            <para>
+                Some URIs can be changed when passed through a
+                <link linkend="class-giofile"><classname>gio.File</classname></link>
+                (for instance unsupported uris with strange formats like mailto:), so
+                if you have a textual uri you want to pass in as argument, consider using
+                <methodname><link linkend="method-gioappinfo--launch-uris">gio.File.launch_uris</link></methodname>()
+                instead.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--launch-uris">
+            <title>gio.AppInfo.launch_uris</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>launch_uris</methodname>
+                <methodparam><parameter role="keyword">uris</parameter></methodparam>
+                <methodparam><parameter role="keyword">launch_context</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>uris</parameter>&nbsp;:</term>
+                    <listitem><simpara>a list containing URIs to launch.
+                    </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>launch_context</parameter>&nbsp;:</term>
+                    <listitem><simpara>a <link linkend="class-gioapplaunchcontext"><classname>gio.AppLaunchContext</classname></link>
+                    or <literal>None</literal>.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> on successful launch,
+                    <literal>False</literal> otherwise.                      
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>launch_uris</methodname>() method launches the application.
+                Passes uris to the launched application as arguments, using the optional
+                launch_context to get information about the details of the launcher
+                (like what screen it is on). On error, error will be set accordingly. 
+            </para>
+            <para>
+                To lauch the application without arguments pass a <literal>None</literal> for files list. 
+            </para>
+            <para>
+                Note that even if the launch is successful the application launched can fail
+                to start if it runs into problems during startup. There is no way to detect this. 
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--remove-supports-type">
+            <title>gio.AppInfo.remove_supports_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>remove_supports_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>A string.</simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>remove_supports_type</methodname>() method removes a
+                supported type from an application, if possible.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--set-as-default-for-extension">
+            <title>gio.AppInfo.set_as_default_for_extension</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_as_default_for_extension</methodname>
+                <methodparam><parameter role="keyword">extension</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>extension</parameter>&nbsp;:</term>
+                    <listitem><simpara>A string containing the file extension (without the dot).
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_as_default_for_extension</methodname>() method sets the
+                application as the default handler for the given file extention.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-gioappinfo--set-as-default-for-type">
+            <title>gio.AppInfo.set_as_default_for_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>set_as_default_for_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>The content type.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>set_as_default_for_type</methodname>() method sets the
+                application as the default handler for a given type.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--should-show">
+            <title>gio.AppInfo.should_show</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>should_show</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the appinfo should be shown,
+                    <literal>False</literal> otherwise. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>should_show</methodname>() method checks if the application
+                info should be shown in menus that list available applications.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--supports-files">
+            <title>gio.AppInfo.supports_files</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>supports_files</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the appinfo supports files. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>supports_files</methodname>() method checks if the application
+                accepts files as arguments.
+            </para>
+        </refsect2>
+        
+        <refsect2 id="method-gioappinfo--supports-uris">
+            <title>gio.AppInfo.supports_uris</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>supports_uris</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><literal>True</literal> if the appinfo supports uris. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>supports_uris</methodname>() method checks if the application
+                accepts uris as arguments.
+            </para>
+        </refsect2>
+    </refsect1>
+    
+    <refsect1>
+        <title>Functions</title>
+
+        <refsect2 id="function-gio--app-info-get-all">
+            <title>gio.app_info_get_all</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>app_info_get_all</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A list of <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>app_info_get_all</methodname>() function gets a list of all of
+                the applications currently registered on this system. 
+            </para>
+            <para>
+                For desktop files, this includes applications that have NoDisplay=true set or are
+                excluded from display by means of OnlyShowIn or NotShowIn. See
+                <methodname><link linkend="method-gioappinfo--should-show">gio.AppInfo.should_show</link></methodname>().
+                The returned list does not include applications which have the Hidden key set.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--app-info-get-all-for-type">
+            <title>gio.app_info_get_all_for_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>app_info_get_all_for_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>the content type to find a
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    for.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>A list of <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
+                    for a given content type or <literal>None</literal> on error. 
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>app_info_get_all_for_type</methodname>() function gets a list of all
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>s
+                for a given content type.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--app-info-get-default-for-type">
+            <title>gio.app_info_get_default_for_type</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>app_info_get_default_for_type</methodname>
+                <methodparam><parameter role="keyword">content_type</parameter></methodparam>
+                <methodparam><parameter role="keyword">must_support_uris</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>content_type</parameter>&nbsp;:</term>
+                    <listitem><simpara>the content type to find a
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    for.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><parameter>must_support_uris</parameter>&nbsp;:</term>
+                    <listitem><simpara>if <literal>True</literal>, the
+                    <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    is expected to support URIs </simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    for given content_type or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>app_info_get_default_for_type</methodname>() function gets the
+                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                that correspond to a given content type.
+            </para>
+        </refsect2>
+
+        <refsect2 id="function-gio--app-info-get-default-for-uri-scheme">
+            <title>gio.app_info_get_default_for_uri_scheme</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>app_info_get_default_for_uri_scheme</methodname>
+                <methodparam><parameter role="keyword">uri_scheme</parameter></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><parameter>uri_scheme</parameter>&nbsp;:</term>
+                    <listitem><simpara>a string containing a URI scheme.</simpara></listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara><link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+                    for given uri_scheme or <literal>None</literal> on error.
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+
+            <para>
+                The <methodname>app_info_get_default_for_uri_scheme</methodname>() function gets
+                the default application for launching applications using this URI scheme. A URI
+                scheme is the initial part of the URI, up to but not including the
+                ':', e.g. "http", "ftp" or "sip".
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>

Modified: trunk/docs/reference/pygio-classes.xml
==============================================================================
--- trunk/docs/reference/pygio-classes.xml	(original)
+++ trunk/docs/reference/pygio-classes.xml	Tue Mar 24 21:34:13 2009
@@ -6,12 +6,14 @@
 
 <title>PyGioClass Reference</title>
 
-<!-- GLIB CLASSES -->
+<!-- GIO CLASSES -->
+<xi:include href="pygio-appinfo.xml"/>
 <xi:include href="pygio-applaunchcontext.xml"/>
 <xi:include href="pygio-cancellable.xml"/>
 <xi:include href="pygio-emblem.xml"/>
 <xi:include href="pygio-icon.xml"/>
 <xi:include href="pygio-emblemedicon.xml"/>
+<xi:include href="pygio-fileattributeinfo.xml"/>
 <xi:include href="pygio-fileenumerator.xml"/>
 <xi:include href="pygio-fileicon.xml"/>
 <xi:include href="pygio-constants.xml"/>

Modified: trunk/docs/reference/pygio-constants.xml
==============================================================================
--- trunk/docs/reference/pygio-constants.xml	(original)
+++ trunk/docs/reference/pygio-constants.xml	Tue Mar 24 21:34:13 2009
@@ -12,8 +12,11 @@
     <title>Synopsis</title>
 
 <programlisting>
+<xref linkend="gio-app-info-constants" endterm="gio-app-info-constants-title"></xref>
 <xref linkend="gio-emblem-origin-constants" endterm="gio-emblem-origin-constants-title"></xref>
 <xref linkend="gio-error-constants" endterm="gio-error-constants-title"></xref>
+<xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+<xref linkend="gio-file-attribute-flags-constants" endterm="gio-file-attribute-flags-constants-title"></xref>
 </programlisting>
 
   </refsect1>
@@ -21,6 +24,35 @@
   <refsect1 id="gio-constants-description">
     <title>Description</title>
 
+    <refsect2 id="gio-app-info-constants">
+      <title id="gio-app-info-constants-title">Gio AppInfo Create Flags Constants</title>
+
+      <para>
+	  Flags used when creating a <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
+      </para>
+
+      <variablelist>
+	<varlistentry>
+	  <term><literal>gio.APP_INFO_CREATE_NONE</literal></term>
+	  <listitem>
+	    <simpara>No flags.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.APP_INFO_CREATE_NEEDS_TERMINAL</literal></term>
+	  <listitem>
+	    <simpara>Application opens in a terminal window. </simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.APP_INFO_CREATE_SUPPORTS_URIS</literal></term>
+	  <listitem>
+	    <simpara>Application supports URI arguments. </simpara>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refsect2>
+
     <refsect2 id="gio-emblem-origin-constants">
       <title id="gio-emblem-origin-constants-title">Gio Emblem Origin Constants</title>
 
@@ -229,7 +261,6 @@
 	    <simpara>File contains too many symbolic links. </simpara>
 	  </listitem>
 	</varlistentry>
-	<!--
 	<varlistentry>
 	  <term><literal>gio.ERROR_TOO_MANY_OPEN_FILES</literal></term>
 	  <listitem>
@@ -237,7 +268,6 @@
 	    more. Duplicate descriptors do count toward this limit. Since 2.20</simpara>
 	  </listitem>
 	</varlistentry>
-	-->
 	<varlistentry>
 	  <term><literal>gio.ERROR_WOULD_BLOCK</literal></term>
 	  <listitem>
@@ -264,6 +294,100 @@
 	</varlistentry>
       </variablelist>
     </refsect2>
+
+    <refsect2 id="gio-file-attribute-type-constants">
+      <title id="gio-file-attribute-type-constants-title">Gio File Attribute Type Constants</title>
+
+      <para>
+	  The data types for file attributes.
+      </para>
+
+      <variablelist>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_TYPE_BOOLEAN</literal></term>
+	  <listitem>
+	    <simpara>a boolean value.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_TYPE_BYTE_STRING</literal></term>
+	  <listitem>
+	    <simpara>a zero terminated string of non-zero bytes.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_TYPE_INT32</literal></term>
+	  <listitem>
+	    <simpara>a signed 4-byte/32-bit integer.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_TYPE_INT64</literal></term>
+	  <listitem>
+	    <simpara>a signed 8-byte/64-bit integer.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_TYPE_INVALID</literal></term>
+	  <listitem>
+	    <simpara>indicates an invalid or uninitalized type.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_TYPE_OBJECT</literal></term>
+	  <listitem>
+	    <simpara>a <link linkend="class-gobject">gobject.GObject</link>.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_TYPE_STRING</literal></term>
+	  <listitem>
+	    <simpara>a null terminated UTF8 string.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_TYPE_UINT32</literal></term>
+	  <listitem>
+	    <simpara>an unsigned 4-byte/32-bit integer.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_TYPE_UINT64</literal></term>
+	  <listitem>
+	    <simpara>an unsigned 8-byte/64-bit integer.</simpara>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="gio-file-attribute-flags-constants">
+      <title id="gio-file-attribute-flags-constants-title">Gio File Attribute Flags Constants</title>
+
+      <para>
+	  Flags specifying the behaviour of an attribute.
+      </para>
+
+      <variablelist>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_INFO_NONE</literal></term>
+	  <listitem>
+	    <simpara>no flags set.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_INFO_COPY_WITH_FILE</literal></term>
+	  <listitem>
+	    <simpara>copy the attribute values when the file is copied.</simpara>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><literal>gio.FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED</literal></term>
+	  <listitem>
+	    <simpara>copy the attribute values when the file is moved.</simpara>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refsect2>
   </refsect1>
 
 </refentry>

Added: trunk/docs/reference/pygio-fileattributeinfo.xml
==============================================================================
--- (empty file)
+++ trunk/docs/reference/pygio-fileattributeinfo.xml	Tue Mar 24 21:34:13 2009
@@ -0,0 +1,73 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd";>
+
+<refentry id="class-giofileattributeinfo">
+    <refnamediv>
+        <refname>gio.FileAttributeInfo</refname>
+        <refpurpose>Information about a specific attribute.</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.FileAttributeInfo</classname></ooclass>
+        <ooclass><classname>__builtin__.object</classname></ooclass>    
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- __builtin__.object
+  +-- <link linkend="class-giofileattributeinfo">gio.FileAttributeInfo</link>
+</synopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            The <link linkend="class-giofileattributeinfo"><classname>gio.FileAttributeInfo</classname></link>
+            contains information about a specific attribute.
+        </para>
+    </refsect1>
+
+    <refsect1 id="attributes-giofileattributeinfo">
+        <title>gio.FileAttributeInfo Attributes</title>
+    
+        <blockquote role="properties">
+            <informaltable pgwide="1" frame="none">
+                <tgroup cols="3">
+                    <colspec column="1" colwidth="1in"/>
+                    <colspec column="2" colwidth="1in"/>
+                    <colspec column="3" colwidth="4in"/>
+                    <tbody>
+                        <row valign="top">
+                            <entry>"name"</entry>
+                            <entry>Read</entry>
+                            <entry>The name of the attribute.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"type"</entry>
+                            <entry>Read</entry>
+                            <entry>the
+                            <xref linkend="gio-file-attribute-type-constants" endterm="gio-file-attribute-type-constants-title"></xref>
+                            type of the attribute.</entry>
+                        </row>
+                        <row valign="top">
+                            <entry>"flags"</entry>
+                            <entry>Read</entry>
+                            <entry>a set of
+                            <xref linkend="gio-file-attribute-flags-constants" endterm="gio-file-attribute-flags-constants-title"></xref>.
+                            </entry>
+                        </row>
+                    </tbody>
+                </tgroup>
+            </informaltable>
+        </blockquote>
+    </refsect1>
+</refentry>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]