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.
1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 |
# File 'lib/ruby-macrodroid/triggers.rb', line 1679 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
1692 1693 1694 1695 1696 1697 |
# File 'lib/ruby-macrodroid/triggers.rb', line 1692 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 |