2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
25 #ifndef _WRT_PLUGIN_JS_FEATURE_H_
26 #define _WRT_PLUGIN_JS_FEATURE_H_
30 #include <JavaScriptCore/JavaScript.h>
31 #include <WidgetDB/IWidgetFeature.h>
33 namespace DeviceAPI {
\rnamespace Tizen {
35 typedef WrtDeviceApis::CommonsJavaScript::PrivateObject<WrtDeviceApis::WidgetDB::Api::IWidgetFeaturePtr, WrtDeviceApis::CommonsJavaScript::NoOwnership> JSFeaturePrivateObject;
39 * @brief This class is javascript extenstion
46 * This method initializes this in the JS Engine.
48 static JSClassRef getClassRef();
51 * Gets object's class description.
53 static const JSClassDefinition* getClassInfo();
57 * The callback invoked when an object is first created.
59 static void initialize(JSContextRef context, JSObjectRef object);
62 * The callback invoked when an object is finalized.
64 static void finalize(JSObjectRef object);
67 * The callback invoked when getting a property's value.
69 static JSValueRef getProperty(JSContextRef context, JSObjectRef object,
70 JSStringRef propertyName, JSValueRef* exception);
73 * This structure describes a statically declared value property.
75 static JSStaticValue m_properties[];
78 * This structure contains properties and callbacks that define a type of object.
80 static JSClassDefinition m_classInfo;
82 static JSClassRef m_classRef;
90 #endif // _WRT_PLUGIN_JS_FEATURE_H_