590
590
priv->lookup_table = NULL;
594
g_object_unref (priv->props);
598
593
if (priv->connection) {
599
594
g_signal_handlers_disconnect_by_func (priv->connection,
600
595
(GCallback) _connection_destroy_cb,
714
709
retval = bus_input_context_filter_keyboard_shortcuts (context, keyval, modifiers);
712
priv->filter_release = TRUE;
717
713
reply = ibus_message_new_method_return (message);
718
714
ibus_message_append_args (reply,
719
715
G_TYPE_BOOLEAN, &retval,
1156
1152
if (priv->capabilities & IBUS_CAP_FOCUS) {
1157
1153
g_signal_emit (context, context_signals[FOCUS_IN], 0);
1159
if ((priv->capabilities & IBUS_CAP_PROPERTY) == 0) {
1160
g_signal_emit (context,
1161
context_signals[REGISTER_PROPERTIES],
1165
1155
if (priv->preedit_visible && (priv->capabilities & IBUS_CAP_PREEDIT_TEXT) == 0) {
1166
1156
g_signal_emit (context,
1167
1157
context_signals[UPDATE_PREEDIT_TEXT],
1222
bus_input_context_page_up (BusInputContext *context)
1224
g_assert (BUS_IS_INPUT_CONTEXT (context));
1226
BusInputContextPrivate *priv;
1227
priv = BUS_INPUT_CONTEXT_GET_PRIVATE (context);
1230
bus_engine_proxy_page_up (priv->engine);
1235
bus_input_context_page_down (BusInputContext *context)
1237
g_assert (BUS_IS_INPUT_CONTEXT (context));
1239
BusInputContextPrivate *priv;
1240
priv = BUS_INPUT_CONTEXT_GET_PRIVATE (context);
1243
bus_engine_proxy_page_down (priv->engine);
1248
bus_input_context_cursor_up (BusInputContext *context)
1250
g_assert (BUS_IS_INPUT_CONTEXT (context));
1252
BusInputContextPrivate *priv;
1253
priv = BUS_INPUT_CONTEXT_GET_PRIVATE (context);
1256
bus_engine_proxy_cursor_up (priv->engine);
1261
bus_input_context_cursor_down (BusInputContext *context)
1263
g_assert (BUS_IS_INPUT_CONTEXT (context));
1265
BusInputContextPrivate *priv;
1266
priv = BUS_INPUT_CONTEXT_GET_PRIVATE (context);
1269
bus_engine_proxy_cursor_down (priv->engine);
1211
#define DEFINE_FUNC(name) \
1213
bus_input_context_##name (BusInputContext *context) \
1215
g_assert (BUS_IS_INPUT_CONTEXT (context)); \
1217
BusInputContextPrivate *priv; \
1218
priv = BUS_INPUT_CONTEXT_GET_PRIVATE (context); \
1220
if (priv->engine) { \
1221
bus_engine_proxy_##name (priv->engine); \
1225
DEFINE_FUNC(page_up)
1226
DEFINE_FUNC(page_down)
1227
DEFINE_FUNC(cursor_up)
1228
DEFINE_FUNC(cursor_down)
1233
bus_input_context_candidate_clicked (BusInputContext *context,
1238
g_assert (BUS_IS_INPUT_CONTEXT (context));
1240
BusInputContextPrivate *priv;
1241
priv = BUS_INPUT_CONTEXT_GET_PRIVATE (context);
1244
bus_engine_proxy_candidate_clicked (priv->engine,
1650
1628
BusInputContextPrivate *priv;
1651
1629
priv = BUS_INPUT_CONTEXT_GET_PRIVATE (context);
1654
g_object_unref (priv->props);
1657
priv->props = (IBusPropList *) g_object_ref (props ? props : props_empty);
1659
1631
if (priv->capabilities & IBUS_CAP_PROPERTY) {
1660
1632
bus_input_context_send_signal (context,
1661
1633
"RegisterProperties",
1662
IBUS_TYPE_PROP_LIST, &(priv->props),
1634
IBUS_TYPE_PROP_LIST, &props,
1663
1635
G_TYPE_INVALID);
1666
1638
g_signal_emit (context,
1667
1639
context_signals[REGISTER_PROPERTIES],
1680
1652
BusInputContextPrivate *priv;
1681
1653
priv = BUS_INPUT_CONTEXT_GET_PRIVATE (context);
1683
if (priv->props == props_empty) {
1687
if (!ibus_prop_list_update_property (priv->props, prop)) {
1691
1655
if (priv->capabilities & IBUS_CAP_PROPERTY) {
1692
1656
bus_input_context_send_signal (context,
1693
1657
"UpdateProperty",
2067
2033
prev_factory = g_quark_from_static_string ("prev-engine");
2036
if (priv->filter_release){
2037
if(modifiers & IBUS_RELEASE_MASK) {
2038
/* filter release key event */
2042
/* stop filter release key event */
2043
priv->filter_release = FALSE;
2070
2047
event = ibus_hotkey_profile_filter_key_event (BUS_DEFAULT_HOTKEY_PROFILE,
2086
2063
bus_input_context_enable (context);
2089
return enabled != priv->enabled;
2066
retval = (enabled != priv->enabled);
2091
2068
else if (event == next_factory) {
2092
2069
if (priv->engine == NULL || priv->enabled == FALSE) {
2095
g_signal_emit (context, context_signals[REQUEST_NEXT_ENGINE], 0);
2073
g_signal_emit (context, context_signals[REQUEST_NEXT_ENGINE], 0);
2098
2077
else if (event == prev_factory) {
2099
2078
if (priv->engine == NULL || priv->enabled == FALSE) {
2102
g_signal_emit (context, context_signals[REQUEST_PREV_ENGINE], 0);
2082
g_signal_emit (context, context_signals[REQUEST_PREV_ENGINE], 0);
2087
if (retval == TRUE) {
2088
/* begine filter release key event */
2089
priv->filter_release = TRUE;