Module: NumRu::DCL

Defined in:
lib/numru/dclext/anim/anim_dcl.rb

Class Method Summary collapse

Class Method Details

.__grclsObject



61
# File 'lib/numru/dclext/anim/anim_dcl.rb', line 61

alias :__grcls :grcls

.__grfrmObject



54
# File 'lib/numru/dclext/anim/anim_dcl.rb', line 54

alias :__grfrm :grfrm

.__gropnObject



7
# File 'lib/numru/dclext/anim/anim_dcl.rb', line 7

alias :__gropn :gropn

.grclsObject



62
63
64
65
# File 'lib/numru/dclext/anim/anim_dcl.rb', line 62

def grcls
  @source.close
  __grcls
end

.grfrmObject



55
56
57
58
# File 'lib/numru/dclext/anim/anim_dcl.rb', line 55

def grfrm
  @source.new_frame
  __grfrm
end

.gropn(wsn) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/numru/dclext/anim/anim_dcl.rb', line 8

def gropn(wsn)

  pr, pw = IO.pipe

  width = NumRu::DCLExt::Anim.width
  height = NumRu::DCLExt::Anim.height

  fork do

    require "numru/dclext/anim/stream"

    pw.close

    stream = NumRu::DCLExt::Anim::Stream.new(pr)
    stream.start

  end  # fork

  require "gtk2"
  require "numru/dclext/gtk"
  require "numru/dclext/anim/source"

  pr.close

  Gtk.init

  drw = Gtk::DrawingArea.new
  drw.set_width_request NumRu::DCLExt::Anim.width
  drw.set_height_request NumRu::DCLExt::Anim.height
  drw.show

  wnd = Gtk::Window.new
  wnd.add drw
  drw.realize

  pixmap = Gdk::Pixmap.new(drw.window, width, height, -1)

  NumRu::DCLExt.zgsdrw(drw)
  NumRu::DCLExt.zgspmp(pixmap)
  
  @source = NumRu::DCLExt::Anim::Source.new(pixmap, pw)

  __gropn(4)
end