• Immutable Page
  • Info
  • Attachments


A plugin has to implement a VTable class that derives from the CompPlugin::VTable, CompPlugin::VTableForScreen <[Plugin screen class name]> or CompPlugin::VTableForScreenAndWindow <[Plugin screen class name],[Plugin window class name]> class. The ForScreen[AndWindow] classes provide automatic initialisation of the plugin classes. A plugin has then also to implement the bool init (); function. A plugin can implement the CompOption::Vector & getOptions (); and bool setOption (const char *name, CompOption::Value &value);  functions or use the  PLUGIN_OPTION_HELPER ([Plugin screen name])  macro if it has implemented the  CompOption::Vector & getOptions ();  and  bool setOption (const char *name, CompOption::Value &value);  functions in its screen class. A plugin also has to call call the COMPIZ_PLUGIN_20081216 ([plugin name], [plugin vtable name])  macro in its code.


class FooPluginVTable :
    public CompPlugin::VTableForScreenAndWindow<FooScreen, FooWindow>

        bool init ();

        PLUGIN_OPTION_HELPER (FooScreen);


COMPIZ_PLUGIN_20081216 (foo, FooPluginVTable)

This macro will also create a [plugin name]VTable * variable, that allows the access to the plugin metadata class within the plugin.

Development/Compiz++Documentation/C++vTable (last edited 2009-01-13 01:41:41 by CPE-58-161-137-105)