webpg-npapi 0.6.1
|
00001 /**********************************************************\ 00002 00003 Auto-generated webpgPlugin.h 00004 00005 This file contains the auto-generated main plugin object 00006 implementation for the webpg-plugin project 00007 00008 \**********************************************************/ 00009 #ifndef H_webpgPluginPLUGIN 00010 #define H_webpgPluginPLUGIN 00011 00012 #include "PluginWindow.h" 00013 #include "PluginEvents/MouseEvents.h" 00014 #include "PluginEvents/AttachedEvent.h" 00015 00016 #include "PluginCore.h" 00017 00018 00019 FB_FORWARD_PTR(webpgPlugin) 00020 class webpgPlugin : public FB::PluginCore 00021 { 00022 public: 00023 static void StaticInitialize(); 00024 static void StaticDeinitialize(); 00025 00026 public: 00027 webpgPlugin(); 00028 virtual ~webpgPlugin(); 00029 00030 public: 00031 void onPluginReady(); 00032 void shutdown(); 00033 virtual FB::JSAPIPtr createJSAPI(); 00034 // If you want your plugin to always be windowless, set this to true 00035 // If you want your plugin to be optionally windowless based on the 00036 // value of the "windowless" param tag, remove this method or return 00037 // FB::PluginCore::isWindowless() 00038 virtual bool isWindowless() { return true; } 00039 std::string getPluginPath() { return m_filesystemPath; } 00040 FB::variant getPluginParams() { return m_params; } 00041 00042 BEGIN_PLUGIN_EVENT_MAP() 00043 EVENTTYPE_CASE(FB::MouseDownEvent, onMouseDown, FB::PluginWindow) 00044 EVENTTYPE_CASE(FB::MouseUpEvent, onMouseUp, FB::PluginWindow) 00045 EVENTTYPE_CASE(FB::MouseMoveEvent, onMouseMove, FB::PluginWindow) 00046 EVENTTYPE_CASE(FB::MouseMoveEvent, onMouseMove, FB::PluginWindow) 00047 EVENTTYPE_CASE(FB::AttachedEvent, onWindowAttached, FB::PluginWindow) 00048 EVENTTYPE_CASE(FB::DetachedEvent, onWindowDetached, FB::PluginWindow) 00049 END_PLUGIN_EVENT_MAP() 00050 00052 virtual bool onMouseDown(FB::MouseDownEvent *evt, FB::PluginWindow *); 00053 virtual bool onMouseUp(FB::MouseUpEvent *evt, FB::PluginWindow *); 00054 virtual bool onMouseMove(FB::MouseMoveEvent *evt, FB::PluginWindow *); 00055 virtual bool onWindowAttached(FB::AttachedEvent *evt, FB::PluginWindow *); 00056 virtual bool onWindowDetached(FB::DetachedEvent *evt, FB::PluginWindow *); 00058 }; 00059 00060 00061 #endif 00062