Add Window auxiliary hint APIs
[platform/core/uifw/dali-adaptor.git] / adaptors / devel-api / adaptor-framework / window-devel.cpp
1 /*
2  * Copyright (c) 2017 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 INCLUDES
19 #include <adaptors/devel-api/adaptor-framework/window-devel.h>
20 #include <adaptors/common/window-impl.h>
21
22 namespace Dali
23 {
24
25 namespace DevelWindow
26 {
27
28 FocusSignalType& FocusChangedSignal( Window window )
29 {
30   return GetImplementation( window ).FocusChangedSignal();
31 }
32
33 void SetAcceptFocus( Window window, bool accept )
34 {
35   GetImplementation( window ).SetAcceptFocus( accept );
36 }
37
38 bool IsFocusAcceptable( Window window )
39 {
40   return GetImplementation( window ).IsFocusAcceptable();
41 }
42
43 void Show( Window window )
44 {
45   GetImplementation( window ).Show();
46 }
47
48 void Hide( Window window )
49 {
50   GetImplementation( window ).Hide();
51 }
52
53 bool IsVisible( Window window )
54 {
55   return GetImplementation( window ).IsVisible();
56 }
57
58 unsigned int GetSupportedAuxiliaryHintCount( Window window )
59 {
60   return GetImplementation( window ).GetSupportedAuxiliaryHintCount();
61 }
62
63 std::string GetSupportedAuxiliaryHint( Window window, unsigned int index )
64 {
65   return GetImplementation( window ).GetSupportedAuxiliaryHint( index );
66 }
67
68 unsigned int AddAuxiliaryHint( Window window, const std::string& hint, const std::string& value )
69 {
70   return GetImplementation( window ).AddAuxiliaryHint( hint, value );
71 }
72
73 bool RemoveAuxiliaryHint( Window window, unsigned int id )
74 {
75   return GetImplementation( window ).RemoveAuxiliaryHint( id );
76 }
77
78 bool SetAuxiliaryHintValue( Window window, unsigned int id, const std::string& value )
79 {
80   return GetImplementation( window ).SetAuxiliaryHintValue( id, value );
81 }
82
83 std::string GetAuxiliaryHintValue( Window window, unsigned int id )
84 {
85   return GetImplementation( window ).GetAuxiliaryHintValue( id );
86 }
87
88 unsigned int GetAuxiliaryHintId( Window window, const std::string& hint )
89 {
90   return GetImplementation( window ).GetAuxiliaryHintId( hint );
91 }
92
93 void SetInputRegion( Window window, const Rect< int >& inputRegion )
94 {
95   return GetImplementation( window ).SetInputRegion( inputRegion );
96 }
97
98 } // namespace DevelWindow
99
100 } // namespace Dali