// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk import ( "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" ) var xTestInit func(int, []string, ...interface{}) // This function is used to initialize a GTK test program. // // It will in turn call g_test_init() and gtk_init() to properly // initialize the testing framework and graphical toolkit. It’ll // also set the program’s locale to “C”. This is done to make test // program environments as deterministic as possible. // // Like gtk_init() and g_test_init(), any known arguments will be // processed and stripped from @argc and @argv. func TestInit(ArgcpVar int, ArgvpVar []string, varArgs ...interface{}) { xTestInit(ArgcpVar, ArgvpVar, varArgs...) } var xTestListAllTypes func(*uint) uintptr // Return the type ids that have been registered after // calling gtk_test_register_all_types(). func TestListAllTypes(NTypesVar *uint) uintptr { cret := xTestListAllTypes(NTypesVar) return cret } var xTestRegisterAllTypes func() // Force registration of all core GTK object types. // // This allows to refer to any of those object types via // g_type_from_name() after calling this function. func TestRegisterAllTypes() { xTestRegisterAllTypes() } var xTestWidgetWaitForDraw func(uintptr) // Enters the main loop and waits for @widget to be “drawn”. // // In this context that means it waits for the frame clock of // @widget to have run a full styling, layout and drawing cycle. // // This function is intended to be used for syncing with actions that // depend on @widget relayouting or on interaction with the display // server. func TestWidgetWaitForDraw(WidgetVar *Widget) { xTestWidgetWaitForDraw(WidgetVar.GoPointer()) } func init() { core.SetPackageName("GTK", "gtk4") core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"}) var libs []uintptr for _, libPath := range core.GetPaths("GTK") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xTestInit, libs, "gtk_test_init") core.PuregoSafeRegister(&xTestListAllTypes, libs, "gtk_test_list_all_types") core.PuregoSafeRegister(&xTestRegisterAllTypes, libs, "gtk_test_register_all_types") core.PuregoSafeRegister(&xTestWidgetWaitForDraw, libs, "gtk_test_widget_wait_for_draw") }