Sha256: 65be50bfc3977128716ecc7a75ee98c3a9a56601bd231bce8bd228fc0491e6d9

Contents?: true

Size: 862 Bytes

Versions: 12

Compression:

Stored size: 862 Bytes

Contents

# frozen_string_literal: true

require_relative './text_record'

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

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

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fusuma-2.4.1 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.4.0 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.3.0 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.2.0 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.1.0 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.0.5 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.0.4 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.0.3 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.0.2 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.0.1 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.0.0 lib/fusuma/plugin/events/records/gesture_record.rb
fusuma-2.0.0.pre2 lib/fusuma/plugin/events/records/gesture_record.rb