Class: WidgetPressedTrigger
- Inherits:
-
Trigger
- Object
- MacroObject
- Trigger
- WidgetPressedTrigger
- Defined in:
- lib/ruby-macrodroid/triggers.rb
Overview
Category: User Input
Instance Attribute Summary
Attributes inherited from Trigger
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ WidgetPressedTrigger
constructor
A new instance of WidgetPressedTrigger.
- #to_s(colour: false) ⇒ Object (also: #to_summary)
Methods inherited from Trigger
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ WidgetPressedTrigger
Returns a new instance of WidgetPressedTrigger.
1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 |
# File 'lib/ruby-macrodroid/triggers.rb', line 1826 def initialize(h={}) = { :swipe_start_area=>0, :swipe_motion=>0, :cleared=>true, :image_id=>2130968576, :image_package_name=>"com.android.providers.settings", :image_resource_name=>"com.android.providers.settings", :widget_label=>"", :widget_type=>4 } super(.merge h) end |
Instance Method Details
#to_s(colour: false) ⇒ Object Also known as: to_summary
1839 1840 1841 1842 1843 1844 |
# File 'lib/ruby-macrodroid/triggers.rb', line 1839 def to_s(colour: false) # 4 == cutom , 0 = green, 1 = blue, 2 = red, 3 = yellow style = %w(Green Blue Red Yellow Custom)[@h[:widget_type]] @s = "Widget Button (%s)" % [style] #+ @h.inspect super() end |