| 1 |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- |
| 2 |
* |
| 3 |
* Copyright (C) 2013 Richard Hughes <[email protected]> |
| 4 |
* |
| 5 |
* Licensed under the GNU General Public License Version 2 |
| 6 |
* |
| 7 |
* This program is free software; you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published by |
| 9 |
* the Free Software Foundation; either version 2 of the License, or |
| 10 |
* (at your option) any later version. |
| 11 |
* |
| 12 |
* This program 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 |
| 15 |
* GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this program; if not, write to the Free Software |
| 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 |
*/ |
| 21 |
|
| 22 |
#ifndef __HUEY_CTX_H |
| 23 |
#define __HUEY_CTX_H |
| 24 |
|
| 25 |
#include <glib-object.h> |
| 26 |
#include <gio/gio.h> |
| 27 |
#include <gusb.h> |
| 28 |
#include <colord-private.h> |
| 29 |
|
| 30 |
G_BEGIN_DECLS |
| 31 |
|
| 32 |
#define HUEY_TYPE_CTX (huey_ctx_get_type ()) |
| 33 |
G_DECLARE_DERIVABLE_TYPE (HueyCtx, huey_ctx, HUEY, CTX, GObject) |
| 34 |
|
| 35 |
struct _HueyCtxClass |
| 36 |
{ |
| 37 |
GObjectClass parent_class; |
| 38 |
/*< private >*/ |
| 39 |
/* Padding for future expansion */ |
| 40 |
void (*_huey_ctx_reserved1) (void); |
| 41 |
void (*_huey_ctx_reserved2) (void); |
| 42 |
void (*_huey_ctx_reserved3) (void); |
| 43 |
void (*_huey_ctx_reserved4) (void); |
| 44 |
void (*_huey_ctx_reserved5) (void); |
| 45 |
void (*_huey_ctx_reserved6) (void); |
| 46 |
void (*_huey_ctx_reserved7) (void); |
| 47 |
void (*_huey_ctx_reserved8) (void); |
| 48 |
}; |
| 49 |
|
| 50 |
HueyCtx *huey_ctx_new (void); |
| 51 |
|
| 52 |
CdColorXYZ *huey_ctx_take_sample (HueyCtx *ctx, |
| 53 |
CdSensorCap cap, |
| 54 |
GError **error) |
| 55 |
G_GNUC_WARN_UNUSED_RESULT; |
| 56 |
GUsbDevice *huey_ctx_get_device (HueyCtx *ctx); |
| 57 |
void huey_ctx_set_device (HueyCtx *ctx, |
| 58 |
GUsbDevice *device); |
| 59 |
gboolean huey_ctx_setup (HueyCtx *ctx, |
| 60 |
GError **error) |
| 61 |
G_GNUC_WARN_UNUSED_RESULT; |
| 62 |
const CdMat3x3 *huey_ctx_get_calibration_lcd (HueyCtx *ctx); |
| 63 |
const CdMat3x3 *huey_ctx_get_calibration_crt (HueyCtx *ctx); |
| 64 |
gfloat huey_ctx_get_calibration_value (HueyCtx *ctx); |
| 65 |
const CdVec3 *huey_ctx_get_dark_offset (HueyCtx *ctx); |
| 66 |
const gchar *huey_ctx_get_unlock_string (HueyCtx *ctx); |
| 67 |
|
| 68 |
G_END_DECLS |
| 69 |
|
| 70 |
#endif /* __HUEY_CTX_H */ |
| 71 |
|