Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
guides.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2012 Richard Wonka.
4 Copyright (C) 2012-2016 Tobias Ellinghaus.
5 Copyright (C) 2020-2021 Diederik Ter Rahe.
6 Copyright (C) 2020 Pascal Obry.
7 Copyright (C) 2021 Aldric Renaudin.
8 Copyright (C) 2022 Chris Elston.
9 Copyright (C) 2022 Martin Bařinka.
10 Copyright (C) 2024 Aurélien PIERRE.
11
12 darktable is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 darktable is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with darktable. If not, see <http://www.gnu.org/licenses/>.
24*/
25
26#ifndef DT_GUI_GUIDES_H
27#define DT_GUI_GUIDES_H
28
29#include "develop/imageop.h"
30#include "views/view.h"
31
32typedef void (*dt_guides_draw_callback)(cairo_t *cr, const float x, const float y,
33 const float w, const float h,
34 const float zoom_scale, void *user_data);
35
36typedef GtkWidget *(*dt_guides_widget_callback)(dt_iop_module_t *self, void *user_data);
37
47
50void dt_guides_init(void);
51void dt_guides_cleanup(void);
52
53void dt_guides_add_guide(const char *name, dt_guides_draw_callback draw, dt_guides_widget_callback widget, void *user_data, GDestroyNotify free);
54
55// create the popover to setup the guides
58
59// draw the guide on screen
60void dt_guides_draw(cairo_t *cr, const float left, const float top, const float width, const float height,
61 const float zoom_scale);
62
63// routines for the module toolbar button
65void dt_guides_button_toggled(gboolean active);
66
68
69#endif // DT_GUI_GUIDES_H
70
71// clang-format off
72// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
73// vim: shiftwidth=2 expandtab tabstop=2 cindent
74// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
75// clang-format on
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
static const float x
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
Definition colorspaces.h:98
const float top
void dt_guides_draw(cairo_t *cr, const float left, const float top, const float width, const float height, const float zoom_scale)
Definition guides.c:800
void dt_guides_add_guide(const char *name, dt_guides_draw_callback draw, dt_guides_widget_callback widget, void *user_data, GDestroyNotify free)
Definition guides.c:587
void dt_guides_init(void)
Definition guides.c:594
void dt_guides_update_popover_values()
Definition guides.c:864
void(* dt_guides_draw_callback)(cairo_t *cr, const float x, const float y, const float w, const float h, const float zoom_scale, void *user_data)
Definition guides.h:32
void dt_guides_set_overlay_colors()
Definition guides.c:680
GtkWidget * dt_guides_popover(dt_view_t *self, GtkWidget *button)
Definition guides.c:718
void dt_guides_cleanup(void)
Definition guides.c:858
void dt_guides_button_toggled(gboolean active)
Definition guides.c:793
void dt_guides_update_button_state()
Definition guides.c:782
GtkWidget *(* dt_guides_widget_callback)(dt_iop_module_t *self, void *user_data)
Definition guides.h:36
uint32_t width
Definition mipmap_cache.c:0
uint32_t height
Definition mipmap_cache.c:1
const char * name
Definition pdf.h:90
gboolean support_flip
Definition guides.h:45
void * user_data
Definition guides.h:43
dt_guides_draw_callback draw
Definition guides.h:41
GDestroyNotify free
Definition guides.h:44
char name[64]
Definition guides.h:40
dt_guides_widget_callback widget
Definition guides.h:42