/usr/share/doc/ruby-gtk3/examples/misc/settings.rb is in ruby-gtk3 2.2.5-4build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | =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 'gtk3'
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
|