// Code generated by girgen. DO NOT EDIT.

package adw

import (
	"unsafe"

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

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

//export _gotk4_adw1_ActionRowClass_activate
func _gotk4_adw1_ActionRowClass_activate(arg0 *C.AdwActionRow) {
	instance0 := coreglib.Take(unsafe.Pointer(arg0))
	overrides := coreglib.OverridesFromObj[ActionRowOverrides](instance0)
	if overrides.Activate == nil {
		panic("gotk4: " + instance0.TypeFromInstance().String() + ": expected ActionRowOverrides.Activate, got none")
	}

	overrides.Activate()
}

//export _gotk4_adw1_AlertDialogClass_response
func _gotk4_adw1_AlertDialogClass_response(arg0 *C.AdwAlertDialog, arg1 *C.char) {
	instance0 := coreglib.Take(unsafe.Pointer(arg0))
	overrides := coreglib.OverridesFromObj[AlertDialogOverrides](instance0)
	if overrides.Response == nil {
		panic("gotk4: " + instance0.TypeFromInstance().String() + ": expected AlertDialogOverrides.Response, got none")
	}

	var _response string // out

	_response = C.GoString((*C.gchar)(unsafe.Pointer(arg1)))

	overrides.Response(_response)
}

//export _gotk4_adw1_DialogClass_close_attempt
func _gotk4_adw1_DialogClass_close_attempt(arg0 *C.AdwDialog) {
	instance0 := coreglib.Take(unsafe.Pointer(arg0))
	overrides := coreglib.OverridesFromObj[DialogOverrides](instance0)
	if overrides.CloseAttempt == nil {
		panic("gotk4: " + instance0.TypeFromInstance().String() + ": expected DialogOverrides.CloseAttempt, got none")
	}

	overrides.CloseAttempt()
}

//export _gotk4_adw1_DialogClass_closed
func _gotk4_adw1_DialogClass_closed(arg0 *C.AdwDialog) {
	instance0 := coreglib.Take(unsafe.Pointer(arg0))
	overrides := coreglib.OverridesFromObj[DialogOverrides](instance0)
	if overrides.Closed == nil {
		panic("gotk4: " + instance0.TypeFromInstance().String() + ": expected DialogOverrides.Closed, got none")
	}

	overrides.Closed()
}

//export _gotk4_adw1_MessageDialogClass_response
func _gotk4_adw1_MessageDialogClass_response(arg0 *C.AdwMessageDialog, arg1 *C.char) {
	instance0 := coreglib.Take(unsafe.Pointer(arg0))
	overrides := coreglib.OverridesFromObj[MessageDialogOverrides](instance0)
	if overrides.Response == nil {
		panic("gotk4: " + instance0.TypeFromInstance().String() + ": expected MessageDialogOverrides.Response, got none")
	}

	var _response string // out

	_response = C.GoString((*C.gchar)(unsafe.Pointer(arg1)))

	overrides.Response(_response)
}

//export _gotk4_adw1_NavigationPageClass_hidden
func _gotk4_adw1_NavigationPageClass_hidden(arg0 *C.AdwNavigationPage) {
	instance0 := coreglib.Take(unsafe.Pointer(arg0))
	overrides := coreglib.OverridesFromObj[NavigationPageOverrides](instance0)
	if overrides.Hidden == nil {
		panic("gotk4: " + instance0.TypeFromInstance().String() + ": expected NavigationPageOverrides.Hidden, got none")
	}

	overrides.Hidden()
}

//export _gotk4_adw1_NavigationPageClass_hiding
func _gotk4_adw1_NavigationPageClass_hiding(arg0 *C.AdwNavigationPage) {
	instance0 := coreglib.Take(unsafe.Pointer(arg0))
	overrides := coreglib.OverridesFromObj[NavigationPageOverrides](instance0)
	if overrides.Hiding == nil {
		panic("gotk4: " + instance0.TypeFromInstance().String() + ": expected NavigationPageOverrides.Hiding, got none")
	}

	overrides.Hiding()
}

//export _gotk4_adw1_NavigationPageClass_showing
func _gotk4_adw1_NavigationPageClass_showing(arg0 *C.AdwNavigationPage) {
	instance0 := coreglib.Take(unsafe.Pointer(arg0))
	overrides := coreglib.OverridesFromObj[NavigationPageOverrides](instance0)
	if overrides.Showing == nil {
		panic("gotk4: " + instance0.TypeFromInstance().String() + ": expected NavigationPageOverrides.Showing, got none")
	}

	overrides.Showing()
}

//export _gotk4_adw1_NavigationPageClass_shown
func _gotk4_adw1_NavigationPageClass_shown(arg0 *C.AdwNavigationPage) {
	instance0 := coreglib.Take(unsafe.Pointer(arg0))
	overrides := coreglib.OverridesFromObj[NavigationPageOverrides](instance0)
	if overrides.Shown == nil {
		panic("gotk4: " + instance0.TypeFromInstance().String() + ": expected NavigationPageOverrides.Shown, got none")
	}

	overrides.Shown()
}
