Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added virtual keyboard functionality (with ibus patch)
- Loading branch information
Naoyuki Ishimura
committed
Jul 1, 2010
1 parent
0c332a0
commit b0d2a69
Showing
50 changed files
with
2,672 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,108 @@ | |||
diff -ruNa ibus-1.3.3.orig/bus/connection.c ibus-1.3.3/bus/connection.c | |||
--- ibus-1.3.3.orig/bus/connection.c 2010-03-25 16:29:20.000000000 +0900 | |||
+++ ibus-1.3.3/bus/connection.c 2010-05-26 13:28:29.917200467 +0900 | |||
@@ -28,6 +28,7 @@ | |||
|
|||
/* BusConnectionPriv */ | |||
struct _BusConnectionPrivate { | |||
+ char dummy; | |||
}; | |||
typedef struct _BusConnectionPrivate BusConnectionPrivate; | |||
|
|||
diff -ruNa ibus-1.3.3.orig/bus/dbusimpl.c ibus-1.3.3/bus/dbusimpl.c | |||
--- ibus-1.3.3.orig/bus/dbusimpl.c 2010-03-25 16:29:20.000000000 +0900 | |||
+++ ibus-1.3.3/bus/dbusimpl.c 2010-05-25 15:15:17.717446408 +0900 | |||
@@ -804,6 +804,42 @@ | |||
/* ignore signal from local interface */ | |||
return FALSE; | |||
} | |||
+ /* for Virtual Keyboard support */ | |||
+ if (ibus_message_is_signal (message, | |||
+ "org.freedesktop.IBus.VKB", | |||
+ "SendText")) { | |||
+ gboolean retval; | |||
+ IBusText *text; | |||
+ IBusError *error = NULL; | |||
+ | |||
+ retval = ibus_message_get_args (message, | |||
+ &error, | |||
+ IBUS_TYPE_TEXT, &text, | |||
+ G_TYPE_INVALID); | |||
+ | |||
+ if (text) { | |||
+ bus_input_context_send_text_to_last_focused (text); | |||
+ } | |||
+ return FALSE; | |||
+ } | |||
+ if (ibus_message_is_signal (message, | |||
+ "org.freedesktop.IBus.VKB", | |||
+ "SendKey")) { | |||
+ gboolean retval; | |||
+ guint keyval, state; | |||
+ IBusError *error = NULL; | |||
+ | |||
+ retval = ibus_message_get_args (message, | |||
+ &error, | |||
+ G_TYPE_UINT, &keyval, | |||
+ G_TYPE_UINT, &state, | |||
+ G_TYPE_INVALID); | |||
+ | |||
+ bus_input_context_send_key_to_last_focused (keyval, 0, state); | |||
+ | |||
+ return FALSE; | |||
+ } | |||
+ | |||
|
|||
ibus_message_set_sender (message, bus_connection_get_unique_name (connection)); | |||
|
|||
diff -ruNa ibus-1.3.3.orig/bus/dbusimpl.c ibus-1.3.3/bus/dbusimpl.c | |||
--- ibus-1.3.3.orig/bus/inputcontext.c 2010-04-30 21:22:39.000000000 +0900 | |||
+++ ibus-1.3.3/bus/inputcontext.c 2010-05-25 15:13:47.390586237 +0900 | |||
@@ -1175,11 +1175,15 @@ | |||
return context->has_focus; | |||
} | |||
|
|||
+static BusInputContext *target_context = NULL; | |||
+ | |||
void | |||
bus_input_context_focus_in (BusInputContext *context) | |||
{ | |||
g_assert (BUS_IS_INPUT_CONTEXT (context)); | |||
|
|||
+ target_context = context; | |||
+ | |||
if (context->has_focus) | |||
return; | |||
|
|||
@@ -1241,6 +1245,30 @@ | |||
} | |||
|
|||
void | |||
+bus_input_context_send_text_to_last_focused (IBusText *text) | |||
+{ | |||
+ if (target_context) { | |||
+ bus_input_context_send_signal (target_context, | |||
+ "CommitText", | |||
+ IBUS_TYPE_TEXT, &text, | |||
+ G_TYPE_INVALID); | |||
+ } | |||
+} | |||
+ | |||
+void | |||
+bus_input_context_send_key_to_last_focused (guint keyval, guint keycode, guint state) | |||
+{ | |||
+ if (target_context) { | |||
+ bus_input_context_send_signal (target_context, | |||
+ "ForwardKeyEvent", | |||
+ G_TYPE_UINT, &keyval, | |||
+ G_TYPE_UINT, &keycode, | |||
+ G_TYPE_UINT, &state, | |||
+ G_TYPE_INVALID); | |||
+ } | |||
+} | |||
+ | |||
+void | |||
bus_input_context_focus_out (BusInputContext *context) | |||
{ | |||
g_assert (BUS_IS_INPUT_CONTEXT (context)); | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.