// Code generated by cmd/cgo; DO NOT EDIT. //line /home/josie/.cache/paru/clone/wiiudownloader/src/pkg/mod/github.com/gotk3/gotk3@v0.6.5-0.20240618185848-ff349ae13f56/glib/notifications.go:1:1 package glib // #include // #include // #include // #include "glib.go.h" import _ "unsafe" import "unsafe" // Notification is a representation of GNotification. type Notification struct { *Object } // native() returns a pointer to the underlying GNotification. func (v *Notification) native() * /*line :16:34*/_Ctype_GNotification /*line :16:49*/ { if v == nil || v.GObject == nil { return nil } return func() *_Ctype_struct__GNotification{ _cgo0 := /*line :20:27*/unsafe.Pointer(v.GObject); _cgoCheckPointer(_cgo0, nil); return /*line :20:53*/_Cfunc_toGNotification(_cgo0); }() } func (v *Notification) Native() uintptr { return uintptr(unsafe.Pointer(v.native())) } func marshalNotification(p uintptr) (interface{}, error) { c := ( /*line :28:7*/_Cfunc_g_value_get_object /*line :28:26*/)((* /*line :28:30*/_Ctype_GValue /*line :28:38*/)(unsafe.Pointer(p))) return wrapNotification(wrapObject(unsafe.Pointer(c))), nil } func wrapNotification(obj *Object) *Notification { return &Notification{obj} } // NotificationNew is a wrapper around g_notification_new(). func NotificationNew(title string) *Notification { cstr1 := (* /*line :38:13*/_Ctype_gchar /*line :38:20*/)(( /*line :38:22*/_Cfunc_CString /*line :38:30*/)(title)) defer func() func() { _cgo0 := /*line :39:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :39:37*/_Cfunc_free(_cgo0); }}()() c := ( /*line :41:7*/_Cfunc_g_notification_new /*line :41:26*/)(cstr1) if c == nil { return nil } return wrapNotification(wrapObject(unsafe.Pointer(c))) } // SetTitle is a wrapper around g_notification_set_title(). func (v *Notification) SetTitle(title string) { cstr1 := (* /*line :50:13*/_Ctype_gchar /*line :50:20*/)(( /*line :50:22*/_Cfunc_CString /*line :50:30*/)(title)) defer func() func() { _cgo0 := /*line :51:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :51:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :53:29*/v.native(); var _cgo1 *_Ctype_gchar = /*line :53:41*/cstr1; _cgoCheckPointer(_cgo0, nil); /*line :53:47*/_Cfunc_g_notification_set_title(_cgo0, _cgo1); }() } // SetBody is a wrapper around g_notification_set_body(). func (v *Notification) SetBody(body string) { cstr1 := (* /*line :58:13*/_Ctype_gchar /*line :58:20*/)(( /*line :58:22*/_Cfunc_CString /*line :58:30*/)(body)) defer func() func() { _cgo0 := /*line :59:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :59:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :61:28*/v.native(); var _cgo1 *_Ctype_gchar = /*line :61:40*/cstr1; _cgoCheckPointer(_cgo0, nil); /*line :61:46*/_Cfunc_g_notification_set_body(_cgo0, _cgo1); }() } // SetDefaultAction is a wrapper around g_notification_set_default_action(). func (v *Notification) SetDefaultAction(detailedAction string) { cstr1 := (* /*line :66:13*/_Ctype_gchar /*line :66:20*/)(( /*line :66:22*/_Cfunc_CString /*line :66:30*/)(detailedAction)) defer func() func() { _cgo0 := /*line :67:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :67:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :69:38*/v.native(); var _cgo1 *_Ctype_gchar = /*line :69:50*/cstr1; _cgoCheckPointer(_cgo0, nil); /*line :69:56*/_Cfunc_g_notification_set_default_action(_cgo0, _cgo1); }() } // AddButton is a wrapper around g_notification_add_button(). func (v *Notification) AddButton(label, detailedAction string) { cstr1 := (* /*line :74:13*/_Ctype_gchar /*line :74:20*/)(( /*line :74:22*/_Cfunc_CString /*line :74:30*/)(label)) defer func() func() { _cgo0 := /*line :75:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :75:37*/_Cfunc_free(_cgo0); }}()() cstr2 := (* /*line :77:13*/_Ctype_gchar /*line :77:20*/)(( /*line :77:22*/_Cfunc_CString /*line :77:30*/)(detailedAction)) defer func() func() { _cgo0 := /*line :78:15*/unsafe.Pointer(cstr2); return func() { _cgoCheckPointer(_cgo0, nil); /*line :78:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :80:30*/v.native(); var _cgo1 *_Ctype_gchar = /*line :80:42*/cstr1; var _cgo2 *_Ctype_gchar = /*line :80:49*/cstr2; _cgoCheckPointer(_cgo0, nil); /*line :80:55*/_Cfunc_g_notification_add_button(_cgo0, _cgo1, _cgo2); }() } // SetIcon is a wrapper around g_notification_set_icon(). func (v *Notification) SetIcon(iconPath string) { fileIcon := FileIconNew(iconPath) func() { _cgo0 := /*line :87:28*/v.native(); _cgo1 := /*line :87:40*/(*_Ctype_GIcon /*line :87:49*/)(fileIcon.native()); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :87:70*/_Cfunc_g_notification_set_icon(_cgo0, _cgo1); }() } // void g_notification_set_default_action_and_target () // requires varargs // void g_notification_set_default_action_and_target_value () // requires variant // void g_notification_add_button_with_target () // requires varargs // void g_notification_add_button_with_target_value () //requires variant // void g_notification_set_urgent () // Deprecated, so not implemented