summaryrefslogtreecommitdiff
path: root/chromium/components/arc/common/gfx.mojom
blob: aaf58a27b7efad1fc0c352ce0c61abb59711b963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2017 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.

// Defines structs (and its related type mappings) related gfx.
// Eventually, we may want to migrate mojom files under ui/gfx.
// However, currently there is no well developed roll mechanism, so
// API diverge can be more problematic, unfortunately. So, instead of sharing,
// defines structs by ourselves.

module arc.mojom;

// Represents a rectangle. Note that the wire format is different from
// the one defined in geometry.mojom in ui/gfx for backward compatibility.
struct Rect {
  int32 left;
  int32 top;
  int32 right;
  int32 bottom;
};

// Represents a range in a text. It is an open interval [start, end).
struct Range {
  // Start offset in UTF-16 index.
  uint32 start;
  // End offset in UTF-16 index.
  uint32 end;
};