summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/angle/samples/angle/sample_util/Window.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/angle/samples/angle/sample_util/Window.h')
-rw-r--r--chromium/third_party/angle/samples/angle/sample_util/Window.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/chromium/third_party/angle/samples/angle/sample_util/Window.h b/chromium/third_party/angle/samples/angle/sample_util/Window.h
new file mode 100644
index 00000000000..adf95e800cc
--- /dev/null
+++ b/chromium/third_party/angle/samples/angle/sample_util/Window.h
@@ -0,0 +1,50 @@
+//
+// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef SAMPLE_UTIL_WINDOW_H
+#define SAMPLE_UTIL_WINDOW_H
+
+#include "Event.h"
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <list>
+
+enum RendererType
+{
+ RENDERER_D3D9,
+ RENDERER_D3D11
+};
+
+class Window
+{
+ public:
+ Window();
+
+ virtual bool initialize(const std::string &name, size_t width, size_t height, RendererType requestedRenderer) = 0;
+ virtual void destroy() = 0;
+
+ int getWidth() const;
+ int getHeight() const;
+ virtual void setMousePosition(int x, int y) = 0;
+
+ virtual EGLDisplay getDisplay() const = 0;
+ virtual EGLNativeWindowType getNativeWindow() const = 0;
+ virtual EGLNativeDisplayType getNativeDisplay() const = 0;
+
+ virtual void messageLoop() = 0;
+
+ bool popEvent(Event *event);
+ void pushEvent(Event event);
+
+ private:
+ int mWidth;
+ int mHeight;
+
+ std::list<Event> mEvents;
+};
+
+#endif // SAMPLE_UTIL_WINDOW_H