~ubuntu-branches/ubuntu/vivid/xfce4-panel/vivid

« back to all changes in this revision

Viewing changes to docs/references/html/libxfce4panel-plugins.html

  • Committer: Package Import Robot
  • Author(s): Lionel Le Folgoc
  • Date: 2013-07-07 10:54:09 UTC
  • mfrom: (4.2.15 sid)
  • Revision ID: package-import@ubuntu.com-20130707105409-nam2sh68h1reuiv4
Tags: 4.10.1-1ubuntu1
* Merge from Debian unstable, remaining Ubuntu changes:
  - debian/patches:
    + xubuntu_migrate-tasklist-separator.patch: added, try to be smart and
      work around the non-expandable tasklist plugin from 4.10 by setting
      as expandable the separator next to it (should work with the default
      panel layouts from Xubuntu, Mythbuntu and UbuntuStudio).
    + xubuntu_add-calendar-popup-to-clock-plugin.patch: added, taken from
      upstream git to show a calendar when left-clicking on the clock plugin
      (so we don't need orage/xfce4-datetime-plugin for this feature only).

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Part II. Panel Plugins</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="Libxfce4panel Reference Manual">
8
8
<link rel="up" href="index.html" title="Libxfce4panel Reference Manual">
9
9
<link rel="prev" href="libxfce4panel-Commonly-used-plugin-macros.html" title="Commonly used plugin macros">
24
24
<a name="libxfce4panel-plugins"></a>Part II. Panel Plugins</h1></div></div></div>
25
25
<div class="toc">
26
26
<p><b>Table of Contents</b></p>
27
 
<dl>
 
27
<dl class="toc">
28
28
<dt>
29
29
<span class="refentrytitle"><a href="XfcePanelPlugin.html">XfcePanelPlugin</a></span><span class="refpurpose"> — Interface for panel plugins</span>
30
30
</dt>
47
47
      executable and do you want to write a plugin as a GObject.</p>
48
48
<div class="sect2">
49
49
<div class="titlepage"><div><div><h3 class="title">
50
 
<a name="idp3817840"></a>Internal or external</h3></div></div></div>
 
50
<a name="idp199424"></a>Internal or external</h3></div></div></div>
51
51
<p>In 4.6 you had to choose to compile a plugin as an executable to run it external (with
52
52
        the appropriate macro to register external plugins) and the same for internal plugins that
53
53
        were compiled a modules. This worked quite good, but had a couple of disadvantages:</p>
54
 
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 
54
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
55
55
<li class="listitem"><p>To switch between internal and external you needed to change the build system and
56
56
            registration macros, so this was not very flexible.</p></li>
57
57
<li class="listitem"><p>When changes were made in the registration macros (esp the ones for external plugins)
74
74
</div>
75
75
<div class="sect2">
76
76
<div class="titlepage"><div><div><h3 class="title">
77
 
<a name="idp150640"></a>GObject plugins</h3></div></div></div>
 
77
<a name="idp115728"></a>GObject plugins</h3></div></div></div>
78
78
<p>To handle the difference in 4.6 between internal and external plugins, the plugin API contained
79
79
        3 different types. There were two objects <span class="structname">XfceInternalPanelPlugin</span> and
80
80
        <span class="structname">XfceExternalPanelPlugin</span> based on a different parents (resp.
85
85
        this reduced a lot of code in libxfce4panel, it also has the advantage that it is easier to write
86
86
        plugins as GObject with <code class="varname">XFCE_TYPE_PANEL_PLUGIN</code> as parent type. This brings a couple
87
87
        of new advantages compared to plugins with register functions:</p>
88
 
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>You can easily cast you plugin to an <span class="structname">XfcePanelPlugin</span>, so
 
88
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>You can easily cast you plugin to an <span class="structname">XfcePanelPlugin</span>, so
89
89
            no need for custom structures. You also get all the GOBject features like type checking.</p></li></ul></div>
90
90
<p>Downside is that you have to register all other types you create inside you plugin and that it
91
91
        could be a bit difficult (when running internal) with special libraries. To work around the latter