summaryrefslogtreecommitdiff
path: root/plugins/color/gcm-edid.h
blob: 5eff73c9f4a227e05c55a65827b98ee7646c8689 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 *
 * Copyright (C) 2009-2010 Richard Hughes <richard@hughsie.com>
 *
 * Licensed under the GNU General Public License Version 2
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef __GCM_EDID_H
#define __GCM_EDID_H

#include <glib-object.h>
#include <colord.h>

G_BEGIN_DECLS

#define GCM_TYPE_EDID           (gcm_edid_get_type ())
#define GCM_EDID(o)             (G_TYPE_CHECK_INSTANCE_CAST ((o), GCM_TYPE_EDID, GcmEdid))
#define GCM_EDID_CLASS(k)       (G_TYPE_CHECK_CLASS_CAST((k), GCM_TYPE_EDID, GcmEdidClass))
#define GCM_IS_EDID(o)          (G_TYPE_CHECK_INSTANCE_TYPE ((o), GCM_TYPE_EDID))
#define GCM_IS_EDID_CLASS(k)    (G_TYPE_CHECK_CLASS_TYPE ((k), GCM_TYPE_EDID))
#define GCM_EDID_GET_CLASS(o)   (G_TYPE_INSTANCE_GET_CLASS ((o), GCM_TYPE_EDID, GcmEdidClass))
#define GCM_EDID_ERROR          (gcm_edid_error_quark ())

typedef struct _GcmEdidPrivate  GcmEdidPrivate;
typedef struct _GcmEdid         GcmEdid;
typedef struct _GcmEdidClass    GcmEdidClass;

struct _GcmEdid
{
         GObject                 parent;
         GcmEdidPrivate         *priv;
};

struct _GcmEdidClass
{
        GObjectClass    parent_class;
};

enum
{
        GCM_EDID_ERROR_FAILED_TO_PARSE
};

GType            gcm_edid_get_type                      (void);
GQuark           gcm_edid_error_quark                   (void);
GcmEdid         *gcm_edid_new                           (void);
void             gcm_edid_reset                         (GcmEdid                *edid);
gboolean         gcm_edid_parse                         (GcmEdid                *edid,
                                                         const guint8           *data,
                                                         gsize                   length,
                                                         GError                 **error);
const gchar     *gcm_edid_get_monitor_name              (GcmEdid                *edid);
const gchar     *gcm_edid_get_vendor_name               (GcmEdid                *edid);
const gchar     *gcm_edid_get_serial_number             (GcmEdid                *edid);
const gchar     *gcm_edid_get_eisa_id                   (GcmEdid                *edid);
const gchar     *gcm_edid_get_checksum                  (GcmEdid                *edid);
const gchar     *gcm_edid_get_pnp_id                    (GcmEdid                *edid);
guint            gcm_edid_get_width                     (GcmEdid                *edid);
guint            gcm_edid_get_height                    (GcmEdid                *edid);
gfloat           gcm_edid_get_gamma                     (GcmEdid                *edid);
const CdColorYxy *gcm_edid_get_red                      (GcmEdid                *edid);
const CdColorYxy *gcm_edid_get_green                    (GcmEdid                *edid);
const CdColorYxy *gcm_edid_get_blue                     (GcmEdid                *edid);
const CdColorYxy *gcm_edid_get_white                    (GcmEdid                *edid);

G_END_DECLS

#endif /* __GCM_EDID_H */