VideoTools/third_party/gotk3/glib/glib_since_2_42.go
Stu d4efa91ce1 Add vendored gotk3 GTK3 bindings for Go
Vendor gotk3 library to ensure consistent GTK3 bindings across
environments and simplify dependency management.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 05:40:43 -05:00

51 lines
1.4 KiB
Go

// Same copyright and license as the rest of the files in this project
// +build !glib_2_40
package glib
// #include <gio/gio.h>
// #include <glib.h>
// #include <glib-object.h>
// #include "glib.go.h"
import "C"
import "unsafe"
/*
* Notification
*/
// NotificationPriority is a representation of GLib's GNotificationPriority.
type NotificationPriority int
const (
NOTIFICATION_PRIORITY_NORMAL NotificationPriority = C.G_NOTIFICATION_PRIORITY_NORMAL
NOTIFICATION_PRIORITY_LOW NotificationPriority = C.G_NOTIFICATION_PRIORITY_LOW
NOTIFICATION_PRIORITY_HIGH NotificationPriority = C.G_NOTIFICATION_PRIORITY_HIGH
NOTIFICATION_PRIORITY_URGENT NotificationPriority = C.G_NOTIFICATION_PRIORITY_URGENT
)
// SetPriority is a wrapper around g_notification_set_priority().
func (v *Notification) SetPriority(prio NotificationPriority) {
C.g_notification_set_priority(v.native(), C.GNotificationPriority(prio))
}
/*
* Application
*/
// GetResourceBasePath is a wrapper around g_application_get_resource_base_path().
func (v *Application) GetResourceBasePath() string {
c := C.g_application_get_resource_base_path(v.native())
return C.GoString((*C.char)(c))
}
// SetResourceBasePath is a wrapper around g_application_set_resource_base_path().
func (v *Application) SetResourceBasePath(bp string) {
cstr1 := (*C.gchar)(C.CString(bp))
defer C.free(unsafe.Pointer(cstr1))
C.g_application_set_resource_base_path(v.native(), cstr1)
}