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-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 "paint.h"
22#include <gtk/gtk.h>
23G_BEGIN_DECLS
24#define DTGTK_BUTTON(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, dtgtk_button_get_type(), GtkDarktableButton)
25#define DTGTK_BUTTON_CLASS(klass) \
26 G_TYPE_CHECK_CLASS_CAST(klass, dtgtk_button_get_type(), GtkDarktableButtonClass)
27#define DTGTK_IS_BUTTON(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, dtgtk_button_get_type())
28#define DTGTK_IS_BUTTON_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE(obj, dtgtk_button_get_type())
29
34
44
49
50GType dtgtk_button_get_type(void);
51
53GtkWidget *dtgtk_button_new(DTGTKCairoPaintIconFunc paint, gint paintflags, void *paintdata);
55void dtgtk_button_set_paint(GtkDarktableButton *button, DTGTKCairoPaintIconFunc paint, gint paintflags, void *paintdata);
57void dtgtk_button_set_active(GtkDarktableButton *button, gboolean active);
59
60G_END_DECLS
61
62// clang-format off
63// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
64// vim: shiftwidth=2 expandtab tabstop=2 cindent
65// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
66// clang-format on
_darktable_button_flags
Definition button.h:31
@ DARKTABLE_BUTTON_SHOW_LABEL
Definition button.h:32
GType dtgtk_button_get_type(void)
Definition dtgtk/button.c:128
void dtgtk_button_set_paint(GtkDarktableButton *button, DTGTKCairoPaintIconFunc paint, gint paintflags, void *paintdata)
Definition dtgtk/button.c:145
enum _darktable_button_flags _darktable_button_flags_t
struct _GtkDarktableButtonClass GtkDarktableButtonClass
void dtgtk_button_set_active(GtkDarktableButton *button, gboolean active)
Definition dtgtk/button.c:153
GtkWidget * dtgtk_button_new(DTGTKCairoPaintIconFunc paint, gint paintflags, void *paintdata)
Definition dtgtk/button.c:115
gboolean dtgtk_button_get_active(GtkDarktableButton *button)
Definition dtgtk/button.c:162
struct _GtkDarktableButton GtkDarktableButton
void(* DTGTKCairoPaintIconFunc)(cairo_t *cr, gint x, gint y, gint w, gint h, gint flags, void *data)
Definition paint.h:46
Definition button.h:46
GtkButtonClass parent_class
Definition button.h:47
Definition button.h:36
DTGTKCairoPaintIconFunc icon
Definition button.h:38
GdkRGBA fg
Definition button.h:41
GdkRGBA bg
Definition button.h:41
void * icon_data
Definition button.h:40
GtkWidget * canvas
Definition button.h:42
GtkButton widget
Definition button.h:37
gint icon_flags
Definition button.h:39