Module: RBGL::GUI::Wayland::Arguments

Defined in:
lib/rbgl/gui/wayland/protocol_objects/arguments.rb

Class Method Summary collapse

Class Method Details

.fixed(value) ⇒ Object



19
20
21
# File 'lib/rbgl/gui/wayland/protocol_objects/arguments.rb', line 19

def fixed(value)
  TypedArgument.new(:fixed, Float(value))
end

.int(value) ⇒ Object



15
16
17
# File 'lib/rbgl/gui/wayland/protocol_objects/arguments.rb', line 15

def int(value)
  TypedArgument.new(:int, Integer(value))
end

.new_id(value) ⇒ Object



32
33
34
# File 'lib/rbgl/gui/wayland/protocol_objects/arguments.rb', line 32

def new_id(value)
  TypedArgument.new(:new_id, Integer(value))
end

.object(value) ⇒ Object



27
28
29
30
# File 'lib/rbgl/gui/wayland/protocol_objects/arguments.rb', line 27

def object(value)
  object_id = value.respond_to?(:id) ? value.id : value
  TypedArgument.new(:object, Integer(object_id))
end

.string(value) ⇒ Object



23
24
25
# File 'lib/rbgl/gui/wayland/protocol_objects/arguments.rb', line 23

def string(value)
  TypedArgument.new(:string, value.to_s)
end

.uint(value) ⇒ Object



11
12
13
# File 'lib/rbgl/gui/wayland/protocol_objects/arguments.rb', line 11

def uint(value)
  TypedArgument.new(:uint, Integer(value))
end