1 // Copyright 2015 Samsung Electronics Co, Ltd. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef WRT_RUNTIME_NATIVE_WINDOW_H_
6 #define WRT_RUNTIME_NATIVE_WINDOW_H_
10 #include <Elementary.h>
16 typedef std::function<void(int)> RotationHandler;
18 virtual ~NativeWindow();
22 bool initialized() const { return initialized_; }
23 Evas_Object* evas_object() const;
24 void SetContent(Evas_Object* content);
25 void SetRotationLock(int degree);
26 void SetAutoRotation();
27 int AddRotationHandler(RotationHandler handler);
28 void RemoveRotationHandler(int id);
29 int rotation() const { return rotation_; }
33 void FullScreen(bool enable);
36 virtual Evas_Object* CreateWindowInternal() = 0;
39 static void DidDeleteRequested(void* data, Evas_Object* obj,
41 static void DidProfileChanged(void* data, Evas_Object* obj, void* event_info);
42 void DidRotation(int degree);
43 void DidFocusChanged(bool got);
49 Evas_Object* content_;
52 std::map<int, RotationHandler> handler_table_;
58 #endif // WRT_RUNTIME_NATIVE_WINDOW_H_