2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
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.
17 #ifndef WRT_RUNTIME_NATIVE_WINDOW_H_
18 #define WRT_RUNTIME_NATIVE_WINDOW_H_
22 #include <Elementary.h>
28 typedef std::function<void(int)> RotationHandler;
30 virtual ~NativeWindow();
34 bool initialized() const { return initialized_; }
35 Evas_Object* evas_object() const;
36 void SetContent(Evas_Object* content);
37 void SetRotationLock(int degree);
38 void SetAutoRotation();
39 int AddRotationHandler(RotationHandler handler);
40 void RemoveRotationHandler(int id);
41 int rotation() const { return rotation_; }
45 void FullScreen(bool enable);
48 virtual Evas_Object* CreateWindowInternal() = 0;
51 static void DidDeleteRequested(void* data, Evas_Object* obj,
53 static void DidProfileChanged(void* data, Evas_Object* obj, void* event_info);
54 void DidRotation(int degree);
55 void DidFocusChanged(bool got);
61 Evas_Object* content_;
64 std::map<int, RotationHandler> handler_table_;
70 #endif // WRT_RUNTIME_NATIVE_WINDOW_H_