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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Generated from namespace: systemInfo.display
6
7 part of chrome;
8
9 /**
10 * Types
11 */
12
13 class SysteminfoDisplayBounds extends ChromeObject {
14 /*
15 * Public constructor
16 */
17 SysteminfoDisplayBounds({int left, int top, int width, int height}) {
18 if (?left)
19 this.left = left;
20 if (?top)
21 this.top = top;
22 if (?width)
23 this.width = width;
24 if (?height)
25 this.height = height;
26 }
27
28 /*
29 * Private constructor
30 */
31 SysteminfoDisplayBounds._proxy(_jsObject) : super._proxy(_jsObject);
32
33 /*
34 * Public accessors
35 */
36 /// The x-coordinate of the upper-left corner.
37 int get left => JS('int', '#.left', this._jsObject);
38
39 void set left(int left) {
40 JS('void', '#.left = #', this._jsObject, left);
41 }
42
43 /// The y-coordinate of the upper-left corner.
44 int get top => JS('int', '#.top', this._jsObject);
45
46 void set top(int top) {
47 JS('void', '#.top = #', this._jsObject, top);
48 }
49
50 /// The width of the display in pixels.
51 int get width => JS('int', '#.width', this._jsObject);
52
53 void set width(int width) {
54 JS('void', '#.width = #', this._jsObject, width);
55 }
56
57 /// The height of the display in pixels.
58 int get height => JS('int', '#.height', this._jsObject);
59
60 void set height(int height) {
61 JS('void', '#.height = #', this._jsObject, height);
62 }
63
64 }
65
66 class SysteminfoDisplayDisplayUnitInfo extends ChromeObject {
67 /*
68 * Public constructor
69 */
70 SysteminfoDisplayDisplayUnitInfo({String id, String name, bool isPrimary, bool isInternal, bool isEnabled, double dpiX, double dpiY, SysteminfoDisplayBounds b ounds, SysteminfoDisplayBounds workArea}) {
71 if (?id)
72 this.id = id;
73 if (?name)
74 this.name = name;
75 if (?isPrimary)
76 this.isPrimary = isPrimary;
77 if (?isInternal)
78 this.isInternal = isInternal;
79 if (?isEnabled)
80 this.isEnabled = isEnabled;
81 if (?dpiX)
82 this.dpiX = dpiX;
83 if (?dpiY)
84 this.dpiY = dpiY;
85 if (?bounds)
86 this.bounds = bounds;
87 if (?workArea)
88 this.workArea = workArea;
89 }
90
91 /*
92 * Private constructor
93 */
94 SysteminfoDisplayDisplayUnitInfo._proxy(_jsObject) : super._proxy(_jsObject);
95
96 /*
97 * Public accessors
98 */
99 /// The unique identifier of the display.
100 String get id => JS('String', '#.id', this._jsObject);
101
102 void set id(String id) {
103 JS('void', '#.id = #', this._jsObject, id);
104 }
105
106 /// The user-friendly name (e.g. "HP LCD monitor").
107 String get name => JS('String', '#.name', this._jsObject);
108
109 void set name(String name) {
110 JS('void', '#.name = #', this._jsObject, name);
111 }
112
113 /// True if this is the primary display.
114 bool get isPrimary => JS('bool', '#.isPrimary', this._jsObject);
115
116 void set isPrimary(bool isPrimary) {
117 JS('void', '#.isPrimary = #', this._jsObject, isPrimary);
118 }
119
120 /// True if this is an internal display.
121 bool get isInternal => JS('bool', '#.isInternal', this._jsObject);
122
123 void set isInternal(bool isInternal) {
124 JS('void', '#.isInternal = #', this._jsObject, isInternal);
125 }
126
127 /// True if this display is enabled.
128 bool get isEnabled => JS('bool', '#.isEnabled', this._jsObject);
129
130 void set isEnabled(bool isEnabled) {
131 JS('void', '#.isEnabled = #', this._jsObject, isEnabled);
132 }
133
134 /// The number of pixels per inch along the x-axis.
135 double get dpiX => JS('double', '#.dpiX', this._jsObject);
136
137 void set dpiX(double dpiX) {
138 JS('void', '#.dpiX = #', this._jsObject, dpiX);
139 }
140
141 /// The number of pixels per inch along the y-axis.
142 double get dpiY => JS('double', '#.dpiY', this._jsObject);
143
144 void set dpiY(double dpiY) {
145 JS('void', '#.dpiY = #', this._jsObject, dpiY);
146 }
147
148 /// The bounds of the display.
149 SysteminfoDisplayBounds get bounds => new SysteminfoDisplayBounds._proxy(JS('' , '#.bounds', this._jsObject));
150
151 void set bounds(SysteminfoDisplayBounds bounds) {
152 JS('void', '#.bounds = #', this._jsObject, convertArgument(bounds));
153 }
154
155 /// The usable work area of the display.
156 SysteminfoDisplayBounds get workArea => new SysteminfoDisplayBounds._proxy(JS( '', '#.workArea', this._jsObject));
157
158 void set workArea(SysteminfoDisplayBounds workArea) {
159 JS('void', '#.workArea = #', this._jsObject, convertArgument(workArea));
160 }
161
162 }
163
164 /**
165 * Events
166 */
167
168 /// Fired when anything changes to the display configuration.
169 class Event_system_info_display_onDisplayChanged extends Event {
170 void addListener(void callback()) => super.addListener(callback);
171
172 void removeListener(void callback()) => super.removeListener(callback);
173
174 bool hasListener(void callback()) => super.hasListener(callback);
175
176 Event_system_info_display_onDisplayChanged(jsObject) : super._(jsObject, 0);
177 }
178
179 /**
180 * Functions
181 */
182
183 class API_system_info_display {
184 /*
185 * API connection
186 */
187 Object _jsObject;
188
189 /*
190 * Events
191 */
192 Event_system_info_display_onDisplayChanged onDisplayChanged;
193
194 /*
195 * Functions
196 */
197 /// Get the information of all attached display devices.
198 void getDisplayInfo(void callback(List<SysteminfoDisplayDisplayUnitInfo> displ ayInfo)) {
199 void __proxy_callback(displayInfo) {
200 if (?callback) {
201 List<SysteminfoDisplayDisplayUnitInfo> __proxy_displayInfo = new List<Sy steminfoDisplayDisplayUnitInfo>();
202 for (var o in displayInfo) {
203 __proxy_displayInfo.add(new SysteminfoDisplayDisplayUnitInfo._proxy(o) );
204 }
205 callback(__proxy_displayInfo);
206 }
207 }
208 JS('void', '#.getDisplayInfo(#)', this._jsObject, convertDartClosureToJS(__p roxy_callback, 1));
209 }
210
211 API_system_info_display(this._jsObject) {
212 onDisplayChanged = new Event_system_info_display_onDisplayChanged(JS('', '#. onDisplayChanged', this._jsObject));
213 }
214 }
OLDNEW
« 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