## Register Plugins

Register Plugins — Macros to register a plugin with the Xfce Panel

## Synopsis

    #include <libxfce4panel/libxfce4panel.h>

    #define             XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (construct)
    #define             XFCE_PANEL_PLUGIN_REGISTER_INTERNAL (construct)
    #define             XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL(construct,init,check)
    #define             XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_WITH_CHECK(construct,check)
    #define             XFCE_PANEL_PLUGIN_REGISTER_INTERNAL_WITH_CHECK(construct,check)

## Description

Each plugin needs a macro to register with the panel. Since a plugin can be internal or external, you have to choose the appropriate macro from the 4 below.

## Details

### XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL()

    #define             XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(construct)

Registers and initializes the plugin. This is the only thing that is required to create a panel plugin.

See also: Panel Plugin interface

`construct` : | name of a function that can be cast to an XfcePanelPluginFunc

### XFCE_PANEL_PLUGIN_REGISTER_INTERNAL()

    #define             XFCE_PANEL_PLUGIN_REGISTER_INTERNAL(construct)

Registers and initializes the plugin. This is the only thing that is required to create a panel plugin.

This macro is for plugins implemented as a loadable module. Generally it is preferred to create an external plugin, for which you have to use `XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL()` .

See also: Panel Plugin interface

`construct` : | name of a function that can be cast to an XfcePanelPluginFunc

### XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL()

    #define             XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL(construct,init,check)

Registers and initializes the plugin. This is the only thing that is required to create a panel plugin.

The `init` argument should be a function that takes two parameters:

gboolean init( int argc, char **argv );

The `check` functions is run aftern `gtk_init()` and before creating the plugin; it takes one argument and should return FALSE if plugin creation is not possible:

gboolean check( GdkScreen *screen );

See also: Panel Plugin interface

`construct` : | name of a function that can be cast to XfcePanelPluginFunc
`init` : | name of a function that can be case to XfcePanelPluginPreInit or NULL
`check` : | name of a function that can be cast to XfcePanelPluginCheck or NULL

Since 4.5

### XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_WITH_CHECK()

    #define             XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_WITH_CHECK(construct,check)

Registers and initializes the plugin. This is the only thing that is required to create a panel plugin. The `check` functions is run before creating the plugin, and should return FALSE if plugin creation is not possible.

See also: Panel Plugin interface

`construct` : | name of a function that can be cast to an XfcePanelPluginFunc
`check` : | name of a function that can be cast to an XfcePanelPluginCheck

### XFCE_PANEL_PLUGIN_REGISTER_INTERNAL_WITH_CHECK()

    #define             XFCE_PANEL_PLUGIN_REGISTER_INTERNAL_WITH_CHECK(construct,check)

Registers and initializes the plugin. This is the only thing that is required to create a panel plugin. The `check` function is run before creating the plugin, and should return FALSE if plugin creation is not possible.

This macro is for plugins implemented as a loadable module. Generally it is preferred to create an external plugin, for which you have to use `XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL()` .

See also: Panel Plugin interface

`construct` : | name of a function that can be cast to an XfcePanelPluginFunc
`check` : | name of a function that can be cast to an XfcePanelPluginCheck