Class: Uh::Display

Inherits:
Object
  • Object
show all
Defined in:
lib/uh/display.rb,
ext/uh/uh.c

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject (readonly)

Class Method Details

.on_errorObject

Instance Method Details

#check!Object


7
8
9
# File 'lib/uh/display.rb', line 7

def check!
  fail DisplayError, 'display not opened' unless opened?
end

#closeObject

#color_by_name(color_name) ⇒ Object


11
12
13
# File 'lib/uh/display.rb', line 11

def color_by_name(color_name)
  Color.new(self, color_name)
end

#create_pixmap(width, height) ⇒ Object


15
16
17
# File 'lib/uh/display.rb', line 15

def create_pixmap(width, height)
  Pixmap.new(self, width, height)
end

#create_subwindow(geo) ⇒ Object


23
24
25
# File 'lib/uh/display.rb', line 23

def create_subwindow(geo)
  root.create_sub geo
end

#create_window(geo) ⇒ Object


19
20
21
# File 'lib/uh/display.rb', line 19

def create_window(geo)
  root.create geo
end

#each_eventObject

#filenoObject

#flushObject

#fontObject


27
28
29
# File 'lib/uh/display.rb', line 27

def font
  @font ||= query_font
end

#grab_keyObject

#listen_eventsObject

#next_eventObject

#openObject

#opened?Boolean

Returns:

  • (Boolean)

#pendingObject

#pending?Boolean

Returns:

  • (Boolean)

31
32
33
# File 'lib/uh/display.rb', line 31

def pending?
  pending > 0
end

#query_fontObject


35
36
37
# File 'lib/uh/display.rb', line 35

def query_font
  Font.new(self)
end

#rootObject

#screensObject

#syncObject

#to_sObject


3
4
5
# File 'lib/uh/display.rb', line 3

def to_s
  ENV['DISPLAY']
end