@@ -272,7 +272,6 @@ pub trait RuntimeHandle<T: UserEvent>: Debug + Clone + Send + Sync + Sized + 'st
272
272
fn set_activation_policy ( & self , activation_policy : ActivationPolicy ) -> Result < ( ) > ;
273
273
274
274
/// Sets the dock visibility for the application.
275
- ///
276
275
#[ cfg( target_os = "macos" ) ]
277
276
#[ cfg_attr( docsrs, doc( cfg( target_os = "macos" ) ) ) ]
278
277
fn set_dock_visibility ( & self , visible : bool ) -> Result < ( ) > ;
@@ -297,14 +296,24 @@ pub trait RuntimeHandle<T: UserEvent>: Debug + Clone + Send + Sync + Sized + 'st
297
296
/// Run a task on the main thread.
298
297
fn run_on_main_thread < F : FnOnce ( ) + Send + ' static > ( & self , f : F ) -> Result < ( ) > ;
299
298
299
+ /// Get a handle to the display controller of the windowing system.
300
300
fn display_handle ( & self ) -> std:: result:: Result < DisplayHandle , raw_window_handle:: HandleError > ;
301
301
302
+ /// Returns the primary monitor of the system.
303
+ ///
304
+ /// Returns None if it can't identify any monitor as a primary one.
302
305
fn primary_monitor ( & self ) -> Option < Monitor > ;
306
+
307
+ /// Returns the monitor that contains the given point.
303
308
fn monitor_from_point ( & self , x : f64 , y : f64 ) -> Option < Monitor > ;
309
+
310
+ /// Returns the list of all the monitors available on the system.
304
311
fn available_monitors ( & self ) -> Vec < Monitor > ;
305
312
313
+ /// Get the cursor position relative to the top-left hand corner of the desktop.
306
314
fn cursor_position ( & self ) -> Result < PhysicalPosition < f64 > > ;
307
315
316
+ /// Sets the app theme.
308
317
fn set_theme ( & self , theme : Option < Theme > ) ;
309
318
310
319
/// Shows the application, but does not automatically focus it.
@@ -407,12 +416,21 @@ pub trait Runtime<T: UserEvent>: Debug + Sized + 'static {
407
416
pending : PendingWebview < T , Self > ,
408
417
) -> Result < DetachedWebview < T , Self > > ;
409
418
419
+ /// Returns the primary monitor of the system.
420
+ ///
421
+ /// Returns None if it can't identify any monitor as a primary one.
410
422
fn primary_monitor ( & self ) -> Option < Monitor > ;
423
+
424
+ /// Returns the monitor that contains the given point.
411
425
fn monitor_from_point ( & self , x : f64 , y : f64 ) -> Option < Monitor > ;
426
+
427
+ /// Returns the list of all the monitors available on the system.
412
428
fn available_monitors ( & self ) -> Vec < Monitor > ;
413
429
430
+ /// Get the cursor position relative to the top-left hand corner of the desktop.
414
431
fn cursor_position ( & self ) -> Result < PhysicalPosition < f64 > > ;
415
432
433
+ /// Sets the app theme.
416
434
fn set_theme ( & self , theme : Option < Theme > ) ;
417
435
418
436
/// Sets the activation policy for the application.
@@ -421,7 +439,6 @@ pub trait Runtime<T: UserEvent>: Debug + Sized + 'static {
421
439
fn set_activation_policy ( & mut self , activation_policy : ActivationPolicy ) ;
422
440
423
441
/// Sets the dock visibility for the application.
424
- ///
425
442
#[ cfg( target_os = "macos" ) ]
426
443
#[ cfg_attr( docsrs, doc( cfg( target_os = "macos" ) ) ) ]
427
444
fn set_dock_visibility ( & mut self , visible : bool ) ;
0 commit comments