| adm | Find | login register |
料功益 joined: 2009-10-24 posted: 7 promoted: bookmarked: Storrs, CT. USA. |
| |||||||||
eliu joined: 2007-08-09 posted: 11482 promoted: 617 bookmarked: 187 新竹, 台灣 |
可以參考 gcin source 裏面的 gcin-x.x.x/gtk-im/gtkimcontextgcin.c 也就是 gcin's GTK IM module 與 scim 比一下大小 就知道困難度,應該是不難。有問題再問。
/usr/lib/gtk-2.0/immodules/im-gcin.so: 11140 /usr/lib/gcin/libgcin-im-client.so.1.2.1 13388 edited: 1
| |||||||||
料功益 joined: 2009-10-24 posted: 7 promoted: bookmarked: Storrs, CT. USA. |
| |||||||||
eliu joined: 2007-08-09 posted: 11482 promoted: 617 bookmarked: 187 新竹, 台灣 |
可以直接看 gcin-im-client.h裏面的 function,不明白再參考 gtkimcontextgcin.c。 直接連上 gcin 的 socket 操作不是正確的作法,這就等於做了 libgcin-im-client.so 裏面的事, 透過 libgcin-im-client.so 的 function 應該比較簡單。 | |||||||||
料功益 joined: 2009-10-24 posted: 7 promoted: bookmarked: Storrs, CT. USA. |
看來要跟SCIM一樣,要寫一個agent,讓這個agent當handler,再讓Emacs連到這個handler了 | |||||||||
eliu joined: 2007-08-09 posted: 11482 promoted: 617 bookmarked: 187 新竹, 台灣 |
為什麼要那麼複雜?emacs 的 plugin 不可以 call C function ? | |||||||||
料功益 joined: 2009-10-24 posted: 7 promoted: bookmarked: Storrs, CT. USA. |
好像是沒辦法,要寫一個agent執行,然後再讓Emacs以IPC的方式連上去 gcin支援dbus嗎? | |||||||||
eliu joined: 2007-08-09 posted: 11482 promoted: 617 bookmarked: 187 新竹, 台灣 |
如果真的不行,把 im-client/gcin-im-client.cpp 改成用 emacs 直接用 socket IPC,只是 protocol有變動,必須也跟著變。目前是很少有變動。 | |||||||||
caleb joined: 2007-09-22 posted: 630 promoted: 134 bookmarked: 90 |
uim 也有 emacs plugin 可以查查看。 不過我沒研究 uim/scim 是怎麼實作的。 | |||||||||
料功益 joined: 2009-10-24 posted: 7 promoted: bookmarked: Storrs, CT. USA. |
感謝,我試試看能不能改改UIM的Lisp給gcin用
|
| adm | Find | login register |