[Release] wrt-plugins-common_0.3.94
[platform/framework/web/wrt-plugins-common.git] / src / js-overlay / deprecated / JSClass / JSSoftKeyboardChangeEvent.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 /**
17  *
18  * @file       JSSoftKeyboardChangeEvent.h
19  * @author     Yunchan Cho (yunchan.cho@samsung.com)
20  * @version    0.1
21  * @brief
22  */
23
24 #ifndef WRT_PLUGIN_JS_SOFTKEYBOARD_CHANGE_EVENT_H
25 #define WRT_PLUGIN_JS_SOFTKEYBOARD_CHANGE_EVENT_H
26
27 #include <JavaScriptCore/JavaScript.h>
28 #include <CommonsJavaScript/PrivateObject.h>
29 #include <SoftKeyboardChangeEvent/ISoftKeyboardChangeEvent.h>
30
31 namespace WrtPlugins {
32 namespace Tizen {
33 typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<
34     WrtDeviceApis::SoftKeyboardChangeEvent::Api::ISoftKeyboardChangeEventPtr>::
35     Type
36 JSSoftKeyboardChangeEventPrivateObject;
37
38 class JSSoftKeyboardChangeEvent
39 {
40   public:
41     /**
42      * This method initializes this in the JS Engine.
43      */
44     static JSClassRef getClassRef();
45
46     /**
47      * Gets object's class description.
48      */
49     static const JSClassDefinition* getClassInfo();
50
51   private:
52     /**
53      * The callback invoked when an object is first created.
54      */
55     static void initialize(JSContextRef context, JSObjectRef object);
56
57     /**
58      * The callback invoked when an object is finalized.
59      */
60     static void finalize(JSObjectRef object);
61
62     /**
63      * This structure describes a statically declared value property.
64      */
65     static JSStaticValue m_property[];
66
67     /**
68      * This structure contains properties and callbacks that define a type of
69      * object.
70      */
71     static JSClassDefinition m_classInfo;
72
73     static JSClassRef m_jsClassRef;
74
75     // getters for properties
76     static JSValueRef getState(
77         JSContextRef context,
78         JSObjectRef object,
79         JSStringRef propertyName,
80         JSValueRef* exception);
81
82     static JSValueRef getWidth(
83         JSContextRef context,
84         JSObjectRef object,
85         JSStringRef propertyName,
86         JSValueRef* exception);
87
88     static JSValueRef getHeight(
89         JSContextRef context,
90         JSObjectRef object,
91         JSStringRef propertyName,
92         JSValueRef* exception);
93
94     static WrtDeviceApis::SoftKeyboardChangeEvent::Api::
95         ISoftKeyboardChangeEventPtr
96     getPrivateObject(JSObjectRef arg);
97 };
98 } // Tizen
99 } // WrtPlugins
100
101 #endif // WRT_PLUGIN_JS_SOFTKEYBOARD_CHANGE_EVENT_H