Module: AMS::Screen
- Defined in:
- screen.rb
Class Method Summary (collapse)
-
+ (Array<Fixnum>) resolution
Get screen resolution of the primary monitor.
-
+ (Array<Fixnum>) virtual_resolution
Get screen resolution of all monitors combined.
Class Method Details
+ (Array<Fixnum>) resolution
Get screen resolution of the primary monitor.
7 8 9 10 11 |
# File 'screen.rb', line 7 def resolution w = AMS::C.get_system_metrics(0) # SM_CXSCREEN h = AMS::C.get_system_metrics(1) # SM_CYSCREEN return [w,h] end |
+ (Array<Fixnum>) virtual_resolution
Get screen resolution of all monitors combined.
16 17 18 19 20 |
# File 'screen.rb', line 16 def virtual_resolution w = AMS::C.get_system_metrics(78) # SM_CXVIRTUALSCREEN h = AMS::C.get_system_metrics(79) # SM_CYVIRTUALSCREEN return [w,h] end |