Class: Gdk::Cursor
- Inherits:
-
Object
- Object
- Gdk::Cursor
- Extended by:
- GLib::Deprecatable
- Defined in:
- lib/gdk3/cursor.rb,
lib/gdk3/deprecated.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Cursor
constructor
A new instance of Cursor.
- #initialize_raw ⇒ Object
Constructor Details
#initialize(*args) ⇒ Cursor
Returns a new instance of Cursor.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/gdk3/cursor.rb', line 33 def initialize(*args) if args.last.is_a?(Hash) = args.pop else = {} end display = [:display] || Display.default if args.size == 1 and args[0].is_a?(String) initialize_new_from_name(display, *args) else initialize_raw(display, *args) end end |
Class Method Details
.new(*args) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/gdk3/cursor.rb', line 21 def new(*args) first_arg = args.first case first_arg when String, Symbol, CursorType @caches[first_arg] ||= super else super end end |
Instance Method Details
#initialize_raw ⇒ Object
32 |
# File 'lib/gdk3/cursor.rb', line 32 alias_method :initialize_raw, :initialize |