@@ -313,8 +313,10 @@ impl<R: Runtime> Window<R> {
313
313
///
314
314
/// # Panics
315
315
///
316
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
317
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
316
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
317
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
318
+ ///
319
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
318
320
pub fn scale_factor ( & self ) -> crate :: Result < f64 > {
319
321
self . window . dispatcher . scale_factor ( ) . map_err ( Into :: into)
320
322
}
@@ -323,8 +325,10 @@ impl<R: Runtime> Window<R> {
323
325
///
324
326
/// # Panics
325
327
///
326
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
327
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
328
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
329
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
330
+ ///
331
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
328
332
pub fn inner_position ( & self ) -> crate :: Result < PhysicalPosition < i32 > > {
329
333
self . window . dispatcher . inner_position ( ) . map_err ( Into :: into)
330
334
}
@@ -333,8 +337,10 @@ impl<R: Runtime> Window<R> {
333
337
///
334
338
/// # Panics
335
339
///
336
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
337
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
340
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
341
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
342
+ ///
343
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
338
344
pub fn outer_position ( & self ) -> crate :: Result < PhysicalPosition < i32 > > {
339
345
self . window . dispatcher . outer_position ( ) . map_err ( Into :: into)
340
346
}
@@ -345,8 +351,10 @@ impl<R: Runtime> Window<R> {
345
351
///
346
352
/// # Panics
347
353
///
348
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
349
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
354
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
355
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
356
+ ///
357
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
350
358
pub fn inner_size ( & self ) -> crate :: Result < PhysicalSize < u32 > > {
351
359
self . window . dispatcher . inner_size ( ) . map_err ( Into :: into)
352
360
}
@@ -357,8 +365,10 @@ impl<R: Runtime> Window<R> {
357
365
///
358
366
/// # Panics
359
367
///
360
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
361
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
368
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
369
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
370
+ ///
371
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
362
372
pub fn outer_size ( & self ) -> crate :: Result < PhysicalSize < u32 > > {
363
373
self . window . dispatcher . outer_size ( ) . map_err ( Into :: into)
364
374
}
@@ -367,8 +377,10 @@ impl<R: Runtime> Window<R> {
367
377
///
368
378
/// # Panics
369
379
///
370
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
371
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
380
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
381
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
382
+ ///
383
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
372
384
pub fn is_fullscreen ( & self ) -> crate :: Result < bool > {
373
385
self . window . dispatcher . is_fullscreen ( ) . map_err ( Into :: into)
374
386
}
@@ -377,8 +389,10 @@ impl<R: Runtime> Window<R> {
377
389
///
378
390
/// # Panics
379
391
///
380
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
381
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
392
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
393
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
394
+ ///
395
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
382
396
pub fn is_maximized ( & self ) -> crate :: Result < bool > {
383
397
self . window . dispatcher . is_maximized ( ) . map_err ( Into :: into)
384
398
}
@@ -387,8 +401,10 @@ impl<R: Runtime> Window<R> {
387
401
///
388
402
/// # Panics
389
403
///
390
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
391
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
404
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
405
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
406
+ ///
407
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
392
408
pub fn is_decorated ( & self ) -> crate :: Result < bool > {
393
409
self . window . dispatcher . is_decorated ( ) . map_err ( Into :: into)
394
410
}
@@ -397,8 +413,10 @@ impl<R: Runtime> Window<R> {
397
413
///
398
414
/// # Panics
399
415
///
400
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
401
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
416
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
417
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
418
+ ///
419
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
402
420
pub fn is_resizable ( & self ) -> crate :: Result < bool > {
403
421
self . window . dispatcher . is_resizable ( ) . map_err ( Into :: into)
404
422
}
@@ -407,8 +425,10 @@ impl<R: Runtime> Window<R> {
407
425
///
408
426
/// # Panics
409
427
///
410
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
411
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
428
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
429
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
430
+ ///
431
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
412
432
pub fn is_visible ( & self ) -> crate :: Result < bool > {
413
433
self . window . dispatcher . is_visible ( ) . map_err ( Into :: into)
414
434
}
@@ -423,8 +443,10 @@ impl<R: Runtime> Window<R> {
423
443
///
424
444
/// # Panics
425
445
///
426
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
427
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
446
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
447
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
448
+ ///
449
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
428
450
pub fn current_monitor ( & self ) -> crate :: Result < Option < Monitor > > {
429
451
self
430
452
. window
@@ -444,8 +466,10 @@ impl<R: Runtime> Window<R> {
444
466
///
445
467
/// # Panics
446
468
///
447
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
448
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
469
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
470
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
471
+ ///
472
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
449
473
pub fn primary_monitor ( & self ) -> crate :: Result < Option < Monitor > > {
450
474
self
451
475
. window
@@ -463,8 +487,10 @@ impl<R: Runtime> Window<R> {
463
487
///
464
488
/// # Panics
465
489
///
466
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
467
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
490
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
491
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
492
+ ///
493
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
468
494
pub fn available_monitors ( & self ) -> crate :: Result < Vec < Monitor > > {
469
495
self
470
496
. window
@@ -478,8 +504,10 @@ impl<R: Runtime> Window<R> {
478
504
///
479
505
/// # Panics
480
506
///
481
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
482
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
507
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
508
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
509
+ ///
510
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
483
511
#[ cfg( target_os = "macos" ) ]
484
512
pub fn ns_window ( & self ) -> crate :: Result < * mut std:: ffi:: c_void > {
485
513
self . window . dispatcher . ns_window ( ) . map_err ( Into :: into)
@@ -488,8 +516,10 @@ impl<R: Runtime> Window<R> {
488
516
///
489
517
/// # Panics
490
518
///
491
- /// Panics if the app is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
492
- /// You can spawn a task to use the API using the [`async_runtime`](crate::async_runtime) to prevent the panic.
519
+ /// - Panics if the event loop is not running yet, usually when called on the [`setup`](crate::Builder#method.setup) closure.
520
+ /// - Panics when called on the main thread, usually on the [`run`](crate::App#method.run) closure.
521
+ ///
522
+ /// You can spawn a task to use the API using [`crate::async_runtime::spawn`] or [`std::thread::spawn`] to prevent the panic.
493
523
#[ cfg( windows) ]
494
524
pub fn hwnd ( & self ) -> crate :: Result < * mut std:: ffi:: c_void > {
495
525
self
0 commit comments