Sha256: e6a4b59558020811366333111ad7ba90a0001fb646eb747bddee5aff026f2427

Contents?: true

Size: 864 Bytes

Versions: 2

Compression:

Stored size: 864 Bytes

Contents

require 'glib2'
begin
  begin
    require 'cairo'
  rescue LoadError
    require 'rubygems'
    require 'cairo'
  end
rescue LoadError
end

base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
vendor_dir = base_dir + "vendor" + "local"
vendor_bin_dir = vendor_dir + "bin"
GLib.prepend_environment_path(vendor_bin_dir)
begin
  major, minor, micro, = RUBY_VERSION.split(/\./)
  require "#{major}.#{minor}/gdk_pixbuf2.so"
rescue LoadError
  require "gdk_pixbuf2.so"
end

module Gdk
  class PixbufLoader
    def self.open(type = nil, mime_type = false)
      loader = Gdk::PixbufLoader.new(type, mime_type)
      if block_given?
        begin
          yield(loader)
        ensure
          loader.close
        end
      end
      loader
    end
  end
  class Pixbuf
    LOG_DOMAIN = "GdkPixbuf"
  end
end

GLib::Log.set_log_domain(Gdk::Pixbuf::LOG_DOMAIN)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gdk_pixbuf2-0.90.2-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-0.90.2 lib/gdk_pixbuf2.rb