Sha256: eb843931334863e8f2c0dc5a055ad2c78b4912b63a24aa2c037a0a7160db51e8

Contents?: true

Size: 771 Bytes

Versions: 4

Compression:

Stored size: 771 Bytes

Contents

# frozen_string_literal: true

require_relative './text_record.rb'

module Fusuma
  module Plugin
    module Events
      module Records
        # Gesture Record
        class GestureRecord < Record
          # define gesture format
          attr_reader :status, :gesture, :finger, :direction

          Delta = Struct.new(:move_x, :move_y, :zoom, :rotate)

          # @param status [String]
          # @param gesture [String]
          # @param finger [String, Integer]
          # @param direction [Delta, NilClass]
          def initialize(status:, gesture:, finger:, direction:)
            @status  = status
            @gesture = gesture
            @finger  = finger.to_i
            @direction = direction
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fusuma-2.0.0.pre lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-1.11.1 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-1.10.2 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-1.10.1 lib/fusuma/plugin/events/records/gesture_record.rb