-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
部分代码不存在,我应该如何找到他们 #104
Comments
图一所示为引用其他Linux软件包提供的头文件。 图二为 librime 的代码。您所列举的哪些枚举值是在图中的最后一行代码处定义的。 这种场合在问题中插入代码即可,不必截图。 |
谢谢,但是我有个问题,就是rime_main.c中的ibus_main(),在什么地方进行定义的,它是其他软件中的函数吗?它在输入法中是负责执行输入的模块还是没有实际的意义啊? if (!ibus_bus_is_connected(bus)) { g_signal_connect(bus, "disconnected", G_CALLBACK(ibus_disconnect_cb), NULL); IBusFactory *factory = ibus_factory_new(ibus_bus_get_connection(bus)); ibus_factory_add_engine(factory, "rime", IBUS_TYPE_RIME_ENGINE); if (!notify_init("ibus-rime")) { RIME_STRUCT(RimeTraits, ibus_rime_traits); gboolean full_check = FALSE; ibus_main(); ibus_rime_stop(); g_object_unref(factory); |
我想要修改一下拼音串切分,音字转换这部分的代码,如果可以的话,您能告诉我一下哪些地方是我应该去重点学习了解的啊? |
ibus_main() 的 大概的关系是 ibus 作为通用的输入法前端是用 GTK 那一系列的东西写的,而 rime 的核心东西都在 librime 里面。 而这个仓库 ibus-rime 是桥接上面两者的,所以的大部分文件都会 include 一些 Librime, libibus 还有 gtk 里面的文件。奇妙的是 gtk 有一个 gobject 让 c 语言也能用上面向对象,所以 ibus 的仓库和这里会有一堆用 gobject 的代码会比较麻烦。 你想改的东西大概在 https://github.com/rime/librime 里面。你不妨先不管具体内容,先试一下完整编译整个程序,然后安装到你的电脑上。 |
你好,
我发现有些代码在源码中并不存在,它们也并不是c++自带的函数,如果我想学习阅读源码,我应该如何去解决这个问题,找到这些代码呢?
比如说下面这些:
我并没有找到 ibus.h 和 ibnotify/notify.h 文件
我没有找到 kClearNone, kClearAuto, kClearManual, kClearMaxLength 是在哪个文件进行定义的
The text was updated successfully, but these errors were encountered: