From d8465ff9abf63545262b7d8f88b069522ae82823 Mon Sep 17 00:00:00 2001 From: nagai Date: Tue, 6 Jul 2004 09:42:12 +0000 Subject: * ext/tk/lib : improve framework of developping Tcl/Tk extension wrappers * BWidget extension support on Ruby/Tk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tkextlib/bwidget/bitmap.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ext/tk/lib/tkextlib/bwidget/bitmap.rb (limited to 'ext/tk/lib/tkextlib/bwidget/bitmap.rb') diff --git a/ext/tk/lib/tkextlib/bwidget/bitmap.rb b/ext/tk/lib/tkextlib/bwidget/bitmap.rb new file mode 100644 index 0000000000..6cfde203e8 --- /dev/null +++ b/ext/tk/lib/tkextlib/bwidget/bitmap.rb @@ -0,0 +1,21 @@ +# +# tkextlib/bwidget/bitmap.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tk/image' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class Bitmap < TkPhotoImage + end + end +end + +class Tk::BWidget::Bitmap + def initialize(name) + @path = tk_call_without_enc('Bitmap::get', name) + Tk_IMGTBL[@path] = self + end +end -- cgit v1.2.3