1
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2
/* vim:set et sts=4: */
4
* Copyright (C) 2010 Google Inc.
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
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
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the
18
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
22
#ifndef __BUS_TEST_CLIENT_H_
23
#define __BUS_TEST_CLIENT_H_
31
/* define GOBJECT macros */
32
#define BUS_TYPE_TEST_CLIENT \
33
(bus_test_client_get_type ())
34
#define BUS_TEST_CLIENT(obj) \
35
(G_TYPE_CHECK_INSTANCE_CAST ((obj), BUS_TYPE_TEST_CLIENT, BusTestClient))
36
#define BUS_TEST_CLIENT_CLASS(klass) \
37
(G_TYPE_CHECK_CLASS_CAST ((klass), BUS_TYPE_TEST_CLIENT, BusTestClientClass))
38
#define BUS_IS_TEST_CLIENT(obj) \
39
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUS_TYPE_TEST_CLIENT))
40
#define BUS_IS_TEST_CLIENT_CLASS(klass) \
41
(G_TYPE_CHECK_CLASS_TYPE ((klass), BUS_TYPE_TEST_CLIENT))
42
#define BUS_TEST_CLIENT_GET_CLASS(obj) \
43
(G_TYPE_CHECK_GET_CLASS ((obj), BUS_TYPE_TEST_CLIENT, BusTestClientClass))
45
#define MODIFIER_KEY_NUM 7
48
typedef struct _BusTestClient BusTestClient;
49
typedef struct _BusTestClientClass BusTestClientClass;
51
struct _BusTestClient {
53
/* instance members */
54
IBusInputContext *ibuscontext;
55
/* modifier key state */
56
gboolean modifier[MODIFIER_KEY_NUM];
59
/* engine is enabled */
61
/* ibus-daemon is enabled */
66
struct _BusTestClientClass {
67
IBusObjectClass parent;
71
GType bus_test_client_get_type (void);
72
BusTestClient *bus_test_client_new (void);
73
gboolean bus_test_client_is_enabled (BusTestClient *client);
74
gboolean bus_test_client_is_connected (BusTestClient *client);
75
gboolean bus_test_client_send_key (BusTestClient *client,
77
void bus_test_client_clear_modifier (BusTestClient *client);