Debian Codegraph @

libcolord-gtk/cd-sample-widget.h

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2012 Richard Hughes <[email protected]>
4 *
5 * Licensed under the GNU Lesser General Public License Version 2.1
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #if !defined (__COLORD_GTK_H_INSIDE__) && !defined (CD_COMPILATION)
23 #error "Only <colord-gtk.h> can be included directly."
24 #endif
25
26 #ifndef __CD_SAMPLE_WIDGET_H__
27 #define __CD_SAMPLE_WIDGET_H__
28
29 #include <gtk/gtk.h>
30 #include <colord.h>
31
32 G_BEGIN_DECLS
33
34 #define CD_TYPE_SAMPLE_WIDGET (cd_sample_widget_get_type ())
35 #define CD_SAMPLE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CD_TYPE_SAMPLE_WIDGET, CdSampleWidget))
36 #define CD_SAMPLE_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), CD_SAMPLE_WIDGET, CdSampleWidgetClass))
37 #define CD_IS_SAMPLE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CD_TYPE_SAMPLE_WIDGET))
38 #define CD_IS_SAMPLE_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), EFF_TYPE_SAMPLE_WIDGET))
39 #define CD_SAMPLE_WIDGET_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), CD_TYPE_SAMPLE_WIDGET, CdSampleWidgetClass))
40
41 typedef struct CdSampleWidget CdSampleWidget;
42 typedef struct CdSampleWidgetClass CdSampleWidgetClass;
43 typedef struct CdSampleWidgetPrivate CdSampleWidgetPrivate;
44
45 struct CdSampleWidget
46 {
47 GtkDrawingArea parent;
48 CdSampleWidgetPrivate *priv;
49 };
50
51 struct CdSampleWidgetClass
52 {
53 GtkDrawingAreaClass parent_class;
54 };
55
56 GType cd_sample_widget_get_type (void);
57 GtkWidget *cd_sample_widget_new (void);
58 void cd_sample_widget_set_color (CdSampleWidget *sample,
59 const CdColorRGB *color);
60
61 G_END_DECLS
62
63 #endif