[4.0] Create Widget Application
[platform/core/uifw/dali-adaptor.git] / adaptors / widget / widget-data.h
1 #ifndef __DALI_WIDGET_DATA_H__
2 #define __DALI_WIDGET_DATA_H__
3
4 /*
5  * Copyright (c) 2017 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/object/base-handle.h>
23 #include <bundle.h>
24
25 namespace Dali
26 {
27
28 namespace Internal DALI_INTERNAL
29 {
30 namespace Adaptor
31 {
32 class WidgetData;
33 }
34 }
35
36 class Window;
37
38 class DALI_IMPORT_API WidgetData : public BaseHandle
39 {
40 public:
41
42   /**
43    * @brief This is the constructor for WidgetApplications with a name.
44    *
45    * @param[in]      instanceId for widget instance
46    * @param[in]      args for widget instance
47    * @param[in]      content for widget instance
48    * @param[in]      window for widget instance
49    * @return A handle to the WidgetData
50    */
51   static WidgetData New( const char* instanceId, bundle* args, char* content );
52
53   /**
54    * @brief The default constructor.
55    *
56    */
57   WidgetData();
58
59   /**
60    * @brief Copy Constructor.
61    * @param[in] WidgetData Handle to an object
62    */
63   WidgetData( const WidgetData& widgetData );
64
65   /**
66    * @brief Assignment operator.
67    * @param[in] WidgetData Handle to an object
68    * @return A reference to this
69    */
70   WidgetData& operator=( const WidgetData& widgetData );
71
72   /**
73    * @brief Destructor
74    *
75    */
76   ~WidgetData();
77
78   /**
79    * @brief Get widget instance id
80    * @return Id of widget instance
81    */
82   const char* GetInstanceId();
83
84   /**
85    * @brief Get widget instance arguments
86    * @return Bundle which contains widget instance arguments
87    */
88   bundle* GetArgs();
89
90   /**
91    * @brief Get widget instance content
92    * @return Content of widget instance
93    */
94   char* GetContent();
95
96   /**
97    * @brief Get widget instance Window
98    * @return Window of widget instance
99    */
100   Window GetWindow();
101
102   /**
103    * @brief Set widget instance arguments
104    * @param[in] args arguments of widget instance
105    */
106   void SetArgs( bundle* args );
107
108   /**
109    * @brief Set widget instance arguments
110    * @param[in] content content of widget instance
111    */
112   void SetContent( char* content );
113
114   /**
115    * @brief Set widget instance arguments
116    * @param[in] window Window of widget instance
117    */
118   void SetWindow( Window window );
119
120 public: // Not intended for application developers
121   /// @cond internal
122   /**
123    * @brief Internal constructor.
124    */
125   explicit DALI_INTERNAL WidgetData(Internal::Adaptor::WidgetData* widgetData);
126   /// @endcond
127 };
128
129 } // namespace Dali
130
131 #endif // ___DALI_WIDGET_DATA_H__