code.witches.io/go/sdl2@v0.1.1/touch.go (about)

     1  package sdl
     2  
     3  // #include <SDL2/SDL_touch.h>
     4  import "C"
     5  
     6  type TouchID int64
     7  type FingerID int64
     8  
     9  type Finger struct {
    10  	ID       FingerID
    11  	X        float32
    12  	Y        float32
    13  	Pressure float32
    14  }
    15  
    16  func GetNumTouchDevices() int {
    17  	return int(C.SDL_GetNumTouchDevices())
    18  }