Class: TotalSpaces2::Displays

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/totalspaces2.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#display_infoObject



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/totalspaces2.rb', line 140

def display_info
  displays = []
  displays_array = self[:displays_array]
  (0...self[:count]).each do |n|
    display = Display.new(displays_array + n * Display.size)
    info = {
      display_id: display[:displayID],
      display_name: display[:display_name],
      width: display[:width],
      height: display[:height]
    }
    displays << info
  end
  
  displays
end