/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is Netscape * Communications Corporation. Portions created by Netscape are * Copyright (C) 2000 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * Mike Pinkerton */ #include "nsISupports.idl" #include "gfxtypes.idl" interface nsIScreen; /** * nsIScreenManager interface * * @author Mike Pinkerton * @version 0.0 * @see nsIOutputDevice * @see "gfx2" **/ [scriptable, uuid(662e7b78-1dd2-11b2-a3d3-fc1e5f5fb9d4)] interface nsIScreenManager : nsISupports { /** * Get the screen that contains the rectangle specified * * @param x the x coordinate for the rect * @param y the y coordinate for the rect * @param width the width of the rect * @param height the height of the rect * @return the screen that contains the rectangle. If the rect overlaps multiple screens, * it will return the screen with the greatest area of intersection. */ nsIScreen screenForRect(in gfx_coord x, in gfx_coord y, in gfx_dimension width, in gfx_dimension height); /** * Get the "main" screen. * On the mac, the one with the menubar. * On windows, the one with the taskbar. * etc. * * @return the primary screen */ readonly attribute nsIScreen primaryScreen; /** * Get the number of screens on this system * * @return the number of screens */ readonly attribute unsigned long numberOfScreens; /** * Get a screen based on an index. * * @param screenIndex The screen number you wish to get starting with 0. * @return the nsIScreen object that corresponds with screenIndex. */ nsIScreen getScreen(in long screenIndex); };