X-Git-Url: http://git.maemo.org/git/?p=mim;a=blobdiff_plain;f=src%2Fui%2Fmim-immodule.c;h=a9746f4bcf36cc3410de54a3f947005ed1eaa194;hp=f459b6237b3b1d0517de23bb7dfca4ea42d70abb;hb=HEAD;hpb=9fe856846971d67418383170fd369873adbb07f0 diff --git a/src/ui/mim-immodule.c b/src/ui/mim-immodule.c index f459b62..a9746f4 100644 --- a/src/ui/mim-immodule.c +++ b/src/ui/mim-immodule.c @@ -1,11 +1,33 @@ -/* - * GTK+ MiM input module - */ - +/********************************************************************* +** +** Copyright (C) 2009 MiM +** +** Contact: Handspring +** +** AUTHOR: +** +** This file is part of MiM Pinyin. +** +** This is free software: you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation, either version 3 of the License, or +** (at your option) any later version. +** +** This is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with Sigil. If not, see . +** +*********************************************************************/ #ifdef HAVE_CONFIG_H # include #endif - +/* + * GTK+ MiM input module + */ #include #include #include @@ -16,19 +38,12 @@ GType type_mim = 0; static gboolean -mim_filter_keypress(GtkIMContext *context, GdkEventKey *event) +mim_filter_keypress(GtkIMContext *context, + GdkEventKey *event) { - gboolean is_initial; - gint i; - if (event->type == GDK_KEY_RELEASE) return FALSE; - /* don't filter key events with accelerator modifiers held down */ - if (event->state & (gtk_accelerator_get_default_mod_mask() - & ~GDK_SHIFT_MASK)) - return FALSE; - return TRUE; } @@ -37,7 +52,7 @@ mim_set_client_window(GtkIMContext *context, GdkWindow *window) { if (window == NULL) { - /* create new client window */ + /*TODO: create new client window */ //mim_mui_create_window(); } } @@ -104,6 +119,8 @@ im_module_init(GTypeModule *module) { g_debug("mim-immodule imported!"); mim_register_type(module); + /*TODO: Mask off the accelerators, except the CTRL (need for CTRL + * ^SPACE) */ } void @@ -123,7 +140,7 @@ im_module_list(const GtkIMContextInfo ***contexts, GtkIMContext * im_module_create(const gchar *context_id) { - if (strcmp(context_id, "mim-n") == 0) + if (strcmp(context_id, "mim") == 0) return GTK_IM_CONTEXT(g_object_new(type_mim, NULL)); else return NULL;