<!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::DesktopAppInfo 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.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <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="tabs"> <ul> <li><a href="annotated.html"><span>Class List</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"><a class="el" href="namespaceGio.html">Gio</a>::<a class="el" href="classGio_1_1DesktopAppInfo.html">DesktopAppInfo</a> </div> </div> <div class="contents"> <h1>Gio::DesktopAppInfo Class Reference</h1><!-- doxytag: class="Gio::DesktopAppInfo" --><!-- doxytag: inherits="Glib::Object,Gio::AppInfo" --> <p><a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a> is an implementation of <a class="el" href="classGio_1_1AppInfo.html" title="Application information, to describe applications installed on the system, and launch...">AppInfo</a> based on desktop files. <a href="#_details">More...</a></p> <p>Inherits <a class="el" href="classGlib_1_1Object.html">Glib::Object</a>, and <a class="el" href="classGio_1_1AppInfo.html">Gio::AppInfo</a>.</p> <div class="dynheader"> Collaboration diagram for Gio::DesktopAppInfo:</div> <div class="dynsection"> <div class="center"><img src="classGio_1_1DesktopAppInfo__coll__graph.png" border="0" usemap="#Gio_1_1DesktopAppInfo_coll__map" alt="Collaboration graph"/></div> <map name="Gio_1_1DesktopAppInfo_coll__map" id="Gio_1_1DesktopAppInfo_coll__map"> <area shape="rect" href="classGlib_1_1Object.html" title="Glib::Object" alt="" coords="5,237,96,267"/><area shape="rect" href="classGlib_1_1ObjectBase.html" title="Glib::ObjectBase is a common base class for Objects and Interfaces." alt="" coords="41,83,161,112"/><area shape="rect" href="classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="108,160,212,189"/><area shape="rect" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="48,5,155,35"/><area shape="rect" href="classGio_1_1AppInfo.html" title="Application information, to describe applications installed on the system, and launch..." alt="" coords="120,237,213,267"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classGio_1_1DesktopAppInfo-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>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_1DesktopAppInfo.html#a8dbb1f225b0f9512c0cef546b7d32012">~DesktopAppInfo</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">GDesktopAppInfo* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1DesktopAppInfo.html#a3098e225a5b79ac496941ae2ab804c0c">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a3098e225a5b79ac496941ae2ab804c0c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const GDesktopAppInfo* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1DesktopAppInfo.html#af6f5698a7fd78187bac77556ac54622f">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#af6f5698a7fd78187bac77556ac54622f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">GDesktopAppInfo* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1DesktopAppInfo.html#a60fe723570666ef15c3b024bdfaf6165">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="#a60fe723570666ef15c3b024bdfaf6165"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1DesktopAppInfo.html#a23113d028a906d5b3e2626dc558f36e6">is_hidden</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A desktop file is hidden if the Hidden key in it is set to True. <a href="#a23113d028a906d5b3e2626dc558f36e6"></a><br/></td></tr> <tr><td colspan="2"><h2>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_1DesktopAppInfo.html">DesktopAppInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1DesktopAppInfo.html#ab6d9c00e00745f57d2e5b35f83060aad">create</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>& desktop_id)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a> based on a desktop file id. <a href="#ab6d9c00e00745f57d2e5b35f83060aad"></a><br/></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_1DesktopAppInfo.html">DesktopAppInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1DesktopAppInfo.html#a4c474a10b54e12eac4cf71ee409c61c0">create_from_keyfile</a> (<a class="el" href="classGlib_1_1KeyFile.html">Glib::KeyFile</a>& key_file)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a>. <a href="#a4c474a10b54e12eac4cf71ee409c61c0"></a><br/></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_1DesktopAppInfo.html">DesktopAppInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1DesktopAppInfo.html#a42dca267f3ad09aaacd4937d20e4ed1d">create_from_filename</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>& filename)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a>. <a href="#a42dca267f3ad09aaacd4937d20e4ed1d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1DesktopAppInfo.html#ad3d07eea529c72d51aa868fe30d63392">set_desktop_env</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>& desktop_env)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the name of the desktop that the application is running in. <a href="#ad3d07eea529c72d51aa868fe30d63392"></a><br/></td></tr> <tr><td colspan="2"><h2>Related Functions</h2></td></tr> <tr><td colspan="2"><p>(Note that these are not member functions.) </p> <br/><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1DesktopAppInfo.html">Gio::DesktopAppInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1DesktopAppInfo.html#ac075226810f278017e3a0fbcc372e739">wrap</a> (GDesktopAppInfo* 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="#ac075226810f278017e3a0fbcc372e739"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p><a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a> is an implementation of <a class="el" href="classGio_1_1AppInfo.html" title="Application information, to describe applications installed on the system, and launch...">AppInfo</a> based on desktop files. </p> <dl class="since_2_16"><dt><b><a class="el" href="since_2_16.html#_since_2_16000046">Since glibmm 2.16:</a></b></dt><dd></dd></dl> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a8dbb1f225b0f9512c0cef546b7d32012"></a><!-- doxytag: member="Gio::DesktopAppInfo::~DesktopAppInfo" ref="a8dbb1f225b0f9512c0cef546b7d32012" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gio::DesktopAppInfo::~DesktopAppInfo </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="ab6d9c00e00745f57d2e5b35f83060aad"></a><!-- doxytag: member="Gio::DesktopAppInfo::create" ref="ab6d9c00e00745f57d2e5b35f83060aad" args="(const std::string &desktop_id)" --> <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_1DesktopAppInfo.html">DesktopAppInfo</a>> Gio::DesktopAppInfo::create </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"> <em>desktop_id</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new <a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a> based on a desktop file id. </p> <p>A desktop file id is the basename of the desktop file, including the .desktop extension. GIO is looking for a desktop file with this name in the <filename>applications</filename> subdirectories of the XDG data directories (i.e. the directories specified in the <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment variables). GIO also supports the prefix-to-subdirectory mapping that is described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink> (i.e. a desktop id of kde-foo.desktop will match <filename>/usr/share/applications/kde/foo.desktop</filename>). </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>desktop_id</em> </td><td>The desktop file id. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a>, or <code>0</code> if no desktop file with that id. </dd></dl> </div> </div> <a class="anchor" id="a42dca267f3ad09aaacd4937d20e4ed1d"></a><!-- doxytag: member="Gio::DesktopAppInfo::create_from_filename" ref="a42dca267f3ad09aaacd4937d20e4ed1d" args="(const std::string &filename)" --> <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_1DesktopAppInfo.html">DesktopAppInfo</a>> Gio::DesktopAppInfo::create_from_filename </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"> <em>filename</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new <a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>The path of a desktop file, in the GLib filename encoding. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a> or <code>0</code> on error. </dd></dl> </div> </div> <a class="anchor" id="a4c474a10b54e12eac4cf71ee409c61c0"></a><!-- doxytag: member="Gio::DesktopAppInfo::create_from_keyfile" ref="a4c474a10b54e12eac4cf71ee409c61c0" args="(Glib::KeyFile &key_file)" --> <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_1DesktopAppInfo.html">DesktopAppInfo</a>> Gio::DesktopAppInfo::create_from_keyfile </td> <td>(</td> <td class="paramtype"><a class="el" href="classGlib_1_1KeyFile.html">Glib::KeyFile</a>& </td> <td class="paramname"> <em>key_file</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new <a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>key_file</em> </td><td>An opened KeyFile. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="classGio_1_1DesktopAppInfo.html" title="DesktopAppInfo is an implementation of AppInfo based on desktop files.">DesktopAppInfo</a> or <code>0</code> on error.</dd></dl> <dl class="since_2_18"><dt><b><a class="el" href="since_2_18.html#_since_2_18000029">Since glibmm 2.18:</a></b></dt><dd></dd></dl> </div> </div> <a class="anchor" id="af6f5698a7fd78187bac77556ac54622f"></a><!-- doxytag: member="Gio::DesktopAppInfo::gobj" ref="af6f5698a7fd78187bac77556ac54622f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GDesktopAppInfo* Gio::DesktopAppInfo::gobj </td> <td>(</td> <td class="paramname"></td> <td> ) </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="classGio_1_1AppInfo.html#a5e52c62432a61c5380bd5dc553898251">Gio::AppInfo</a>.</p> </div> </div> <a class="anchor" id="a3098e225a5b79ac496941ae2ab804c0c"></a><!-- doxytag: member="Gio::DesktopAppInfo::gobj" ref="a3098e225a5b79ac496941ae2ab804c0c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GDesktopAppInfo* Gio::DesktopAppInfo::gobj </td> <td>(</td> <td class="paramname"></td> <td> ) </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="classGio_1_1AppInfo.html#ab31e9bca0208159f0be42227397b8a94">Gio::AppInfo</a>.</p> </div> </div> <a class="anchor" id="a60fe723570666ef15c3b024bdfaf6165"></a><!-- doxytag: member="Gio::DesktopAppInfo::gobj_copy" ref="a60fe723570666ef15c3b024bdfaf6165" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GDesktopAppInfo* Gio::DesktopAppInfo::gobj_copy </td> <td>(</td> <td class="paramname"></td> <td> ) </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="a23113d028a906d5b3e2626dc558f36e6"></a><!-- doxytag: member="Gio::DesktopAppInfo::is_hidden" ref="a23113d028a906d5b3e2626dc558f36e6" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::DesktopAppInfo::is_hidden </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>A desktop file is hidden if the Hidden key in it is set to True. </p> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if hidden, <code>false</code> otherwise. </dd></dl> </div> </div> <a class="anchor" id="ad3d07eea529c72d51aa868fe30d63392"></a><!-- doxytag: member="Gio::DesktopAppInfo::set_desktop_env" ref="ad3d07eea529c72d51aa868fe30d63392" args="(const std::string &desktop_env)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void Gio::DesktopAppInfo::set_desktop_env </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"> <em>desktop_env</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the name of the desktop that the application is running in. </p> <p>This is used by g_app_info_should_show() to evaluate the <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> desktop entry fields.</p> <p>The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop Menu specification</ulink> recognizes the following: <simplelist> <member>GNOME</member> <member>KDE</member> <member>ROX</member> <member>XFCE</member> <member>Old</member> </simplelist></p> <p>Should be called only once; subsequent calls are ignored. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>desktop_env</em> </td><td>A string specifying what desktop this is. </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Friends And Related Function Documentation</h2> <a class="anchor" id="ac075226810f278017e3a0fbcc372e739"></a><!-- doxytag: member="Gio::DesktopAppInfo::wrap" ref="ac075226810f278017e3a0fbcc372e739" args="(GDesktopAppInfo *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_1DesktopAppInfo.html">Gio::DesktopAppInfo</a> > wrap </td> <td>(</td> <td class="paramtype">GDesktopAppInfo * </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><td> </td> </tr> <tr> <td></td> <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 border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>object</em> </td><td>The C instance. </td></tr> <tr><td valign="top"></td><td valign="top"><em>take_copy</em> </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> <hr/>The documentation for this class was generated from the following file:<ul> <li>giomm/desktopappinfo.h</li> </ul> </div> <hr size="1"/><address style="text-align: right;"><small>Generated on Mon Sep 21 11:07:24 2009 for glibmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>