Sha256: 67da2ecdf5eeeb927e131529a4bb954e2cee4070b89c6f77ace86dc81682464a
Contents?: true
Size: 1.12 KB
Versions: 14
Compression:
Stored size: 1.12 KB
Contents
=begin Copyright (c) 2006-2011 Ruby-GNOME2 Project Team This program is licenced under the same licence as Ruby-GNOME2. =end require 'glib2' require 'pango' require 'gdk_pixbuf2' base_dir = Pathname.new(__FILE__).dirname.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}/gdk3.so" rescue LoadError require "gdk3.so" end module Gdk LOG_DOMAIN = "Gdk" end if Gdk.cairo_available? module Cairo class Context if method_defined?(:set_source_color) alias_method :set_source_not_gdk_color, :set_source_color def set_source_color(color) if color.is_a?(Gdk::Color) set_source_gdk_color(color) else set_source_not_gdk_color(color) end end else alias_method :set_source_color, :set_source_gdk_color end def source_color=(color) set_source_color(color) color end end end end GLib::Log.set_log_domain(Gdk::LOG_DOMAIN)
Version data entries
14 entries across 14 versions & 1 rubygems