chromium/ui/base/mojom/ui_base_types.mojom

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module ui.mojom;

// Specifies the type of modality applied to a window. Different modal
// treatments may be handled differently by the window manager.
enum ModalType {
  // Window is not modal.
  kNone,

  // Window is modal to its transient parent.
  kWindow,

  // Window is modal to a child of its transient parent.
  kChild,

  // Window is modal to all other windows.
  kSystem
};

// It's mapped to ui::MenuSourceType. Any new type here needs to be synced
// with ui::MenuSourceType in ui_base_types.h.
[Stable, Extensible]
enum MenuSourceType {
  [Default] NONE,
  MOUSE,
  KEYBOARD,
  TOUCH,
  TOUCH_EDIT_MENU,
  LONG_PRESS,
  LONG_TAP,
  TOUCH_HANDLE,
  STYLUS,
  ADJUST_SELECTION,
  ADJUST_SELECTION_RESET
};

// Mapped to ui::WindowShowState. Any new type here needs to be synced with
// ui::MenuSourceType in ui_base_types.h.
[Stable, Extensible]
enum WindowShowState {
  [Default] SHOW_STATE_DEFAULT = 0,
  SHOW_STATE_NORMAL = 1,
  SHOW_STATE_MINIMIZED = 2,
  SHOW_STATE_MAXIMIZED = 3,
  SHOW_STATE_INACTIVE = 4,
  SHOW_STATE_FULLSCREEN = 5
};