|
Packit Service |
1d8f1c |
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
|
Packit Service |
1d8f1c |
/* vim:set et sts=4: */
|
|
Packit Service |
1d8f1c |
/* bus - The Input Bus
|
|
Packit Service |
1d8f1c |
* Copyright (C) 2010 Google Inc.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
1d8f1c |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
1d8f1c |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
1d8f1c |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
1d8f1c |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
1d8f1c |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
1d8f1c |
* Lesser General Public License for more details.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
1d8f1c |
* License along with this library; if not, write to the Free Software
|
|
Packit Service |
1d8f1c |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
Packit Service |
1d8f1c |
* USA
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#ifndef __BUS_TEST_CLIENT_H_
|
|
Packit Service |
1d8f1c |
#define __BUS_TEST_CLIENT_H_
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#include <ibus.h>
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/*
|
|
Packit Service |
1d8f1c |
* Type macros.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/* define GOBJECT macros */
|
|
Packit Service |
1d8f1c |
#define BUS_TYPE_TEST_CLIENT \
|
|
Packit Service |
1d8f1c |
(bus_test_client_get_type ())
|
|
Packit Service |
1d8f1c |
#define BUS_TEST_CLIENT(obj) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_INSTANCE_CAST ((obj), BUS_TYPE_TEST_CLIENT, BusTestClient))
|
|
Packit Service |
1d8f1c |
#define BUS_TEST_CLIENT_CLASS(klass) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_CLASS_CAST ((klass), BUS_TYPE_TEST_CLIENT, BusTestClientClass))
|
|
Packit Service |
1d8f1c |
#define BUS_IS_TEST_CLIENT(obj) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUS_TYPE_TEST_CLIENT))
|
|
Packit Service |
1d8f1c |
#define BUS_IS_TEST_CLIENT_CLASS(klass) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_CLASS_TYPE ((klass), BUS_TYPE_TEST_CLIENT))
|
|
Packit Service |
1d8f1c |
#define BUS_TEST_CLIENT_GET_CLASS(obj) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_GET_CLASS ((obj), BUS_TYPE_TEST_CLIENT, BusTestClientClass))
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#define MODIFIER_KEY_NUM 7
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
G_BEGIN_DECLS
|
|
Packit Service |
1d8f1c |
typedef struct _BusTestClient BusTestClient;
|
|
Packit Service |
1d8f1c |
typedef struct _BusTestClientClass BusTestClientClass;
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
struct _BusTestClient {
|
|
Packit Service |
1d8f1c |
IBusObject parent;
|
|
Packit Service |
1d8f1c |
/* instance members */
|
|
Packit Service |
1d8f1c |
IBusInputContext *ibuscontext;
|
|
Packit Service |
1d8f1c |
/* modifier key state */
|
|
Packit Service |
1d8f1c |
gboolean modifier[MODIFIER_KEY_NUM];
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
gint caps;
|
|
Packit Service |
1d8f1c |
/* engine is enabled */
|
|
Packit Service |
1d8f1c |
gboolean enabled;
|
|
Packit Service |
1d8f1c |
/* ibus-daemon is enabled */
|
|
Packit Service |
1d8f1c |
gboolean connected;
|
|
Packit Service |
1d8f1c |
/* private member */
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
struct _BusTestClientClass {
|
|
Packit Service |
1d8f1c |
IBusObjectClass parent;
|
|
Packit Service |
1d8f1c |
/* class members */
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GType bus_test_client_get_type (void);
|
|
Packit Service |
1d8f1c |
BusTestClient *bus_test_client_new (void);
|
|
Packit Service |
1d8f1c |
gboolean bus_test_client_is_enabled (BusTestClient *client);
|
|
Packit Service |
1d8f1c |
gboolean bus_test_client_is_connected (BusTestClient *client);
|
|
Packit Service |
1d8f1c |
gboolean bus_test_client_send_key (BusTestClient *client,
|
|
Packit Service |
1d8f1c |
guint keysym);
|
|
Packit Service |
1d8f1c |
void bus_test_client_clear_modifier (BusTestClient *client);
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
G_END_DECLS
|
|
Packit Service |
1d8f1c |
#endif
|
|
Packit Service |
1d8f1c |
|