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#pragma once
33
34#include "common/darktable.h"
35#include <gtk/gtk.h>
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#define DT_VIEW_RATINGS_MASK 0x7
42// first three bits of dt_view_image_over_t
43
45int dt_ratings_get(const int32_t imgid);
46
48void dt_ratings_apply_on_image(const int32_t imgid, const int rating, const gboolean single_star_toggle,
49 const gboolean undo_on, const gboolean group_on);
50
52void dt_ratings_apply_on_list(GList *list, const int rating, const gboolean undo_on);
53
54#ifdef __cplusplus
55}
56#endif
57
58// clang-format off
59// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
60// vim: shiftwidth=2 expandtab tabstop=2 cindent
61// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
62// clang-format on
int dt_ratings_get(const int32_t imgid)
Definition ratings.c:85
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:219
void dt_ratings_apply_on_list(GList *list, const int rating, const gboolean undo_on)
Definition ratings.c:200