Re: Converting signal code from RubyGTK to Gtkmm
- From: Jens Georg <mail jensge org>
- To: Jason Grimes <jason gina alaska edu>
- Cc: gtkmm-list gnome org
- Subject: Re: Converting signal code from RubyGTK to Gtkmm
- Date: Sat, 10 Jul 2010 11:50:05 +0300
> $image.signal_connect('expose_event') do
> if $rgb == nil || $rgb.length != $iwidth*$iheight*3
> puts 'rgb buffer is null or wrong length'
> else
> Gdk::RGB.draw_rgb_image($image.window,
> $image.style.fg_gc($image.state),
> 0, 0, $iwidth, $iheight,
> Gdk::RGB::Dither::NORMAL, $rgb, $iwidth*3, 0, 0)
> end
> end
It's actually the ruby bindings that are totaly $favourite_curse, c-like
function wrapping with no OOP at all, as it seems.
draw_image is is a method of the window/drawable, hence:
http://library.gnome.org/devel/gtkmm/unstable/classGdk_1_1Drawable.html#a8ea32afd4ea08f6abea8de6fc268ccb6
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]