Debian Codegraph @

src/ck-vt-monitor.h

raw symbols SCIP
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2006 William Jon McCann <[email protected]>
4 *
5 * This program 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 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program 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 this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 */
20
21 #ifndef __CK_VT_MONITOR_H
22 #define __CK_VT_MONITOR_H
23
24 #include <glib-object.h>
25
26 G_BEGIN_DECLS
27
28 #define CK_TYPE_VT_MONITOR (ck_vt_monitor_get_type ())
29 #define CK_VT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CK_TYPE_VT_MONITOR, CkVtMonitor))
30 #define CK_VT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CK_TYPE_VT_MONITOR, CkVtMonitorClass))
31 #define CK_IS_VT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CK_TYPE_VT_MONITOR))
32 #define CK_IS_VT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CK_TYPE_VT_MONITOR))
33 #define CK_VT_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CK_TYPE_VT_MONITOR, CkVtMonitorClass))
34
35 typedef struct CkVtMonitorPrivate CkVtMonitorPrivate;
36
37 typedef struct
38 {
39 GObject parent;
40 CkVtMonitorPrivate *priv;
41 } CkVtMonitor;
42
43 typedef struct
44 {
45 GObjectClass parent_class;
46
47 void (* active_changed) (CkVtMonitor *vt_monitor,
48 guint num);
49 } CkVtMonitorClass;
50
51 typedef enum
52 {
53 CK_VT_MONITOR_ERROR_GENERAL,
54 CK_VT_MONITOR_ERROR_ALREADY_ACTIVE,
55 CK_VT_MONITOR_ERROR_NO_CONSOLE
56 } CkVtMonitorError;
57
58 #define CK_VT_MONITOR_ERROR ck_vt_monitor_error_quark ()
59
60 GQuark ck_vt_monitor_error_quark (void);
61 GType ck_vt_monitor_get_type (void);
62 CkVtMonitor * ck_vt_monitor_new (void);
63
64 gboolean ck_vt_monitor_set_active (CkVtMonitor *vt_monitor,
65 guint32 num,
66 GError **error);
67 gboolean ck_vt_monitor_get_active (CkVtMonitor *vt_monitor,
68 guint32 *num,
69 GError **error);
70
71 G_END_DECLS
72
73 #endif /* __CK_VT_MONITOR_H */