Debian Codegraph @

swig/Fl_Plugin.i

raw ◀ ▶
1 Debian patch touch this file
1 /* File : Fl_Plugin.i */
2
3 %feature("docstring") ::Fl_Plugin
4 """
5 Fl_Plugin allows link-time and run-time integration of binary modules.
6
7 Fl_Plugin and Fl_Plugin_Manager provide a small and simple solution for
8 linking C++ classes at run-time, or optionally linking modules at compile
9 time without the need to change the main application.
10
11 Fl_Plugin_Manager uses static initialisation to create the plugin interface
12 early during startup. Plugins are stored in a temporary database, organized
13 in classes.
14
15 Plugins should derive a new class from Fl_Plugin as a base:
•16 \\code
17 class My_Plugin : public Fl_Plugin {
18 public:
19 My_Plugin() : Fl_Plugin('effects', 'blur') { }
20 void do_something(...);
21 };
22 My_Plugin blur_plugin();
•23 \\endcode
24
25 Plugins can be put into modules and either linked befor distribution, or loaded
26 from dynamically linkable files. An Fl_Plugin_Manager is used to list and
27 access all currently loaded plugins.
28 \code
29 Fl_Plugin_Manager mgr('effects');
30 int i, n = mgr.plugins();
31 for (i=0; i<n; i++) {
32 My_Plugin *pin = (My_Plugin*)mgr.plugin(i);
33 pin->do_something();
34 }
35 \endcode
36 """ ;
37
38 %{
39 #include "FL/Fl_Plugin.H"
40 %}
41
42 //%include "macros.i"
43
44 //CHANGE_OWNERSHIP(Fl_Plugin)
45
46 %include "FL/Fl_Plugin.H"