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-2021 darktable developers.
4
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 darktable is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#include "common/module_api.h"
20#include "gui/gtk.h"
21#include <glib.h>
22
23#ifdef FULL_API_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#include <glib.h>
30#include <cairo/cairo.h>
31#include <stddef.h>
32#include <stdint.h>
33
34struct dt_lib_module_t;
35struct dt_view_t;
36struct dt_gui_module_t;
37
38/* early definition of modules to do type checking */
39
40#pragma GCC visibility push(default)
41
42#endif // FULL_API_H
43
45REQUIRED(const char *, name, struct dt_lib_module_t *self);
46
48REQUIRED(const char **, views, struct dt_lib_module_t *self);
50REQUIRED(uint32_t, container, struct dt_lib_module_t *self);
54DEFAULT(gboolean, expandable, struct dt_lib_module_t *self);
55
57DEFAULT(int, lib_focus, struct dt_gui_module_t *module, gboolean toggle);
58
60OPTIONAL(void, init, struct dt_lib_module_t *self);
63REQUIRED(void, gui_init, struct dt_lib_module_t *self);
67OPTIONAL(void, gui_reset, struct dt_lib_module_t *self);
68
70OPTIONAL(void, view_enter, struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view);
72OPTIONAL(void, view_leave, struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view);
73
76OPTIONAL(void, gui_post_expose, struct dt_lib_module_t *self, cairo_t *cr, int32_t width, int32_t height,
77 int32_t pointerx, int32_t pointery);
79OPTIONAL(int, mouse_moved, struct dt_lib_module_t *self, double x, double y, double pressure, int which);
80OPTIONAL(int, button_released, struct dt_lib_module_t *self, double x, double y, int which, uint32_t state);
81OPTIONAL(int, button_pressed, struct dt_lib_module_t *self, double x, double y, double pressure, int which, int type,
82 uint32_t state);
83OPTIONAL(int, key_pressed, struct dt_lib_module_t *self, GdkEventKey *event);
84OPTIONAL(int, scrolled, struct dt_lib_module_t *self, double x, double y, int up);
85OPTIONAL(void, configure, struct dt_lib_module_t *self, int width, int height);
87
90OPTIONAL(void *,legacy_params, struct dt_lib_module_t *self, const void *const old_params, const size_t old_params_size,
91 const int old_version, int *new_version, size_t *new_size);
92OPTIONAL(void *,get_params, struct dt_lib_module_t *self, int *size);
93OPTIONAL(int, set_params, struct dt_lib_module_t *self, const void *params, int size);
95OPTIONAL(void, manage_presets, struct dt_lib_module_t *self);
96OPTIONAL(void, set_preferences, void *menu, struct dt_lib_module_t *self);
98DEFAULT(gboolean, preset_autoapply, struct dt_lib_module_t *self);
99
100#ifdef FULL_API_H
101
102#pragma GCC visibility pop
103
104#ifdef __cplusplus
105}
106#endif
107
108#endif // FULL_API_H
109
110// clang-format off
111// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
112// vim: shiftwidth=2 expandtab tabstop=2 cindent
113// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
114// clang-format on
int scrolled(struct dt_iop_module_t *self, double x, double y, int up, uint32_t state)
Definition ashift.c:4682
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:4309
int button_released(struct dt_iop_module_t *self, double x, double y, int which, uint32_t state)
Definition ashift.c:4516
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:3671
int mouse_moved(struct dt_iop_module_t *self, double x, double y, double pressure, int which)
Definition ashift.c:4090
void init_presets(dt_iop_module_so_t *self)
Definition atrous.c:757
void gui_reset(dt_imageio_module_format_t *self)
Definition avif.c:927
int set_params(dt_imageio_module_format_t *self, const void *params, const int size)
Definition avif.c:655
void init(dt_imageio_module_format_t *self)
Definition avif.c:142
void * get_params(dt_imageio_module_format_t *self)
Definition avif.c:620
uint32_t container(dt_lib_module_t *self)
Definition backgroundjobs.c:61
int position()
Definition backgroundjobs.c:66
const char ** views(dt_lib_module_t *self)
Definition backgroundjobs.c:55
int expandable(dt_lib_module_t *self)
Definition backgroundjobs.c:71
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:3108
int type
Definition common/metadata.c:42
char * name
Definition common/metadata.c:41
int key_pressed(dt_view_t *self, GdkEventKey *event)
Definition darkroom.c:2693
void configure(dt_view_t *self, int wd, int ht)
Definition darkroom.c:2698
void view_leave(struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view)
Definition duplicate.c:153
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:300
static void gui_cleanup(dt_lib_import_t *d)
Definition import.c:1243
static void gui_init(dt_lib_import_t *d)
Definition import.c:926
gboolean preset_autoapply(dt_lib_module_t *self)
Definition ioporder.c:257
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:1173
size_t size
Definition mipmap_cache.c:3
#define REQUIRED(return_type, function_name,...)
Definition module_api.h:74
#define DEFAULT(return_type, function_name,...)
Definition module_api.h:75
#define OPTIONAL(return_type, function_name,...)
Definition module_api.h:73
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:25
Definition libs/lib.h:75
Definition views/view.h:95
int mouse_leave(struct dt_iop_module_t *self)
Definition toneequal.c:2023