I have this in an autoload:
var swipe_start = null
var minimum_drag = 100
swipe_start = get_global_mouse_pos()
if swipe_start == null:
var swipe = swipe_end - swipe_start
if abs(swipe.x) > minimum_drag:
if swipe.x > 0:
It just emits a signal with one argument that can be "right" or "left". If you don't know how to start maybe this helps.
Basically, if you don't care about the whole curve, your swipe is swipeend - swipestart where swipestart and swipeend are the return value of getglobalmouse_pos() when the user touches the screen and when she lifts her finger, respectively.