Revert "Move geometry to mojo/services, extract input events to their own mojom"
[chromium-blink-merge.git] / mojo / services / native_viewport / native_viewport.mojom
blob8e0edb559bbd51635a75401db316827930d96bc3
1 // Copyright 2013 The Chromium Authors. 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 import "../../public/interfaces/geometry/geometry.mojom"
7 module mojo {
9 struct KeyData {
10   int32 key_code;
11   bool is_char;
14 struct TouchData {
15   int32 pointer_id;
18 struct Event {
19   int32 action;
20   int32 flags;
21   int64 time_stamp;
22   Point location;
23   KeyData key_data;
24   TouchData touch_data;
27 [Client=NativeViewportClient]
28 interface NativeViewport {
29   Create(Rect bounds);
30   Show();
31   Hide();
32   Close();
33   SetBounds(Rect bounds);
34   CreateGLES2Context(handle<message_pipe> gles2_client);
37 interface NativeViewportClient {
38   OnCreated();
39   OnBoundsChanged(Rect bounds);
40   OnDestroyed();
41   OnEvent(Event event) => ();