SockIt
Public Member Functions | Static Public Member Functions

SockIt Class Reference

#include <SockIt.h>

List of all members.

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()

Detailed Description

The root plugin object, auto-generated by FireBreath.

See also:
http://www.firebreath.org/

Definition at line 25 of file SockIt.h.


Constructor & Destructor Documentation

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();
}

Member Function Documentation

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]

Tells the browser whether or not this plugin should have a window associated with it.

Definition at line 86 of file SockIt.h.

        {
            return false;
        }
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

See also:
FB::FactoryBase::globalPluginDeinitialize

Definition at line 19 of file SockIt.cpp.

References shutdown().

Referenced by PluginFactory::globalPluginDeinitialize().

SockIt::StaticInitialize ( ) [static]

Called from PluginFactory::globalPluginInitialize()

Performs one-time global initialization of the plugin. This should only be called once per process.

See also:
FB::FactoryBase::globalPluginInitialize

Definition at line 14 of file SockIt.cpp.

Referenced by PluginFactory::globalPluginInitialize().

{
    // add any library initialization routines here
}

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Friends Defines