// 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/gactionmap.go:1:1 package glib // #include // #include // #include // #include "glib.go.h" import _ "unsafe" import "unsafe" // IActionMap is an interface representation of ActionMap, // used to avoid duplication when embedding the type in a wrapper of another GObject-based type. type IActionMap interface { Native() uintptr LookupAction(actionName string) *Action AddAction(action IAction) RemoveAction(actionName string) } // ActionMap is a representation of glib's GActionMap GInterface type ActionMap struct { *Object } // void g_action_map_add_action_entries (GActionMap *action_map, const GActionEntry *entries, gint n_entries, gpointer user_data); // struct GActionEntry // native() returns a pointer to the underlying GActionMap. func (v *ActionMap) native() * /*line :29:31*/_Ctype_GActionMap /*line :29:43*/ { if v == nil || v.GObject == nil { return nil } return func() *_Ctype_struct__GActionMap{ _cgo0 := /*line :33:24*/unsafe.Pointer(v.GObject); _cgoCheckPointer(_cgo0, nil); return /*line :33:50*/_Cfunc_toGActionMap(_cgo0); }() } func (v *ActionMap) Native() uintptr { return uintptr(unsafe.Pointer(v.native())) } func marshalActionMap(p uintptr) (interface{}, error) { c := ( /*line :41:7*/_Cfunc_g_value_get_object /*line :41:26*/)((* /*line :41:30*/_Ctype_GValue /*line :41:38*/)(unsafe.Pointer(p))) return wrapActionMap(wrapObject(unsafe.Pointer(c))), nil } func wrapActionMap(obj *Object) *ActionMap { return &ActionMap{obj} } // LookupAction is a wrapper around g_action_map_lookup_action func (v *ActionMap) LookupAction(actionName string) *Action { c := func() *_Ctype_struct__GAction{ _cgo0 := /*line :51:36*/v.native(); var _cgo1 *_Ctype_gchar = /*line :51:48*/(*_Ctype_gchar /*line :51:57*/)(_Cfunc_CString /*line :51:68*/(actionName)); _cgoCheckPointer(_cgo0, nil); return /*line :51:82*/_Cfunc_g_action_map_lookup_action(_cgo0, _cgo1); }() if c == nil { return nil } return wrapAction(wrapObject(unsafe.Pointer(c))) } // AddAction is a wrapper around g_action_map_add_action func (v *ActionMap) AddAction(action IAction) { func() { _cgo0 := /*line :60:28*/v.native(); _cgo1 := /*line :60:40*/action.toGAction(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :60:59*/_Cfunc_g_action_map_add_action(_cgo0, _cgo1); }() } // RemoveAction is a wrapper around g_action_map_remove_action func (v *ActionMap) RemoveAction(actionName string) { func() { _cgo0 := /*line :65:31*/v.native(); var _cgo1 *_Ctype_gchar = /*line :65:43*/(*_Ctype_gchar /*line :65:52*/)(_Cfunc_CString /*line :65:63*/(actionName)); _cgoCheckPointer(_cgo0, nil); /*line :65:77*/_Cfunc_g_action_map_remove_action(_cgo0, _cgo1); }() }