GithubHelp home page GithubHelp logo

fcitx / fcitx-handwriting Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 5.0 629 KB

Handwriting Support for Fcitx, using Zinnia.

Home Page: http://code.google.com/p/fcitx-handwriting

License: GNU General Public License v3.0

C 100.00%

fcitx-handwriting's Introduction

Fcitx 4 is under maintainence Mode now, so no new issue and PR should be created.

Please give fcitx 5 a try if possible. If you're experiencing problem, you can
reach out mail list (fcitx[at]googlegroups.com) or IRC (fcitx[at]freenode) for help.

Please read http://fcitx-im.org for further help.

See COPYING and COPYING.LIBS for License information.

fcitx-handwriting's People

Contributors

chenfc avatar wengxt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fcitx-handwriting's Issues

手写输入 for fcitx 4.2.6.1

我发现 手写输入 的版本很老了,与 fcitx 4.2.6.1 不兼容。
我用 RHEL 6.4 ,好像只能用到 4.2.6.1 版本,再高就会编译错误。
我对 handwriting 做了一个补丁,使之可以在 4.2.6.1 上手写输入。
但是依然有一个bug,手写输入窗口不能自动关闭,一旦关闭后,也不能自动打开。希望提供一个 solution

下面是我做的补丁

diff -urN fcitx-handwriting-20110908/im/CMakeLists.txt fcitx-handwriting-20110908.new/im/CMakeLists.txt
--- fcitx-handwriting-20110908/im/CMakeLists.txt    2013-08-28 13:48:26.714595086 +0800
+++ fcitx-handwriting-20110908.new/im/CMakeLists.txt    2013-08-28 13:47:25.700113492 +0800
@@ -23,3 +23,4 @@
                       ${FCITX4_FCITX_UTILS_LIBRARIES}
 )
 fcitx_add_addon_conf_file(fcitx-handwriting.conf)
+fcitx_add_inputmethod_conf_file(handwriting.conf)
diff -urN fcitx-handwriting-20110908/im/fcitx-handwriting.conf.in fcitx-handwriting-20110908.new/im/fcitx-handwriting.conf.in
--- fcitx-handwriting-20110908/im/fcitx-handwriting.conf.in 2013-08-28 13:48:26.718595182 +0800
+++ fcitx-handwriting-20110908.new/im/fcitx-handwriting.conf.in 2013-08-28 13:43:05.855813046 +0800
@@ -8,3 +8,4 @@
 Type=SharedLibrary
 Dependency=fcitx-dbus
 SubConfig=
+IMRegisterMethod=ConfigFile
diff -urN fcitx-handwriting-20110908/im/handwriting.c fcitx-handwriting-20110908.new/im/handwriting.c
--- fcitx-handwriting-20110908/im/handwriting.c 2013-08-28 13:48:26.721595256 +0800
+++ fcitx-handwriting-20110908.new/im/handwriting.c 2013-08-28 13:25:06.731827820 +0800
@@ -6,9 +6,12 @@
 #include <fcitx/instance.h>
 #include <fcitx/module.h>
 #include <fcitx/candidate.h>
+#include <dbus/dbus.h>

 #define _(x) gettext(x)

+FCITX_EXPORT_API int ABI_VERSION = FCITX_ABI_VERSION;
+
 static void* HandWritingCreate ( FcitxInstance* instance );
 static void HandWritingDestroy ( void *arg );

@@ -16,7 +19,7 @@
 INPUT_RETURN_VALUE HandWritingDoInput ( void* arg, FcitxKeySym sym, unsigned int state );
 INPUT_RETURN_VALUE HandWritingGetCandWords ( void *arg );
 void HandWritingResetIM ( void *arg );
-INPUT_RETURN_VALUE HandWritingGetCandWord ( void *arg, CandidateWord* candWord );
+INPUT_RETURN_VALUE HandWritingGetCandWord ( void *arg, FcitxCandidateWord* candWord );
 void HandWritingSave ( void *arg );
 void HandWritingReloadConfig ( void *arg );
 DBusHandlerResult HandWritingDBusFilter ( DBusConnection* connection, DBusMessage* msg, void* user_data );
@@ -37,7 +40,7 @@

 void* HandWritingCreate ( FcitxInstance* instance )
 {
-   FcitxHandWriting* handwriting = fcitx_malloc0 ( sizeof ( FcitxHandWriting ) );
+   FcitxHandWriting* handwriting = fcitx_utils_malloc0 ( sizeof ( FcitxHandWriting ) );
    FcitxModuleFunctionArg arg;
    handwriting->owner = instance;
    handwriting->conn = InvokeFunction ( instance, FCITX_DBUS, GETCONNECTION, arg );
@@ -80,9 +83,10 @@
        return NULL;
    }

-   FcitxRegisterIM (
+   FcitxInstanceRegisterIM (
        instance,
        handwriting,
+       "handwriting",
        _ ( "HandWriting" ),
        "handwriting",
        HandWritingInit,
@@ -93,7 +97,8 @@
        HandWritingSave,
        HandWritingReloadConfig,
        NULL,
-       99
+       99,
+        "zh_CN" 
    );
    dbus_error_free ( &err );

@@ -115,7 +120,7 @@
    return IRV_TO_PROCESS;
 }

-INPUT_RETURN_VALUE HandWritingGetCandWord ( void* arg, CandidateWord* candWord )
+INPUT_RETURN_VALUE HandWritingGetCandWord ( void* arg, FcitxCandidateWord* candWord )
 {
    return IRV_TO_PROCESS;
 }
@@ -150,7 +155,7 @@
    {
        if ( dbus_message_get_args ( msg, &error, DBUS_TYPE_STRING, &s0 ,DBUS_TYPE_INVALID ) )
        {
-           CommitString ( handwriting->owner, GetCurrentIC ( handwriting->owner ), s0 );
+           FcitxInstanceCommitString ( handwriting->owner, FcitxInstanceGetCurrentIC ( handwriting->owner ), s0 );
        }
        return DBUS_HANDLER_RESULT_HANDLED;
    }
diff -urN fcitx-handwriting-20110908/im/handwriting.conf.in fcitx-handwriting-20110908.new/im/handwriting.conf.in
--- fcitx-handwriting-20110908/im/handwriting.conf.in   1970-01-01 08:00:00.000000000 +0800
+++ fcitx-handwriting-20110908.new/im/handwriting.conf.in   2013-08-28 13:46:08.436238489 +0800
@@ -0,0 +1,9 @@
+[InputMethod]
+UniqueName=handwriting
+Name=Hand Writing
+Name[zh_CN]=手写
+Name[zh_TW]=手写
+IconName=handwriting
+Priority=5
+LangCode=zh_CN
+Parent=fcitx-handwriting

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.