1/*
2 * GTK - The GIMP Toolkit
3 * Copyright (C) 2018 Red Hat, Inc.
4 * All rights reserved.
5 *
6 * This Library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
10 *
11 * This Library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef __GTK_COLOR_PICKER_H__
21#define __GTK_COLOR_PICKER_H__
22
23
24#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
25#error "Only <gtk/gtk.h> can be included directly."
26#endif
27
28#include <gtk/gtkwindow.h>
29
30G_BEGIN_DECLS
31
32
33#define GTK_TYPE_COLOR_PICKER (gtk_color_picker_get_type ())
34#define GTK_COLOR_PICKER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_COLOR_PICKER, GtkColorPicker))
35#define GTK_IS_COLOR_PICKER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_COLOR_PICKER))
36#define GTK_COLOR_PICKER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GTK_TYPE_COLOR_PICKER, GtkColorPickerInterface))
37
38
39typedef struct _GtkColorPicker GtkColorPicker;
40typedef struct _GtkColorPickerInterface GtkColorPickerInterface;
41
42struct _GtkColorPickerInterface {
43 GTypeInterface g_iface;
44
45 void (* pick) (GtkColorPicker *picker,
46 GAsyncReadyCallback callback,
47 gpointer user_data);
48
49 GdkRGBA * (* pick_finish) (GtkColorPicker *picker,
50 GAsyncResult *res,
51 GError **error);
52};
53
54GType gtk_color_picker_get_type (void) G_GNUC_CONST;
55GtkColorPicker * gtk_color_picker_new (void);
56void gtk_color_picker_pick (GtkColorPicker *picker,
57 GAsyncReadyCallback callback,
58 gpointer user_data);
59GdkRGBA * gtk_color_picker_pick_finish (GtkColorPicker *picker,
60 GAsyncResult *res,
61 GError **error);
62
63G_END_DECLS
64
65#endif /* __GTK_COLOR_PICKER_H__ */
66

source code of gtk/gtk/gtkcolorpickerprivate.h