Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
colorlabel_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_COLORLABEL_REPOSITORY_H
29#define DT_DATABASE_COLORLABEL_REPOSITORY_H
30
31#include <glib.h>
32#include <stdint.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
39
46int dt_colorlabel_repository_get(const int32_t imgid);
47
49void dt_colorlabel_repository_set(const int32_t imgid, const int color);
50
52void dt_colorlabel_repository_remove(const int32_t imgid, const int color);
53
55void dt_colorlabel_repository_remove_all(const int32_t imgid);
56
58gboolean dt_colorlabel_repository_has(const int32_t imgid, const int color);
59
69GList *dt_colorlabel_repository_get_list(const int32_t imgid);
70
77void dt_colorlabel_repository_foreach(const int32_t imgid, void (*cb)(void *, const int),
78 void *user_data);
79
89
91
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif // DT_DATABASE_COLORLABEL_REPOSITORY_H
98
99// clang-format off
100// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
101// vim: shiftwidth=2 expandtab tabstop=2 cindent
102// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
103// clang-format on
gboolean dt_colorlabel_repository_has(const int32_t imgid, const int color)
TRUE when colour color is set on imgid.
void dt_colorlabel_repository_remove_all(const int32_t imgid)
Clear every colour on imgid.
void dt_colorlabel_repository_remove(const int32_t imgid, const int color)
Clear colour color on imgid. Clearing one that is not set does nothing.
void dt_colorlabel_repository_set(const int32_t imgid, const int color)
Set colour color on imgid. Setting one that is already set does nothing.
GList * dt_colorlabel_repository_get_list(const int32_t imgid)
The colours set on imgid, as a list rather than a bitmask.
G_BEGIN_DECLS int dt_colorlabel_repository_get(const int32_t imgid)
The colours set on imgid, as a bitmask: bit c is set when colour c is.
void dt_colorlabel_repository_foreach(const int32_t imgid, void(*cb)(void *, const int), void *user_data)
Every colour label of imgid, one call per row, in the order the rows come back.
void dt_colorlabel_repository_cleanup(void)
Finalise whatever this repository still caches – today, nothing.
GdkRGBA color[]
Definition geotagging.c:539