Example #1
0
// SetMouseInput enables or disables mouse click events handling. By default,
// those events are handled. This is needed for DVD menus to work, as well as a
// few video filters such as "puzzle".
//
// Note: On X11, there can be only one subscriber for key press and mouse
// click events per window. If your application has subscribed to those events
// for the X window ID of the video widget, then LibVLC will not be able to
// handle key presses and mouse clicks in any case.
//
// Note: This function is only implemented for X11 and Win32 at the moment.
func (this *Player) SetMouseInput(toggle bool) error {
	if this.ptr == nil {
		return syscall.EINVAL
	}

	if toggle {
		C.libvlc_video_set_mouse_input(this.ptr, 1)
	} else {
		C.libvlc_video_set_mouse_input(this.ptr, 0)
	}

	return checkError()
}
Example #2
0
// SetMouseInput enables or disables mouse click events handling. By default,
// those events are handled. This is needed for DVD menus to work, as well as a
// few video filters such as "puzzle".
//
// Note: On X11, there can be only one subscriber for key press and mouse
// click events per window. If your application has subscribed to those events
// for the X window ID of the video widget, then LibVLC will not be able to
// handle key presses and mouse clicks in any case.
//
// Note: This function is only implemented for X11 and Win32 at the moment.
func (this *Player) SetMouseInput(toggle bool) error {
	if this.ptr == nil {
		return &VLCError{"Player is nil"}
	}

	if toggle {
		C.libvlc_video_set_mouse_input(this.ptr, 1)
	} else {
		C.libvlc_video_set_mouse_input(this.ptr, 0)
	}

	return checkError()
}