## ESourceSelectable

ESourceSelectable — Base class for selectable data sources

## Functions

const gchar * | e_source_selectable_get_color ()
gchar * | e_source_selectable_dup_color ()
void | e_source_selectable_set_color ()
gboolean | e_source_selectable_get_selected ()
void | e_source_selectable_set_selected ()

## Types and Values

struct | ESourceSelectable
struct | ESourceSelectableClass

## Includes

    #include <libedataserver/libedataserver.h>

## Description

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

## Functions

### 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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

extension | an ESourceSelectable |
selected | selected state |

Since 3.6

## Types and Values

### struct ESourceSelectable

    struct ESourceSelectable {
    	ESourceBackend parent;
    	ESourceSelectablePrivate *priv;
    };

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

Since 3.6

### struct ESourceSelectableClass

    struct ESourceSelectableClass {
    	ESourceBackendClass parent_class;
    };

## See Also

ESourceCalendar, ESourceMemoList, ESourceTaskList