PScreenManager.ipdl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. include protocol PBrowser;
  6. include protocol PContent;
  7. include "mozilla/GfxMessageUtils.h";
  8. using nsIntRect from "nsRect.h";
  9. using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
  10. namespace mozilla {
  11. namespace dom {
  12. struct ScreenDetails {
  13. uint32_t id;
  14. nsIntRect rect;
  15. nsIntRect rectDisplayPix;
  16. nsIntRect availRect;
  17. nsIntRect availRectDisplayPix;
  18. int32_t pixelDepth;
  19. int32_t colorDepth;
  20. double contentsScaleFactor;
  21. };
  22. nested(upto inside_cpow) sync protocol PScreenManager
  23. {
  24. manager PContent;
  25. parent:
  26. nested(inside_sync) sync Refresh()
  27. returns (uint32_t numberOfScreens,
  28. float systemDefaultScale,
  29. bool success);
  30. nested(inside_cpow) sync ScreenRefresh(uint32_t aId)
  31. returns (ScreenDetails screen,
  32. bool success);
  33. nested(inside_sync) sync GetPrimaryScreen()
  34. returns (ScreenDetails screen,
  35. bool success);
  36. nested(inside_sync) sync ScreenForRect(int32_t aLeft,
  37. int32_t aTop,
  38. int32_t aWidth,
  39. int32_t aHeight)
  40. returns (ScreenDetails screen,
  41. bool success);
  42. nested(inside_cpow) sync ScreenForBrowser(TabId aTabId)
  43. returns (ScreenDetails screen,
  44. bool success);
  45. child:
  46. async __delete__();
  47. };
  48. } // namespace dom
  49. } // namespace mozilla