Register Transform uniforms in SVG Visual & only register shader properties upon...
[platform/core/uifw/dali-toolkit.git] / node-addon / javascript-application-options.h
1 #ifndef __DALI_JAVASCRIPT_APPLICATION_OPTIONS_H__
2 #define __DALI_JAVASCRIPT_APPLICATION_OPTIONS_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 #include <public-api/dali-core.h>
22 #include <public-api/adaptor-framework/window.h>
23 #include <v8.h>
24
25 namespace DaliNodeAddon
26 {
27
28 struct WindowOptions
29 {
30   WindowOptions()
31   : positionSize(0,0,0,0)
32   {
33   }
34
35   std::string name;
36   Dali::PositionSize positionSize;
37   bool transparent:1;
38 };
39
40 struct StereoScopicOptions
41 {
42   StereoScopicOptions()
43   : viewMode(Dali::MONO),
44     stereoBase(65.f)
45   {
46   }
47
48   Dali::ViewMode viewMode;
49   float stereoBase;
50 };
51
52 struct ApplicationOptions
53 {
54   WindowOptions window;
55   StereoScopicOptions stereo;
56   std::string stylesheet;
57 };
58
59 /**
60  * @brief parse the dali JavaScript application options
61  * The options are passed to dali when require is called.
62  * E.g. var dali.require('dali.js)(  {options object}  )
63  *
64  * @param[in] args JavaScript arguments
65  * @param[out] options assigned Dali options
66  * @return true on success, false on failure
67  *
68  */
69 bool GetApplicationOptions( const v8::FunctionCallbackInfo<v8::Value>& args, ApplicationOptions& options );
70
71
72 } // namespace DaliNodeAddon
73
74
75
76 #endif // __DALI_JAVASCRIPT_APPLICATION_OPTIONS_H__