Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Application launching: GDK 2 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GDK 2 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk2-X-Window-System-Interaction.html" title="X Window System Interaction">
<link rel="next" href="gdk2-Testing.html" title="Testing">
<meta name="generator" content="GTK-Doc V1.26.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gdk2-Application-launching.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdk2-X-Window-System-Interaction.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gdk2-Testing.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdk2-Application-launching"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk2-Application-launching.top_of_page"></a>Application launching</span></h2>
<p>Application launching</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gdk2-Application-launching.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="returnvalue">GdkAppLaunchContext</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-new" title="gdk_app_launch_context_new ()">gdk_app_launch_context_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-display" title="gdk_app_launch_context_set_display ()">gdk_app_launch_context_set_display</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-screen" title="gdk_app_launch_context_set_screen ()">gdk_app_launch_context_set_screen</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-desktop" title="gdk_app_launch_context_set_desktop ()">gdk_app_launch_context_set_desktop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-timestamp" title="gdk_app_launch_context_set_timestamp ()">gdk_app_launch_context_set_timestamp</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-icon" title="gdk_app_launch_context_set_icon ()">gdk_app_launch_context_set_icon</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-icon-name" title="gdk_app_launch_context_set_icon_name ()">gdk_app_launch_context_set_icon_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk2-Application-launching.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext">GdkAppLaunchContext</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk2-Application-launching.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gdk/gdkx.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gdk2-Application-launching.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="gdk2-Application-launching.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdk-app-launch-context-new"></a><h3>gdk_app_launch_context_new ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="returnvalue">GdkAppLaunchContext</span></a> *
gdk_app_launch_context_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a>.</p>
<div class="refsect3">
<a name="gdk-app-launch-context-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-app-launch-context-set-display"></a><h3>gdk_app_launch_context_set_display ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_app_launch_context_set_display (<em class="parameter"><code><a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a> *context</code></em>,
                                    <em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>);</pre>
<p>Sets the display on which applications will be launched when
using this context. See also <a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-screen" title="gdk_app_launch_context_set_screen ()"><code class="function">gdk_app_launch_context_set_screen()</code></a>.</p>
<div class="refsect3">
<a name="gdk-app-launch-context-set-display.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>display</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-app-launch-context-set-screen"></a><h3>gdk_app_launch_context_set_screen ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_app_launch_context_set_screen (<em class="parameter"><code><a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a> *context</code></em>,
                                   <em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
<p>Sets the screen on which applications will be launched when
using this context. See also <a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-display" title="gdk_app_launch_context_set_display ()"><code class="function">gdk_app_launch_context_set_display()</code></a>.</p>
<p>If both <em class="parameter"><code>screen</code></em>
 and <em class="parameter"><code>display</code></em>
 are set, the <em class="parameter"><code>screen</code></em>
 takes priority.
If neither <em class="parameter"><code>screen</code></em>
 or <em class="parameter"><code>display</code></em>
 are set, the default screen and
display are used.</p>
<div class="refsect3">
<a name="gdk-app-launch-context-set-screen.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>screen</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-app-launch-context-set-desktop"></a><h3>gdk_app_launch_context_set_desktop ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_app_launch_context_set_desktop (<em class="parameter"><code><a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a> *context</code></em>,
                                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> desktop</code></em>);</pre>
<p>Sets the workspace on which applications will be launched when
using this context when running under a window manager that 
supports multiple workspaces, as described in the </p>
<a class="ulink" href="http://www.freedesktop.org/Standards/wm-spec" target="_top">Extended 
Window Manager Hints</a>. 
<p>When the workspace is not specified or <em class="parameter"><code>desktop</code></em>
 is set to -1, 
it is up to the window manager to pick one, typically it will
be the current workspace.</p>
<div class="refsect3">
<a name="gdk-app-launch-context-set-desktop.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>desktop</p></td>
<td class="parameter_description"><p>the number of a workspace, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-app-launch-context-set-timestamp"></a><h3>gdk_app_launch_context_set_timestamp ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_app_launch_context_set_timestamp (<em class="parameter"><code><a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a> *context</code></em>,
                                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> timestamp</code></em>);</pre>
<p>Sets the timestamp of <em class="parameter"><code>context</code></em>
. The timestamp should ideally
be taken from the event that triggered the launch. </p>
<p>Window managers can use this information to avoid moving the
focus to the newly launched application when the user is busy
typing in another window. This is also known as 'focus stealing
prevention'.</p>
<div class="refsect3">
<a name="gdk-app-launch-context-set-timestamp.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timestamp</p></td>
<td class="parameter_description"><p>a timestamp</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-app-launch-context-set-icon"></a><h3>gdk_app_launch_context_set_icon ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_app_launch_context_set_icon (<em class="parameter"><code><a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a> *context</code></em>,
                                 <em class="parameter"><code><a href="../gio/GIcon.html#GIcon-struct"><span class="type">GIcon</span></a> *icon</code></em>);</pre>
<p>Sets the icon for applications that are launched with this
context.</p>
<p>Window Managers can use this information when displaying startup
notification.</p>
<p>See also <a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-icon-name" title="gdk_app_launch_context_set_icon_name ()"><code class="function">gdk_app_launch_context_set_icon_name()</code></a>.</p>
<div class="refsect3">
<a name="gdk-app-launch-context-set-icon.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>icon</p></td>
<td class="parameter_description"><p>a <a href="../gio/GIcon.html#GIcon-struct"><span class="type">GIcon</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-app-launch-context-set-icon-name"></a><h3>gdk_app_launch_context_set_icon_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_app_launch_context_set_icon_name (<em class="parameter"><code><a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a> *context</code></em>,
                                      <em class="parameter"><code>const <span class="type">char</span> *icon_name</code></em>);</pre>
<p>Sets the icon for applications that are launched with this context. 
The <em class="parameter"><code>icon_name</code></em>
 will be interpreted in the same way as the Icon field 
in desktop files. See also <a class="link" href="gdk2-Application-launching.html#gdk-app-launch-context-set-icon" title="gdk_app_launch_context_set_icon ()"><code class="function">gdk_app_launch_context_set_icon()</code></a>. </p>
<p>If both <em class="parameter"><code>icon</code></em>
 and <em class="parameter"><code>icon_name</code></em>
 are set, the <em class="parameter"><code>icon_name</code></em>
 takes priority.
If neither <em class="parameter"><code>icon</code></em>
 or <em class="parameter"><code>icon_name</code></em>
 is set, the icon is taken from either 
the file that is passed to launched application or from the <a href="../gio/GAppInfo.html#GAppInfo-struct"><span class="type">GAppInfo</span></a> 
for the launched application itself.</p>
<div class="refsect3">
<a name="gdk-app-launch-context-set-icon-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>context</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk2-Application-launching.html#GdkAppLaunchContext" title="GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>icon_name</p></td>
<td class="parameter_description"><p>an icon name, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
</div>
</div>
<div class="refsect1">
<a name="gdk2-Application-launching.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdkAppLaunchContext"></a><h3>GdkAppLaunchContext</h3>
<pre class="programlisting">typedef struct GdkAppLaunchContext	      GdkAppLaunchContext;
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.26.1</div>
</body>
</html>