| 1 |
Source-derived documentation for developers is provided separately, courtesy |
| 2 |
of doxygen. Look for scim-doc-$(VERSION).tar.gz on our website for download |
| 3 |
or browse online at http://oss.leggewie.org/scim/ |
| 4 |
|
| 5 |
To compile scim from VCS, be sure to run the bootstrap script in the toplevel |
| 6 |
directory first. To prepare a new tarball for release, adjust the values of |
| 7 |
the AC_INIT, SCIM_*_VERSION, SCIM_CURRENT and SCIM_REVISION variables in |
| 8 |
configure.ac as necessary. Then run |
| 9 |
"./bootstrap && ./configure && make dist && make docs". |
| 10 |
|
| 11 |
The main program of SCIM is named scim. The usage of scim is: |
| 12 |
|
| 13 |
scim [option]... |
| 14 |
|
| 15 |
The options are: |
| 16 |
-l, --list List all of available modules. |
| 17 |
-f, --frontend name Uses specified FrontEnd module. |
| 18 |
-c, --config name Uses specified Config module. |
| 19 |
-e, --engines name Load specified set of input method engines. |
| 20 |
-ne,--no-engines name Do not load those set of engines. |
| 21 |
-d, --daemon Run scim as a daemon. |
| 22 |
--no-socket Do not try to start a SCIM SocketFrontEnd daemon. |
| 23 |
-h, --help Show this help message. |
| 24 |
|
| 25 |
By default, scim will use x11 frontend module and simple |
| 26 |
config module if they are available, unless you specify the module names. |
| 27 |
|
| 28 |
And if --no-socket option is not used, scim will try to start a separated |
| 29 |
daemon with SocketFrontEnd to provide the service, and X11 FrontEnd will |
| 30 |
try to connect to this service daemon. |
| 31 |
|
| 32 |
TIPS of X11 FrontEnd: |
| 33 |
===================== |
| 34 |
|
| 35 |
* You can drag input window, lookup window by pressing down right mouse button. |
| 36 |
* export GDK_USE_XFT=1 before running scim to let scim use Anti-Aliased font. |
| 37 |
* Font and color of preedit, status and lookup area can be changed in config file. |
| 38 |
|
| 39 |
TIPS of Socket FrontEnd, IMEngine and Config module: |
| 40 |
================================================== |
| 41 |
|
| 42 |
*********** Notice ************ |
| 43 |
From 1.0.0, scim will make use of SocketFrontEnd to construct a single user |
| 44 |
client/server input method environment automatically. Unless you use --no-socket |
| 45 |
option when starting scim. |
| 46 |
******************************* |
| 47 |
|
| 48 |
Socket FrontEnd/IMEngine/Config module is useless under X11 environment. It's only |
| 49 |
useful to work with GTK2 SCIM IM Module. |
| 50 |
|
| 51 |
The purpose of Socket FrontEnd is to listen and accept request |
| 52 |
on a local/inet socket. Socket IMEngine and Config module serve as clients of |
| 53 |
Socket FrontEnd. |
| 54 |
|
| 55 |
The default socket address is local:/tmp/scim-socket-frontend, the prefix local: |
| 56 |
indicates that it's a unix/local socket. If you want to create a inet socket, use |
| 57 |
inet: prefix, e.g. inet:localhost:12345, 12345 is the port number. |
| 58 |
|
| 59 |
Use following command to start scim daemon to listen a socket: |
| 60 |
|
| 61 |
$ scim -f socket -c simple -ne socket -d |
| 62 |
|
| 63 |
To specify a different address, you can do: |
| 64 |
|
| 65 |
$ SCIM_SOCKET_ADDRESS=inet:localhost:12345 scim -f socket -c simple -ne socket -d |
| 66 |
|
| 67 |
the option "-ne socket" tells scim does not load Socket IMEngine IM module, because |
| 68 |
there is no Socket FrontEnd running yet. |
| 69 |
|
| 70 |
Then to use this scim to serve another scim, you can do like this: |
| 71 |
|
| 72 |
$ SCIM_SOCKET_ADDRESS=inet:localhost:12345 scim -f x11 -c socket -e socket -d |
| 73 |
|
| 74 |
(This command starts a SCIM X11 XIM server which only forward request between |
| 75 |
X11 and the previous started SCIM Socket FrontEnd.) |
| 76 |
|
| 77 |
The option "-e socket" tells scim only uses Socket IMEngine IM module. Other module |
| 78 |
should not be loaded directly, because they will be accessed via Socket FrontEnd by |
| 79 |
Socket IMEngine IM module. -c socket tells scim to load configuration from remote |
| 80 |
Socket FrontEnd instead of local config file. |
| 81 |
|
| 82 |
Or if you want to use GTK2 IM Module within a GTK2/GNOME2 application, you can: |
| 83 |
|
| 84 |
$ export SCIM_SOCKET_ADDRESS=inet:localhost:12345 |
| 85 |
$ testgtk |
| 86 |
|
| 87 |
Then you can use SCIM directly within testgtk, by right clicking on an entry widget |
| 88 |
and selecting SCIM input method. |
| 89 |
|
| 90 |
By default, GTK2 SCIM IM Module will only use Socket IMEngine/Config modules, if |
| 91 |
you want to load other modules directly, you may set the environment variables, |
| 92 |
e.g.: |
| 93 |
|
| 94 |
$ export GTK_IM_SCIM_CONFIG_MODULE=simple |
| 95 |
$ export GTK_IM_SCIM_IMENGINE_MODULES=table |
| 96 |
|
| 97 |
In case you do not understand how Socket FrontEnd/IMEngine module work, here is a |
| 98 |
simple diagram to explain it: |
| 99 |
|
| 100 |
+--------+ |
| 101 |
|IMEngine| |
| 102 |
|Mod 1 |--+ |
| 103 |
+--------+ | |
| 104 |
| |
| 105 |
+--------+ | +--------+ inet +--------+ +--------+ |
| 106 |
|IMEngine| | |Socket | +--------+ |Socket | |X11 | /-----\ |
| 107 |
|Mod 2 |--+--+ |-|a socket| <- -> |IMEngine|--| |-| X11 |<->app |
| 108 |
+--------+ | |FrontEnd| +--------+ |Module | |FrontEnd| \-----/ |
| 109 |
. | +--------+ local +--------+ +--------+ |
| 110 |
. | |
| 111 |
. | |
| 112 |
+--------+ | |
| 113 |
|IMEngine| | |
| 114 |
|Mod n |--+ |
| 115 |
+--------+ |
| 116 |
|
| 117 |
Then you see, IMEngine Modules 1 to n (like pinyin, table, rawcode etc.) with |
| 118 |
Socket FrontEnd together act as a socket daemon (like apache), Socket IMEngine |
| 119 |
Module with X11 FrontEnd act as a client. All requests from application |
| 120 |
will first be sent to X11 FrontEnd, then transfered to Socket FrontEnd via |
| 121 |
Socket IMEngine IM Module, then those requests will be proceeded by the real |
| 122 |
IMEngine Modules (1 to n), all reply will be sent back to application via |
| 123 |
the same route. |
| 124 |
|
| 125 |
Have fun! |
| 126 |
|
| 127 |
James Su <[email protected]> |
| 128 |
Rolf Leggewie <[email protected]> |