<!doctypehtml PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html xmlns=http://www.w3.org/1999/xhtml xmlns:html=http://www.w3.org/1999/xhtml><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta content="text/html; charset=utf-8"><link href=/skin/gtkdoc.css rel=stylesheet><link href=https://static.gnome.org/css/grass-theme-style.css media=all rel=stylesheet><link href=/skin/lgo2010.css media=all rel=stylesheet><link href=/skin/gnome-16.png rel=icon type=image/png><link rel="SHORTCUT ICON"href=/skin/gnome-16.png type=image/png><link title="GNOME Library Search"href=/gnome-library-search.xml rel=search type=application/opensearchdescription+xml><link href=/skin/jquery.autocomplete.css rel=stylesheet><script src=/js/jquery.js></script><script src=/js/jquery.autocomplete.js></script><title>
   Applet Registration, Installation and Build System: Panel Applet Reference Manual
  </title><link title="Panel Applet Reference Manual"href=index.html rel=home><link title="Part II. Getting Started with the Panel Applet library"href=getting-started.html rel=up><link href=getting-started.settings.html rel=prev title=Settings><link title="Out-of-Process vs In-Process"href=getting-started.in-out-process.html rel=next><link href=/skin/jquery.autocomplete.css media=all rel=stylesheet><link href=/skin/960_24_col.css media=all rel=stylesheet><script src=/js/jquery.js></script><script src=/js/jquery.jcarousel.min.js></script><script src=/js/jquery.autocomplete.js></script><body><div id=accessibility_access><ul><li><a href=#container> Go to page content </a><li><a href=#top_bar> Go to main menu </a><li><a onclick="$('#s').focus(); return false;"href=#s> Go to the search field </a></ul></div><div id=global_domain_bar><div class=maxwidth><div class=tab><a class=root href=https://www.gnome.org/> GNOME.org </a></div></div></div><div class=container_12 id=header><div class=grid_3 id=logo><a title="Go to home page"href=/> <img alt="GNOME: The Free Software Desktop Project"src=/skin/gnome-logo-devcenter.png> </a></div><div class=grid_9 id=top_bar><div class=left><div class=menu-globalnav-container><ul class=menu id=menu-globalnav><li class="menu-item menu-item-type-post_type menu-item-6"><a href=/about/> About </a><li class="menu-item menu-item-type-post_type menu-item-23"><a href=https://help.gnome.org/users/> Users </a><li class="menu-item menu-item-type-post_type menu-item-40"><a href=https://help.gnome.org/admin/> Administrators </a><li class=current-menu-item><a href=https://developer.gnome.org/> Developers </a></ul></div></div><div class=right><form action=/symbols/ id=searchform role=search><div><label class=hidden for=q>Search:</label><input id=s name=q placeholder=Search></div></form><script>$('#s').autocomplete('/symbols/lookup/',
        { minChars:3, matchSubset:1, matchContains:1, cacheLength:10,
          selectOnly:1, rowsLimit:25 });</script></div></div></div><div class=clearfix></div><div class="gtk-doc two_columns"id=container><div class=content><table summary="Navigation header"cellpadding=2 cellspacing=5 class=navigation id=top width=100%><tbody><tr valign=middle><td align=left class=shortcuts width=100%><td><a accesskey=h href=index.html> <img alt=Home border=0 height=16 src=home.png width=16> </a><td><a accesskey=u href=getting-started.html> <img alt=Up border=0 height=16 src=up.png width=16> </a><td><a accesskey=p href=getting-started.settings.html> <img alt=Prev border=0 height=16 src=left.png width=16> </a><td><a accesskey=n href=getting-started.in-out-process.html> <img alt=Next border=0 height=16 src=right.png width=16> </a></table><div class=chapter><div class=titlepage><div><div><h2 class=title><a name=getting-started.install> </a> Applet Registration, Installation and Build System</h2></div></div></div><div class=toc><dl class=toc><dt><span class=sect1> <a href=getting-started.install.html#getting-started.install.panel-applet> Panel Applet File Syntax </a> </span><dd><dl><dt><span class=sect2> <a href=getting-started.install.html#id-1.3.7.5.3> Panel Applet File Example </a> </span><dt><span class=sect2> <a href=getting-started.install.html#id-1.3.7.5.4> File Format and well known Fields </a> </span><dt><span class=sect2> <a href=getting-started.install.html#id-1.3.7.5.5> Installation </a> </span></dt></dl><dt><span class=sect1> <a href=getting-started.in-out-process.html> Out-of-Process vs In-Process </a> </span><dt><span class=sect1> <a href=getting-started.install.build-system.html> Build system </a> </span><dd><dl><dt><span class=sect2> <a href=getting-started.install.build-system.html#id-1.3.7.7.2> Configure </a> </span><dt><span class=sect2> <a href=getting-started.install.build-system.html#id-1.3.7.7.3> Makefiles </a> </span></dt></dl></dl></div><p>Simply installing the applet binary will obviously not be enough. The applet also needs to be registered to the panel. In order to do this you need to provide a Panel Applet File. Panel Applet files are ini-style text files with an extension named <code class=constant>
       .panel-applet
      </code> .<div class=warning><p>If you are creating an out-process applet, then you also need to provide a D-Bus service file to automatically start the binary when the panel wants to create an applet.</div><p>This chapter explains the syntax of <code class=constant>
       .panel-applet
      </code> files and gives the necessary information to setup the build system in order to install all the required parts of the applet on the system. For the build system part it is assumed that GNU Autotools (e.g. autoconf and automake) are used.<div class=sect1><div class=titlepage><div><div><h2 style="clear: both"class=title><a name=getting-started.install.panel-applet> </a> Panel Applet File Syntax</h2></div></div></div><p>The <code class=filename>
        .panel-applet
       </code> file is a key file about the applet binary, describing the <a title="Applet Factory"class=link href=getting-started.concepts.html#getting-started.concepts.applet-factory> applet factory </a> of the binary and the <a title="Applet Types"class=link href=getting-started.concepts.html#getting-started.concepts.applet-types> applet types </a> this factory can create.<div class=sect2><div class=titlepage><div><div><h3 class=title><a name=id-1.3.7.5.3> </a> Panel Applet File Example</h3></div></div></div><div class=informalexample><table border=0 cellpadding=0 cellspacing=0 class=listing_frame><tbody><tr><td align=right class=listing_lines><pre>1
2
3
4
5
6
7
8
9</pre><td class=listing_code><pre class=programlisting><span class=p>[</span><span class=n>Applet</span> <span class=n>Factory</span><span class=p>]</span>
<span class=n>Id</span><span class=o>=</span><span class=n>HelloWorldFactory</span>
<span class=n>Name</span><span class=o>=</span><span class=n>Hello</span> <span class=n>World</span> <span class=n>Applet</span> <span class=n>Factory</span>
<span class=n>Description</span><span class=o>=</span><span class=n>Factory</span> <span class=k>for</span> <span class=n>the</span> <span class=n>our</span> <span class=n>example</span> <span class=n>applets</span>

<span class=p>[</span><span class=n>HelloWorldApplet</span><span class=p>]</span>
<span class=n>Name</span><span class=o>=</span><span class=n>Hello</span> <span class=n>World</span>
<span class=n>Description</span><span class=o>=</span><span class=n>Factory</span> <span class=k>for</span> <span class=n>the</span> <span class=n>Hello</span> <span class=n>World</span> <span class=n>example</span> <span class=n>applet</span>
<span class=n>Icon</span><span class=o>=</span><span class=n>hello</span><span class=o>-</span><span class=n>world</span><span class=o>-</span><span class=n>icon</span></pre></table></div></div><div class=sect2><div class=titlepage><div><div><h3 class=title><a name=id-1.3.7.5.4> </a> File Format and well known Fields</h3></div></div></div><p>The file must contain a <code class=constant>
         Applet Factory
        </code> group with the following keys:<div class=itemizedlist><ul style="list-style-type: disc;"class=itemizedlist><li class=listitem><p><code class=constant>
            Id
           </code> (string): the identifier of the applet factory. This must be the same name that will be used as the first parameter to <code class=function>
            PANEL_APPLET_OUT_PROCESS_FACTORY()
           </code> or <a class=link href=libpanel-applet-Panel-Applet-Factory.html#PANEL-APPLET-IN-PROCESS-FACTORY:CAPS title=PANEL_APPLET_IN_PROCESS_FACTORY()> <code class=function>
             PANEL_APPLET_IN_PROCESS_FACTORY()
            </code> </a> .</p><li class=listitem><p><code class=constant>
            InProcess
           </code> (boolean, optional): whether the applet should be <a title="Out-of-Process vs In-Process"class=link href=getting-started.in-out-process.html> in-process or out-of-process </a> . By default, the applet is out-of-process.</p><li class=listitem><p><code class=constant>
            Location
           </code> (string): the path to the applet binary. Only mandatory if <code class=constant>
            InProcess
           </code> is <code class=constant>
            true
           </code> .</p><li class=listitem><p><code class=constant>
            Name
           </code> (localized string, optional): the name of the applet factory. For example: <code class=constant>
            Hello World Factory
           </code> .</p><li class=listitem><p><code class=constant>
            Description
           </code> (localized string, optional): the description of the applet factory. For example: <code class=constant>
            Factory for the Hello World applet example
           </code> .</p></ul></div><p>For each applet type, it must also contain a group named with the applet type identifier. Such a group must have the following keys:<div class=itemizedlist><ul style="list-style-type: disc;"class=itemizedlist><li class=listitem><p><code class=constant>
            Name
           </code> (localized string): the name of the applet type. For example: <code class=constant>
            Hello World
           </code> .</p><li class=listitem><p><code class=constant>
            Description
           </code> (localized string, optional): the description of the applet type. For example: <code class=constant>
            Hello World applet example
           </code> .</p><li class=listitem><p><code class=constant>
            Icon
           </code> (string, optional): the icon name of the applet type. For example: <code class=constant>
            hello-world-icon
           </code> . It can also be the path to an icon, but this not recommended.</p></ul></div></div><div class=sect2><div class=titlepage><div><div><h3 class=title><a name=id-1.3.7.5.5> </a> Installation</h3></div></div></div><p>The <code class=filename>
         .panel-applet
        </code> file must be installed in a specific directory to be discoverable by the panel. The exact path of this directory can be queried with <code class=constant>
         pkg-config
        </code> :<div class=informalexample><table border=0 cellpadding=0 cellspacing=0 class=listing_frame><tbody><tr><td align=right class=listing_lines><pre>1</pre><td class=listing_code><pre class=programlisting><span class=n>pkg</span><span class=o>-</span><span class=n>config</span> <span class=o>--</span><span class=n>variable</span><span class=o>=</span><span class=n>libpanel_applet_dir</span> <span class=n>libpanel</span><span class=o>-</span><span class=n>applet</span></pre></table></div><p>The path depends on how GNOME Panel was compiled and installed so it could be different depending on which Linux distribution is used. Therefore never hard-code the path in your build system but use he above command instead. Please see the <a title="Build system"class=link href=getting-started.install.build-system.html> Build System </a> section for more information on how install a Panel Applet file with autotools.</div></div></div><div class=footer><hr> Generated by GTK-Doc V1.32.1</div></div><div class=default id=footer_art> </div></div><div class=clearfix></div><div id=footer_grass> </div><div id=footer><div class=container_12><div class="links grid_9"><div class=menu-footer-1-container><ul class=menu id=menu-footer-1><li class="menu-item menu-item-type-custom menu-item-home menu-item-88"id=menu-item-88><a href=https://www.gnome.org/> The GNOME Project </a> <ul class=sub-menu><li class="menu-item menu-item-type-post_type menu-item-89"id=menu-item-89><a href=https://www.gnome.org/about/> About Us </a><li class="menu-item menu-item-type-custom menu-item-90"id=menu-item-90><a href=https://www.gnome.org/get-involved/> Get Involved </a><li class="menu-item menu-item-type-custom menu-item-91"id=menu-item-91><a href=https://www.gnome.org/teams/> Teams </a><li class="menu-item menu-item-type-custom menu-item-92"id=menu-item-92><a href=https://foundation.gnome.org> The GNOME Foundation </a><li><a href=https://www.gnome.org/support-gnome/> Support GNOME </a><li><a href=https://www.gnome.org/contact/> Contact </a></ul></ul></div><div class=menu-footer-2-container><ul class=menu id=menu-footer-2><li class="menu-item menu-item-type-post_type current-menu-item page_item page-item-20 current_page_item menu-item-99"id=menu-item-99><a href=#> Resources </a> <ul class=sub-menu><li><a href=https://help.gnome.org> Documentation </a><li><a href=https://wiki.gnome.org> Wiki </a><li><a href=https://mail.gnome.org/mailman/listinfo> Mailing Lists </a><li><a href=https://wiki.gnome.org/GnomeIrcChannels> IRC Channels </a><li><a href=https://gitlab.gnome.org/> Bug Tracker </a><li><a href=https://gitlab.gnome.org/> Development Code </a><li><a href=https://wiki.gnome.org/Jhbuild> Build Tool </a></ul></ul></div><div class=menu-footer-4-container><ul class=menu id=menu-footer-4><li class="menu-item menu-item-type-custom menu-item-104"id=menu-item-104><a href=http://www.gnome.org/news/> News </a> <ul class=sub-menu><li><a href=https://www.gnome.org/start/stable> Latest Release </a><li><a href=https://planet.gnome.org> Planet GNOME </a><li><a href=https://news.gnome.org> Development News </a><li><a href=https://twitter.com/gnome> Twitter </a></ul></ul></div></div><div class="links grid_3 right"><div><ul class="menu available_languages"><li><strong> This website is available in many languages </strong> <ul class=sub-menu><li><a title="Switching Language"href=/languages> Switch Language </a></ul></ul><script src=/js/language.js></script></div></div><div class=grid_9 id=footnotes>Copyright © 2005‒2014 <strong class=gnome_logo> The GNOME Project </strong><br><br><small> Optimised for standards. Hosted by <a href=http://redhat.com> Red Hat </a> . </small></div><div class=clear></div></div></div><script>$(document).ready(function() {
    // Get browser
    $.each($.browser, function(i) {
        $('body').addClass(i);
        return false;
    });

    // Get OS and add it as class to body tag, this then allows forcing some
    // customisation in the CSS rules.
    var match = navigator.userAgent.toLowerCase().match(/(win|mac|linux)/);
    if (match) {
        $('body').addClass(match[0]);
    }
});</script><script>var _paq = _paq || [];
      _paq.push(['disableCookies']);
      _paq.push(["trackPageView"]);
      _paq.push(["enableLinkTracking"]);

      (function() {
        var u=(("https:" == document.location.protocol) ? "https" : "http") + "://webstats.gnome.org/";
        _paq.push(["setTrackerUrl", u+"piwik.php"]);
        _paq.push(["setSiteId", "6"]);
        var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
        g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
      })();</script>