Panel plugin interface

Maarten Boekhold boekhold at emirates.net.ae
Fri Sep 10 17:39:17 CEST 2004



Jasper Huijsmans wrote:

> On Fri, Sep 10, 2004 at 02:59:05PM +0400, Maarten Boekhold wrote:

>>Yesterday I asked for information on the panel plugin interface. On the 
>>suggestion of 'benny' on the #xfce IRC channel, I created a list of all 
>>the non-static functions in the panel source files (just the 'panel' 
>>sub-directory).

> Awesome! Please give me some time to go through the list, it's quite extensive
> ;-)

Glad to be able to do something useful :)

> Some are probably specifically intended for plugins, while others may be
> useful in some very specific situations. 

For the plugins that are included in the xfce4-panel module, the 
following functions *and* variables appear to be used (some of the lines 
are wrapped, so take care when reading this)

xfce_plugin_check_version    = xfce4-panel.exe.xfce_plugin_check_version
control_class_set_unique     = xfce4-panel.exe.control_class_set_unique
exec_cmd                     = xfce4-panel.exe.exec_cmd
exec_cmd_silent              = xfce4-panel.exe.exec_cmd_silent
groups_get_arrow_direction   = xfce4-panel.exe.groups_get_arrow_direction
add_tooltip                  = xfce4-panel.exe.add_tooltip
icon_size                    = xfce4-panel.exe.icon_size
get_pixbuf_by_id             = xfce4-panel.exe.get_pixbuf_by_id
create_command_options       = xfce4-panel.exe.create_command_options
command_options_get_command  = xfce4-panel.exe.command_options_get_command
command_options_set_command  = xfce4-panel.exe.command_options_set_command
select_file_name             = xfce4-panel.exe.select_file_name
themed_pixbuf_from_name_list = xfce4-panel.exe.themed_pixbuf_from_name_list
xmlconfig                    = xfce4-panel.exe.xmlconfig
hide_current_popup_menu      = xfce4-panel.exe.hide_current_popup_menu
disable_user_config          = xfce4-panel.exe.disable_user_config
mcs_dialog                   = xfce4-panel.exe.mcs_dialog
quit                         = xfce4-panel.exe.quit
border_width                 = xfce4-panel.exe.border_width


> As a side note this work may just come in handy when designing a new plugin 
> system for 4.4 as well.

Ah, cool. A new system. My personal hint: if there are anyt global 
variables that can be accessed by plugins (xmlconfig, border_width 
etc.), a pointer to them should be included in the control structure 
that is passed to plugins. Much cleaner than having the plugins 
accessing them directly. We could also do that for all functions btw.

Maarten



More information about the Xfce4-dev mailing list