#include <Commons/plugin_initializer_def.h>
#include <Commons/WrtAccess/WrtAccess.h>
-#include <js-overlay/js_overlay_addEventListener.h>
-#include <js-overlay/js_iframe_support.h>
#include "JSWidget.h"
#include "JSPreferences.h"
using namespace WrtDeviceApis;
using namespace WrtDeviceApis::Commons;
-namespace Options{
-
-class_definition_options_t WidgetOptions =
-{
+namespace Options {
+class_definition_options_t WidgetOptions = {
JS_CLASS,
CREATE_INSTANCE,
- ALWAYS_NOTICE,
+ NONE_NOTICE,
USE_OVERLAYED, //ignored
- IFrameSupport::RegisterWidget,
+ NULL,
NULL,
NULL
};
-class_definition_options_t WidgetInterfaceOptions =
-{
+class_definition_options_t WidgetInterfaceOptions = {
JS_INTERFACE,
CREATE_INSTANCE,
ALWAYS_NOTICE,
NULL,
NULL
};
-
};
void on_widget_init_callback(feature_mapping_interface_t *mapping)
{
WrtAccessSingleton::Instance().initialize(widgetId);
}
- Catch (Commons::Exception)
+ Catch(Commons::Exception)
{
LogError("Wrt wrapper registration failed");
return;
{
WrtAccessSingleton::Instance().deinitialize(widgetId);
}
- Catch (Commons::Exception)
+ Catch(Commons::Exception)
{
LogError("Wrt wrapper registration failed");
return;
}
-
}
PLUGIN_ON_WIDGET_START(on_widget_start_callback)
PLUGIN_CLASS_MAP_BEGIN
PLUGIN_CLASS_MAP_ADD_INTERFACE(
- WRT_JS_EXTENSION_OBJECT_GLOBAL,
- INTERFACE_WIDGET_NAME,
- (js_class_template_getter)WrtPlugins::W3C::JSWidget::getClassRef,
- reinterpret_cast<js_class_constructor_cb_t>(WrtPlugins::W3C::JSWidget::callAsConstructor),
- &Options::WidgetInterfaceOptions)
+ WRT_JS_EXTENSION_OBJECT_GLOBAL,
+ INTERFACE_WIDGET_NAME,
+ (js_class_template_getter) WrtPlugins::W3C::JSWidget::getClassRef,
+ reinterpret_cast<js_class_constructor_cb_t>(WrtPlugins::W3C::JSWidget::
+ callAsConstructor),
+ &Options::WidgetInterfaceOptions)
PLUGIN_CLASS_MAP_ADD_INTERFACE_PRODUCT(
- WRT_JS_EXTENSION_OBJECT_GLOBAL,
- OBJECT_WIDGET,
- INTERFACE_WIDGET_NAME,
- &Options::WidgetOptions)
+ WRT_JS_EXTENSION_OBJECT_GLOBAL,
+ OBJECT_WIDGET,
+ INTERFACE_WIDGET_NAME,
+ &Options::WidgetOptions)
PLUGIN_CLASS_MAP_END