## 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 ()
guint | e_source_selectable_get_order ()
void | e_source_selectable_set_order ()

## Types and Values

struct | ESourceSelectable

## Object Hierarchy

        GObject
        ╰── ESourceExtension
            ╰── ESourceBackend
                ╰── ESourceSelectable
                    ├── ESourceCalendar
                    ├── ESourceMemoList
                    ╰── ESourceTaskList

## Includes

    #include <libedataserver/libedataserver.h>

## Description

ESourceSelectable is an abstract base class for data sources that can be selected.

## 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, or `NULL`, when none is set.

[nullable]

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”, or `NULL`, when none is set.

[nullable]

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`. | [nullable]

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

### e_source_selectable_get_order ()

    guint
    e_source_selectable_get_order (ESourceSelectable *extension);

Returns the preferred sorting order for the ESource to which `extension` belongs. Default is 0.

#### Parameters

extension | an ESourceSelectable |

#### Returns

the preferred sorting order for the ESource

Since: 3.40

### e_source_selectable_set_order ()

    void
    e_source_selectable_set_order (ESourceSelectable *extension,
                                   guint order);

Sets the sorting order for the ESource to which `extension` belongs.

#### Parameters

extension | an ESourceSelectable |
order | the sorting order |

Since: 3.40

## Types and Values

### struct ESourceSelectable

    struct ESourceSelectable;

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

Since: 3.6

## See Also

ESourceCalendar, ESourceMemoList, ESourceTaskList