Common macros

## Common macros Common macros — Macros to work glib version independent. |

## Synopsis

    #include <libxfce4panel/libxfce4panel.h>

    #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
    #define             I_                                  (string)

## Description

Macros for plugin writers to use new features in Glib 2.8 and 2.10 without breaking old versions of Glib. It is recommended to use those macros when possible.

## Details

### panel_slice_alloc()

    #define             panel_slice_alloc(block_size)

Use g_slice_alloc when available, fallback to g_malloc.

`block_size` : | the number of bytes to allocate

### panel_slice_alloc0()

    #define             panel_slice_alloc0(block_size)

Use g_slice_alloc0 when available, fallback to g_malloc0.

`block_size` : | the number of bytes to allocate

### panel_slice_free()

    #define             panel_slice_free(type, ptr)

Use g_slice_free when available, fallback to g_free.

`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)

Use g_slice_free1 when available, fallback to g_free.

`block_size` : | the number of bytes to allocate
`mem_block` : | a pointer to the block to free

### panel_slice_new()

    #define             panel_slice_new(type)

Use g_slice_new when available, fallback to g_new.

`type` : | the type to allocate, typically a structure name

### panel_slice_new0()

    #define             panel_slice_new0(type)

Use g_slice_new0 when available, fallback to g_new0.

`type` : | the type to allocate, typically a structure name

### PANEL_PARAM_READABLE

    #define             PANEL_PARAM_READABLE

Alias for G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB

### PANEL_PARAM_READWRITE

    #define             PANEL_PARAM_READWRITE

Alias for G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB

### PANEL_PARAM_WRITABLE

    #define             PANEL_PARAM_WRITABLE

Alias for G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB

### I_()

    #define             I_(string)

Canonical representation for `string`. This can be use in functions like g_object_get_data.

`string` : | a string