Module: Rabbit::ScreenInfo
- Included in:
- Frame
- Defined in:
- lib/rabbit/utils.rb
Class Method Summary collapse
- .default_screen ⇒ Object
- .mm_to_inch(mm) ⇒ Object
- .screen_depth ⇒ Object
- .screen_height ⇒ Object
- .screen_height_mm ⇒ Object
- .screen_width ⇒ Object
- .screen_width_mm ⇒ Object
- .screen_x_resolution ⇒ Object
- .screen_y_resolution ⇒ Object
Class Method Details
.default_screen ⇒ Object
355 356 357 |
# File 'lib/rabbit/utils.rb', line 355 def default_screen Gdk::Screen.default end |
.mm_to_inch(mm) ⇒ Object
387 388 389 |
# File 'lib/rabbit/utils.rb', line 387 def mm_to_inch(mm) mm / 25.4 end |
.screen_depth ⇒ Object
383 384 385 |
# File 'lib/rabbit/utils.rb', line 383 def screen_depth default_screen.root_window.depth end |
.screen_height ⇒ Object
367 368 369 |
# File 'lib/rabbit/utils.rb', line 367 def screen_height default_screen.height end |
.screen_height_mm ⇒ Object
371 372 373 |
# File 'lib/rabbit/utils.rb', line 371 def screen_height_mm default_screen.height_mm end |
.screen_width ⇒ Object
359 360 361 |
# File 'lib/rabbit/utils.rb', line 359 def screen_width default_screen.width end |
.screen_width_mm ⇒ Object
363 364 365 |
# File 'lib/rabbit/utils.rb', line 363 def screen_width_mm default_screen.width_mm end |
.screen_x_resolution ⇒ Object
375 376 377 |
# File 'lib/rabbit/utils.rb', line 375 def screen_x_resolution screen_width / mm_to_inch(screen_width_mm) end |
.screen_y_resolution ⇒ Object
379 380 381 |
# File 'lib/rabbit/utils.rb', line 379 def screen_y_resolution screen_height / mm_to_inch(screen_height_mm) end |