[dali_2.3.24] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / windows / window-system-win.cpp
1 /*
2  * Copyright (c) 2024 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 // INTERNAL HEADERS
19 #include <dali/internal/window-system/common/window-system.h>
20
21 // EXTERNAL HEADERS
22 #include <Windows.h>
23 #include <dali/integration-api/adaptor-framework/adaptor.h>
24 #include <dali/integration-api/adaptor-framework/scene-holder.h>
25 #include <dali/integration-api/debug.h>
26
27 namespace Dali
28 {
29 namespace Internal
30 {
31 namespace Adaptor
32 {
33 namespace WindowSystem
34 {
35 namespace
36 {
37 static bool gGeometryHittest = false;
38 } // unnamed namespace
39
40 void Initialize()
41 {
42 }
43
44 void GetScreenSize(int32_t& width, int32_t& height)
45 {
46   width  = GetSystemMetrics(SM_CXSCREEN);
47   height = GetSystemMetrics(SM_CYSCREEN);
48 }
49
50 void UpdateScreenSize()
51 {
52 }
53
54 bool SetKeyboardRepeatInfo(float rate, float delay)
55 {
56   return false;
57 }
58
59 bool GetKeyboardRepeatInfo(float& rate, float& delay)
60 {
61   return false;
62 }
63
64 bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
65 {
66   return false;
67 }
68
69 bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
70 {
71   return false;
72 }
73
74 bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
75 {
76   return false;
77 }
78
79 bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
80 {
81   return false;
82 }
83
84 void SetGeometryHittestEnabled(bool enable)
85 {
86   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
87   if(gGeometryHittest != enable && Dali::Adaptor::IsAvailable())
88   {
89     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
90     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
91     {
92       if(*iter)
93       {
94         (*iter).SetGeometryHittestEnabled(enable);
95       }
96     }
97   }
98   gGeometryHittest = enable;
99 }
100
101 bool IsGeometryHittestEnabled()
102 {
103   return gGeometryHittest;
104 }
105
106 } // namespace WindowSystem
107
108 } // namespace Adaptor
109
110 } // namespace Internal
111
112 } // namespace Dali