Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
ratings.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2010-2011 Henrik Andersson.
4 Copyright (C) 2010, 2012 johannes hanika.
5 Copyright (C) 2012 Richard Wonka.
6 Copyright (C) 2013, 2020 Pascal Obry.
7 Copyright (C) 2014, 2016 Tobias Ellinghaus.
8 Copyright (C) 2018 Rick Yorgason.
9 Copyright (C) 2019-2020 Philippe Weyland.
10 Copyright (C) 2020 Aldric Renaudin.
11 Copyright (C) 2021 Diederik Ter Rahe.
12 Copyright (C) 2021 Hubert Kowalski.
13 Copyright (C) 2022 Martin Bařinka.
14 Copyright (C) 2022 solarer.
15 Copyright (C) 2023, 2025 Aurélien PIERRE.
16 Copyright (C) 2025 Alynx Zhou.
17
18 darktable is free software: you can redistribute it and/or modify
19 it under the terms of the GNU General Public License as published by
20 the Free Software Foundation, either version 3 of the License, or
21 (at your option) any later version.
22
23 darktable is distributed in the hope that it will be useful,
24 but WITHOUT ANY WARRANTY; without even the implied warranty of
25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 GNU General Public License for more details.
27
28 You should have received a copy of the GNU General Public License
29 along with darktable. If not, see <http://www.gnu.org/licenses/>.
30*/
31
32#ifndef DT_METADATA_RATINGS_H
33#define DT_METADATA_RATINGS_H
34
35#include <gtk/gtk.h>
36#include <stdint.h>
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42#define DT_VIEW_RATINGS_MASK 0x7
43// first three bits of dt_view_image_over_t
44
46int dt_ratings_get(const int32_t imgid);
47
49void dt_ratings_apply_on_image(const int32_t imgid, const int rating, const gboolean single_star_toggle,
50 const gboolean undo_on, const gboolean group_on);
51
53void dt_ratings_apply_on_list(GList *list, const int rating, const gboolean undo_on);
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif // DT_METADATA_RATINGS_H
60
61// clang-format off
62// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
63// vim: shiftwidth=2 expandtab tabstop=2 cindent
64// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
65// clang-format on
int dt_ratings_get(const int32_t imgid)
Definition ratings.c:81
void dt_ratings_apply_on_image(const int32_t imgid, const int rating, const gboolean single_star_toggle, const gboolean undo_on, const gboolean group_on)
Definition ratings.c:216
void dt_ratings_apply_on_list(GList *list, const int rating, const gboolean undo_on)
Definition ratings.c:196