Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
common/film.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2009-2013 johannes hanika.
4 Copyright (C) 2010 Henrik Andersson.
5 Copyright (C) 2011, 2014, 2016 Tobias Ellinghaus.
6 Copyright (C) 2012 Richard Wonka.
7 Copyright (C) 2013 Jérémy Rosen.
8 Copyright (C) 2013 Simon Spannagel.
9 Copyright (C) 2016 Roman Lebedev.
10 Copyright (C) 2020 Pascal Obry.
11 Copyright (C) 2021 Philippe Weyland.
12 Copyright (C) 2022 HansBull.
13 Copyright (C) 2022 Martin Bařinka.
14 Copyright (C) 2025 Aurélien PIERRE.
15
16 darktable is free software: you can redistribute it and/or modify
17 it under the terms of the GNU General Public License as published by
18 the Free Software Foundation, either version 3 of the License, or
19 (at your option) any later version.
20
21 darktable is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU General Public License for more details.
25
26 You should have received a copy of the GNU General Public License
27 along with darktable. If not, see <http://www.gnu.org/licenses/>.
28*/
29
30#pragma once
31
32#include "common/darktable.h"
33#include "common/dtpthread.h"
34
35#include <glib.h>
36#include <inttypes.h>
37
43typedef struct dt_film_t
44{
45 int32_t id;
46 char dirname[512];
47 dt_pthread_mutex_t images_mutex;
48 GDir *dir;
50 int32_t ref;
52
53void dt_film_init(dt_film_t *film);
54void dt_film_cleanup(dt_film_t *film);
56int dt_film_open(const int32_t id);
57
60int dt_film_import(const char *dirname);
62void dt_film_set_query(const int32_t id);
64int32_t dt_film_get_id(const char *folder);
66void dt_film_remove(const int id);
68gboolean dt_film_is_empty(const int id);
70int dt_film_new(dt_film_t *film, const char *directory);
74GList *dt_film_get_image_ids(const int filmid);
75// initialize film folder status
77// clang-format off
78// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
79// vim: shiftwidth=2 expandtab tabstop=2 cindent
80// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
81// clang-format on
void dt_film_init(dt_film_t *film)
Definition common/film.c:74
gboolean dt_film_is_empty(const int id)
Definition common/film.c:386
int dt_film_new(dt_film_t *film, const char *directory)
Definition common/film.c:165
void dt_film_remove_empty()
Definition common/film.c:345
void dt_film_remove(const int id)
Definition common/film.c:401
int32_t dt_film_get_id(const char *folder)
Definition common/film.c:115
void dt_film_set_query(const int32_t id)
Definition common/film.c:94
GList * dt_film_get_image_ids(const int filmid)
Definition common/film.c:458
int dt_film_open(const int32_t id)
Definition common/film.c:132
void dt_film_set_folder_status()
Definition common/film.c:475
int dt_film_import(const char *dirname)
Definition common/film.c:240
void dt_film_cleanup(dt_film_t *film)
Definition common/film.c:84
Definition common/film.h:44
int32_t num_images
Definition common/film.h:49
dt_pthread_mutex_t images_mutex
Definition common/film.h:47
int32_t id
Definition common/film.h:45
GDir * dir
Definition common/film.h:48
int32_t ref
Definition common/film.h:50
int32_t last_loaded
Definition common/film.h:49
char dirname[512]
Definition common/film.h:46