6d329bbfc4d05818dac5c23b7e31586cfe70ccb7
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / window-data.cpp
1 /*
2  * Copyright (c) 2023 Samsung Electronics Co., Ltd.
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 // CLASS HEADER
19 #include <dali/public-api/adaptor-framework/window-data.h>
20
21 namespace Dali
22 {
23 struct WindowData::Impl
24 {
25   Impl()
26   : mPositionSize(0, 0, 0, 0),
27     mIsTransparent(true),
28     mWindowType(WindowType::NORMAL)
29   {
30   }
31
32   Dali::Rect<int> mPositionSize;  ///< The position and size of the Window
33   bool            mIsTransparent; ///< The transparency of the Window
34   WindowType      mWindowType;    ///< The window type of the Window
35 };
36
37 WindowData::WindowData()
38 : mImpl(std::make_unique<Impl>())
39 {
40 }
41
42 WindowData::~WindowData() = default;
43
44 void WindowData::SetPositionSize(Dali::Rect<int>& positionSize)
45 {
46   mImpl->mPositionSize = positionSize;
47 }
48
49 Dali::Rect<int> WindowData::GetPositionSize() const
50 {
51   return mImpl->mPositionSize;
52 }
53
54 void WindowData::SetTransparency(bool transparent)
55 {
56   mImpl->mIsTransparent = transparent;
57 }
58
59 bool WindowData::GetTransparency() const
60 {
61   return mImpl->mIsTransparent;
62 }
63
64 void WindowData::SetWindowType(WindowType type)
65 {
66   mImpl->mWindowType = type;
67 }
68
69 WindowType WindowData::GetWindowType() const
70 {
71   return mImpl->mWindowType;
72 }
73
74 } // namespace Dali