Пример #1
0
// Enables receiving mouse input from Getch.
func Mousemask(mask MouseMask) MouseMask {
	var old C.mmask_t

	C.mousemask(C.mmask_t(mask), &old)

	return MouseMask(old)
}
Пример #2
0
func (m mMask) addEvents(mask int) {
	m = mMask(C.mousemask(C.mmask_t(mask|int(m)), nil))
}
Пример #3
0
func (m mMask) removeEvents(mask int) {
	m = mMask(C.mousemask(C.mmask_t(mask&^int(m)), nil))
}
Пример #4
0
/* Initializes the mouse (must be done after nc.Init). Returns a mouse object, with events enabled from variable mask. */
func InitMouse(mask int) *Mouse {
	mmask := mMask(C.mousemask(C.mmask_t(mask), nil))
	event := C.MEVENT{}
	return &Mouse{mmask, &event}
}