g_hash_table_iter_init (&iter, parser->sequences);
while (g_hash_table_iter_next (&iter, (gpointer *)&sequence, (gpointer *)&value))
{
- static guint16 keysyms[MAX_COMPOSE_LEN + 1];
+ static guint keysyms[MAX_COMPOSE_LEN + 1];
int i;
int n_compose = 0;
gboolean remove_sequence = FALSE;
for (i = 0; i < MAX_COMPOSE_LEN + 1; i++)
{
- gunichar codepoint = sequence[i];
- keysyms[i] = (guint16) codepoint;
+ guint codepoint = sequence[i];
+ keysyms[i] = codepoint;
if (codepoint == 0)
break;
compare_seq (const void *key, const void *value)
{
int i = 0;
- const guint16 *keysyms = key;
+ const guint *keysyms = key;
const guint16 *seq = value;
while (keysyms[i])
static int
compare_seq_index (const void *key, const void *value)
{
- const guint16 *keysyms = key;
+ const guint *keysyms = key;
const guint16 *seq = value;
if (keysyms[0] < seq[0])
*/
gboolean
gtk_compose_table_check (const GtkComposeTable *table,
- const guint16 *compose_buffer,
+ const guint *compose_buffer,
int n_compose,
gboolean *compose_finish,
gboolean *compose_match,
void
gtk_compose_table_get_prefix (const GtkComposeTable *table,
- const guint16 *compose_buffer,
+ const guint *compose_buffer,
int n_compose,
int *prefix)
{
for (k = 0; k < MIN (len, n_compose) - 1; k++)
{
- if (compose_buffer[k + 1] != (gunichar) table->data[j + k])
+ if (compose_buffer[k + 1] != table->data[j + k])
break;
}
p = MAX (p, k + 1);
((k) >= GDK_KEY_dead_grave && (k) <= GDK_KEY_dead_greek)
gboolean
-gtk_check_algorithmically (const guint16 *compose_buffer,
- int n_compose,
- GString *output)
+gtk_check_algorithmically (const guint *compose_buffer,
+ int n_compose,
+ GString *output)
{
int i;
gpointer data);
gboolean gtk_compose_table_check (const GtkComposeTable *table,
- const guint16 *compose_buffer,
+ const guint *compose_buffer,
int n_compose,
gboolean *compose_finish,
gboolean *compose_match,
GString *output);
void gtk_compose_table_get_prefix (const GtkComposeTable *table,
- const guint16 *compose_buffer,
+ const guint *compose_buffer,
int n_compose,
int *prefix);
-gboolean gtk_check_algorithmically (const guint16 *compose_buffer,
+gboolean gtk_check_algorithmically (const guint *compose_buffer,
int n_compose,
GString *output);
struct _GtkIMContextSimplePrivate
{
- guint16 *compose_buffer;
+ guint *compose_buffer;
int compose_buffer_len;
GString *tentative_match;
int tentative_match_len;
G_LOCK_DEFINE_STATIC (global_tables);
static GSList *global_tables;
-static const guint16 gtk_compose_ignore[] = {
+static const guint gtk_compose_ignore[] = {
0, /* Yes, XKB will send us key press events with NoSymbol :( */
GDK_KEY_Overlay1_Enable,
GDK_KEY_Overlay2_Enable,
priv = context_simple->priv = gtk_im_context_simple_get_instance_private (context_simple);
priv->compose_buffer_len = builtin_compose_table.max_seq_len + 1;
- priv->compose_buffer = g_new0 (guint16, priv->compose_buffer_len);
+ priv->compose_buffer = g_new0 (guint, priv->compose_buffer_len);
priv->tentative_match = g_string_new ("");
priv->tentative_match_len = 0;
}
{
int len = priv->tentative_match_len;
int i;
- guint16 *compose_buffer;
+ guint *compose_buffer;
char *str;
- compose_buffer = alloca (sizeof (guint16) * priv->compose_buffer_len);
+ compose_buffer = alloca (sizeof (guint) * priv->compose_buffer_len);
- memcpy (compose_buffer, priv->compose_buffer, sizeof (guint16) * priv->compose_buffer_len);
+ memcpy (compose_buffer, priv->compose_buffer, sizeof (guint) * priv->compose_buffer_len);
str = g_strdup (priv->tentative_match->str);
gtk_im_context_simple_commit_string (context_simple, str);
if (n_compose + 1 == priv->compose_buffer_len)
{
priv->compose_buffer_len += 1;
- priv->compose_buffer = g_renew (guint16, priv->compose_buffer, priv->compose_buffer_len);
+ priv->compose_buffer = g_renew (guint, priv->compose_buffer, priv->compose_buffer_len);
}
priv->compose_buffer[n_compose++] = keyval;
{
GtkComposeTable *table;
char *file;
- guint16 buffer[8] = { 0, };
+ guint buffer[8] = { 0, };
gboolean finish, match, ret;
GString *output;
compose_table_match_builtin (void)
{
const GtkComposeTable *table = &builtin_compose_table;
- guint16 buffer[8] = { 0, };
+ guint buffer[8] = { 0, };
gboolean finish, match, ret;
GString *s;
static void
match_algorithmic (void)
{
- guint16 buffer[8] = { 0, };
+ guint buffer[8] = { 0, };
gboolean ret;
GString *output;