~ubuntu-branches/ubuntu/hardy/uim/hardy

« back to all changes in this revision

Viewing changes to doc/PLUGIN

  • Committer: Bazaar Package Importer
  • Author(s): Masahito Omote
  • Date: 2005-12-04 13:10:42 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051204131042-ktzc8b17zi7a3cw8
Tags: 1:0.4.9.1-1
* New upstream release
* libuim0-nox, libuim-nox-dev, and libuim0-dbg-nox is now obsolete.
  Because libuim0 does not depends on X11. They now become dummy package,
  therefore you can safely remove them.
* Add --enable-debug in configure again.
* debian/patches/08_fix_privilage_escalation_CVE_2005_3149: disabled.
* Fix Error on purge because update-uim-config is not found.
  (closes: Bug#339345)
* uim-qt: New package for Qt utilities for uim. qt-immodule does not
  contained yet because of Debian's Qt3 does not support immodule and
  because uim does not recognize libqt4-dev's headers properly. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Plugin for uim
 
2
 
 
3
From 0.4.6, uim supports plugin system which loads library and scheme
 
4
definition. uim's plugin consist of both scheme and library.
 
5
 
 
6
    ___________    (load-plugin "foo")
 
7
   |           | ------------------+--->  libuim-foo.so
 
8
   |  libuim   |                   |
 
9
   |___________|                   +--->  foo.scm
 
10
 
 
11
 When called (load-plugin "foo") from libuim scheme engine, libuim-foo.so
 
12
 is loaded and call 'plugin_instance_init' in libuim-foo.so first. After
 
13
 loading libuim-foo.so is succeeded, 'foo.scm' is loaded.
 
14
 
 
15
* For end users
 
16
 If you want to install 3rd party plugin, you have to place both the shared
 
17
 object and scheme file to ~/.uim.d/plugin/.
 
18
 For example, if you want to install "foo", you have to locate both libuim-foo.so
 
19
 and foo.scm to ~/.uim.d/plugin. And you have to add to ~/.uim as follows,
 
20
 
 
21
 (load-plugin "foo")
 
22
 
 
23
* For system admins
 
24
 If you want to install 3rd party plugin, you have to place the shared object
 
25
 to ${libdatadir}/plugin/ and place the scheme library to ${datadir}/plugin.
 
26
 For example, if you want to install "foo", you have to install libuim-foo.so
 
27
 to ${libdatadir}/plugin and foo.scm to ${datadir}/plugin. If you want to enable
 
28
 this for all users put it as follows in ${datadir}/loader.scm,
 
29
 
 
30
 (load-plugin "foo")
 
31
 
 
32
* For plugin developers
 
33
 plugin_instance_init(void): Called when plugin is being loaded. In most case,
 
34
                             initialize variables and bind scheme symbol and C
 
35
                             functions.
 
36
 plugin_instance_quit(void): Called when plugin is being unloaded.
 
37
 
 
38
 - Plugin's loading scheme:
 
39
  1. Plugin loading
 
40
   dlopen(libuim-foo.so) -> call plugin_instance_init -> call "foo.scm"
 
41
 
 
42
  2. Plugin unloading
 
43
   call plugin_instance_quit -> dlclose(libuim-foo.so)