~ubuntu-branches/ubuntu/quantal/ibus/quantal

« back to all changes in this revision

Viewing changes to bus/test-client.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry Warsaw
  • Date: 2011-08-11 17:00:57 UTC
  • mfrom: (6.2.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110811170057-6dmbfs4s3cchzl7x
Tags: 1.3.99.20110419-1ubuntu1
* Merge with Debian unstable.  Remaining Ubuntu changes:
  - Indicator support:
    + Add 05_appindicator.patch: Use an indicator rather than a notification
      icon.
    + debian/control: Recommend python-appindicator.
  - debian/control: Install im-switch instead of im-config by default.
  - debian/README.source: Removed, it was outdated and no longer correct
  - debian/patches/01_ubuntu_desktop: Fix "Desktop entry needs the
    X-Ubuntu-Gettext-Domain key"  (LP: #457632)
  - debian/patches/02_title_update.patch: Rename "IBus Preferences" to
    "Keyboard Input Methods"
  - debian/patches/06_locale_parser.patch: Cherry-picked from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2
 
/* vim:set et sts=4: */
3
 
/* bus - The Input Bus
4
 
 * Copyright (C) 2010 Google Inc.
5
 
 *
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.
10
 
 *
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.
15
 
 *
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.
20
 
 */
21
 
 
22
 
#ifndef __BUS_TEST_CLIENT_H_
23
 
#define __BUS_TEST_CLIENT_H_
24
 
 
25
 
#include <ibus.h>
26
 
 
27
 
/*
28
 
 * Type macros.
29
 
 */
30
 
 
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))
44
 
 
45
 
#define MODIFIER_KEY_NUM 7
46
 
 
47
 
G_BEGIN_DECLS
48
 
typedef struct _BusTestClient BusTestClient;
49
 
typedef struct _BusTestClientClass BusTestClientClass;
50
 
 
51
 
struct _BusTestClient {
52
 
    IBusObject parent;
53
 
    /* instance members */
54
 
    IBusInputContext        *ibuscontext;
55
 
    /* modifier key state */
56
 
    gboolean                 modifier[MODIFIER_KEY_NUM];
57
 
 
58
 
    gint                     caps;
59
 
    /* engine is enabled */
60
 
    gboolean                 enabled;
61
 
    /* ibus-daemon is enabled */
62
 
    gboolean                 connected;
63
 
    /* private member */
64
 
};
65
 
 
66
 
struct _BusTestClientClass {
67
 
    IBusObjectClass parent;
68
 
    /* class members */
69
 
};
70
 
 
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,
76
 
                                                 guint               keysym);
77
 
void             bus_test_client_clear_modifier (BusTestClient      *client);
78
 
 
79
 
G_END_DECLS
80
 
#endif
81