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/selection.h"
24#include "control/control.h"
25#include "views/view.h"
26
27
37// get the list of images to act on during global changes (libs, accels)
39{
42
44 return g_list_copy(dt_view_active_images_get_all());
45
47 return g_list_append(NULL, GINT_TO_POINTER(dt_control_get_keyboard_over_id()));
48
49 return NULL;
50}
51
52// get only the number of images to act on
53int dt_act_on_get_images_nb(const gboolean only_visible, const gboolean force)
54{
57
59 return g_list_length(dt_view_active_images_get_all());
60
62 return 1;
63
64 return 0;
65}
66
80
81// clang-format off
82// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
83// vim: shiftwidth=2 expandtab tabstop=2 cindent
84// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
85// clang-format on
int dt_act_on_get_images_nb(const gboolean only_visible, const gboolean force)
Definition act_on.c:53
GList * dt_act_on_get_images()
Definition act_on.c:38
int32_t dt_act_on_get_first_image()
Definition act_on.c:67
int32_t dt_control_get_keyboard_over_id()
Definition control.c:1012
int32_t dt_selection_get_first_id(struct dt_selection_t *selection)
Definition selection.c:103
struct dt_selection_t * dt_selection_get_global(void)
Definition selection.c:80
int dt_selection_get_length(struct dt_selection_t *selection)
Definition selection.c:193
GList * dt_selection_get_list(struct dt_selection_t *selection)
Definition selection.c:185
GList * dt_view_active_images_get_all()
Definition view.c:1302
int32_t dt_view_active_images_get_first()
Definition view.c:1307