2 // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 #ifndef SAMPLE_UTIL_WINDOW_H
8 #define SAMPLE_UTIL_WINDOW_H
13 #include <EGL/eglext.h>
22 virtual bool initialize(const std::string &name, size_t width, size_t height) = 0;
23 virtual void destroy() = 0;
26 int getHeight() const;
28 virtual EGLNativeWindowType getNativeWindow() const = 0;
29 virtual EGLNativeDisplayType getNativeDisplay() const = 0;
31 virtual void messageLoop() = 0;
33 bool popEvent(Event *event);
34 virtual void pushEvent(Event event);
36 virtual void setMousePosition(int x, int y) = 0;
37 virtual bool resize(int width, int height) = 0;
38 virtual bool setVisible(bool isVisible) = 0;
44 std::list<Event> mEvents;
47 OSWindow *CreateOSWindow();
49 #endif // SAMPLE_UTIL_WINDOW_H