ESourceSelectable

## ESourceSelectable ESourceSelectable — Base class for selectable data sources |

## Synopsis

    #include <libedataserver/libedataserver.h>

    struct              ESourceSelectable;
    const gchar *       e_source_selectable_get_color       (ESourceSelectable *extension);
    gchar *             e_source_selectable_dup_color       (ESourceSelectable *extension);
    void                e_source_selectable_set_color       (ESourceSelectable *extension,
                                                             const gchar *color);
    gboolean            e_source_selectable_get_selected    (ESourceSelectable *extension);
    void                e_source_selectable_set_selected    (ESourceSelectable *extension,
                                                             gboolean selected);

## Object Hierarchy

      GObject
       +----ESourceExtension
             +----ESourceBackend
                   +----ESourceSelectable
                         +----ESourceCalendar
                         +----ESourceMemoList
                         +----ESourceTaskList

## Properties

      "color"                    gchar*                : Read / Write / Construct
      "selected"                 gboolean              : Read / Write / Construct

## Description

ESourceSelectable is an abstract base class for data sources that can be selected in an ESourceSelector or similar widget.

## Details

### struct ESourceSelectable

    struct ESourceSelectable;

Contains only private data that should be read and manipulated using the functions below.

Since 3.6

### e_source_selectable_get_color ()

    const gchar *       e_source_selectable_get_color       (ESourceSelectable *extension);

Returns the color specification for the ESource to which `extension` belongs. A colored block is often displayed next to the data source's display name in user interfaces.

`extension` : | an ESourceSelectable
Returns : | the color specification for the ESource

Since 3.6

### e_source_selectable_dup_color ()

    gchar *             e_source_selectable_dup_color       (ESourceSelectable *extension);

Thread-safe variation of `e_source_selectable_get_color()`. Use this function when accessing `extension` from multiple threads.

The returned string should be freed with `g_free()` when no longer needed.

`extension` : | an ESourceSelectable
Returns : | a newly-allocated copy of "color"

Since 3.6

### e_source_selectable_set_color ()

    void                e_source_selectable_set_color       (ESourceSelectable *extension,
                                                             const gchar *color);

Sets the color specification for the ESource to which `extension` belongs. A colored block is often displayed next to the data source's display name in user interfaces.

The internal copy of `color` is automatically stripped of leading and trailing whitespace. If the resulting string is empty, `NULL` is set instead.

`extension` : | an ESourceSelectable
`color` : | a color specification, or `NULL`. [allow-none]

Since 3.6

### e_source_selectable_get_selected ()

    gboolean            e_source_selectable_get_selected    (ESourceSelectable *extension);

Returns the selected state of the ESource to which `extension` belongs. The selected state is often represented as a checkbox next to the data source's display name in user interfaces.

`extension` : | an ESourceSelectable
Returns : | the selected state for the ESource

Since 3.6

### e_source_selectable_set_selected ()

    void                e_source_selectable_set_selected    (ESourceSelectable *extension,
                                                             gboolean selected);

Sets the selected state for the ESource to which `extension` belongs. The selected state is often represented as a checkbox next to the data source's display name in user interfaces.

`extension` : | an ESourceSelectable
`selected` : | selected state

Since 3.6

## Property Details

### The `"color"` property

      "color"                    gchar*                : Read / Write / Construct

Textual specification of a color.

Default value: "#becedd"

### The `"selected"` property

      "selected"                 gboolean              : Read / Write / Construct

Whether the data source is selected.

Default value: TRUE

## See Also

ESourceCalendar, ESourceMemoList, ESourceTaskList