Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
thumbtable_info.h
Go to the documentation of this file.
1/*
2 This file is part of the Ansel project.
3 Copyright (C) 2026 Aurélien PIERRE.
4
5 Ansel 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 Ansel 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 Ansel. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include "common/darktable.h"
22#include "common/image.h"
23#include "common/image_cache.h"
24
25#include <limits.h>
26#include <stdint.h>
27#include <sqlite3.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33static inline gboolean dt_thumbtable_info_is_altered(const dt_image_t info)
34{
35 return info.history_items > 0;
36}
37
38static inline gboolean dt_thumbtable_info_is_grouped(const dt_image_t info)
39{
40 return info.group_members > 1;
41}
42
43
46
47void dt_thumbtable_copy_image(dt_image_t *info, const dt_image_t *const img);
49
50#ifndef NDEBUG
52#endif
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
Definition common/image.h:247
uint32_t history_items
Definition common/image.h:287
uint32_t group_members
Definition common/image.h:286
void dt_thumbtable_copy_image(dt_image_t *info, const dt_image_t *const img)
Definition thumbtable_info.c:38
void dt_thumbtable_info_cleanup(void)
Definition thumbtable_info.c:90
static gboolean dt_thumbtable_info_is_grouped(const dt_image_t info)
Definition thumbtable_info.h:38
void dt_thumbtable_info_debug_assert_matches_cache(const dt_image_t *sql_info)
Definition thumbtable_info.c:110
static gboolean dt_thumbtable_info_is_altered(const dt_image_t info)
Definition thumbtable_info.h:33
void dt_thumbtable_info_seed_image_cache(const dt_image_t *info)
Definition thumbtable_info.c:45
sqlite3_stmt * dt_thumbtable_info_get_collection_stmt(void)
Definition thumbtable_info.c:54