Change Application::ResizeSignal() deprecated version correctly
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / widget.h
1 #ifndef DALI_WIDGET_H
2 #define DALI_WIDGET_H
3
4 /*
5  * Copyright (c) 2018 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
24 // INTERNAL INCLUDES
25 #include <dali/public-api/dali-adaptor-common.h>
26
27 namespace Dali
28 {
29
30   /**
31  * @addtogroup dali_adaptor_framework
32  * @{
33  */
34
35 namespace Internal
36 {
37
38 namespace Adaptor
39 {
40 class Widget;
41 }
42
43 }
44
45 class Window;
46
47 /**
48  * @brief Widget class is the base class for custom widget.
49  *
50  * To make own Widget, user should inherit this class and its impl class.
51  *
52  * @SINCE_1_3_5
53  */
54 class DALI_ADAPTOR_API Widget : public BaseHandle
55 {
56 public:
57
58   /**
59    * @brief Enumeration class for termination type of widget instance.
60    * @SINCE_1_3_5
61    */
62   enum class Termination
63   {
64     PERMANENT, //< User deleted this widget from the viewer @SINCE_1_3_5
65     TEMPORARY, //< Widget is deleted because of other reasons (e.g. widget process is terminated temporarily by the system) @SINCE_1_3_5
66   };
67
68 public:
69
70   /**
71    * @brief This is the constructor for Widget.
72    * @SINCE_1_3_5
73    * @return A handle to the Widget
74    */
75   static Widget New();
76
77   /**
78    * @brief The default constructor.
79    * @SINCE_1_3_5
80    */
81   Widget();
82
83   /**
84    * @brief Copy Constructor.
85    * @SINCE_1_3_5
86    * @param[in] widget Handle to an object
87    */
88   Widget( const Widget& widget );
89
90   /**
91    * @brief Assignment operator.
92    * @SINCE_1_3_5
93    * @param[in] widget Handle to an object
94    * @return A reference to this
95    */
96   Widget& operator=( const Widget& widget );
97
98   /**
99    * @brief Destructor
100    * @SINCE_1_3_5
101    */
102   ~Widget();
103
104 public: // Not intended for application developers
105   explicit Widget(Internal::Adaptor::Widget* widget);
106 };
107
108 /**
109  * @}
110  */
111 } // namespace Dali
112
113 #endif // DALI_WIDGET_H