FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
FB::PluginCore::PluginCore ( )

Default Constructor.

As of FireBreath 1.4 alpha 3, you no longer need to specify the param tags that you want to support, as these will now be automatically detected on all platforms.

You can access param values set in your HTML with <param> tags inside your object tag, like so:

<object ....>
<param name="onload" value="onpluginloaded" />
<param name="starturl" value="" />
<param name="paramlist" value="width=100;height=100" />

Then from within your plugin class, you can access the value like so:

std::string paramlist = m_params["starturl"].convert_cast<std::string>();

Note that if "onload" is one of the param names added (which it is if you don't override this method), FireBreath will query the browser for a function matching the string passed in as this param and call that function when initialization is complete. Similarly, all other params that start with "on" will be automatically resolved to matching function names if possible.

To get the function from an "onstart" param, you could use the following code: FB::JSObjectPtr func = m_params["onstart"].convert_cast<FB::JSObjectPtr>();

See Also

Definition at line 47 of file PluginCore.cpp.

47  : m_paramsSet(false), m_Window(NULL),
48  m_windowLessParam(boost::indeterminate), m_scriptingOnly(false)
49 {
50  FB::Log::initLogging();
51  // This class is only created on the main UI thread,
52  // so there is no need for mutexes here
53  ++PluginCore::ActivePluginCount;
54 }
bool m_paramsSet
Boolean value indicates if the browser has called setParams() yet or not.
Definition: PluginCore.h:358