Sha256: c7da25e0c03c5704bd3cf899f42a064a06566119ca4ed975d83ba7603cc52661

Contents?: true

Size: 918 Bytes

Versions: 40

Compression:

Stored size: 918 Bytes

Contents

require 'glib2'

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, _ = 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"

    class << self
      def cairo_available?
        if Gdk.respond_to?(:cairo_available?)
          Gdk.cairo_available?
        else
          false
        end
      end
    end
  end
end

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

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
gdk_pixbuf2-1.2.6-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.6 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.5-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.5 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.4-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.4 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.3 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.3-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.2-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.2 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.1-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.1 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.0-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.2.0 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.1.9-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.1.9 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.1.8-x86-mingw32 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.1.8 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.1.7 lib/gdk_pixbuf2.rb
gdk_pixbuf2-1.1.7-x86-mingw32 lib/gdk_pixbuf2.rb