Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
selection.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2011-2021 darktable developers.
4
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 darktable is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include <glib.h>
22#include <inttypes.h>
23
24#include "common/debug.h"
25
61struct dt_selection_t;
62
64void dt_selection_free(struct dt_selection_t *selection);
65
67int32_t dt_selection_get_first_id(struct dt_selection_t *selection);
69void dt_selection_clear(struct dt_selection_t *selection);
71void dt_selection_select(struct dt_selection_t *selection, int32_t imgid);
73void dt_selection_deselect(struct dt_selection_t *selection, int32_t imgid);
75void dt_selection_select_single(struct dt_selection_t *selection, int32_t imgid);
77void dt_selection_toggle(struct dt_selection_t *selection, int32_t imgid);
79void dt_selection_select_list(struct dt_selection_t *selection, const GList *list);
81void dt_selection_deselect_list(struct dt_selection_t *selection, const GList *list);
83GList *dt_selection_get_list(struct dt_selection_t *selection);
84
86void dt_selection_push(struct dt_selection_t *selection);
88void dt_selection_pop(struct dt_selection_t *selection);
89
91int dt_selection_get_length(struct dt_selection_t *selection);
92
94gchar *dt_selection_ids_to_string(struct dt_selection_t *selection);
95
97gboolean dt_selection_is_id_selected(struct dt_selection_t *selection, int32_t imgid);
98
101
102#define dt_selection_reload_from_database(selection) DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_SQL, dt_selection_reload_from_database_real, (selection))
103
104// clang-format off
105// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
106// vim: shiftwidth=2 expandtab tabstop=2 cindent
107// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
108// clang-format on
struct dt_selection_t * dt_selection_new()
Definition selection.c:214
int32_t dt_selection_get_first_id(struct dt_selection_t *selection)
Definition selection.c:48
void dt_selection_select_single(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:259
void dt_selection_pop(struct dt_selection_t *selection)
Definition selection.c:197
void dt_selection_clear(struct dt_selection_t *selection)
Definition selection.c:236
gchar * dt_selection_ids_to_string(struct dt_selection_t *selection)
Definition selection.c:337
int dt_selection_get_length(struct dt_selection_t *selection)
Definition selection.c:155
void dt_selection_select(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:243
void dt_selection_select_list(struct dt_selection_t *selection, const GList *list)
Definition selection.c:290
GList * dt_selection_get_list(struct dt_selection_t *selection)
Definition selection.c:148
void dt_selection_free(struct dt_selection_t *selection)
Definition selection.c:228
gboolean dt_selection_is_id_selected(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:363
void dt_selection_toggle(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:266
void dt_selection_reload_from_database_real(struct dt_selection_t *selection)
Definition selection.c:106
void dt_selection_deselect(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:251
void dt_selection_deselect_list(struct dt_selection_t *selection, const GList *list)
Definition selection.c:313
void dt_selection_push(struct dt_selection_t *selection)
Definition selection.c:180
Definition selection.c:27