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 Henrik Andersson.
4 Copyright (C) 2012 Richard Wonka.
5 Copyright (C) 2013 Jérémy Rosen.
6 Copyright (C) 2013-2014, 2016 Tobias Ellinghaus.
7 Copyright (C) 2016 Roman Lebedev.
8 Copyright (C) 2018 Rick Yorgason.
9 Copyright (C) 2020-2021 Aldric Renaudin.
10 Copyright (C) 2020-2021 Pascal Obry.
11 Copyright (C) 2022 Martin Bařinka.
12 Copyright (C) 2022 Philippe Weyland.
13 Copyright (C) 2023, 2025 Aurélien PIERRE.
14
15 darktable is free software: you can redistribute it and/or modify
16 it under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
19
20 darktable is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with darktable. If not, see <http://www.gnu.org/licenses/>.
27*/
28
29#pragma once
30
31#include <glib.h>
32#include <inttypes.h>
33
34#include "common/debug.h"
35
71struct dt_selection_t;
72
74void dt_selection_free(struct dt_selection_t *selection);
75
77int32_t dt_selection_get_first_id(struct dt_selection_t *selection);
79void dt_selection_clear(struct dt_selection_t *selection);
81void dt_selection_select(struct dt_selection_t *selection, int32_t imgid);
83void dt_selection_deselect(struct dt_selection_t *selection, int32_t imgid);
85void dt_selection_select_single(struct dt_selection_t *selection, int32_t imgid);
87void dt_selection_toggle(struct dt_selection_t *selection, int32_t imgid);
89void dt_selection_select_list(struct dt_selection_t *selection, const GList *list);
91void dt_selection_deselect_list(struct dt_selection_t *selection, const GList *list);
93GList *dt_selection_get_list(struct dt_selection_t *selection);
94
96void dt_selection_push(struct dt_selection_t *selection);
98void dt_selection_pop(struct dt_selection_t *selection);
99
101int dt_selection_get_length(struct dt_selection_t *selection);
102
104gchar *dt_selection_ids_to_string(struct dt_selection_t *selection);
105
107gboolean dt_selection_is_id_selected(struct dt_selection_t *selection, int32_t imgid);
108
111
112#define dt_selection_reload_from_database(selection) DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_SQL, dt_selection_reload_from_database_real, (selection))
113
114// clang-format off
115// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
116// vim: shiftwidth=2 expandtab tabstop=2 cindent
117// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
118// clang-format on
struct dt_selection_t * dt_selection_new()
Definition selection.c:238
int32_t dt_selection_get_first_id(struct dt_selection_t *selection)
Definition selection.c:69
void dt_selection_select_single(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:289
void dt_selection_pop(struct dt_selection_t *selection)
Definition selection.c:221
void dt_selection_clear(struct dt_selection_t *selection)
Definition selection.c:266
gchar * dt_selection_ids_to_string(struct dt_selection_t *selection)
Definition selection.c:367
int dt_selection_get_length(struct dt_selection_t *selection)
Definition selection.c:179
void dt_selection_select(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:273
void dt_selection_select_list(struct dt_selection_t *selection, const GList *list)
Definition selection.c:320
GList * dt_selection_get_list(struct dt_selection_t *selection)
Definition selection.c:172
void dt_selection_free(struct dt_selection_t *selection)
Definition selection.c:252
gboolean dt_selection_is_id_selected(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:393
void dt_selection_toggle(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:296
void dt_selection_reload_from_database_real(struct dt_selection_t *selection)
Definition selection.c:130
void dt_selection_deselect(struct dt_selection_t *selection, int32_t imgid)
Definition selection.c:281
void dt_selection_deselect_list(struct dt_selection_t *selection, const GList *list)
Definition selection.c:343
void dt_selection_push(struct dt_selection_t *selection)
Definition selection.c:204
Definition selection.c:48