Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
button.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2010 Henrik Andersson.
4 Copyright (C) 2010 Pascal de Bruijn.
5 Copyright (C) 2011 johannes hanika.
6 Copyright (C) 2011 Jérémy Rosen.
7 Copyright (C) 2011 Robert Bieber.
8 Copyright (C) 2012 José Carlos García Sogo.
9 Copyright (C) 2012 Richard Wonka.
10 Copyright (C) 2013-2016 Roman Lebedev.
11 Copyright (C) 2014, 2016, 2018 Tobias Ellinghaus.
12 Copyright (C) 2017 luzpaz.
13 Copyright (C) 2017 Ulrich Pegelow.
14 Copyright (C) 2020 Marco.
15 Copyright (C) 2020 Pascal Obry.
16 Copyright (C) 2022 Aldric Renaudin.
17 Copyright (C) 2022 Martin Bařinka.
18 Copyright (C) 2025 Aurélien PIERRE.
19
20 darktable is free software: you can redistribute it and/or modify
21 it under the terms of the GNU General Public License as published by
22 the Free Software Foundation, either version 3 of the License, or
23 (at your option) any later version.
24
25 darktable is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 GNU General Public License for more details.
29
30 You should have received a copy of the GNU General Public License
31 along with darktable. If not, see <http://www.gnu.org/licenses/>.
32*/
33
34#pragma once
35
36#include "paint.h"
37#include <gtk/gtk.h>
38G_BEGIN_DECLS
39#define DTGTK_BUTTON(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, dtgtk_button_get_type(), GtkDarktableButton)
40#define DTGTK_BUTTON_CLASS(klass) \
41 G_TYPE_CHECK_CLASS_CAST(klass, dtgtk_button_get_type(), GtkDarktableButtonClass)
42#define DTGTK_IS_BUTTON(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, dtgtk_button_get_type())
43#define DTGTK_IS_BUTTON_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE(obj, dtgtk_button_get_type())
44
49
59
64
65GType dtgtk_button_get_type(void);
66
68GtkWidget *dtgtk_button_new(DTGTKCairoPaintIconFunc paint, gint paintflags, void *paintdata);
70void dtgtk_button_set_paint(GtkDarktableButton *button, DTGTKCairoPaintIconFunc paint, gint paintflags, void *paintdata);
72void dtgtk_button_set_active(GtkDarktableButton *button, gboolean active);
74
75G_END_DECLS
76
77// clang-format off
78// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
79// vim: shiftwidth=2 expandtab tabstop=2 cindent
80// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
81// clang-format on
_darktable_button_flags
Definition button.h:46
@ DARKTABLE_BUTTON_SHOW_LABEL
Definition button.h:47
GType dtgtk_button_get_type(void)
Definition dtgtk/button.c:145
void dtgtk_button_set_paint(GtkDarktableButton *button, DTGTKCairoPaintIconFunc paint, gint paintflags, void *paintdata)
Definition dtgtk/button.c:162
enum _darktable_button_flags _darktable_button_flags_t
struct _GtkDarktableButtonClass GtkDarktableButtonClass
void dtgtk_button_set_active(GtkDarktableButton *button, gboolean active)
Definition dtgtk/button.c:170
GtkWidget * dtgtk_button_new(DTGTKCairoPaintIconFunc paint, gint paintflags, void *paintdata)
Definition dtgtk/button.c:132
gboolean dtgtk_button_get_active(GtkDarktableButton *button)
Definition dtgtk/button.c:179
struct _GtkDarktableButton GtkDarktableButton
void(* DTGTKCairoPaintIconFunc)(cairo_t *cr, gint x, gint y, gint w, gint h, gint flags, void *data)
Definition dtgtk/paint.h:74
Stroke-level path sampling and runtime-state API for drawlayer.
struct _GtkWidget GtkWidget
Definition splash.h:29
Definition button.h:61
GtkButtonClass parent_class
Definition button.h:62
Definition button.h:51
DTGTKCairoPaintIconFunc icon
Definition button.h:53
GdkRGBA fg
Definition button.h:56
GdkRGBA bg
Definition button.h:56
void * icon_data
Definition button.h:55
GtkWidget * canvas
Definition button.h:57
GtkButton widget
Definition button.h:52
gint icon_flags
Definition button.h:54