| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Generated from namespace: app.window | 5 // Generated from namespace: app.window |
| 6 | 6 |
| 7 part of chrome; | 7 part of chrome; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Types | 10 * Types |
| 11 */ | 11 */ |
| 12 | 12 |
| 13 class AppWindowBounds extends ChromeObject { |
| 14 /* |
| 15 * Public constructor |
| 16 */ |
| 17 AppWindowBounds({int left, int top, int width, int height}) { |
| 18 if (left != null) |
| 19 this.left = left; |
| 20 if (top != null) |
| 21 this.top = top; |
| 22 if (width != null) |
| 23 this.width = width; |
| 24 if (height != null) |
| 25 this.height = height; |
| 26 } |
| 27 |
| 28 /* |
| 29 * Private constructor |
| 30 */ |
| 31 AppWindowBounds._proxy(_jsObject) : super._proxy(_jsObject); |
| 32 |
| 33 /* |
| 34 * Public accessors |
| 35 */ |
| 36 int get left => JS('int', '#.left', this._jsObject); |
| 37 |
| 38 void set left(int left) { |
| 39 JS('void', '#.left = #', this._jsObject, left); |
| 40 } |
| 41 |
| 42 int get top => JS('int', '#.top', this._jsObject); |
| 43 |
| 44 void set top(int top) { |
| 45 JS('void', '#.top = #', this._jsObject, top); |
| 46 } |
| 47 |
| 48 int get width => JS('int', '#.width', this._jsObject); |
| 49 |
| 50 void set width(int width) { |
| 51 JS('void', '#.width = #', this._jsObject, width); |
| 52 } |
| 53 |
| 54 int get height => JS('int', '#.height', this._jsObject); |
| 55 |
| 56 void set height(int height) { |
| 57 JS('void', '#.height = #', this._jsObject, height); |
| 58 } |
| 59 |
| 60 } |
| 61 |
| 13 class AppWindowCreateWindowOptions extends ChromeObject { | 62 class AppWindowCreateWindowOptions extends ChromeObject { |
| 14 /* | 63 /* |
| 15 * Public constructor | 64 * Public constructor |
| 16 */ | 65 */ |
| 17 AppWindowCreateWindowOptions({String id, int defaultWidth, int defaultHeight,
int defaultLeft, int defaultTop, int width, int height, int left, int top, int m
inWidth, int minHeight, int maxWidth, int maxHeight, String type, String frame,
AppWindowBounds bounds, bool transparentBackground, bool hidden, bool singleton}
) { | 66 AppWindowCreateWindowOptions({String id, int defaultWidth, int defaultHeight,
int defaultLeft, int defaultTop, int width, int height, int left, int top, int m
inWidth, int minHeight, int maxWidth, int maxHeight, String type, String frame,
AppWindowBounds bounds, bool transparentBackground, String state, bool hidden, b
ool resizable, bool singleton}) { |
| 18 if (id != null) | 67 if (id != null) |
| 19 this.id = id; | 68 this.id = id; |
| 20 if (defaultWidth != null) | 69 if (defaultWidth != null) |
| 21 this.defaultWidth = defaultWidth; | 70 this.defaultWidth = defaultWidth; |
| 22 if (defaultHeight != null) | 71 if (defaultHeight != null) |
| 23 this.defaultHeight = defaultHeight; | 72 this.defaultHeight = defaultHeight; |
| 24 if (defaultLeft != null) | 73 if (defaultLeft != null) |
| 25 this.defaultLeft = defaultLeft; | 74 this.defaultLeft = defaultLeft; |
| 26 if (defaultTop != null) | 75 if (defaultTop != null) |
| 27 this.defaultTop = defaultTop; | 76 this.defaultTop = defaultTop; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 42 if (maxHeight != null) | 91 if (maxHeight != null) |
| 43 this.maxHeight = maxHeight; | 92 this.maxHeight = maxHeight; |
| 44 if (type != null) | 93 if (type != null) |
| 45 this.type = type; | 94 this.type = type; |
| 46 if (frame != null) | 95 if (frame != null) |
| 47 this.frame = frame; | 96 this.frame = frame; |
| 48 if (bounds != null) | 97 if (bounds != null) |
| 49 this.bounds = bounds; | 98 this.bounds = bounds; |
| 50 if (transparentBackground != null) | 99 if (transparentBackground != null) |
| 51 this.transparentBackground = transparentBackground; | 100 this.transparentBackground = transparentBackground; |
| 101 if (state != null) |
| 102 this.state = state; |
| 52 if (hidden != null) | 103 if (hidden != null) |
| 53 this.hidden = hidden; | 104 this.hidden = hidden; |
| 105 if (resizable != null) |
| 106 this.resizable = resizable; |
| 54 if (singleton != null) | 107 if (singleton != null) |
| 55 this.singleton = singleton; | 108 this.singleton = singleton; |
| 56 } | 109 } |
| 57 | 110 |
| 58 /* | 111 /* |
| 59 * Private constructor | 112 * Private constructor |
| 60 */ | 113 */ |
| 61 AppWindowCreateWindowOptions._proxy(_jsObject) : super._proxy(_jsObject); | 114 AppWindowCreateWindowOptions._proxy(_jsObject) : super._proxy(_jsObject); |
| 62 | 115 |
| 63 /* | 116 /* |
| 64 * Public accessors | 117 * Public accessors |
| 65 */ | 118 */ |
| 66 /// Id to identify the window. This will be used to remember the size and | 119 /// Id to identify the window. This will be used to remember the size and |
| 67 /// position of the window and restore that geometry when a window with the | 120 /// position of the window and restore that geometry when a window with the |
| 68 /// same id (and no explicit size or position) is later opened. | 121 /// same id is later opened. |
| 69 String get id => JS('String', '#.id', this._jsObject); | 122 String get id => JS('String', '#.id', this._jsObject); |
| 70 | 123 |
| 71 void set id(String id) { | 124 void set id(String id) { |
| 72 JS('void', '#.id = #', this._jsObject, id); | 125 JS('void', '#.id = #', this._jsObject, id); |
| 73 } | 126 } |
| 74 | 127 |
| 75 /// Default width of the window. (Deprecated; regular bounds act like this | 128 /// Default width of the window. (Deprecated; regular bounds act like this |
| 76 /// now.) | 129 /// now.) |
| 77 int get defaultWidth => JS('int', '#.defaultWidth', this._jsObject); | 130 int get defaultWidth => JS('int', '#.defaultWidth', this._jsObject); |
| 78 | 131 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 JS('void', '#.left = #', this._jsObject, left); | 178 JS('void', '#.left = #', this._jsObject, left); |
| 126 } | 179 } |
| 127 | 180 |
| 128 /// Y coordinate of the window. (Deprecated; use 'bounds'.) | 181 /// Y coordinate of the window. (Deprecated; use 'bounds'.) |
| 129 int get top => JS('int', '#.top', this._jsObject); | 182 int get top => JS('int', '#.top', this._jsObject); |
| 130 | 183 |
| 131 void set top(int top) { | 184 void set top(int top) { |
| 132 JS('void', '#.top = #', this._jsObject, top); | 185 JS('void', '#.top = #', this._jsObject, top); |
| 133 } | 186 } |
| 134 | 187 |
| 135 /// Minimum width of the window. | 188 /// Minimum width for the lifetime of the window. |
| 136 int get minWidth => JS('int', '#.minWidth', this._jsObject); | 189 int get minWidth => JS('int', '#.minWidth', this._jsObject); |
| 137 | 190 |
| 138 void set minWidth(int minWidth) { | 191 void set minWidth(int minWidth) { |
| 139 JS('void', '#.minWidth = #', this._jsObject, minWidth); | 192 JS('void', '#.minWidth = #', this._jsObject, minWidth); |
| 140 } | 193 } |
| 141 | 194 |
| 142 /// Minimum height of the window. | 195 /// Minimum height for the lifetime of the window. |
| 143 int get minHeight => JS('int', '#.minHeight', this._jsObject); | 196 int get minHeight => JS('int', '#.minHeight', this._jsObject); |
| 144 | 197 |
| 145 void set minHeight(int minHeight) { | 198 void set minHeight(int minHeight) { |
| 146 JS('void', '#.minHeight = #', this._jsObject, minHeight); | 199 JS('void', '#.minHeight = #', this._jsObject, minHeight); |
| 147 } | 200 } |
| 148 | 201 |
| 149 /// Maximum width of the window. | 202 /// Maximum width for the lifetime of the window. |
| 150 int get maxWidth => JS('int', '#.maxWidth', this._jsObject); | 203 int get maxWidth => JS('int', '#.maxWidth', this._jsObject); |
| 151 | 204 |
| 152 void set maxWidth(int maxWidth) { | 205 void set maxWidth(int maxWidth) { |
| 153 JS('void', '#.maxWidth = #', this._jsObject, maxWidth); | 206 JS('void', '#.maxWidth = #', this._jsObject, maxWidth); |
| 154 } | 207 } |
| 155 | 208 |
| 156 /// Maximum height of the window. | 209 /// Maximum height for the lifetime of the window. |
| 157 int get maxHeight => JS('int', '#.maxHeight', this._jsObject); | 210 int get maxHeight => JS('int', '#.maxHeight', this._jsObject); |
| 158 | 211 |
| 159 void set maxHeight(int maxHeight) { | 212 void set maxHeight(int maxHeight) { |
| 160 JS('void', '#.maxHeight = #', this._jsObject, maxHeight); | 213 JS('void', '#.maxHeight = #', this._jsObject, maxHeight); |
| 161 } | 214 } |
| 162 | 215 |
| 163 /// Window type: 'shell' - the default window type 'panel' - a panel, manage
d | 216 /// Type of window to create. |
| 164 /// by the OS (Currently experimental, Ash only) | |
| 165 String get type => JS('String', '#.type', this._jsObject); | 217 String get type => JS('String', '#.type', this._jsObject); |
| 166 | 218 |
| 167 void set type(String type) { | 219 void set type(String type) { |
| 168 JS('void', '#.type = #', this._jsObject, type); | 220 JS('void', '#.type = #', this._jsObject, type); |
| 169 } | 221 } |
| 170 | 222 |
| 171 /// Frame type: 'none' or 'chrome' (defaults to 'chrome'). | 223 /// Frame type: 'none' or 'chrome' (defaults to 'chrome'). |
| 172 String get frame => JS('String', '#.frame', this._jsObject); | 224 String get frame => JS('String', '#.frame', this._jsObject); |
| 173 | 225 |
| 174 void set frame(String frame) { | 226 void set frame(String frame) { |
| 175 JS('void', '#.frame = #', this._jsObject, frame); | 227 JS('void', '#.frame = #', this._jsObject, frame); |
| 176 } | 228 } |
| 177 | 229 |
| 178 /// Size of the content in the window (excluding the titlebar). If specified i
n | 230 /// Size and position of the content in the window (excluding the titlebar). I
f |
| 179 /// addition to any of the left/top/width/height parameters, this field takes | 231 /// an id is also specified and a window with a matching id has been shown |
| 180 /// precedence. If a frameBounds is specified, the frameBounds take precedence
. | 232 /// before, the remembered bounds of the window will be used instead. |
| 181 AppWindowBounds get bounds => new AppWindowBounds._proxy(JS('', '#.bounds', th
is._jsObject)); | 233 AppWindowBounds get bounds => new AppWindowBounds._proxy(JS('', '#.bounds', th
is._jsObject)); |
| 182 | 234 |
| 183 void set bounds(AppWindowBounds bounds) { | 235 void set bounds(AppWindowBounds bounds) { |
| 184 JS('void', '#.bounds = #', this._jsObject, convertArgument(bounds)); | 236 JS('void', '#.bounds = #', this._jsObject, convertArgument(bounds)); |
| 185 } | 237 } |
| 186 | 238 |
| 187 /// Enable window background transparency. Only supported in ash. Requires | 239 /// Enable window background transparency. Only supported in ash. Requires |
| 188 /// experimental API permission. | 240 /// experimental API permission. |
| 189 bool get transparentBackground => JS('bool', '#.transparentBackground', this._
jsObject); | 241 bool get transparentBackground => JS('bool', '#.transparentBackground', this._
jsObject); |
| 190 | 242 |
| 191 void set transparentBackground(bool transparentBackground) { | 243 void set transparentBackground(bool transparentBackground) { |
| 192 JS('void', '#.transparentBackground = #', this._jsObject, transparentBackgro
und); | 244 JS('void', '#.transparentBackground = #', this._jsObject, transparentBackgro
und); |
| 193 } | 245 } |
| 194 | 246 |
| 247 /// The initial state of the window, allowing it to be created already |
| 248 /// fullscreen, maximized, or minimized. Defaults to 'normal'. |
| 249 String get state => JS('String', '#.state', this._jsObject); |
| 250 |
| 251 void set state(String state) { |
| 252 JS('void', '#.state = #', this._jsObject, state); |
| 253 } |
| 254 |
| 195 /// If true, the window will be created in a hidden state. Call show() on the | 255 /// If true, the window will be created in a hidden state. Call show() on the |
| 196 /// window to show it once it has been created. Defaults to false. | 256 /// window to show it once it has been created. Defaults to false. |
| 197 bool get hidden => JS('bool', '#.hidden', this._jsObject); | 257 bool get hidden => JS('bool', '#.hidden', this._jsObject); |
| 198 | 258 |
| 199 void set hidden(bool hidden) { | 259 void set hidden(bool hidden) { |
| 200 JS('void', '#.hidden = #', this._jsObject, hidden); | 260 JS('void', '#.hidden = #', this._jsObject, hidden); |
| 201 } | 261 } |
| 202 | 262 |
| 263 /// If true, the window will be resizable by the user. Defaults to true. |
| 264 bool get resizable => JS('bool', '#.resizable', this._jsObject); |
| 265 |
| 266 void set resizable(bool resizable) { |
| 267 JS('void', '#.resizable = #', this._jsObject, resizable); |
| 268 } |
| 269 |
| 203 /// By default if you specify an id for the window, the window will only be | 270 /// By default if you specify an id for the window, the window will only be |
| 204 /// created if another window with the same id doesn't already exist. If a | 271 /// created if another window with the same id doesn't already exist. If a |
| 205 /// window with the same id already exists that window is activated instead. I
f | 272 /// window with the same id already exists that window is activated instead. I
f |
| 206 /// you do want to create multiple windows with the same id, you can set this | 273 /// you do want to create multiple windows with the same id, you can set this |
| 207 /// property to false. | 274 /// property to false. |
| 208 bool get singleton => JS('bool', '#.singleton', this._jsObject); | 275 bool get singleton => JS('bool', '#.singleton', this._jsObject); |
| 209 | 276 |
| 210 void set singleton(bool singleton) { | 277 void set singleton(bool singleton) { |
| 211 JS('void', '#.singleton = #', this._jsObject, singleton); | 278 JS('void', '#.singleton = #', this._jsObject, singleton); |
| 212 } | 279 } |
| 213 | 280 |
| 214 } | 281 } |
| 215 | 282 |
| 216 class AppWindowBounds extends ChromeObject { | |
| 217 /* | |
| 218 * Public constructor | |
| 219 */ | |
| 220 AppWindowBounds({int left, int top, int width, int height}) { | |
| 221 if (left != null) | |
| 222 this.left = left; | |
| 223 if (top != null) | |
| 224 this.top = top; | |
| 225 if (width != null) | |
| 226 this.width = width; | |
| 227 if (height != null) | |
| 228 this.height = height; | |
| 229 } | |
| 230 | |
| 231 /* | |
| 232 * Private constructor | |
| 233 */ | |
| 234 AppWindowBounds._proxy(_jsObject) : super._proxy(_jsObject); | |
| 235 | |
| 236 /* | |
| 237 * Public accessors | |
| 238 */ | |
| 239 int get left => JS('int', '#.left', this._jsObject); | |
| 240 | |
| 241 void set left(int left) { | |
| 242 JS('void', '#.left = #', this._jsObject, left); | |
| 243 } | |
| 244 | |
| 245 int get top => JS('int', '#.top', this._jsObject); | |
| 246 | |
| 247 void set top(int top) { | |
| 248 JS('void', '#.top = #', this._jsObject, top); | |
| 249 } | |
| 250 | |
| 251 int get width => JS('int', '#.width', this._jsObject); | |
| 252 | |
| 253 void set width(int width) { | |
| 254 JS('void', '#.width = #', this._jsObject, width); | |
| 255 } | |
| 256 | |
| 257 int get height => JS('int', '#.height', this._jsObject); | |
| 258 | |
| 259 void set height(int height) { | |
| 260 JS('void', '#.height = #', this._jsObject, height); | |
| 261 } | |
| 262 | |
| 263 } | |
| 264 | |
| 265 class AppWindowAppWindow extends ChromeObject { | 283 class AppWindowAppWindow extends ChromeObject { |
| 266 /* | 284 /* |
| 267 * Private constructor | 285 * Private constructor |
| 268 */ | 286 */ |
| 269 AppWindowAppWindow._proxy(_jsObject) : super._proxy(_jsObject); | 287 AppWindowAppWindow._proxy(_jsObject) : super._proxy(_jsObject); |
| 270 | 288 |
| 271 /* | 289 /* |
| 272 * Public accessors | 290 * Public accessors |
| 273 */ | 291 */ |
| 274 /// The JavaScript 'window' object for the created child. | 292 /// The JavaScript 'window' object for the created child. |
| 275 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 293 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 276 // for details. All rights reserved. Use of this source code is governed by a | 294 // for details. All rights reserved. Use of this source code is governed by a |
| 277 // BSD-style license that can be found in the LICENSE file. | 295 // BSD-style license that can be found in the LICENSE file. |
| 278 | 296 |
| 279 // TODO(sashab, sra): Detect whether this is the current window, or an | 297 // TODO(sashab, sra): Detect whether this is the current window, or an |
| 280 // external one, and return an appropriately-typed object | 298 // external one, and return an appropriately-typed object |
| 281 WindowBase get contentWindow => | 299 WindowBase get contentWindow => |
| 282 JS("Window", "#.contentWindow", this._jsObject); | 300 JS("Window", "#.contentWindow", this._jsObject); |
| 283 | 301 |
| 284 /* | 302 /* |
| 285 * Methods | 303 * Methods |
| 286 */ | 304 */ |
| 287 /// Focus the window. | 305 /// Focus the window. |
| 288 void focus() => JS('void', '#.focus()', this._jsObject); | 306 void focus() => JS('void', '#.focus()', this._jsObject); |
| 289 | 307 |
| 308 /// Fullscreens the window. |
| 309 void fullscreen() => JS('void', '#.fullscreen()', this._jsObject); |
| 310 |
| 311 /// Is the window fullscreen? |
| 312 bool isFullscreen() => JS('bool', '#.isFullscreen()', this._jsObject); |
| 313 |
| 290 /// Minimize the window. | 314 /// Minimize the window. |
| 291 void minimize() => JS('void', '#.minimize()', this._jsObject); | 315 void minimize() => JS('void', '#.minimize()', this._jsObject); |
| 292 | 316 |
| 293 /// Is the window minimized? | 317 /// Is the window minimized? |
| 294 void isMinimized() => JS('void', '#.isMinimized()', this._jsObject); | 318 bool isMinimized() => JS('bool', '#.isMinimized()', this._jsObject); |
| 295 | 319 |
| 296 /// Maximize the window. | 320 /// Maximize the window. |
| 297 void maximize() => JS('void', '#.maximize()', this._jsObject); | 321 void maximize() => JS('void', '#.maximize()', this._jsObject); |
| 298 | 322 |
| 299 /// Is the window maximized? | 323 /// Is the window maximized? |
| 300 void isMaximized() => JS('void', '#.isMaximized()', this._jsObject); | 324 bool isMaximized() => JS('bool', '#.isMaximized()', this._jsObject); |
| 301 | 325 |
| 302 /// Restore the window. | 326 /// Restore the window, exiting a maximized, minimized, or fullscreen state. |
| 303 void restore() => JS('void', '#.restore()', this._jsObject); | 327 void restore() => JS('void', '#.restore()', this._jsObject); |
| 304 | 328 |
| 305 /// Move the window to the position (|left|, |top|). | 329 /// Move the window to the position (|left|, |top|). |
| 306 void moveTo(int left, int top) => JS('void', '#.moveTo(#, #)', this._jsObject,
left, top); | 330 void moveTo(int left, int top) => JS('void', '#.moveTo(#, #)', this._jsObject,
left, top); |
| 307 | 331 |
| 308 /// Resize the window to |width|x|height| pixels in size. | 332 /// Resize the window to |width|x|height| pixels in size. |
| 309 void resizeTo(int width, int height) => JS('void', '#.resizeTo(#, #)', this._j
sObject, width, height); | 333 void resizeTo(int width, int height) => JS('void', '#.resizeTo(#, #)', this._j
sObject, width, height); |
| 310 | 334 |
| 311 /// Draw attention to the window. | 335 /// Draw attention to the window. |
| 312 void drawAttention() => JS('void', '#.drawAttention()', this._jsObject); | 336 void drawAttention() => JS('void', '#.drawAttention()', this._jsObject); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 class Event_app_window_onClosed extends Event { | 386 class Event_app_window_onClosed extends Event { |
| 363 void addListener(void callback()) => super.addListener(callback); | 387 void addListener(void callback()) => super.addListener(callback); |
| 364 | 388 |
| 365 void removeListener(void callback()) => super.removeListener(callback); | 389 void removeListener(void callback()) => super.removeListener(callback); |
| 366 | 390 |
| 367 bool hasListener(void callback()) => super.hasListener(callback); | 391 bool hasListener(void callback()) => super.hasListener(callback); |
| 368 | 392 |
| 369 Event_app_window_onClosed(jsObject) : super._(jsObject, 0); | 393 Event_app_window_onClosed(jsObject) : super._(jsObject, 0); |
| 370 } | 394 } |
| 371 | 395 |
| 396 /// Fired when the window is fullscreened. |
| 397 class Event_app_window_onFullscreened extends Event { |
| 398 void addListener(void callback()) => super.addListener(callback); |
| 399 |
| 400 void removeListener(void callback()) => super.removeListener(callback); |
| 401 |
| 402 bool hasListener(void callback()) => super.hasListener(callback); |
| 403 |
| 404 Event_app_window_onFullscreened(jsObject) : super._(jsObject, 0); |
| 405 } |
| 406 |
| 372 /// Fired when the window is maximized. | 407 /// Fired when the window is maximized. |
| 373 class Event_app_window_onMaximized extends Event { | 408 class Event_app_window_onMaximized extends Event { |
| 374 void addListener(void callback()) => super.addListener(callback); | 409 void addListener(void callback()) => super.addListener(callback); |
| 375 | 410 |
| 376 void removeListener(void callback()) => super.removeListener(callback); | 411 void removeListener(void callback()) => super.removeListener(callback); |
| 377 | 412 |
| 378 bool hasListener(void callback()) => super.hasListener(callback); | 413 bool hasListener(void callback()) => super.hasListener(callback); |
| 379 | 414 |
| 380 Event_app_window_onMaximized(jsObject) : super._(jsObject, 0); | 415 Event_app_window_onMaximized(jsObject) : super._(jsObject, 0); |
| 381 } | 416 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 410 /* | 445 /* |
| 411 * API connection | 446 * API connection |
| 412 */ | 447 */ |
| 413 Object _jsObject; | 448 Object _jsObject; |
| 414 | 449 |
| 415 /* | 450 /* |
| 416 * Events | 451 * Events |
| 417 */ | 452 */ |
| 418 Event_app_window_onBoundsChanged onBoundsChanged; | 453 Event_app_window_onBoundsChanged onBoundsChanged; |
| 419 Event_app_window_onClosed onClosed; | 454 Event_app_window_onClosed onClosed; |
| 455 Event_app_window_onFullscreened onFullscreened; |
| 420 Event_app_window_onMaximized onMaximized; | 456 Event_app_window_onMaximized onMaximized; |
| 421 Event_app_window_onMinimized onMinimized; | 457 Event_app_window_onMinimized onMinimized; |
| 422 Event_app_window_onRestored onRestored; | 458 Event_app_window_onRestored onRestored; |
| 423 | 459 |
| 424 /* | 460 /* |
| 425 * Functions | 461 * Functions |
| 426 */ | 462 */ |
| 427 /// The size and position of a window can be specified in a number of differen
t | 463 /// The size and position of a window can be specified in a number of differen
t |
| 428 /// ways. The most simple option is not specifying anything at all, in which | 464 /// ways. The most simple option is not specifying anything at all, in which |
| 429 /// case a default size and platform dependent position will be used.<br/><br/
> | 465 /// case a default size and platform dependent position will be used.<br/><br/
> |
| 430 /// Another option is to use the top/left and width/height properties, which | 466 /// Another option is to use the bounds property, which will put the window at |
| 431 /// will always put the window at the specified coordinates with the specified | 467 /// the specified coordinates with the specified size. If the window has a |
| 432 /// size.<br/><br/> Yet another option is to give the window a (unique) id. | 468 /// frame, it's total size will be the size given plus the size of the frame; |
| 433 /// This id is then used to remember the size and position of the window | 469 /// that is, the size in bounds is the content size, not the window |
| 434 /// whenever it is moved or resized. This size and position is then used | 470 /// size.<br/><br/> To automatically remember the positions of windows you can |
| 435 /// instead of the specified bounds on subsequent opening of a window with the | 471 /// give them ids. If a window has an id, This id is used to remember the size |
| 436 /// same id. If you need to open a window with an id at a location other than | 472 /// and position of the window whenever it is moved or resized. This size and |
| 437 /// the remembered default, you can create it hidden, move it to the desired | 473 /// position is then used instead of the specified bounds on subsequent openin
g |
| 438 /// location, then show it.<br/><br/> You can also combine these various | 474 /// of a window with the same id. If you need to open a window with an id at a |
| 439 /// options, explicitly specifying for example the size while having the | 475 /// location other than the remembered default, you can create it hidden, move |
| 440 /// position be remembered or other combinations like that. Size and position | 476 /// it to the desired location, then show it. |
| 441 /// are dealt with seperately, but individual coordinates are not. So if you | |
| 442 /// specify a top (or left) coordinate, you should also specify a left (or top
) | |
| 443 /// coordinate, and similar for size.<br/><br/> If you specify both a regular | |
| 444 /// and a default value for the same option the regular value is the only one | |
| 445 /// that takes effect. | |
| 446 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 477 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 447 // for details. All rights reserved. Use of this source code is governed by a | 478 // for details. All rights reserved. Use of this source code is governed by a |
| 448 // BSD-style license that can be found in the LICENSE file. | 479 // BSD-style license that can be found in the LICENSE file. |
| 449 | 480 |
| 450 // TODO(sashab): This override is no longer needed once prefixes are removed. | 481 // TODO(sashab): This override is no longer needed once prefixes are removed. |
| 451 void create(String url, | 482 void create(String url, |
| 452 [AppWindowCreateWindowOptions options, | 483 [AppWindowCreateWindowOptions options, |
| 453 void callback(AppWindowAppWindow created_window)]) { | 484 void callback(AppWindowAppWindow created_window)]) { |
| 454 void __proxy_callback(created_window) { | 485 void __proxy_callback(created_window) { |
| 455 if (callback != null) | 486 if (callback != null) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 470 // TODO(sashab, kalman): Fix IDL parser to read function return values | 501 // TODO(sashab, kalman): Fix IDL parser to read function return values |
| 471 // correctly. Currently, it just reads void for all functions. | 502 // correctly. Currently, it just reads void for all functions. |
| 472 AppWindowAppWindow current() => | 503 AppWindowAppWindow current() => |
| 473 new AppWindowAppWindow._proxy(JS('void', '#.current()', this._jsObject)); | 504 new AppWindowAppWindow._proxy(JS('void', '#.current()', this._jsObject)); |
| 474 | 505 |
| 475 void initializeAppWindow(Object state) => JS('void', '#.initializeAppWindow(#)
', this._jsObject, convertArgument(state)); | 506 void initializeAppWindow(Object state) => JS('void', '#.initializeAppWindow(#)
', this._jsObject, convertArgument(state)); |
| 476 | 507 |
| 477 API_app_window(this._jsObject) { | 508 API_app_window(this._jsObject) { |
| 478 onBoundsChanged = new Event_app_window_onBoundsChanged(JS('', '#.onBoundsCha
nged', this._jsObject)); | 509 onBoundsChanged = new Event_app_window_onBoundsChanged(JS('', '#.onBoundsCha
nged', this._jsObject)); |
| 479 onClosed = new Event_app_window_onClosed(JS('', '#.onClosed', this._jsObject
)); | 510 onClosed = new Event_app_window_onClosed(JS('', '#.onClosed', this._jsObject
)); |
| 511 onFullscreened = new Event_app_window_onFullscreened(JS('', '#.onFullscreene
d', this._jsObject)); |
| 480 onMaximized = new Event_app_window_onMaximized(JS('', '#.onMaximized', this.
_jsObject)); | 512 onMaximized = new Event_app_window_onMaximized(JS('', '#.onMaximized', this.
_jsObject)); |
| 481 onMinimized = new Event_app_window_onMinimized(JS('', '#.onMinimized', this.
_jsObject)); | 513 onMinimized = new Event_app_window_onMinimized(JS('', '#.onMinimized', this.
_jsObject)); |
| 482 onRestored = new Event_app_window_onRestored(JS('', '#.onRestored', this._js
Object)); | 514 onRestored = new Event_app_window_onRestored(JS('', '#.onRestored', this._js
Object)); |
| 483 } | 515 } |
| 484 } | 516 } |
| OLD | NEW |