Module: Gdk

Defined in:
gdk3/lib/gdk3.rb

Defined Under Namespace

Classes: Error

Constant Summary collapse

LOG_DOMAIN =
"Gdk"
@@init_hooks =
[]

Class Method Summary collapse

Class Method Details

.cairo_available?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'gdk3/lib/gdk3.rb', line 66

def cairo_available?
  true
end

.const_missing(name) ⇒ Object



34
35
36
37
38
39
40
41
# File 'gdk3/lib/gdk3.rb', line 34

def const_missing(name)
  init
  if const_defined?(name)
    const_get(name)
  else
    super
  end
end

.initObject



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'gdk3/lib/gdk3.rb', line 44

def init
  class << self
    remove_method(:init)
    remove_method(:const_missing)
  end
  loader = Loader.new(self)
  loader.load
  x11_loader = GdkX11::Loader.new(GdkX11)
  x11_loader.load
  if Object.const_defined?(:Gtk) and Gtk.respond_to?(:init)
    Gtk.init
  end

  @@init_hooks.each do |hook|
    hook.call
  end
end

.on_init(&block) ⇒ Object



62
63
64
# File 'gdk3/lib/gdk3.rb', line 62

def on_init(&block)
  @@init_hooks << block
end