Skip to content

Commit 5136dbc

Browse files
jpetersenueno
authored andcommitted
wayland: Add wayland client
This patch adds a new client which supports the Wayland input method protocol. Note that the support is disabled by default until the input method protocol becomes official in the Wayland upstream. Supply --enable-wayland to configure to try it. Also, you will need to set the executable path of ibus-wayland under the "input-method" section of weston.ini, like this: [input-method] path=.../libexec/ibus-wayland BUG=Issue#1617 Review URL: https://codereview.appspot.com/11320043 Patch from Jan Arne Petersen <jan.petersen@kdab.com>.
1 parent 1bdcf21 commit 5136dbc

7 files changed

Lines changed: 1394 additions & 0 deletions

File tree

client/Makefile.am

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ if ENABLE_XIM
3232
X11 = x11
3333
endif
3434

35+
if ENABLE_WAYLAND
36+
WAYLAND = wayland
37+
endif
38+
3539
SUBDIRS = \
3640
$(GTK2) \
3741
$(GTK3) \
3842
$(X11) \
43+
$(WAYLAND) \
3944
$(NULL)
4045

4146
-include $(top_srcdir)/git.mk

client/wayland/Makefile.am

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# vim:set noet ts=4:
2+
#
3+
# ibus - The Input Bus
4+
#
5+
# Copyright (c) 2007-2013 Peng Huang <shawn.p.huang@gmail.com>
6+
# Copyright (c) 2007-2013 Red Hat, Inc.
7+
#
8+
# This library is free software; you can redistribute it and/or modify
9+
# it under the terms of the GNU Lesser General Public License as
10+
# published by the Free Software Foundation; either version 2.1 of the
11+
# License, or (at your option) any later version.
12+
#
13+
# This library is distributed in the hope that it will be useful, but
14+
# WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
# Lesser General Public License for more details.
17+
#
18+
# You should have received a copy of the GNU Lesser General Public
19+
# License along with this library; if not, write to the Free Software
20+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21+
# 02110-1301 USA.
22+
23+
libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la
24+
25+
libexec_PROGRAMS = ibus-wayland
26+
27+
protocol_sources = \
28+
input-method-protocol.c \
29+
input-method-client-protocol.h \
30+
$(NULL)
31+
32+
ibus_wayland_SOURCES = \
33+
$(protocol_sources) \
34+
main.c \
35+
$(NULL)
36+
37+
ibus_wayland_DEPENDENCIES = \
38+
$(libibus) \
39+
$(NULL)
40+
41+
ibus_wayland_LDADD = \
42+
$(libibus) \
43+
$(GIO2_LIBS) \
44+
$(WAYLAND_LIBS) \
45+
$(NULL)
46+
47+
ibus_wayland_CFLAGS = \
48+
$(GIO2_CFLAGS) \
49+
$(WAYLAND_CFLAGS) \
50+
-I$(top_srcdir)/src \
51+
-I$(top_builddir)/src \
52+
$(NULL)
53+
54+
$(libibus):
55+
(cd $(top_builddir)/src; make)
56+
57+
EXTRA_DIST = \
58+
README \
59+
$(protocol_sources) \
60+
$(NULL)
61+
62+
-include $(top_srcdir)/git.mk

client/wayland/README

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
The following two files are generated with wayland-scanner:
2+
3+
input-method-protocol.c
4+
input-method-client-protocol.h
5+
6+
We include them in the distribution instead of generating them, since
7+
the Wayland protocol structure will unlikely change. Do not modify
8+
those files manually.
9+
10+
To generate them, use the wayland-scanner command as follows. You can
11+
find input-method.xml in the Weston source code (maybe it will be
12+
moved to the Wayland source code later).
13+
14+
$ wayland-scanner code < input-method.xml \
15+
> input-method-protocol.c
16+
$ wayland-scanner client-header < input-method.xml \
17+
> input-method-client-protocol.h

0 commit comments

Comments
 (0)