2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/public-api/adaptor-framework/key-grab.h>
22 #include <dali/internal/window-system/common/window-impl.h>
30 bool GrabKeyTopmost( Window window, Dali::KEY daliKey )
32 Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation( window );
33 return windowImpl.GrabKey( daliKey, TOPMOST );
36 bool UngrabKeyTopmost( Window window, Dali::KEY daliKey )
38 Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation( window );
39 return windowImpl.UngrabKey( daliKey );
42 bool GrabKey( Window window, Dali::KEY daliKey, KeyGrabMode grabMode )
44 Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation( window );
45 return windowImpl.GrabKey( daliKey, grabMode );
49 bool UngrabKey( Window window, Dali::KEY daliKey )
51 Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation( window );
52 return windowImpl.UngrabKey( daliKey );
56 bool GrabKeyList( Window window, const Dali::Vector<Dali::KEY>& daliKeyVector, const Dali::Vector<KeyGrabMode>& grabModeVector, Dali::Vector<bool>& returnVector)
58 Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation( window );
59 return windowImpl.GrabKeyList( daliKeyVector, grabModeVector, returnVector );
62 bool UngrabKeyList( Window window, const Dali::Vector<Dali::KEY>& daliKeyVector, Dali::Vector<bool>& returnVector)
64 Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation( window );
65 return windowImpl.UngrabKeyList( daliKeyVector, returnVector );
68 } // namespace KeyGrab