module RbSDL2::Window::Size

Public Instance Methods

h()
Alias for: height
h=(num)
Alias for: height=
height() click to toggle source
# File lib/rb_sdl2/window/size.rb, line 4
def height
  ptr = ::FFI::MemoryPointer.new(:int)
  ::SDL2.SDL_GetWindowSize(self, nil, ptr)
  ptr.read_int
end
Also aliased as: h
height=(num) click to toggle source
# File lib/rb_sdl2/window/size.rb, line 11
def height=(num)
  self.size = [w, num]
end
Also aliased as: h=
maximum_size() click to toggle source
# File lib/rb_sdl2/window/size.rb, line 16
def maximum_size
  w_h = Array.new(2) { ::FFI::MemoryPointer.new(:int) }
  ::SDL2.SDL_GetWindowMaximumSize(self, *w_h)
  w_h.map(&:read_int)
end
maximum_size=(w_h) click to toggle source
# File lib/rb_sdl2/window/size.rb, line 22
def maximum_size=(w_h)
  ::SDL2.SDL_SetWindowMaximumSize(self, *w_h)
end
minimum_size() click to toggle source
# File lib/rb_sdl2/window/size.rb, line 26
def minimum_size
  w_h = Array.new(2) { ::FFI::MemoryPointer.new(:int) }
  ::SDL2.SDL_GetWindowMinimumSize(self, *w_h)
  w_h.map(&:read_int)
end
minimum_size=(w_h) click to toggle source
# File lib/rb_sdl2/window/size.rb, line 32
def minimum_size=(w_h)
  ::SDL2.SDL_SetWindowMinimumSize(self, *w_h)
end
size() click to toggle source
# File lib/rb_sdl2/window/size.rb, line 36
def size
  w_h = Array.new(2) { ::FFI::MemoryPointer.new(:int) }
  ::SDL2.SDL_GetWindowSize(self, *w_h)
  w_h.map(&:read_int)
end
size=(w_h) click to toggle source
# File lib/rb_sdl2/window/size.rb, line 42
def size=(w_h)
  ::SDL2.SDL_SetWindowSize(self, *w_h)
end
w()
Alias for: width
w=(num)
Alias for: width=
width() click to toggle source
# File lib/rb_sdl2/window/size.rb, line 46
def width
  ptr = ::FFI::MemoryPointer.new(:int)
  ::SDL2.SDL_GetWindowSize(self, ptr, nil)
  ptr.read_int
end
Also aliased as: w
width=(num) click to toggle source
# File lib/rb_sdl2/window/size.rb, line 53
def width=(num)
  self.size = [num, h]
end
Also aliased as: w=