Skip to content

Touch Gesture Library, created under the guidance of the Sway project.

License

Notifications You must be signed in to change notification settings

grahnen/libtouch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libtouch

Due to not having touch-screen hardware any more, and working on my degree, this project is dead, looking to be revived by anyone who wants to continue where I left off.

API

Target

Represents an area or region on the screen within which an action must take place.

For movement actions, it represents where the movement must end.

Action

Represents one action, one part of a gesture. The possible actions are

  • Touch
  • Move
  • Rotate
  • Pinch
  • Delay

Each action can have

Treshold

Decides how much/how many/etc the action must be performed. E.g. the number of fingers for a touch, or the length of a movement.

Target

Where the action must take place. A movement is considered complete when it reaches the target.

Duration

Maximum duration within which an action must take place.

Move Tolerance

How much is minimum movement, before it is regarded as actual movement. E.g. a tap and hold may move X pixels without being regarded as a swipe, or how much movement in the “wrong” direction is allowed.

Gesture

A gesture is a series of actions, each must be completed before the next begins.

Engine

The libtouch_engine is responsible for controlling the memory allocation and freeing of other structures, as well as keeping them nice and tidy to be able to check them all.

The inner state is updated through the functions

Progress Tracker

When finished with creating all gestures, one or more progress trackers can be created. Each tracker independently tracks input. One for each seat, for instance.

libtouch_progress_register_move
libtouch_progress_register_touch

Examples

See examples.c

About

Touch Gesture Library, created under the guidance of the Sway project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published