Wrapping the panel

Bo Lorentsen bl at lue.dk
Mon Sep 7 23:20:25 CEST 2009

Nick Schermer wrote:
> XfceInternalPanelPlugin is an object that implements the
> XfcePanelPlugin interface, with a GtkEvenBox as parent
> type.XfceExternalPanelPlugin the same but with a GtkPlug as parent
> type. XfcePanelPlugin (the iface) also implements a base for the
> signals and properties.
Hmm, the XfcePanelPlugin don't seem like a interface to me, and 
technically a pure interface can't have signals nor properties.

But, what is important is that in C++ it would be nice/needed to make 
real class specializations. This means that C++ need to be able to 
inherit a user made class (the new plugin) and then register this to the 

We can make all kind of fancy stuff to help the end user doing this like 
template wrappers or macros, but I need to be able to specialize to make 
sense in a C++ environment.
> Both the internal and external plugins also implement the
> XfcePanelItem interface, which is the communication between the panel
> and plugin (XfcePanelPlugin interface the users' side of the
> implementation).
Ok, this XfcePanelItemInterface is new to the 4.8 version of the panel ?

Are there any working doc. on the internal of this new panel ?
> No, when you construct a panel plugin you get either an external or
> internal plugin (say and eventbox or a plug), you communicate with
> that through the iface. The XfcePanelPlugin base_init registers the
> signals and properties for both the internal and external object.
Yeps, I think I got that, but to me it looks like the XfcePanelPlugin 
(line 31 in xfce-panel-plugin-iface.h) interface has the properties and 
signals, but it is in fact the XfceExternalPanelPlugin that enherits 
from GtkPlug that again end up with a GObject, but it fullfill the 

In C++ I can't put properties and signals on the interface 
(XfcePanelPluginInterface), so I would need something like a common 
class between the external and internal. This is again not possible, as 
we only use single enheritment in GTK+, so ... I have a challenge here :-)

So to me we need something like this (internal and external may 
disappear in 4.8 ?)

    XfcePanelPlugin  <- XfcePanelPluginInterface

I hope this make sense ...
> We (Jasper is with me on this one, I know ;-) admit this
> implementation is quite complicated. 
It seems to me that you broke a few GTK+ roles too :-)
> Therefor I simplified this in the
> devel/4.8 panel. There the XfcePanelPlugin is a 'normal' object with 1
> iface for the panel specific communication. 
I will look forward to se how this looks ...
> If the 4.6 implementation
> is too complicated for the c++ bindings, I suggest to focus on the
> devel panel, which will be a lot easier for you. I'm even for api
> breaks if stuff is not c++-wrap-able at this point of development.
Ok, I'm in ... but I guess I need to make the new panel work on my dev. 
system too. I use to be more conservative when setting up development 
env. :-)

Looking forward to se how this goes :-)


More information about the Xfce4-dev mailing list