2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file JSSoftKeyboardChangeEvent.h
19 * @author Yunchan Cho (yunchan.cho@samsung.com)
24 #ifndef WRT_PLUGIN_JS_SOFTKEYBOARD_CHANGE_EVENT_H
25 #define WRT_PLUGIN_JS_SOFTKEYBOARD_CHANGE_EVENT_H
27 #include <JavaScriptCore/JavaScript.h>
28 #include <CommonsJavaScript/PrivateObject.h>
29 #include <SoftKeyboardChangeEvent/ISoftKeyboardChangeEvent.h>
31 namespace WrtPlugins {
34 typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<
35 WrtDeviceApis::SoftKeyboardChangeEvent::Api::ISoftKeyboardChangeEventPtr>::Type
36 JSSoftKeyboardChangeEventPrivateObject;
38 class JSSoftKeyboardChangeEvent
42 * This method initializes this in the JS Engine.
44 static const JSClassRef getClassRef();
47 * Gets object's class description.
49 static const JSClassDefinition* getClassInfo();
53 * The callback invoked when an object is first created.
55 static void initialize(JSContextRef context, JSObjectRef object);
58 * The callback invoked when an object is finalized.
60 static void finalize(JSObjectRef object);
63 * This structure describes a statically declared value property.
65 static JSStaticValue m_property[];
68 * This structure contains properties and callbacks that define a type of object.
70 static JSClassDefinition m_classInfo;
72 static JSClassRef m_jsClassRef;
74 // getters for properties
75 static JSValueRef getState(
78 JSStringRef propertyName,
79 JSValueRef* exception);
81 static JSValueRef getWidth(
84 JSStringRef propertyName,
85 JSValueRef* exception);
87 static JSValueRef getHeight(
90 JSStringRef propertyName,
91 JSValueRef* exception);
93 static WrtDeviceApis::SoftKeyboardChangeEvent::Api::ISoftKeyboardChangeEventPtr
94 getPrivateObject(JSObjectRef arg);
99 #endif // WRT_PLUGIN_JS_SOFTKEYBOARD_CHANGE_EVENT_H