// Code generated by girgen. DO NOT EDIT.

package adw

import (
	coreglib "github.com/diamondburned/gotk4/pkg/core/glib"
)

// #include <stdlib.h>
// #include <adwaita.h>
import "C"

//export _gotk4_adw1_SwipeTracker_ConnectBeginSwipe
func _gotk4_adw1_SwipeTracker_ConnectBeginSwipe(arg0 C.gpointer, arg1 C.guintptr) {
	var f func()
	{
		closure := coreglib.ConnectedGeneratedClosure(uintptr(arg1))
		if closure == nil {
			panic("given unknown closure user_data")
		}
		defer closure.TryRepanic()

		f = closure.Func.(func())
	}

	f()
}

//export _gotk4_adw1_SwipeTracker_ConnectEndSwipe
func _gotk4_adw1_SwipeTracker_ConnectEndSwipe(arg0 C.gpointer, arg1 C.gdouble, arg2 C.gdouble, arg3 C.guintptr) {
	var f func(velocity, to float64)
	{
		closure := coreglib.ConnectedGeneratedClosure(uintptr(arg3))
		if closure == nil {
			panic("given unknown closure user_data")
		}
		defer closure.TryRepanic()

		f = closure.Func.(func(velocity, to float64))
	}

	var _velocity float64 // out
	var _to float64       // out

	_velocity = float64(arg1)
	_to = float64(arg2)

	f(_velocity, _to)
}

//export _gotk4_adw1_SwipeTracker_ConnectPrepare
func _gotk4_adw1_SwipeTracker_ConnectPrepare(arg0 C.gpointer, arg1 C.AdwNavigationDirection, arg2 C.guintptr) {
	var f func(direction NavigationDirection)
	{
		closure := coreglib.ConnectedGeneratedClosure(uintptr(arg2))
		if closure == nil {
			panic("given unknown closure user_data")
		}
		defer closure.TryRepanic()

		f = closure.Func.(func(direction NavigationDirection))
	}

	var _direction NavigationDirection // out

	_direction = NavigationDirection(arg1)

	f(_direction)
}

//export _gotk4_adw1_SwipeTracker_ConnectUpdateSwipe
func _gotk4_adw1_SwipeTracker_ConnectUpdateSwipe(arg0 C.gpointer, arg1 C.gdouble, arg2 C.guintptr) {
	var f func(progress float64)
	{
		closure := coreglib.ConnectedGeneratedClosure(uintptr(arg2))
		if closure == nil {
			panic("given unknown closure user_data")
		}
		defer closure.TryRepanic()

		f = closure.Func.(func(progress float64))
	}

	var _progress float64 // out

	_progress = float64(arg1)

	f(_progress)
}
