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-2020 darktable developers.
4
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU 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 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include "develop/imageop.h"
22#include "views/view.h"
23
24typedef void (*dt_guides_draw_callback)(cairo_t *cr, const float x, const float y,
25 const float w, const float h,
26 const float zoom_scale, void *user_data);
27
28typedef GtkWidget *(*dt_guides_widget_callback)(dt_iop_module_t *self, void *user_data);
29
39
40GList *dt_guides_init();
41void dt_guides_cleanup(GList *guides);
42
43void dt_guides_add_guide(const char *name, dt_guides_draw_callback draw, dt_guides_widget_callback widget, void *user_data, GDestroyNotify free);
44
45// create the popover to setup the guides
46GtkWidget *dt_guides_popover(dt_view_t *self, GtkWidget *button);
48
49// draw the guide on screen
50void dt_guides_draw(cairo_t *cr, const float left, const float top, const float width, const float height,
51 const float zoom_scale);
52
53// routines for the module toolbar button
55void dt_guides_button_toggled(gboolean active);
56
58
59// clang-format off
60// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
61// vim: shiftwidth=2 expandtab tabstop=2 cindent
62// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
63// clang-format on
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
char * name
Definition common/metadata.c:41
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:769
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:560
void dt_guides_update_popover_values()
Definition gui/guides.c:832
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:24
void dt_guides_set_overlay_colors()
Definition gui/guides.c:653
GList * dt_guides_init()
Definition gui/guides.c:567
void dt_guides_cleanup(GList *guides)
Definition gui/guides.c:827
GtkWidget * dt_guides_popover(dt_view_t *self, GtkWidget *button)
Definition gui/guides.c:690
void dt_guides_button_toggled(gboolean active)
Definition gui/guides.c:762
void dt_guides_update_button_state()
Definition gui/guides.c:752
GtkWidget *(* dt_guides_widget_callback)(dt_iop_module_t *self, void *user_data)
Definition gui/guides.h:28
static gboolean draw(GtkWidget *widget, cairo_t *cr, dt_iop_module_t *self)
Definition hotpixels.c:358
Definition gui/guides.h:31
gboolean support_flip
Definition gui/guides.h:37
void * user_data
Definition gui/guides.h:35
dt_guides_draw_callback draw
Definition gui/guides.h:33
GDestroyNotify free
Definition gui/guides.h:36
char name[64]
Definition gui/guides.h:32
dt_guides_widget_callback widget
Definition gui/guides.h:34
Definition imageop.h:182
Definition views/view.h:95