Sha256: 0ce064494edf0270c61ab3423aea03435cc714c091a598306965aec4d2c26d16

Contents?: true

Size: 1.47 KB

Versions: 184

Compression:

Stored size: 1.47 KB

Contents

=begin
  setting.rb - Gtk::Settings sample script.

  Copyright (C) 2004-2006 Masao Mutoh
  This program is licenced under the same licence as Ruby-GNOME2.

  $Id: settings.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
=end

require 'gtk2'

spec = GLib::Param::Int.new("integer",         # name
			    "Integer",         # nick
			    "Integer integer", # blurb
			    0,                 # min
			    10000,             # max
			    0,                 # default
			    GLib::Param::READABLE|
			    GLib::Param::WRITABLE)

enum = GLib::Param::Enum.new("enum",                      # name
			     "Enum",                      # nick
			     "Enum enum",                 # blurb
			     GLib::Type["GdkCursorType"], #type
			     Gdk::Cursor::ARROW,          #default
			     GLib::Param::READABLE|
			     GLib::Param::WRITABLE)

flags = GLib::Param::Flags.new("flags",                       # name
			       "Flags",                       # nick
			       "Flags flags",                 # blurb
			       GLib::Type["GdkEventMask"],    #type
			       Gdk::Event::LEAVE_NOTIFY_MASK, #default
			       GLib::Param::READABLE|
			       GLib::Param::WRITABLE)

p Gtk::Settings.rc_property_parse_color(spec, "{2222,44444,65535}").to_a
p Gtk::Settings.rc_property_parse_enum(enum, "watch")
p Gtk::Settings.rc_property_parse_flags(flags, "(scroll-mask|structure-mask)")
p Gtk::Settings.rc_property_parse_requisition(spec, "{100, 200}")
p Gtk::Settings.rc_property_parse_border(spec, "{100, 200, 300, 400}").to_a

Version data entries

184 entries across 184 versions & 1 rubygems

Version Path
gtk2-3.2.7-x86-mingw32 sample/misc/settings.rb
gtk2-3.2.7-x64-mingw32 sample/misc/settings.rb
gtk2-3.2.7 sample/misc/settings.rb
gtk2-3.2.6-x64-mingw32 sample/misc/settings.rb
gtk2-3.2.6-x86-mingw32 sample/misc/settings.rb
gtk2-3.2.6 sample/misc/settings.rb
gtk2-3.2.5-x64-mingw32 sample/misc/settings.rb
gtk2-3.2.5-x86-mingw32 sample/misc/settings.rb
gtk2-3.2.5 sample/misc/settings.rb
gtk2-3.2.4-x64-mingw32 sample/misc/settings.rb
gtk2-3.2.4-x86-mingw32 sample/misc/settings.rb
gtk2-3.2.4 sample/misc/settings.rb
gtk2-3.2.3-x64-mingw32 sample/misc/settings.rb
gtk2-3.2.3-x86-mingw32 sample/misc/settings.rb
gtk2-3.2.3 sample/misc/settings.rb
gtk2-3.2.2-x64-mingw32 sample/misc/settings.rb
gtk2-3.2.2-x86-mingw32 sample/misc/settings.rb
gtk2-3.2.2 sample/misc/settings.rb
gtk2-3.2.1-x64-mingw32 sample/misc/settings.rb
gtk2-3.2.1-x86-mingw32 sample/misc/settings.rb