Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
gui/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#pragma once
27
28#include "develop/imageop.h"
29#include "views/view.h"
30
31typedef void (*dt_guides_draw_callback)(cairo_t *cr, const float x, const float y,
32 const float w, const float h,
33 const float zoom_scale, void *user_data);
34
35typedef GtkWidget *(*dt_guides_widget_callback)(dt_iop_module_t *self, void *user_data);
36
46
47GList *dt_guides_init();
48void dt_guides_cleanup(GList *guides);
49
50void dt_guides_add_guide(const char *name, dt_guides_draw_callback draw, dt_guides_widget_callback widget, void *user_data, GDestroyNotify free);
51
52// create the popover to setup the guides
55
56// draw the guide on screen
57void dt_guides_draw(cairo_t *cr, const float left, const float top, const float width, const float height,
58 const float zoom_scale);
59
60// routines for the module toolbar button
62void dt_guides_button_toggled(gboolean active);
63
65
66// clang-format off
67// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
68// vim: shiftwidth=2 expandtab tabstop=2 cindent
69// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
70// clang-format on
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
const float h
Definition colorspaces_inline_conversions.h:1366
const float top
Definition colorspaces_inline_conversions.h:672
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
char * name
Definition common/metadata.c:61
void dt_guides_draw(cairo_t *cr, const float left, const float top, const float width, const float height, const float zoom_scale)
Definition gui/guides.c:782
void dt_guides_add_guide(const char *name, dt_guides_draw_callback draw, dt_guides_widget_callback widget, void *user_data, GDestroyNotify free)
Definition gui/guides.c:573
void dt_guides_update_popover_values()
Definition gui/guides.c:846
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 gui/guides.h:31
void dt_guides_set_overlay_colors()
Definition gui/guides.c:666
GList * dt_guides_init()
Definition gui/guides.c:580
void dt_guides_cleanup(GList *guides)
Definition gui/guides.c:840
GtkWidget * dt_guides_popover(dt_view_t *self, GtkWidget *button)
Definition gui/guides.c:703
void dt_guides_button_toggled(gboolean active)
Definition gui/guides.c:775
void dt_guides_update_button_state()
Definition gui/guides.c:765
GtkWidget *(* dt_guides_widget_callback)(dt_iop_module_t *self, void *user_data)
Definition gui/guides.h:35
static gboolean draw(GtkWidget *widget, cairo_t *cr, dt_iop_module_t *self)
Definition hotpixels.c:398
static const float x
Definition iop_profile.h:239
struct _GtkWidget GtkWidget
Definition splash.h:29
Definition gui/guides.h:38
gboolean support_flip
Definition gui/guides.h:44
void * user_data
Definition gui/guides.h:42
dt_guides_draw_callback draw
Definition gui/guides.h:40
GDestroyNotify free
Definition gui/guides.h:43
char name[64]
Definition gui/guides.h:39
dt_guides_widget_callback widget
Definition gui/guides.h:41
Definition imageop.h:216
Definition views/view.h:123