summaryrefslogtreecommitdiffstats
path: root/dom/ipc/PScreenManager.ipdl
blob: a6ad26cfcc07dcc4cf10ad887bde3a7eb7fc6a44 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

include protocol PBrowser;
include protocol PContent;

include "mozilla/GfxMessageUtils.h";

using nsIntRect from "nsRect.h";
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";

namespace mozilla {
namespace dom {

struct ScreenDetails {
  uint32_t id;
  nsIntRect rect;
  nsIntRect rectDisplayPix;
  nsIntRect availRect;
  nsIntRect availRectDisplayPix;
  int32_t pixelDepth;
  int32_t colorDepth;
  double contentsScaleFactor;
};

nested(upto inside_cpow) sync protocol PScreenManager
{
  manager PContent;

parent:
    nested(inside_sync) sync Refresh()
      returns (uint32_t numberOfScreens,
               float systemDefaultScale,
               bool success);

    nested(inside_cpow) sync ScreenRefresh(uint32_t aId)
      returns (ScreenDetails screen,
               bool success);

    nested(inside_sync) sync GetPrimaryScreen()
      returns (ScreenDetails screen,
               bool success);

    nested(inside_sync) sync ScreenForRect(int32_t aLeft,
                                           int32_t aTop,
                                           int32_t aWidth,
                                           int32_t aHeight)
      returns (ScreenDetails screen,
               bool success);

    nested(inside_cpow) sync ScreenForBrowser(TabId aTabId)
      returns (ScreenDetails screen,
               bool success);

child:
    async __delete__();
};

} // namespace dom
} // namespace mozilla