Sha256: 22a492a3d8a40d6e0a39632db47c117e83d4a56d7b574ac077fb653e217b4eb8

Contents?: true

Size: 1.71 KB

Versions: 13

Compression:

Stored size: 1.71 KB

Contents

module OperaWatir
  # @private
  # Documentation doesn't work with these dynamic enums so just leave them out
  module DesktopEnums

    # Enum for the key/mouse modifiers
    KEYMODIFIER_ENUM_MAP = SystemInputProtos::ModifierPressed.constants.inject({}) do |acc, const|
      acc[const.to_s.downcase.to_sym] = SystemInputProtos::ModifierPressed.const_get(const)
      acc
    end
    
    # Enum for the mouse buttons
    MOUSEBUTTON_ENUM_MAP = SystemInputProtos::MouseInfo::MouseButton.constants.inject({}) do |acc, const|
      acc[const.to_s.downcase.to_sym] = SystemInputProtos::MouseInfo::MouseButton.const_get(const)
      acc
    end

    # Enum for the widget types
    WIDGET_ENUM_MAP = DesktopWmProtos::QuickWidgetInfo::QuickWidgetType.constants.inject({}) do |acc, const|
      acc[const.to_s.downcase.to_sym] = DesktopWmProtos::QuickWidgetInfo::QuickWidgetType.const_get(const)
      acc
    end
    
    # Enum for window types
    WINDOW_ENUM_MAP = DesktopWmProtos::DesktopWindowInfo::DesktopWindowType.constants.inject({}) do |acc, const|
      acc[const.to_s.downcase.to_sym] = DesktopWmProtos::DesktopWindowInfo::DesktopWindowType.const_get(const)
      acc
    end
    
    # Enum for search types
    WIDGET_SEARCHTYPE_ENUM_MAP = DesktopWmProtos::QuickWidgetSearch::QuickWidgetSearchType.constants.inject({}) do |acc, const|
      acc[const.to_s.downcase.to_sym] = DesktopWmProtos::QuickWidgetSearch::QuickWidgetSearchType.const_get(const)
      acc
    end

    # Enum for drop position types for dropping a widget onto another
    DROPPOSITION_ENUM_MAP = QuickWidget::DropPosition.constants.inject({}) do |acc, const|
      acc[const.to_s.downcase.to_sym] = QuickWidget::DropPosition.const_get(const)
      acc
    end 
end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
operawatir-0.4.3.pre1-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4.2-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4.1-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4.1.pre7-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4.1.pre6-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4.1.pre5-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4.1.pre4-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4.1.pre3-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4.1.pre2-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4.1.pre1-jruby lib/operawatir/desktop_enums.rb
operawatir-0.4-jruby lib/operawatir/desktop_enums.rb
operawatir-0.3.7.pre2-jruby lib/operawatir/desktop_enums.rb
operawatir-0.3.7.pre1-jruby lib/operawatir/desktop_enums.rb