2010-08-13 08:43:35 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* 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 Communicator.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corp.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2000
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2010-08-16 00:15:03 -07:00
|
|
|
/* NOTE: this interface is completely undesigned, not stable and likely to change */
|
|
|
|
|
2011-05-10 17:30:20 -07:00
|
|
|
[scriptable, uuid(a67c77af-2952-4028-93ab-e7bc3b43cf81)]
|
2010-08-13 08:43:35 -07:00
|
|
|
interface nsIGfxInfo : nsISupports
|
|
|
|
{
|
2010-10-01 20:55:19 -07:00
|
|
|
/*
|
|
|
|
* These are win32-specific
|
|
|
|
*/
|
2010-08-13 08:43:35 -07:00
|
|
|
readonly attribute boolean D2DEnabled;
|
2010-08-16 00:15:03 -07:00
|
|
|
readonly attribute boolean DWriteEnabled;
|
2011-06-24 10:41:18 -07:00
|
|
|
readonly attribute boolean AzureEnabled;
|
2011-01-14 04:57:17 -08:00
|
|
|
readonly attribute DOMString DWriteVersion;
|
2011-05-10 17:30:20 -07:00
|
|
|
readonly attribute DOMString cleartypeParameters;
|
2010-08-27 08:49:02 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the display adapter.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString adapterDescription;
|
|
|
|
|
|
|
|
readonly attribute DOMString adapterDriver;
|
|
|
|
|
|
|
|
/* These types are inspired by DXGI_ADAPTER_DESC */
|
|
|
|
readonly attribute unsigned long adapterVendorID;
|
|
|
|
|
|
|
|
readonly attribute unsigned long adapterDeviceID;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of RAM in MB in the display adapter.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString adapterRAM;
|
|
|
|
|
|
|
|
readonly attribute DOMString adapterDriverVersion;
|
|
|
|
|
|
|
|
readonly attribute DOMString adapterDriverDate;
|
2010-08-30 14:45:29 -07:00
|
|
|
|
2011-02-07 11:44:48 -08:00
|
|
|
void getFailures(
|
|
|
|
[optional] out unsigned long failureCount,
|
|
|
|
[retval, array, size_is(failureCount)] out string failures);
|
|
|
|
|
|
|
|
[noscript, notxpcom] void logFailure(in ACString failure);
|
2010-08-30 14:45:29 -07:00
|
|
|
/*
|
|
|
|
* A set of constants for features that we can ask this GfxInfo object
|
|
|
|
* about via GetFeatureStatus
|
|
|
|
*/
|
|
|
|
/* Don't assign 0 or -1 */
|
|
|
|
/* Whether Direct2D is supported for content rendering. */
|
|
|
|
const long FEATURE_DIRECT2D = 1;
|
|
|
|
/* Whether Direct3D 9 is supported for layers. */
|
|
|
|
const long FEATURE_DIRECT3D_9_LAYERS = 2;
|
|
|
|
/* Whether Direct3D 10.0 is supported for layers. */
|
|
|
|
const long FEATURE_DIRECT3D_10_LAYERS = 3;
|
|
|
|
/* Whether Direct3D 10.1 is supported for layers. */
|
|
|
|
const long FEATURE_DIRECT3D_10_1_LAYERS = 4;
|
|
|
|
/* Whether OpenGL is supported for layers */
|
|
|
|
const long FEATURE_OPENGL_LAYERS = 5;
|
|
|
|
/* Whether WebGL is supported via OpenGL. */
|
|
|
|
const long FEATURE_WEBGL_OPENGL = 6;
|
|
|
|
/* Whether WebGL is supported via ANGLE (D3D9 -- does not check for the presence of ANGLE libs). */
|
|
|
|
const long FEATURE_WEBGL_ANGLE = 7;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A set of return values from GetFeatureStatus
|
|
|
|
*/
|
2010-10-06 21:40:08 -07:00
|
|
|
/* We don't explicitly block or discourage the feature. Which means we'll try getting it from the
|
|
|
|
* hardware, and see what happens. */
|
|
|
|
const long FEATURE_NO_INFO = 1;
|
|
|
|
/* This feature is blocked on this driver version. Updating driver will typically unblock it. */
|
|
|
|
const long FEATURE_BLOCKED_DRIVER_VERSION = 2;
|
|
|
|
/* This feature is blocked on this device, regardless of driver version.
|
|
|
|
* Typically means we hit too many driver crashes without a good reason to hope for them to
|
|
|
|
* get fixed soon. */
|
|
|
|
const long FEATURE_BLOCKED_DEVICE = 3;
|
2010-08-30 14:45:29 -07:00
|
|
|
/* This feature is available and can be used, but is not suggested (e.g. shouldn't be used by default */
|
2010-10-06 21:40:08 -07:00
|
|
|
const long FEATURE_DISCOURAGED = 4;
|
2010-10-12 14:27:14 -07:00
|
|
|
/* This feature is blocked on this OS version. */
|
|
|
|
const long FEATURE_BLOCKED_OS_VERSION = 5;
|
2010-08-30 14:45:29 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Ask about a feature, and return the status of that feature
|
|
|
|
*/
|
|
|
|
long getFeatureStatus(in long aFeature);
|
2010-10-06 21:40:08 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Ask about a feature, return the minimum driver version required for it if its status is
|
|
|
|
* FEATURE_BLOCKED_DRIVER_VERSION, otherwise return an empty string.
|
|
|
|
*/
|
|
|
|
DOMString getFeatureSuggestedDriverVersion(in long aFeature);
|
2010-12-16 12:49:54 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* WebGL info; valid params are "full-renderer", "vendor", "renderer", "version",
|
|
|
|
* "shading_language_version", "extensions". These return info from
|
|
|
|
* underlying GL impl that's used to implement WebGL.
|
|
|
|
*/
|
|
|
|
DOMString getWebGLParameter(in DOMString aParam);
|
2010-08-13 08:43:35 -07:00
|
|
|
};
|
|
|
|
|