// Code generated by girgen. DO NOT EDIT.

package adw

import (
	"fmt"
	"unsafe"

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

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

// GType values.
var (
	GTypeNavigationDirection = coreglib.Type(C.adw_navigation_direction_get_type())
)

func init() {
	coreglib.RegisterGValueMarshalers([]coreglib.TypeMarshaler{
		coreglib.TypeMarshaler{T: GTypeNavigationDirection, F: marshalNavigationDirection},
	})
}

// NavigationDirection describes the direction of a swipe navigation gesture.
type NavigationDirection C.gint

const (
	// NavigationDirectionBack corresponds to start or top, depending on
	// orientation and text direction.
	NavigationDirectionBack NavigationDirection = iota
	// NavigationDirectionForward corresponds to end or bottom, depending on
	// orientation and text direction.
	NavigationDirectionForward
)

func marshalNavigationDirection(p uintptr) (interface{}, error) {
	return NavigationDirection(coreglib.ValueFromNative(unsafe.Pointer(p)).Enum()), nil
}

// String returns the name in string for NavigationDirection.
func (n NavigationDirection) String() string {
	switch n {
	case NavigationDirectionBack:
		return "Back"
	case NavigationDirectionForward:
		return "Forward"
	default:
		return fmt.Sprintf("NavigationDirection(%d)", n)
	}
}
