Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: components/mus/public/interfaces/input_events.mojom

Issue 2057793002: Reorganize event mojom files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typos in comments. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/mus/public/interfaces/input_events.mojom
diff --git a/components/mus/public/interfaces/input_events.mojom b/components/mus/public/interfaces/input_events.mojom
deleted file mode 100644
index 0e205a0abeba931c553a52e7a2c34e16e6226392..0000000000000000000000000000000000000000
--- a/components/mus/public/interfaces/input_events.mojom
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright 2014 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.
-
-module mus.mojom;
-
-import "components/mus/public/interfaces/input_event_constants.mojom";
-import "components/mus/public/interfaces/input_key_codes.mojom";
-
-struct KeyData {
- // The chromium event key code; these values are from the ui/ KeyCode enum,
- // which has the fun property of being neither consistently the Windows key
- // code, nor the X11 keycodes. (This value is consistent across platforms
- // for basic ASCII characters; it will differ for modifiers. We don't define
- // this as a mojo enum because mojom doesn't appear to have a platform
- // dependent preprocessor yet.)
- //
- // TODO(erg): Remove this, and declare Win32 keycodes correct by fiat. We can
- // not do this until we remove ui::Event usage from within mojo.
- int32 key_code;
-
- // Whether this is a character event, and the character value if it is. Note
- // that this is different than |text|, which holds a value even when there
- // isn't actually a character to insert. (For example, |text| will be set and
- // have a value on backspace, and |character| won't.)
- bool is_char;
- uint16 character;
-
- // The Win32 key code. Because of the web, this is the closest thing that we
- // have to a cross platform key state.
- KeyboardCode windows_key_code;
-
- // The platform specific key code.
- //
- // TODO(erg): This exists only for NPAPI support, pepper USB keyboard support
- // and IME on android support. Theoretically, we should be able to remove this
- // in the medium to long term.
- int32 native_key_code;
-
- // The text generated by this keystroke. Corresponds to
- // blink::WebKeyboardEvent::text.
- uint16 text;
-
- // Like |text|, but unmodified by concurrently held modifier keys (except
- // shift). Corresponds to blink::WebKeyboardEvent::unmodifiedText.
- uint16 unmodified_text;
-};
-
-struct LocationData {
- // |x| and |y| are in the coordinate system of the View.
- // Typically, this will be an integer-valued translation w.r.t.
- // the screen and in this case, |x| and |y| are in units of physical
- // pixels. However, some View embedders may apply arbitrary transformations
- // of a view w.r.t. the screen.
- float x;
- float y;
- // |screen_x| and |screen_y| are in screen coordinates in units of
- // physical pixels.
- float screen_x;
- float screen_y;
-};
-
-// TODO(rjkroege,sadrul): Add gesture representation.
-struct PointerData {
- int32 pointer_id;
- PointerKind kind;
- LocationData location;
- // Some devices (e.g. pen, finger) can extend across multiple pixels
- // at once. |brush_data| provides additional data for this case and
- // is available when |kind| is PEN or TOUCH.
- BrushData? brush_data;
- // Only set for |WHEEL| events.
- WheelData? wheel_data;
-};
-
-// Information payload to support
-// https://developer.mozilla.org/en-US/docs/Web/Events/wheel.
-// TODO(rjkroege): Handle MacOS momentum scrolling.
-struct WheelData {
- WheelMode mode;
- // |delta_x|, |delta_y|, |delta_z| can be in units of pixels, lines, pages
- // or control scaling as controlled by |mode|. Pixel scroll is physical
- // pixels in the coordinate system of the target View.
- float delta_x;
- float delta_y;
- float delta_z;
-};
-
-// Supplementary data to support pointers where the pointer can
-// cover multiple pixels per http://www.w3.org/TR/pointerevents/
-struct BrushData {
- // |width| and |height| are in CSS pixels in the coordinate system of
- // the target View.
- float width;
- float height;
- // |pressure| range is [0,1]. For devices like mice buttons where the
- // pressure is not available, it will be set to 0.5 if the button is down.
- float pressure;
- // |tilt_x| and |tilt_y| are in degrees. See comments in ui::PointerDetails
- // for more information.
- float tilt_x;
- float tilt_y;
-};
-
-struct Event {
- // TODO(sky): rename to type.
- EventType action;
- // A bitfield of kEventFlag* and kMouseEventFlag* values in
- // input_event_constants.mojom.
- //
- // TODO(sky): parts of this should move to PointerData.
- int32 flags;
- // Time in microseconds from when the platform was started.
- // This value accurately orders events w.r.t. to each other but
- // does not position them at an absolute time.
- int64 time_stamp;
- KeyData? key_data;
- PointerData? pointer_data;
-};
« no previous file with comments | « components/mus/public/interfaces/input_event_constants.mojom ('k') | components/mus/public/interfaces/input_key_codes.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698