Index: ui/wayland/wayland_delegate.h |
diff --git a/ui/wayland/wayland_delegate.h b/ui/wayland/wayland_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d6735bfbdf23448ac8dd3e859877a17bc75e9b0f |
--- /dev/null |
+++ b/ui/wayland/wayland_delegate.h |
@@ -0,0 +1,44 @@ |
+// Copyright 2013 The Chromium 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 UI_WAYLAND_WAYLAND_DELEGATE_H_ |
+#define UI_WAYLAND_WAYLAND_DELEGATE_H_ |
+ |
+#include "ui/wayland/wayland_display.h" |
+ |
+namespace base { |
+namespace wayland { |
+union WaylandEvent; |
+} |
+} |
+ |
+namespace ui { |
+ |
+// WaylandDelegate is an interface for processing Wayland events. |
+class WaylandDelegate { |
+ public: |
+ virtual ~WaylandDelegate() {} |
+ |
+ virtual void OnMouseEvent(base::wayland::WaylandEvent* event) = 0; |
+ virtual void OnKeyNotify(base::wayland::WaylandEvent* event) = 0; |
+ virtual void OnKeyboardEnter(base::wayland::WaylandEvent* event) = 0; |
+ virtual void OnKeyboardLeave(base::wayland::WaylandEvent* event) = 0; |
+ virtual void OnMouseEnter(base::wayland::WaylandEvent* event) = 0; |
+ virtual void OnMouseLeave(base::wayland::WaylandEvent* event) = 0; |
+ virtual void OnGeometryChange(base::wayland::WaylandEvent* event) = 0; |
+ virtual void OnPaint(cairo_surface_t* &cairo_window_surface, |
+ cairo_rectangle_int_t ®ion) = 0; |
+ virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
+ const gfx::Rect& new_bounds) = 0; |
+ virtual void OnWindowDestroying() = 0; |
+ virtual void OnWindowDestroyed() = 0; |
+ |
+ // Returns the non-client component (see hit_test.h) containing |point|, in |
+ // window coordinates. |
+ virtual int GetNonClientComponent(const gfx::Point& point) const = 0; |
+}; |
+ |
+} // namespace ui |
+ |
+#endif // UI_WAYLAND_WAYLAND_DELEGATE_H_ |