Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
lib_api.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2016 Roman Lebedev.
4 Copyright (C) 2016-2017 Tobias Ellinghaus.
5 Copyright (C) 2019 Heiko Bauke.
6 Copyright (C) 2020-2021 Aldric Renaudin.
7 Copyright (C) 2020-2021 Pascal Obry.
8 Copyright (C) 2020 Philippe Weyland.
9 Copyright (C) 2021-2022 Diederik Ter Rahe.
10 Copyright (C) 2022 Martin Bařinka.
11 Copyright (C) 2025 Aurélien PIERRE.
12
13 darktable is free software: you can redistribute it and/or modify
14 it under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 darktable is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public License
24 along with darktable. If not, see <http://www.gnu.org/licenses/>.
25*/
26#include "common/module_api.h"
27#include "gui/gtk.h"
28#include <glib.h>
29
30#ifdef FULL_API_H
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36#include <glib.h>
37#include <cairo/cairo.h>
38#include <stddef.h>
39#include <stdint.h>
40
41struct dt_lib_module_t;
42struct dt_view_t;
43struct dt_gui_module_t;
44
45/* early definition of modules to do type checking */
46
47#pragma GCC visibility push(default)
48
49#endif // FULL_API_H
50
52REQUIRED(const char *, name, struct dt_lib_module_t *self);
53
55REQUIRED(const char **, views, struct dt_lib_module_t *self);
57REQUIRED(uint32_t, container, struct dt_lib_module_t *self);
61DEFAULT(gboolean, expandable, struct dt_lib_module_t *self);
62
64DEFAULT(int, lib_focus, struct dt_gui_module_t *module, gboolean toggle);
65
67OPTIONAL(void, init, struct dt_lib_module_t *self);
70REQUIRED(void, gui_init, struct dt_lib_module_t *self);
74OPTIONAL(void, gui_reset, struct dt_lib_module_t *self);
75
77OPTIONAL(void, view_enter, struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view);
79OPTIONAL(void, view_leave, struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view);
80
83OPTIONAL(void, gui_post_expose, struct dt_lib_module_t *self, cairo_t *cr, int32_t width, int32_t height,
84 int32_t pointerx, int32_t pointery);
86OPTIONAL(int, mouse_moved, struct dt_lib_module_t *self, double x, double y, double pressure, int which);
87OPTIONAL(int, button_released, struct dt_lib_module_t *self, double x, double y, int which, uint32_t state);
88OPTIONAL(int, button_pressed, struct dt_lib_module_t *self, double x, double y, double pressure, int which, int type,
89 uint32_t state);
90OPTIONAL(int, key_pressed, struct dt_lib_module_t *self, GdkEventKey *event);
91OPTIONAL(int, scrolled, struct dt_lib_module_t *self, double x, double y, int up);
92OPTIONAL(void, configure, struct dt_lib_module_t *self, int width, int height);
94
97OPTIONAL(void *,legacy_params, struct dt_lib_module_t *self, const void *const old_params, const size_t old_params_size,
98 const int old_version, int *new_version, size_t *new_size);
99OPTIONAL(void *,get_params, struct dt_lib_module_t *self, int *size);
100OPTIONAL(int, set_params, struct dt_lib_module_t *self, const void *params, int size);
102OPTIONAL(void, manage_presets, struct dt_lib_module_t *self);
103OPTIONAL(void, set_preferences, void *menu, struct dt_lib_module_t *self);
105DEFAULT(gboolean, preset_autoapply, struct dt_lib_module_t *self);
106
107#ifdef FULL_API_H
108
109#pragma GCC visibility pop
110
111#ifdef __cplusplus
112}
113#endif
114
115#endif // FULL_API_H
116
117// clang-format off
118// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
119// vim: shiftwidth=2 expandtab tabstop=2 cindent
120// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
121// clang-format on
int scrolled(struct dt_iop_module_t *self, double x, double y, int up, uint32_t state)
Definition ashift.c:4969
int button_pressed(struct dt_iop_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state)
Definition ashift.c:4583
int button_released(struct dt_iop_module_t *self, double x, double y, int which, uint32_t state)
Definition ashift.c:4798
void gui_post_expose(struct dt_iop_module_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery)
Definition ashift.c:3910
int mouse_moved(struct dt_iop_module_t *self, double x, double y, double pressure, int which)
Definition ashift.c:4360
void init_presets(dt_iop_module_so_t *self)
Definition atrous.c:804
void gui_reset(dt_imageio_module_format_t *self)
Definition avif.c:936
int set_params(dt_imageio_module_format_t *self, const void *params, const int size)
Definition avif.c:664
void init(dt_imageio_module_format_t *self)
Definition avif.c:151
void * get_params(dt_imageio_module_format_t *self)
Definition avif.c:629
uint32_t container(dt_lib_module_t *self)
Definition backgroundjobs.c:77
int position()
Definition backgroundjobs.c:82
const char ** views(dt_lib_module_t *self)
Definition backgroundjobs.c:71
int expandable(dt_lib_module_t *self)
Definition backgroundjobs.c:87
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
void set_preferences(void *menu, dt_lib_module_t *self)
Definition collect.c:3286
int type
Definition common/metadata.c:62
char * name
Definition common/metadata.c:61
int mouse_leave(struct dt_iop_module_t *self)
Definition crop.c:1735
int key_pressed(dt_view_t *self, GdkEventKey *event)
Definition darkroom.c:3085
void configure(dt_view_t *self, int wd, int ht)
Definition darkroom.c:3167
void view_leave(struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view)
Definition duplicate.c:173
void * legacy_params(dt_imageio_module_format_t *self, const void *const old_params, const size_t old_params_size, const int old_version, const int new_version, size_t *new_size)
Definition exr.cc:320
static void gui_cleanup(dt_lib_import_t *d)
Definition import.c:1257
static void gui_init(dt_lib_import_t *d)
Definition import.c:939
static const float x
Definition iop_profile.h:239
gboolean preset_autoapply(dt_lib_module_t *self)
Definition ioporder.c:268
void view_enter(struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view)
Definition libs/histogram.c:1226
size_t size
Definition mipmap_cache.c:3
#define REQUIRED(return_type, function_name,...)
Definition module_api.h:80
#define DEFAULT(return_type, function_name,...)
Definition module_api.h:81
#define OPTIONAL(return_type, function_name,...)
Definition module_api.h:79
The dt_gui_module_t type is the intersection between a dt_lib_module_t and a dt_iop_module_t structur...
Definition gui_module_api.h:42
Definition libs/lib.h:78
Definition views/view.h:123