x11ic->icid = call_data->icid;
x11ic->connect_id = call_data->connect_id;
x11ic->conn = (X11ICONN *)g_hash_table_lookup (_connections,
- (gconstpointer)(unsigned long)call_data->connect_id);
+ GINT_TO_POINTER (call_data->connect_id));
if (x11ic->conn == NULL) {
g_slice_free (X11IC, x11ic);
g_return_val_if_reached (0);
}
g_hash_table_insert (_x11_ic_table,
- (gpointer)x11ic->icid, (gpointer)x11ic);
+ GINT_TO_POINTER (x11ic->icid), (gpointer)x11ic);
x11ic->conn->clients = g_list_append (x11ic->conn->clients,
- (gpointer)x11ic);
+ (gpointer)x11ic);
return 1;
}
call_data->icid, call_data->connect_id);
x11ic = (X11IC *)g_hash_table_lookup (_x11_ic_table,
- (gconstpointer)(unsigned long)call_data->icid);
+ GINT_TO_POINTER (call_data->icid));
g_return_val_if_fail (x11ic != NULL, 0);
if (x11ic->context) {
}
g_hash_table_remove (_x11_ic_table,
- (gconstpointer)(unsigned long)call_data->icid);
+ GINT_TO_POINTER (call_data->icid));
x11ic->conn->clients = g_list_remove (x11ic->conn->clients, (gconstpointer)x11ic);
g_free (x11ic->preedit_string);
LOG (1, "XIM_SET_IC_FOCUS ic=%d connect_id=%d",
call_data->icid, call_data->connect_id);
- x11ic = (X11IC *)g_hash_table_lookup (_x11_ic_table,
- (gconstpointer)(unsigned long)call_data->icid);
+ x11ic = (X11IC *) g_hash_table_lookup (_x11_ic_table,
+ GINT_TO_POINTER (call_data->icid));
g_return_val_if_fail (x11ic != NULL, 0);
ibus_input_context_focus_in (x11ic->context);
LOG (1, "XIM_UNSET_IC_FOCUS ic=%d connect_id=%d",
call_data->icid, call_data->connect_id);
- x11ic = (X11IC *)g_hash_table_lookup (_x11_ic_table,
- (gconstpointer)(unsigned long)call_data->icid);
+ x11ic = (X11IC *) g_hash_table_lookup (_x11_ic_table,
+ GINT_TO_POINTER (call_data->icid));
g_return_val_if_fail (x11ic != NULL, 0);
ibus_input_context_focus_out (x11ic->context);
LOG (1, "XIM_FORWARD_EVENT ic=%d connect_id=%d",
call_data->icid, call_data->connect_id);
- x11ic = (X11IC *)g_hash_table_lookup (_x11_ic_table,
- (gconstpointer)(unsigned long)call_data->icid);
+ x11ic = (X11IC *) g_hash_table_lookup (_x11_ic_table,
+ GINT_TO_POINTER (call_data->icid));
g_return_val_if_fail (x11ic != NULL, 0);
xevent = (XKeyEvent*) &(call_data->event);
LOG (1, "XIM_OPEN connect_id=%d",
call_data->connect_id);
- conn = (X11ICONN *)g_hash_table_lookup (_connections,
- (gconstpointer)(unsigned long)call_data->connect_id);
+ conn = (X11ICONN *) g_hash_table_lookup (_connections,
+ GINT_TO_POINTER (call_data->connect_id));
g_return_val_if_fail (conn == NULL, 0);
conn = g_slice_new0 (X11ICONN);
/* Remove the IC from g_client dictionary */
g_hash_table_remove (_x11_ic_table,
- (gconstpointer)(unsigned long)x11ic->icid);
+ GINT_TO_POINTER (x11ic->icid));
g_slice_free (X11IC, x11ic);
}
LOG (1, "XIM_CLOSE connect_id=%d",
call_data->connect_id);
- conn = (X11ICONN *)g_hash_table_lookup (_connections,
- (gconstpointer)(unsigned long)call_data->connect_id);
+ conn = (X11ICONN *) g_hash_table_lookup (_connections,
+ GINT_TO_POINTER (call_data->connect_id));
g_return_val_if_fail (conn != NULL, 0);
g_list_foreach (conn->clients, _free_ic, NULL);
g_list_free (conn->clients);
g_hash_table_remove (_connections,
- (gconstpointer)(unsigned long)call_data->connect_id);
+ GINT_TO_POINTER (call_data->connect_id));
g_slice_free (X11ICONN, conn);
LOG (1, "XIM_SET_IC_VALUES ic=%d connect_id=%d",
call_data->icid, call_data->connect_id);
- x11ic = (X11IC *)g_hash_table_lookup (_x11_ic_table,
- (gconstpointer)(unsigned long)call_data->icid);
+ x11ic = (X11IC *) g_hash_table_lookup (_x11_ic_table,
+ GINT_TO_POINTER (call_data->icid));
g_return_val_if_fail (x11ic != NULL, 0);
i = _xim_store_ic_values (x11ic, call_data);
LOG (1, "XIM_GET_IC_VALUES ic=%d connect_id=%d",
call_data->icid, call_data->connect_id);
- x11ic = (X11IC *)g_hash_table_lookup (_x11_ic_table,
- (gconstpointer)(unsigned long)call_data->icid);
+ x11ic = (X11IC *) g_hash_table_lookup (_x11_ic_table,
+ GINT_TO_POINTER (call_data->icid));
g_return_val_if_fail (x11ic != NULL, 0);
XICAttribute *ic_attr = call_data->ic_attr;
LOG (1, "XIM_RESET_IC ic=%d connect_id=%d",
call_data->icid, call_data->connect_id);
- x11ic = (X11IC *)g_hash_table_lookup (_x11_ic_table,
- (gconstpointer)(unsigned long)call_data->icid);
+ x11ic = (X11IC *) g_hash_table_lookup (_x11_ic_table,
+ GINT_TO_POINTER (call_data->icid));
g_return_val_if_fail (x11ic != NULL, 0);
ibus_input_context_reset (x11ic->context);