SockIt
|
#include <SockIt.h>
Public Member Functions | |
SockIt () | |
SockIt constructor. At this point, the API is not yet available, nor is the window. | |
virtual | ~SockIt () |
SockIt destructor. | |
void | onPluginReady () |
void | shutdown () |
virtual FB::JSAPIPtr | createJSAPI () |
Creates an instance of the JSAPI object that provides the primary Javascript interface. | |
virtual bool | isWindowless () |
virtual bool | onMouseDown (FB::MouseDownEvent *evt, FB::PluginWindow *) |
virtual bool | onMouseUp (FB::MouseUpEvent *evt, FB::PluginWindow *) |
virtual bool | onMouseMove (FB::MouseMoveEvent *evt, FB::PluginWindow *) |
virtual bool | onWindowAttached (FB::AttachedEvent *evt, FB::PluginWindow *) |
virtual bool | onWindowDetached (FB::DetachedEvent *evt, FB::PluginWindow *) |
Static Public Member Functions | |
static void | StaticInitialize () |
Called from PluginFactory::globalPluginInitialize() | |
static void | StaticDeinitialize () |
Called from PluginFactory::globalPluginDeinitialize() |
The root plugin object, auto-generated by FireBreath.
SockIt::SockIt | ( | ) |
SockIt constructor. At this point, the API is not yet available, nor is the window.
Definition at line 24 of file SockIt.cpp.
{ }
SockIt::~SockIt | ( | ) | [virtual] |
SockIt destructor.
Tell the host to free the retained JSAPI objects unless the root JSAPI object is referenced somewhere else, it will be released here.
Definition at line 28 of file SockIt.cpp.
{ releaseRootJSAPI(); m_host->freeRetainedObjects(); }
FB::JSAPIPtr SockIt::createJSAPI | ( | ) | [virtual] |
Creates an instance of the JSAPI object that provides the primary Javascript interface.
Definition at line 43 of file SockIt.cpp.
{ return boost::make_shared<SockItAPI>(FB::ptr_cast<SockIt>(shared_from_this()), m_host); }
virtual bool SockIt::isWindowless | ( | ) | [inline, virtual] |
bool SockIt::onMouseDown | ( | FB::MouseDownEvent * | evt, |
FB::PluginWindow * | |||
) | [virtual] |
BEGIN EVENTDEF -- DON'T CHANGE THIS LINE
Definition at line 48 of file SockIt.cpp.
{ //printf("Mouse down at: %d, %d\n", evt->m_x, evt->m_y); return false; }
bool SockIt::onMouseMove | ( | FB::MouseMoveEvent * | evt, |
FB::PluginWindow * | |||
) | [virtual] |
Definition at line 60 of file SockIt.cpp.
{ //printf("Mouse move at: %d, %d\n", evt->m_x, evt->m_y); return false; }
bool SockIt::onMouseUp | ( | FB::MouseUpEvent * | evt, |
FB::PluginWindow * | |||
) | [virtual] |
Definition at line 54 of file SockIt.cpp.
{ //printf("Mouse up at: %d, %d\n", evt->m_x, evt->m_y); return false; }
void SockIt::onPluginReady | ( | ) |
When this is called, the BrowserHost is attached, the JSAPI object is created, and we are ready to interact with the page and such. The PluginWindow may or may not have already fire the AttachedEvent at this point.
Definition at line 34 of file SockIt.cpp.
{ }
bool SockIt::onWindowAttached | ( | FB::AttachedEvent * | evt, |
FB::PluginWindow * | |||
) | [virtual] |
Definition at line 65 of file SockIt.cpp.
{ // The window is attached; act appropriately return false; }
bool SockIt::onWindowDetached | ( | FB::DetachedEvent * | evt, |
FB::PluginWindow * | |||
) | [virtual] |
Definition at line 71 of file SockIt.cpp.
{ // The window is about to be detached; act appropriately return false; }
void SockIt::shutdown | ( | ) |
This will be called when it is time for the plugin to shut down; any threads or anything else that may hold a shared_ptr to this object should be released here so that this object can be safely destroyed. This is the last point that shared_from_this and weak_ptr references to this object will be valid.
Definition at line 38 of file SockIt.cpp.
Referenced by StaticDeinitialize().
{ }
SockIt::StaticDeinitialize | ( | ) | [static] |
Called from PluginFactory::globalPluginDeinitialize()
Performs one-time global de-initialization of the plugin. This should be called just before the plugin library is unloaded
Definition at line 19 of file SockIt.cpp.
References shutdown().
Referenced by PluginFactory::globalPluginDeinitialize().
{ Logger::shutdown(); }
SockIt::StaticInitialize | ( | ) | [static] |
Called from PluginFactory::globalPluginInitialize()
Performs one-time global initialization of the plugin. This should only be called once per process.
Definition at line 14 of file SockIt.cpp.
Referenced by PluginFactory::globalPluginInitialize().
{
// add any library initialization routines here
}