Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
selection_repository.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2026 Aurélien PIERRE.
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
28#ifndef DT_DATABASE_SELECTION_REPOSITORY_H
29#define DT_DATABASE_SELECTION_REPOSITORY_H
30
31#include <glib.h>
32#include <stdint.h>
33
35
37void dt_selection_repository_select(const int32_t imgid);
38
40void dt_selection_repository_deselect(const int32_t imgid);
41
49void dt_selection_repository_select_list(const char *ids);
50
59void dt_selection_repository_deselect_list(const char *ids);
60
63
69
72
75
78
88
92
94
95#endif // DT_DATABASE_SELECTION_REPOSITORY_H
96
97// clang-format off
98// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
99// vim: shiftwidth=2 expandtab tabstop=2 cindent
100// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
101// clang-format on
void dt_selection_repository_clear(void)
Empty the selection.
G_BEGIN_DECLS void dt_selection_repository_select(const int32_t imgid)
Add imgid to the selection. Selecting an already-selected image does nothing.
void dt_selection_repository_cleanup(void)
Finalise whatever this repository still caches – today, nothing. See dt_colorlabel_repository_cleanup...
void dt_selection_repository_pop(void)
Copy memory.selected_backup back over the selection.
void dt_selection_repository_deselect_list(const char *ids)
Remove every id in ids from the selection.
void dt_selection_repository_deselect(const int32_t imgid)
Remove imgid from the selection.
void dt_selection_repository_drop_uncollected(void)
Drop selected images that are no longer in the current collection.
GList * dt_selection_repository_get_all(void)
Every selected image id, GINT_TO_POINTER, ASCENDING. Free with g_list_free().
int32_t dt_selection_repository_get_lowest_id(void)
The lowest selected image id, or UNKNOWN_IMAGE when nothing is selected.
void dt_selection_repository_push(void)
Copy the selection into memory.selected_backup, replacing what was there.
void dt_selection_repository_select_list(const char *ids)
Add every id in ids to the selection.