Skip to content

Commit

Permalink
Merge pull request gotk3#931 from mintsoft/fix_callback
Browse files Browse the repository at this point in the history
Fixing undefined: callback
  • Loading branch information
andre-hub authored Jun 18, 2024
2 parents 3cef00d + 032d730 commit ff349ae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gdk/gdk_since_3_22.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"unsafe"

"github.com/gotk3/gotk3/glib"
"github.com/gotk3/gotk3/internal/callback"
)

func init() {
Expand Down Expand Up @@ -137,7 +138,12 @@ func (v *Seat) GetDisplay() (*Display, error) {

// Grab is a wrapper around gdk_seat_grab().
func (v *Seat) Grab(window *Window, capabilities SeatCapabilities, owner_events bool, cursor *Cursor, event *Event, prepare_func GrabPrepareFunc, prepare_func_data C.gpointer) GrabStatus {
return GrabStatus(C.gdk_seat_grab(v.native(), window.native(), C.GdkSeatCapabilities(capabilities), gbool(owner_events), cursor.native(), event.native(), (*[0]byte)(C.gpointer(callback.Assign(prepare_func))), prepare_func_data))
prepare_func_wrapped := (*[0]byte)(nil)
if(prepare_func != nil) {
prepare_func_wrapped = (*[0]byte)(C.gpointer(callback.Assign(prepare_func)))
}

return GrabStatus(C.gdk_seat_grab(v.native(), window.native(), C.GdkSeatCapabilities(capabilities), gbool(owner_events), cursor.native(), event.native(), prepare_func_wrapped, prepare_func_data))
}

// UnGrab is a wrapper around gdk_seat_ungrab().
Expand Down

0 comments on commit ff349ae

Please sign in to comment.