gecko-dev/gfx2/public/nsIOutputDevice.idl
2002-09-24 19:15:52 +00:00

114 lines
3.1 KiB
Plaintext

/* -*- 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):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsISupports.idl"
#include "gfxtypes.idl"
interface nsIAtom; // should we really be using an atom??
interface nsIFontMetrics;
/**
* nsIOutputDevice interface
*
* @author Stuart Parmenter <pavlov@netscape.com>
* @version 0.0
* @see nsIScreenManager
* @see "gfx2"
**/
[scriptable, uuid(ecc03f96-1dd1-11b2-8d3a-a652b5f45e04)]
interface nsIOutputDevice : nsISupports
{
readonly attribute gfx_format preferedAlphaFormat;
/**
* Get the nsIFontMetrics that describe the properties of
* an nsFont.
*
* @param aFont font description to obtain metrics for
* @param aLangGroup the language group of the document
* @return The nsIFontMetrics that describes aFont and aLangGroup.
*/
[noscript] nsIFontMetrics getFontMetricsWithLanguage([const] in nsFont aFont,
in nsIAtom aLangGroup);
/**
* Get the nsIFontMetrics that describe the properties of
* an nsFont.
*
* @param aFont font description to obtain metrics for
* @return The nsIFontMetrics that describes aFont.
*/
[noscript] nsIFontMetrics getFontMetrics([const] in nsFont aFont);
/**
* Check to see if a particular named font exists.
* @param aFontName character string of font face name
* @return TRUE if font is available, else FALSE if font is unavailable
*/
boolean checkFontExistence([const] in wstring aFaceName);
// whats this do?
[noscript] wstring firstExistingFont([const] in nsFont aFont);
// what does aliased mean?
wstring getLocalFontName([const] in wstring aFaceName, out boolean aAliased);
// XXX ?
/**
* Attempt to free up resoruces by flushing out any fonts no longer
* referenced by anything other than the font cache itself.
* @return error status
*/
void flushFontCache();
//functions for handling gamma correction of output device
attribute gfx_gamma gamma;
// do we need this?
//XXX the return from this really needs to be ref counted somehow. MMP
// this should be an array
void getGamaTable([array, size_is(nelements)] out PRUint8 points,
out unsigned long nelements);
[noscript] readonly attribute nsSize2 size;
readonly attribute gfx_depth depth;
};