Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
user_message.h
Go to the documentation of this file.
1/*
2 This file is part of Ansel.
3 Copyright (C) 2026 Aurélien Pierre.
4 Copyright (C) 2026 Guillaume Stutin.
5
6 Ansel is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 Ansel is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Ansel. If not, see <http://www.gnu.org/licenses/>.
18*/
19
39
40#ifndef DT_CONTROL_USER_MESSAGE_H
41#define DT_CONTROL_USER_MESSAGE_H
42
43/* These are defined in a C translation unit and called from C++ ones (imageio/format/exr.cc),
44 * so the declarations must carry C linkage -- control/control.h wraps its own in the same
45 * guard. Without it the C++ caller emits a mangled reference (_Z14dt_control_logPKcz) that
46 * nothing defines.
47 *
48 * On Linux that still LINKS: a shared object may carry undefined symbols and resolve them when
49 * the plugin is dlopen()ed, so the breakage would first appear as a module failing to load at
50 * runtime. macOS and Windows resolve plugin symbols at link time and fail the build instead,
51 * which is how this was caught. Three green Linux configurations do not cover it. */
52#ifdef __cplusplus
53extern "C" {
54#endif
55
57void dt_control_log(const char *msg, ...) __attribute__((format(printf, 1, 2)));
58
60void dt_toast_log(const char *msg, ...) __attribute__((format(printf, 1, 2)));
61
63void dt_toast_markup_log(const char *msg, ...) __attribute__((format(printf, 1, 2)));
64
86void dt_control_alert(const char *title, const char *message, const char *item);
87
92void dt_control_alert_once(const char *title, const char *message, const char *item);
93
96typedef void (*dt_control_alert_handler_t)(const char *title, const char *message, const char *item, int once);
97
100
101/* Busy counters. Each enter must be matched by a leave: they are counters, not flags, so
102 * nested work does not clear the indicator early. */
107
108#ifdef __cplusplus
109}
110#endif
111
112#endif // DT_CONTROL_USER_MESSAGE_H
113
114// clang-format off
115// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
116// vim: shiftwidth=2 expandtab tabstop=2 cindent
117// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
118// clang-format on
void dt_control_alert_once(const char *title, const char *message, const char *item)
dt_control_alert() for a failure that repeats as long as its cause lasts – memory running short,...
Definition control.c:893
void dt_toast_log(const char *msg,...)
Definition control.c:922
void dt_control_alert(const char *title, const char *message, const char *item)
Tell the user something that must not go unseen: what it says stays true after a toast would have fad...
Definition control.c:888
void dt_toast_markup_log(const char *msg,...)
Definition control.c:930
void dt_control_set_alert_handler(dt_control_alert_handler_t handler)
Install the alert handler; NULL restores the fallback to dt_control_log().
Definition control.c:871
void dt_control_toast_busy_enter()
Definition control.c:946
void dt_control_log_busy_leave()
Definition control.c:954
void dt_control_log_busy_enter()
Definition control.c:938
void dt_control_toast_busy_leave()
Definition control.c:962
float dt_aligned_pixel_simd_t __attribute__((vector_size(16), aligned(16)))
Apply one channel's tone curve to each of the three colour channels, or pass the channel through unto...
Definition simd.h:55
void(* dt_control_alert_handler_t)(const char *title, const char *message, const char *item, int once)
What dt_control_alert() and dt_control_alert_once() hand their finished text to, with once non-zero f...
void dt_control_log(const char *msg,...) __attribute__((format(printf
Post a message to the log overlay drawn over the centre view.