naiveproxy/services/ui/public/interfaces/window_tree_constants.mojom

67 lines
2.1 KiB
Plaintext
Raw Normal View History

2018-01-28 19:30:36 +03:00
// Copyright 2016 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 ui.mojom;
import "ui/gfx/geometry/mojo/geometry.mojom";
// Contains state of a single window.
struct WindowData {
// Unique identifier of the parent. If the client can not see the parent an
// id of 0 is supplied.
uint32 parent_id;
// Unique identifier of the window.
uint32 window_id;
// Id of the transient parent, 0 if there isn't one.
uint32 transient_parent_id;
gfx.mojom.Rect bounds;
// Arbitrary key/value pairs. The interpretation of these is left to the
// client. See SetWindowProperty() for more information.
map<string, array<uint8>> properties;
// True if this window is visible. The window may not be drawn on screen (see
// OnWindowParentDrawnStateChanged() for details).
bool visible;
};
// The result of an input event sent to a client app.
enum EventResult {
HANDLED,
UNHANDLED,
};
enum EventTargetingPolicy {
// The target is a valid target for events, but none of its descendants are
// considered.
TARGET_ONLY,
// The target and its descendants are possible targets. This is the default.
TARGET_AND_DESCENDANTS,
// The target is not a valid target, but its descendants are possible targets.
DESCENDANTS_ONLY,
// Neither the target nor its descendants are valid targets.
NONE
};
// A bitfield of what drag operations are possible.
const uint32 kDropEffectNone = 0;
const uint32 kDropEffectMove = 1;
const uint32 kDropEffectCopy = 2;
const uint32 kDropEffectLink = 4;
// When this flag is set in a call to Embed(), the embedder (i.e. the client
// that is making the call to Embed()) will receive events that are targeted to
// the embedded client. The embedded client will not receive any input events
// from the window server. However, the embedder can choose to dispatch events
// to the embedded client through other mechanism.
// TODO(sad): Provide an API in mus for the embedder to dispatch events to the
// embedded client. https://crbug.com/621085
const uint32 kEmbedFlagEmbedderInterceptsEvents = 0x01;