Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
act_on.c
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2021 Aldric Renaudin.
4 Copyright (C) 2022-2023, 2025 Aurélien PIERRE.
5 Copyright (C) 2022 Martin Bařinka.
6 Copyright (C) 2022 Philippe Weyland.
7
8 darktable is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 darktable is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with darktable. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#include "common/act_on.h"
23#include "common/collection.h"
24#include "common/selection.h"
25#include "control/control.h"
26#include "views/view.h"
27
28
38// get the list of images to act on during global changes (libs, accels)
40{
43
45 return g_list_copy(dt_view_active_images_get_all());
46
48 return g_list_append(NULL, GINT_TO_POINTER(dt_control_get_keyboard_over_id()));
49
50 return NULL;
51}
52
53// get only the number of images to act on
54int dt_act_on_get_images_nb(const gboolean only_visible, const gboolean force)
55{
58
60 return g_list_length(dt_view_active_images_get_all());
61
63 return 1;
64
65 return 0;
66}
67
81
82// clang-format off
83// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
84// vim: shiftwidth=2 expandtab tabstop=2 cindent
85// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
86// clang-format on
int dt_act_on_get_images_nb(const gboolean only_visible, const gboolean force)
Definition act_on.c:54
GList * dt_act_on_get_images()
Definition act_on.c:39
int32_t dt_act_on_get_first_image()
Definition act_on.c:68
int32_t dt_control_get_keyboard_over_id()
Definition control.c:949
darktable_t darktable
Definition darktable.c:181
int32_t dt_selection_get_first_id(struct dt_selection_t *selection)
Definition selection.c:69
int dt_selection_get_length(struct dt_selection_t *selection)
Definition selection.c:179
GList * dt_selection_get_list(struct dt_selection_t *selection)
Definition selection.c:172
struct dt_selection_t * selection
Definition darktable.h:782
GList * dt_view_active_images_get_all()
Definition view.c:1301
int32_t dt_view_active_images_get_first()
Definition view.c:1306