Remove the wearable definition in Makefile.am
[platform/core/uifw/dali-adaptor.git] / adaptors / emscripten / wrappers / actor-wrapper.h
1 #ifndef __DALI_ACTOR_WRAPPER_H__
2 #define __DALI_ACTOR_WRAPPER_H__
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/dali-core.h>
23 #include "emscripten/emscripten.h"
24 #include "emscripten/val.h"
25
26 // INTERNAL INCLUDES
27 #include "signal-holder.h"
28
29 namespace Dali
30 {
31 namespace Internal
32 {
33 namespace Emscripten
34 {
35
36 /**
37  * Exposes a representation of the actor base object pointer for javascript debugging
38  *
39  * @param[in] self The dali actor
40  *
41  * @return the address as an int
42  */
43 unsigned int AddressOf(Dali::Actor self);
44
45 /**
46  * Provides screen to local values conveniently for javascript
47  *
48  * @param[in] self The dali actor
49  * @param[in] screenX The screen X coordinate
50  * @param[in] screenY The screen Y coordinate
51  *
52  * @return the local coordinates
53  */
54 std::vector<float> ScreenToLocal(Dali::Actor self, float screenX, float screenY);
55
56 /**
57  * Connect a javascript function to a dali signal.
58  *
59  * Handles touched and hovered specially to provide more context than Dali provides.
60  *
61  * @param[in] actor The dali actor
62  * @param[in] signalHolder The Dali signal holder
63  * @param[in] signalName The name of the signal
64  * @param[in] javascriptFunction The function to call back when the signal is triggered
65  *
66  * @return the local coordinates
67  *
68  */
69 bool ConnectSignal( Dali::Actor actor,
70                     SignalHolder& signalHolder,
71                     const std::string& signalName,
72                     const emscripten::val& javascriptFunction );
73
74 /**
75  * Sets a javascript function to an actor property notification
76  *
77  * @param[in] self The dali actor
78  * @param[in] signalHolder The Dali signal holder
79  * @param[in] index The property Index
80  * @param[in] propertyConditionType The condition type name
81  * @param[in] arg0 The property notification arg0
82  * @param[in] arg1 The property notification arg1
83  * @param[in] propertyConditionType The condition type name
84  * @param[in] javascriptFunction The function to call back when the signal is triggered
85  *
86  * @return the local coordinates
87
88  */
89 void SetPropertyNotification( Dali::Actor self,
90                               SignalHolder& signalHolder,
91                               Dali::Property::Index index, const std::string& propertyConditionType, float arg0, float arg1,
92                               const emscripten::val& javascriptFunction);
93
94
95 }; // namespace Emscripten
96 }; // namespace Internal
97 }; // namespace Dali
98
99 #endif // header