Class: RBGL::GUI::Backend

Inherits:
Object
  • Object
show all
Defined in:
lib/rbgl/gui/backend.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(width, height, title = "RBGL", **_options) ⇒ Backend

Returns a new instance of Backend.



14
15
16
17
18
# File 'lib/rbgl/gui/backend.rb', line 14

def initialize(width, height, title = "RBGL", **_options)
  @width = width
  @height = height
  @title = title
end

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height.



12
13
14
# File 'lib/rbgl/gui/backend.rb', line 12

def height
  @height
end

#titleObject (readonly)

Returns the value of attribute title.



12
13
14
# File 'lib/rbgl/gui/backend.rb', line 12

def title
  @title
end

#widthObject (readonly)

Returns the value of attribute width.



12
13
14
# File 'lib/rbgl/gui/backend.rb', line 12

def width
  @width
end

Instance Method Details

#closeObject

Raises:

  • (NotImplementedError)


41
42
43
# File 'lib/rbgl/gui/backend.rb', line 41

def close
  raise NotImplementedError
end

#metal_available?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/rbgl/gui/backend.rb', line 49

def metal_available?
  false
end

#native_handleObject



53
54
55
# File 'lib/rbgl/gui/backend.rb', line 53

def native_handle
  nil
end

#poll_eventsObject

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/rbgl/gui/backend.rb', line 24

def poll_events
  raise NotImplementedError
end

#poll_events_rawObject



28
29
30
# File 'lib/rbgl/gui/backend.rb', line 28

def poll_events_raw
  []
end

#present(_framebuffer) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/rbgl/gui/backend.rb', line 20

def present(_framebuffer)
  raise NotImplementedError
end

#resize(width, height) ⇒ Object



32
33
34
35
# File 'lib/rbgl/gui/backend.rb', line 32

def resize(width, height)
  @width = width
  @height = height
end

#set_pixels(buffer, width, height) ⇒ Object

Raises:

  • (NotImplementedError)


45
46
47
# File 'lib/rbgl/gui/backend.rb', line 45

def set_pixels(buffer, width, height)
  raise NotImplementedError
end

#should_close?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/rbgl/gui/backend.rb', line 37

def should_close?
  raise NotImplementedError
end