~vcs-imports/pygtk/main

« back to all changes in this revision

Viewing changes to docs/reference/pygtk-gdkapplaunchcontext.xml

  • Committer: gianmt
  • Date: 2009-03-05 20:42:42 UTC
  • Revision ID: vcs-imports@canonical.com-20090305204242-ia54hwtxpdycp4pe
2009-03-05  Gian Mario Tagliaretti  <gianmt@gnome.org>

        * Makefile.am:
        * pygtk-gdk-classes.xml:
        * pygtk-gdkapplaunchcontext.xml: Add new class gtk.gdk.AppLaunchContext.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" standalone="no"?>
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
 
3
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
 
4
 
 
5
<refentry id="class-gdkapplaunchcontext">
 
6
    <refnamediv>
 
7
        <refname>gtk.gdk.AppLaunchContext</refname>
 
8
        <refpurpose>Startup notification for applications.</refpurpose>
 
9
    </refnamediv>
 
10
 
 
11
    <refsect1>
 
12
        <title>Synopsis</title>
 
13
 
 
14
    <classsynopsis language="python">
 
15
        <ooclass><classname>gtk.gdk.AppLaunchContext</classname></ooclass>
 
16
        <ooclass><classname><link linkend="class-gioapplaunchcontext">gio.AppLaunchContext</link></classname></ooclass>
 
17
    
 
18
    <methodsynopsis language="python">
 
19
        <methodname><link linkend="method-gdkapplaunchcontext--set-desktop">set_desktop</link></methodname>
 
20
        <methodparam><parameter role="keyword">desktop</parameter></methodparam>
 
21
    </methodsynopsis>
 
22
    <methodsynopsis language="python">
 
23
        <methodname><link linkend="method-gdkapplaunchcontext--set-display">set_display</link></methodname>
 
24
        <methodparam><parameter role="keyword">display</parameter></methodparam>
 
25
    </methodsynopsis>
 
26
    <methodsynopsis language="python">
 
27
        <methodname><link linkend="method-gdkapplaunchcontext--set-icon">set_icon</link></methodname>
 
28
        <methodparam><parameter role="keyword">icon</parameter></methodparam>
 
29
    </methodsynopsis>
 
30
    <methodsynopsis language="python">
 
31
        <methodname><link linkend="method-gdkapplaunchcontext--set-icon-name">set_icon_name</link></methodname>
 
32
        <methodparam><parameter role="keyword">icon_name</parameter></methodparam>
 
33
    </methodsynopsis>
 
34
    <methodsynopsis language="python">
 
35
        <methodname><link linkend="method-gdkapplaunchcontext--set-screen">set_screen</link></methodname>
 
36
        <methodparam><parameter role="keyword">screen</parameter></methodparam>
 
37
    </methodsynopsis>
 
38
    <methodsynopsis language="python">
 
39
        <methodname><link linkend="method-gdkapplaunchcontext--set-timestamp">set_timestamp</link></methodname>
 
40
        <methodparam><parameter role="keyword">timestamp</parameter></methodparam>
 
41
    </methodsynopsis>
 
42
    
 
43
    </classsynopsis>
 
44
    </refsect1>
 
45
 
 
46
    <refsect1>
 
47
        <title>Ancestry</title>
 
48
 
 
49
<synopsis>+-- <link linkend="class-gioapplaunchcontext">gio.AppLaunchContext</link>
 
50
  +-- <link linkend="class-gdkapplaunchcontext">gtk.gdk.AppLaunchContext</link>
 
51
</synopsis>
 
52
 
 
53
    </refsect1>
 
54
 
 
55
    <refsect1>
 
56
        <title>Description</title>
 
57
 
 
58
        <para>
 
59
            The <link linkend="class-gdkapplaunchcontext"><classname>gtk.gdk.AppLaunchContext</classname></link>
 
60
            is an implementation of <link linkend="class-gioapplaunchcontext">gio.AppLaunchContext</link>
 
61
            that handles launching an application in a graphical context. It provides startup notification
 
62
            and allows to launch applications on a specific screen or workspace.
 
63
        </para>
 
64
    </refsect1>
 
65
 
 
66
    <refsect1>
 
67
        <title>Methods</title>
 
68
 
 
69
        <refsect2 id="method-gdkapplaunchcontext--set-display">
 
70
            <title>gtk.gdk.AppLaunchContext.set_display</title>
 
71
 
 
72
            <programlisting><methodsynopsis language="python">
 
73
                <methodname>set_display</methodname>
 
74
                <methodparam></methodparam>
 
75
            </methodsynopsis></programlisting>
 
76
            
 
77
            <variablelist>
 
78
                <varlistentry>
 
79
                    <term><parameter>display</parameter>&nbsp;:</term>
 
80
                    <listitem><simpara>a
 
81
                    <link linkend="class-gdkdisplay"><classname>gtk.gdk.Display</classname></link>.
 
82
                    </simpara></listitem>
 
83
                </varlistentry>
 
84
            </variablelist>
 
85
 
 
86
            <note>
 
87
                <para>This method is available in PyGTK 2.14 and above.</para>
 
88
            </note>
 
89
    
 
90
            <para>
 
91
                The <methodname>set_display</methodname>() method sets the display
 
92
                on which applications will be launched when using this context. See also
 
93
                <methodname><link linkend="method-gdkapplaunchcontext--set-screen">set_screen</link></methodname>.
 
94
            </para>
 
95
        </refsect2>
 
96
 
 
97
        <refsect2 id="method-gdkapplaunchcontext--set-desktop">
 
98
            <title>gtk.gdk.AppLaunchContext.set_desktop</title>
 
99
 
 
100
            <programlisting><methodsynopsis language="python">
 
101
                <methodname>set_desktop</methodname>
 
102
                <methodparam></methodparam>
 
103
            </methodsynopsis></programlisting>
 
104
            
 
105
            <variablelist>
 
106
                <varlistentry>
 
107
                    <term><parameter>desktop</parameter>&nbsp;:</term>
 
108
                    <listitem><simpara>the number of a workspace, or -1
 
109
                    </simpara></listitem>
 
110
                </varlistentry>
 
111
            </variablelist>
 
112
 
 
113
            <note>
 
114
                <para>This method is available in PyGTK 2.14 and above.</para>
 
115
            </note>
 
116
    
 
117
            <para>
 
118
                The <methodname>set_desktop</methodname>() method sets the workspace
 
119
                on which applications will be launched when using this context when
 
120
                running under a window manager that supports multiple workspaces, as
 
121
                described in the Extended Window Manager Hints.
 
122
            </para>
 
123
            <para>
 
124
                When the workspace is not specified or desktop is set to -1, it is
 
125
                up to the window manager to pick one, typically it will be the current workspace.
 
126
            </para>
 
127
        </refsect2>
 
128
 
 
129
        <refsect2 id="method-gdkapplaunchcontext--set-icon">
 
130
            <title>gtk.gdk.AppLaunchContext.set_icon</title>
 
131
 
 
132
            <programlisting><methodsynopsis language="python">
 
133
                <methodname>set_icon</methodname>
 
134
                <methodparam></methodparam>
 
135
            </methodsynopsis></programlisting>
 
136
            
 
137
            <variablelist>
 
138
                <varlistentry>
 
139
                    <term><parameter>icon</parameter>&nbsp;:</term>
 
140
                    <listitem><simpara>a
 
141
                    <link linkend="class-gioicon"><classname>gio.Icon</classname></link>,
 
142
                    or <literal>None</literal>.
 
143
                    </simpara></listitem>
 
144
                </varlistentry>
 
145
            </variablelist>
 
146
 
 
147
            <note>
 
148
                <para>This method is available in PyGTK 2.14 and above.</para>
 
149
            </note>
 
150
    
 
151
            <para>
 
152
                The <methodname>set_icon</methodname>() method sets the icon for
 
153
                applications that are launched with this context. See also
 
154
                <methodname><link linkend="method-gdkapplaunchcontext--set-icon-name">set_icon_name</link></methodname>.
 
155
            </para>
 
156
        </refsect2>
 
157
 
 
158
        <refsect2 id="method-gdkapplaunchcontext--set-icon-name">
 
159
            <title>gtk.gdk.AppLaunchContext.set_icon_name</title>
 
160
 
 
161
            <programlisting><methodsynopsis language="python">
 
162
                <methodname>set_icon_name</methodname>
 
163
                <methodparam></methodparam>
 
164
            </methodsynopsis></programlisting>
 
165
            
 
166
            <variablelist>
 
167
                <varlistentry>
 
168
                    <term><parameter>icon_name</parameter>&nbsp;:</term>
 
169
                    <listitem><simpara>an icon name, or <literal>None</literal>.
 
170
                    </simpara></listitem>
 
171
                </varlistentry>
 
172
            </variablelist>
 
173
 
 
174
            <note>
 
175
                <para>This method is available in PyGTK 2.14 and above.</para>
 
176
            </note>
 
177
    
 
178
            <para>
 
179
                The <methodname>set_icon_name</methodname>() method sets the icon
 
180
                for applications that are launched with this context. The icon_name
 
181
                will be interpreted in the same way as the Icon field in desktop files. See also
 
182
                <methodname><link linkend="method-gdkapplaunchcontext--set-icon">set_icon</link></methodname>.
 
183
            </para>
 
184
            <para>
 
185
                If both icon and icon_name are set, the icon_name takes priority.
 
186
                If neither icon or icon_name is set, the icon is taken from either the
 
187
                file that is passed to launched application or from the
 
188
                <link linkend="class-gioappinfo"><classname>gio.AppInfo</classname></link>
 
189
                for the launched application itself.
 
190
            </para>
 
191
        </refsect2>
 
192
 
 
193
        <refsect2 id="method-gdkapplaunchcontext--set-timestamp">
 
194
            <title>gtk.gdk.AppLaunchContext.set_timestamp</title>
 
195
 
 
196
            <programlisting><methodsynopsis language="python">
 
197
                <methodname>set_timestamp</methodname>
 
198
                <methodparam></methodparam>
 
199
            </methodsynopsis></programlisting>
 
200
            
 
201
            <variablelist>
 
202
                <varlistentry>
 
203
                    <term><parameter>timestamp</parameter>&nbsp;:</term>
 
204
                    <listitem><simpara>a timestamp 
 
205
                    </simpara></listitem>
 
206
                </varlistentry>
 
207
            </variablelist>
 
208
 
 
209
            <note>
 
210
                <para>This method is available in PyGTK 2.14 and above.</para>
 
211
            </note>
 
212
    
 
213
            <para>
 
214
                The <methodname>set_timestamp</methodname>() method sets the timestamp of
 
215
                context. The timestamp should ideally be taken from the event that triggered the launch. 
 
216
            </para>
 
217
            <para>
 
218
                Window managers can use this information to avoid moving the focus
 
219
                to the newly launched application when the user is busy typing in
 
220
                another window. This is also known as 'focus stealing prevention'.
 
221
            </para>
 
222
        </refsect2>
 
223
    </refsect1>
 
224
</refentry>