Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: tools/dom/src/chrome/system_info_display.dart

Issue 12316032: Added more Chrome.* libraries to dart:chrome (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added isMaximised override file Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/src/chrome/system_indicator.dart ('k') | tools/dom/src/chrome/usb.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/chrome/system_info_display.dart
diff --git a/tools/dom/src/chrome/system_info_display.dart b/tools/dom/src/chrome/system_info_display.dart
new file mode 100644
index 0000000000000000000000000000000000000000..a61a9fc360bcf0bbd46cc377f905524bf2fe946f
--- /dev/null
+++ b/tools/dom/src/chrome/system_info_display.dart
@@ -0,0 +1,214 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Generated from namespace: systemInfo.display
+
+part of chrome;
+
+/**
+ * Types
+ */
+
+class SysteminfoDisplayBounds extends ChromeObject {
+ /*
+ * Public constructor
+ */
+ SysteminfoDisplayBounds({int left, int top, int width, int height}) {
+ if (?left)
+ this.left = left;
+ if (?top)
+ this.top = top;
+ if (?width)
+ this.width = width;
+ if (?height)
+ this.height = height;
+ }
+
+ /*
+ * Private constructor
+ */
+ SysteminfoDisplayBounds._proxy(_jsObject) : super._proxy(_jsObject);
+
+ /*
+ * Public accessors
+ */
+ /// The x-coordinate of the upper-left corner.
+ int get left => JS('int', '#.left', this._jsObject);
+
+ void set left(int left) {
+ JS('void', '#.left = #', this._jsObject, left);
+ }
+
+ /// The y-coordinate of the upper-left corner.
+ int get top => JS('int', '#.top', this._jsObject);
+
+ void set top(int top) {
+ JS('void', '#.top = #', this._jsObject, top);
+ }
+
+ /// The width of the display in pixels.
+ int get width => JS('int', '#.width', this._jsObject);
+
+ void set width(int width) {
+ JS('void', '#.width = #', this._jsObject, width);
+ }
+
+ /// The height of the display in pixels.
+ int get height => JS('int', '#.height', this._jsObject);
+
+ void set height(int height) {
+ JS('void', '#.height = #', this._jsObject, height);
+ }
+
+}
+
+class SysteminfoDisplayDisplayUnitInfo extends ChromeObject {
+ /*
+ * Public constructor
+ */
+ SysteminfoDisplayDisplayUnitInfo({String id, String name, bool isPrimary, bool isInternal, bool isEnabled, double dpiX, double dpiY, SysteminfoDisplayBounds bounds, SysteminfoDisplayBounds workArea}) {
+ if (?id)
+ this.id = id;
+ if (?name)
+ this.name = name;
+ if (?isPrimary)
+ this.isPrimary = isPrimary;
+ if (?isInternal)
+ this.isInternal = isInternal;
+ if (?isEnabled)
+ this.isEnabled = isEnabled;
+ if (?dpiX)
+ this.dpiX = dpiX;
+ if (?dpiY)
+ this.dpiY = dpiY;
+ if (?bounds)
+ this.bounds = bounds;
+ if (?workArea)
+ this.workArea = workArea;
+ }
+
+ /*
+ * Private constructor
+ */
+ SysteminfoDisplayDisplayUnitInfo._proxy(_jsObject) : super._proxy(_jsObject);
+
+ /*
+ * Public accessors
+ */
+ /// The unique identifier of the display.
+ String get id => JS('String', '#.id', this._jsObject);
+
+ void set id(String id) {
+ JS('void', '#.id = #', this._jsObject, id);
+ }
+
+ /// The user-friendly name (e.g. "HP LCD monitor").
+ String get name => JS('String', '#.name', this._jsObject);
+
+ void set name(String name) {
+ JS('void', '#.name = #', this._jsObject, name);
+ }
+
+ /// True if this is the primary display.
+ bool get isPrimary => JS('bool', '#.isPrimary', this._jsObject);
+
+ void set isPrimary(bool isPrimary) {
+ JS('void', '#.isPrimary = #', this._jsObject, isPrimary);
+ }
+
+ /// True if this is an internal display.
+ bool get isInternal => JS('bool', '#.isInternal', this._jsObject);
+
+ void set isInternal(bool isInternal) {
+ JS('void', '#.isInternal = #', this._jsObject, isInternal);
+ }
+
+ /// True if this display is enabled.
+ bool get isEnabled => JS('bool', '#.isEnabled', this._jsObject);
+
+ void set isEnabled(bool isEnabled) {
+ JS('void', '#.isEnabled = #', this._jsObject, isEnabled);
+ }
+
+ /// The number of pixels per inch along the x-axis.
+ double get dpiX => JS('double', '#.dpiX', this._jsObject);
+
+ void set dpiX(double dpiX) {
+ JS('void', '#.dpiX = #', this._jsObject, dpiX);
+ }
+
+ /// The number of pixels per inch along the y-axis.
+ double get dpiY => JS('double', '#.dpiY', this._jsObject);
+
+ void set dpiY(double dpiY) {
+ JS('void', '#.dpiY = #', this._jsObject, dpiY);
+ }
+
+ /// The bounds of the display.
+ SysteminfoDisplayBounds get bounds => new SysteminfoDisplayBounds._proxy(JS('', '#.bounds', this._jsObject));
+
+ void set bounds(SysteminfoDisplayBounds bounds) {
+ JS('void', '#.bounds = #', this._jsObject, convertArgument(bounds));
+ }
+
+ /// The usable work area of the display.
+ SysteminfoDisplayBounds get workArea => new SysteminfoDisplayBounds._proxy(JS('', '#.workArea', this._jsObject));
+
+ void set workArea(SysteminfoDisplayBounds workArea) {
+ JS('void', '#.workArea = #', this._jsObject, convertArgument(workArea));
+ }
+
+}
+
+/**
+ * Events
+ */
+
+/// Fired when anything changes to the display configuration.
+class Event_system_info_display_onDisplayChanged extends Event {
+ void addListener(void callback()) => super.addListener(callback);
+
+ void removeListener(void callback()) => super.removeListener(callback);
+
+ bool hasListener(void callback()) => super.hasListener(callback);
+
+ Event_system_info_display_onDisplayChanged(jsObject) : super._(jsObject, 0);
+}
+
+/**
+ * Functions
+ */
+
+class API_system_info_display {
+ /*
+ * API connection
+ */
+ Object _jsObject;
+
+ /*
+ * Events
+ */
+ Event_system_info_display_onDisplayChanged onDisplayChanged;
+
+ /*
+ * Functions
+ */
+ /// Get the information of all attached display devices.
+ void getDisplayInfo(void callback(List<SysteminfoDisplayDisplayUnitInfo> displayInfo)) {
+ void __proxy_callback(displayInfo) {
+ if (?callback) {
+ List<SysteminfoDisplayDisplayUnitInfo> __proxy_displayInfo = new List<SysteminfoDisplayDisplayUnitInfo>();
+ for (var o in displayInfo) {
+ __proxy_displayInfo.add(new SysteminfoDisplayDisplayUnitInfo._proxy(o));
+ }
+ callback(__proxy_displayInfo);
+ }
+ }
+ JS('void', '#.getDisplayInfo(#)', this._jsObject, convertDartClosureToJS(__proxy_callback, 1));
+ }
+
+ API_system_info_display(this._jsObject) {
+ onDisplayChanged = new Event_system_info_display_onDisplayChanged(JS('', '#.onDisplayChanged', this._jsObject));
+ }
+}
« no previous file with comments | « tools/dom/src/chrome/system_indicator.dart ('k') | tools/dom/src/chrome/usb.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698