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">
5
<refentry id="class-gdkapplaunchcontext">
7
<refname>gtk.gdk.AppLaunchContext</refname>
8
<refpurpose>Startup notification for applications.</refpurpose>
12
<title>Synopsis</title>
14
<classsynopsis language="python">
15
<ooclass><classname>gtk.gdk.AppLaunchContext</classname></ooclass>
16
<ooclass><classname><link linkend="class-gioapplaunchcontext">gio.AppLaunchContext</link></classname></ooclass>
18
<methodsynopsis language="python">
19
<methodname><link linkend="method-gdkapplaunchcontext--set-desktop">set_desktop</link></methodname>
20
<methodparam><parameter role="keyword">desktop</parameter></methodparam>
22
<methodsynopsis language="python">
23
<methodname><link linkend="method-gdkapplaunchcontext--set-display">set_display</link></methodname>
24
<methodparam><parameter role="keyword">display</parameter></methodparam>
26
<methodsynopsis language="python">
27
<methodname><link linkend="method-gdkapplaunchcontext--set-icon">set_icon</link></methodname>
28
<methodparam><parameter role="keyword">icon</parameter></methodparam>
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>
34
<methodsynopsis language="python">
35
<methodname><link linkend="method-gdkapplaunchcontext--set-screen">set_screen</link></methodname>
36
<methodparam><parameter role="keyword">screen</parameter></methodparam>
38
<methodsynopsis language="python">
39
<methodname><link linkend="method-gdkapplaunchcontext--set-timestamp">set_timestamp</link></methodname>
40
<methodparam><parameter role="keyword">timestamp</parameter></methodparam>
47
<title>Ancestry</title>
49
<synopsis>+-- <link linkend="class-gioapplaunchcontext">gio.AppLaunchContext</link>
50
+-- <link linkend="class-gdkapplaunchcontext">gtk.gdk.AppLaunchContext</link>
56
<title>Description</title>
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.
67
<title>Methods</title>
69
<refsect2 id="method-gdkapplaunchcontext--set-display">
70
<title>gtk.gdk.AppLaunchContext.set_display</title>
72
<programlisting><methodsynopsis language="python">
73
<methodname>set_display</methodname>
74
<methodparam></methodparam>
75
</methodsynopsis></programlisting>
79
<term><parameter>display</parameter> :</term>
81
<link linkend="class-gdkdisplay"><classname>gtk.gdk.Display</classname></link>.
87
<para>This method is available in PyGTK 2.14 and above.</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>.
97
<refsect2 id="method-gdkapplaunchcontext--set-desktop">
98
<title>gtk.gdk.AppLaunchContext.set_desktop</title>
100
<programlisting><methodsynopsis language="python">
101
<methodname>set_desktop</methodname>
102
<methodparam></methodparam>
103
</methodsynopsis></programlisting>
107
<term><parameter>desktop</parameter> :</term>
108
<listitem><simpara>the number of a workspace, or -1
109
</simpara></listitem>
114
<para>This method is available in PyGTK 2.14 and above.</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.
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.
129
<refsect2 id="method-gdkapplaunchcontext--set-icon">
130
<title>gtk.gdk.AppLaunchContext.set_icon</title>
132
<programlisting><methodsynopsis language="python">
133
<methodname>set_icon</methodname>
134
<methodparam></methodparam>
135
</methodsynopsis></programlisting>
139
<term><parameter>icon</parameter> :</term>
141
<link linkend="class-gioicon"><classname>gio.Icon</classname></link>,
142
or <literal>None</literal>.
143
</simpara></listitem>
148
<para>This method is available in PyGTK 2.14 and above.</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>.
158
<refsect2 id="method-gdkapplaunchcontext--set-icon-name">
159
<title>gtk.gdk.AppLaunchContext.set_icon_name</title>
161
<programlisting><methodsynopsis language="python">
162
<methodname>set_icon_name</methodname>
163
<methodparam></methodparam>
164
</methodsynopsis></programlisting>
168
<term><parameter>icon_name</parameter> :</term>
169
<listitem><simpara>an icon name, or <literal>None</literal>.
170
</simpara></listitem>
175
<para>This method is available in PyGTK 2.14 and above.</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>.
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.
193
<refsect2 id="method-gdkapplaunchcontext--set-timestamp">
194
<title>gtk.gdk.AppLaunchContext.set_timestamp</title>
196
<programlisting><methodsynopsis language="python">
197
<methodname>set_timestamp</methodname>
198
<methodparam></methodparam>
199
</methodsynopsis></programlisting>
203
<term><parameter>timestamp</parameter> :</term>
204
<listitem><simpara>a timestamp
205
</simpara></listitem>
210
<para>This method is available in PyGTK 2.14 and above.</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.
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'.