<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>glibmm: Gio::AppLaunchContext Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"> <ul> <li><a class="el" href="namespaceGio.html">Gio</a> </li> <li><a class="el" href="classGio_1_1AppLaunchContext.html">AppLaunchContext</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#related">Related Functions</a> </div> <div class="headertitle"> <h1>Gio::AppLaunchContext Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="Gio::AppLaunchContext" --><!-- doxytag: inherits="Glib::Object" --> <p>This is used to handle, for instance, startup notification and launching of the new application on the same screen as the launching window. <a href="#_details">More...</a></p> <p><code>#include <giomm/appinfo.h></code></p> <!-- startSectionHeader --><div class="dynheader"> Inheritance diagram for Gio::AppLaunchContext:<!-- endSectionHeader --></div> <!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent"> <div class="center"><img src="classGio_1_1AppLaunchContext__inherit__graph.png" border="0" usemap="#Gio_1_1AppLaunchContext_inherit__map" alt="Inheritance graph"/></div> <map name="Gio_1_1AppLaunchContext_inherit__map" id="Gio_1_1AppLaunchContext_inherit__map"> <area shape="rect" id="node2" href="classGlib_1_1Object.html" title="Glib::Object" alt="" coords="44,160,137,189"/><area shape="rect" id="node4" href="classGlib_1_1ObjectBase.html" title="Glib::ObjectBase is a common base class for Objects and Interfaces." alt="" coords="28,83,153,112"/><area shape="rect" id="node6" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="33,5,148,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div> <p><a href="classGio_1_1AppLaunchContext-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#a11fe8b5d8eb6de7c6d1a19d77d366c98">~AppLaunchContext</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">GAppLaunchContext* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#a41ed3abab4ad83b765974dfa6cb66067">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a41ed3abab4ad83b765974dfa6cb66067"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const GAppLaunchContext* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#aa05603f4fe010e75df7ca950183b9224">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#aa05603f4fe010e75df7ca950183b9224"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">GAppLaunchContext* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#ac14e1569a0a5a81f846c0e11e7109011">gobj_copy</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#ac14e1569a0a5a81f846c0e11e7109011"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01202.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#acb9df3c4d0856cf54725a0ec1baf29cb">get_display</a> (const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1AppInfo.html">AppInfo</a> >& info, const <a class="el" href="classGlib_1_1ListHandle.html">Glib::ListHandle</a>< <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1File.html">Gio::File</a> > >& files)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the display string for the <em>context</em>. <a href="#acb9df3c4d0856cf54725a0ec1baf29cb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01202.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#ac76a58054fccd2cfc6f3554e1d4b012a">get_startup_notify_id</a> (const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1AppInfo.html">AppInfo</a> >& info, const <a class="el" href="classGlib_1_1ListHandle.html">Glib::ListHandle</a>< <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1File.html">Gio::File</a> > >& files)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Initiates startup notification for the application and returns the <envar>DESKTOP_STARTUP_ID</envar> for the launched operation, if supported. <a href="#ac76a58054fccd2cfc6f3554e1d4b012a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#aeb5fe002776ad4f040b6be49fa25b46a">launch_failed</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01202.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>& startup_notify_id)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Called when an application has failed to launch, so that it can cancel the application startup notification started in g_app_launch_context_get_startup_notify_id(). <a href="#aeb5fe002776ad4f040b6be49fa25b46a"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br class="typebreak"/> < <a class="el" href="classGio_1_1AppLaunchContext.html">AppLaunchContext</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#a9e0b952987932c15f4f8ac7ae6d2e046">create</a> ()</td></tr> <tr><td colspan="2"><h2><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#a04c6b83e39f16c6ae04ad10c387e2cec">AppLaunchContext</a> ()</td></tr> <tr><td colspan="2"><h2><a name="related"></a> Related Functions</h2></td></tr> <tr><td colspan="2"><p>(Note that these are not member functions.) </p> <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br class="typebreak"/> < <a class="el" href="classGio_1_1AppLaunchContext.html">Gio::AppLaunchContext</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1AppLaunchContext.html#a3cda3d0a285e3ad87f1c94142b04a688">wrap</a> (GAppLaunchContext* object, bool take_copy=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#a3cda3d0a285e3ad87f1c94142b04a688"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>This is used to handle, for instance, startup notification and launching of the new application on the same screen as the launching window. </p> <p>See also <a class="el" href="classGio_1_1AppInfo.html" title="Application information, to describe applications installed on the system, and launch them...">AppInfo</a>.</p> <dl class="since_2_16"><dt><b><a class="el" href="since_2_16.html#_since_2_16000013">Since glibmm 2.16:</a></b></dt><dd></dd></dl> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a11fe8b5d8eb6de7c6d1a19d77d366c98"></a><!-- doxytag: member="Gio::AppLaunchContext::~AppLaunchContext" ref="a11fe8b5d8eb6de7c6d1a19d77d366c98" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gio::AppLaunchContext::~AppLaunchContext </td> <td>(</td> <td class="paramname"> )</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a04c6b83e39f16c6ae04ad10c387e2cec"></a><!-- doxytag: member="Gio::AppLaunchContext::AppLaunchContext" ref="a04c6b83e39f16c6ae04ad10c387e2cec" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gio::AppLaunchContext::AppLaunchContext </td> <td>(</td> <td class="paramname"> )</td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a9e0b952987932c15f4f8ac7ae6d2e046"></a><!-- doxytag: member="Gio::AppLaunchContext::create" ref="a9e0b952987932c15f4f8ac7ae6d2e046" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1AppLaunchContext.html">AppLaunchContext</a>> Gio::AppLaunchContext::create </td> <td>(</td> <td class="paramname"> )</td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="acb9df3c4d0856cf54725a0ec1baf29cb"></a><!-- doxytag: member="Gio::AppLaunchContext::get_display" ref="acb9df3c4d0856cf54725a0ec1baf29cb" args="(const Glib::RefPtr< AppInfo > &info, const Glib::ListHandle< Glib::RefPtr< Gio::File > > &files)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01202.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> Gio::AppLaunchContext::get_display </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1AppInfo.html">AppInfo</a> >& </td> <td class="paramname"> <em>info</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classGlib_1_1ListHandle.html">Glib::ListHandle</a>< <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1File.html">Gio::File</a> > >& </td> <td class="paramname"> <em>files</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the display string for the <em>context</em>. </p> <p>This is used to ensure new applications are started on the same display as the launching application, by setting the <envar>DISPLAY</envar> environment variable. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">info</td><td>A <a class="el" href="classGio_1_1AppInfo.html" title="Application information, to describe applications installed on the system, and launch them...">AppInfo</a>. </td></tr> <tr><td class="paramname">files</td><td>A List of <a class="el" href="classGio_1_1File.html" title="File and directory handling.">File</a> objects. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A display string for the display. </dd></dl> </div> </div> <a class="anchor" id="ac76a58054fccd2cfc6f3554e1d4b012a"></a><!-- doxytag: member="Gio::AppLaunchContext::get_startup_notify_id" ref="ac76a58054fccd2cfc6f3554e1d4b012a" args="(const Glib::RefPtr< AppInfo > &info, const Glib::ListHandle< Glib::RefPtr< Gio::File > > &files)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01202.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> Gio::AppLaunchContext::get_startup_notify_id </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1AppInfo.html">AppInfo</a> >& </td> <td class="paramname"> <em>info</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classGlib_1_1ListHandle.html">Glib::ListHandle</a>< <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1File.html">Gio::File</a> > >& </td> <td class="paramname"> <em>files</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Initiates startup notification for the application and returns the <envar>DESKTOP_STARTUP_ID</envar> for the launched operation, if supported. </p> <p>Startup notification IDs are defined in the . </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">info</td><td>A <a class="el" href="classGio_1_1AppInfo.html" title="Application information, to describe applications installed on the system, and launch them...">AppInfo</a>. </td></tr> <tr><td class="paramname">files</td><td>A List of of <a class="el" href="classGio_1_1File.html" title="File and directory handling.">File</a> objects. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A startup notification ID for the application, or <code>0</code> if not supported. </dd></dl> </div> </div> <a class="anchor" id="a41ed3abab4ad83b765974dfa6cb66067"></a><!-- doxytag: member="Gio::AppLaunchContext::gobj" ref="a41ed3abab4ad83b765974dfa6cb66067" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GAppLaunchContext* Gio::AppLaunchContext::gobj </td> <td>(</td> <td class="paramname"> )</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGlib_1_1ObjectBase.html#a4c6efc18be8cb9c56e58fc0bd20fafbe">Glib::ObjectBase</a>.</p> </div> </div> <a class="anchor" id="aa05603f4fe010e75df7ca950183b9224"></a><!-- doxytag: member="Gio::AppLaunchContext::gobj" ref="aa05603f4fe010e75df7ca950183b9224" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GAppLaunchContext* Gio::AppLaunchContext::gobj </td> <td>(</td> <td class="paramname"> )</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGlib_1_1ObjectBase.html#a778a94181132976bbfb0519793f3b32e">Glib::ObjectBase</a>.</p> </div> </div> <a class="anchor" id="ac14e1569a0a5a81f846c0e11e7109011"></a><!-- doxytag: member="Gio::AppLaunchContext::gobj_copy" ref="ac14e1569a0a5a81f846c0e11e7109011" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GAppLaunchContext* Gio::AppLaunchContext::gobj_copy </td> <td>(</td> <td class="paramname"> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p> </div> </div> <a class="anchor" id="aeb5fe002776ad4f040b6be49fa25b46a"></a><!-- doxytag: member="Gio::AppLaunchContext::launch_failed" ref="aeb5fe002776ad4f040b6be49fa25b46a" args="(const std::string &startup_notify_id)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::AppLaunchContext::launch_failed </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01202.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"> <em>startup_notify_id</em> )</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Called when an application has failed to launch, so that it can cancel the application startup notification started in g_app_launch_context_get_startup_notify_id(). </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">startup_notify_id</td><td>The startup notification id that was returned by g_app_launch_context_get_startup_notify_id(). </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Friends And Related Function Documentation</h2> <a class="anchor" id="a3cda3d0a285e3ad87f1c94142b04a688"></a><!-- doxytag: member="Gio::AppLaunchContext::wrap" ref="a3cda3d0a285e3ad87f1c94142b04a688" args="(GAppLaunchContext *object, bool take_copy=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1AppLaunchContext.html">Gio::AppLaunchContext</a> > wrap </td> <td>(</td> <td class="paramtype">GAppLaunchContext * </td> <td class="paramname"> <em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>take_copy</em> = <code>false</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p>A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">object</td><td>The C instance. </td></tr> <tr><td class="paramname">take_copy</td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div> </div> <hr class="footer"/><address class="footer"><small>Generated on Tue Apr 5 2011 16:07:12 for glibmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address> </body> </html>