Commonly used plugin macros

## Commonly used plugin macros Commonly used plugin macros — Various macros to make life easier for plugin developers. |

## Synopsis

    #include <libxfce4panel/libxfce4panel.h>

    #define             XFCE_PANEL_CHANNEL_NAME

    #define             panel_slice_alloc                   (block_size)
    #define             panel_slice_alloc0                  (block_size)
    #define             panel_slice_free                    (type,
                                                             ptr)
    #define             panel_slice_free1                   (block_size,
                                                             mem_block)
    #define             panel_slice_new                     (type)
    #define             panel_slice_new0                    (type)

    #define             PANEL_PARAM_READABLE
    #define             PANEL_PARAM_READWRITE
    #define             PANEL_PARAM_WRITABLE

## Description

Some commonly used macros in panel plugins.

## Details

### XFCE_PANEL_CHANNEL_NAME

    #define XFCE_PANEL_CHANNEL_NAME (xfce_panel_get_channel_name ())

Macro to return the value of `xfce_panel_get_channel_name()`.

See also: xfce_panel_plugin_xfconf_channel_new, xfce_panel_plugin_get_property_base

Since 4.8

### panel_slice_alloc()

    #define panel_slice_alloc(block_size) (g_slice_alloc ((block_size)))

### Warning

`panel_slice_alloc` has been deprecated since version 4.8 and should not be used in newly-written code. Deprecated because panel depends on recent enough version of glib. Use `g_slice_alloc()` instead.

See `g_slice_alloc()` for more information.

`block_size` : | the number of bytes to allocate
Returns : | a pointer to the allocated memory block

### panel_slice_alloc0()

    #define panel_slice_alloc0(block_size) (g_slice_alloc0 ((block_size)))

### Warning

`panel_slice_alloc0` has been deprecated since version 4.8 and should not be used in newly-written code. Deprecated because panel depends on recent enough version of glib. Use `g_slice_alloc0()` instead.

See `g_slice_alloc0()` for more information.

`block_size` : | the number of bytes to allocate
Returns : | a pointer to the allocated memory block

### panel_slice_free()

    #define panel_slice_free(type, ptr) G_STMT_START{ g_slice_free (type, (ptr)); }G_STMT_END

### Warning

`panel_slice_free` has been deprecated since version 4.8 and should not be used in newly-written code. Deprecated because panel depends on recent enough version of glib. Use `g_slice_free()` instead.

See `g_slice_free()` for more information.

`type` : | the type to allocate, typically a structure name
`ptr` : | a pointer to the block to free

### panel_slice_free1()

    #define panel_slice_free1(block_size, mem_block) G_STMT_START{ g_slice_free1 ((block_size), (mem_block)); }G_STMT_END

### Warning

`panel_slice_free1` has been deprecated since version 4.8 and should not be used in newly-written code. Deprecated because panel depends on recent enough version of glib. Use `g_slice_free1()` instead.

See `g_slice_free1()` for more information.

`block_size` : | the size of the block
`mem_block` : | a pointer to the block to free

### panel_slice_new()

    #define panel_slice_new(type) (g_slice_new (type))

### Warning

`panel_slice_new` has been deprecated since version 4.8 and should not be used in newly-written code. Deprecated because panel depends on recent enough version of glib. Use `g_slice_new()` instead.

See `g_slice_new()` for more information.

`type` : | the type to allocate, typically a structure name
Returns : | a pointer to the allocated memory block

### panel_slice_new0()

    #define panel_slice_new0(type) (g_slice_new0 (type))

### Warning

`panel_slice_new0` has been deprecated since version 4.8 and should not be used in newly-written code. Deprecated because panel depends on recent enough version of glib. Use `g_slice_new0()` instead.

See `g_slice_new0()` for more information.

`type` : | the type to allocate, typically a structure name
Returns : | a pointer to the allocated memory block

### PANEL_PARAM_READABLE

    #define PANEL_PARAM_READABLE (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)

### Warning

`PANEL_PARAM_READABLE` has been deprecated since version 4.8 and should not be used in newly-written code. Deprecated because panel depends on recent enough version of glib. Use G_PARAM_READABLE | G_PARAM_STATIC_STRINGS instead.

Macro for G_PARAM_READABLE with static strings.

### PANEL_PARAM_READWRITE

    #define PANEL_PARAM_READWRITE (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)

### Warning

`PANEL_PARAM_READWRITE` has been deprecated since version 4.8 and should not be used in newly-written code. Deprecated because panel depends on recent enough version of glib. Use G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS instead.

Macro for G_PARAM_READWRITE with static strings.

### PANEL_PARAM_WRITABLE

    #define PANEL_PARAM_WRITABLE (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)

### Warning

`PANEL_PARAM_WRITABLE` has been deprecated since version 4.8 and should not be used in newly-written code. Deprecated because panel depends on recent enough version of glib. Use G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS instead.

Macro for PANEL_PARAM_WRITABLE with static strings.