dom/ipc/PScreenManager.ipdl
author Peter Van der Beken <peterv@propagandism.org>
Tue, 07 Oct 2014 11:44:48 +0200
changeset 209153 b2238670c5bfadfe00fe080a225d7bf3446e03de
parent 208176 aea1ce66d747dd583fdfce71077b2ed21c5b154d
child 209263 e56bf4ea89fbe8633f23035e98bbd547ad262b0c
permissions -rw-r--r--
Bug 808856 - Make not overriding WrapObject fail to build. r=ehsan.

/* -*- 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;

using struct nsIntRect from "nsRect.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;
};

rpc protocol PScreenManager
{
  manager PContent;

parent:
    rpc Refresh()
      returns (uint32_t numberOfScreens,
               float systemDefaultScale,
               bool success);

    rpc ScreenRefresh(uint32_t aId)
      returns (ScreenDetails screen,
               bool success);

    rpc GetPrimaryScreen()
      returns (ScreenDetails screen,
               bool success);

    rpc ScreenForRect(int32_t aLeft,
                       int32_t aTop,
                       int32_t aWidth,
                       int32_t aHeight)
      returns (ScreenDetails screen,
               bool success);

    rpc ScreenForBrowser(PBrowser aBrowser)
      returns (ScreenDetails screen,
               bool success);

child:
    __delete__();
};

} // namespace dom
} // namespace mozilla