Пример #1
0
// Options turns features on and off
func (f *Field) Options(opts int, on bool) {
	if on {
		C.field_opts_on((*C.FIELD)(f), C.Field_Options(opts))
		return
	}
	C.field_opts_off((*C.FIELD)(f), C.Field_Options(opts))
}
Пример #2
0
// Options turns features on and off
func (f *Field) Options(opts int, on bool) {
	if on {
		C.field_opts_on(f.field, C.Field_Options(opts))
		return
	}
	C.field_opts_off(f.field, C.Field_Options(opts))
}
Пример #3
0
// OptionsOn turns feature(s) on
func (f *Field) SetOptionsOn(opts Char) error {
	err := int(C.field_opts_on((*C.FIELD)(f), C.Field_Options(opts)))
	if err != C.E_OK {
		return ncursesError(syscall.Errno(err))
	}
	return nil
}
Пример #4
0
// OptionsOff turns feature(s) off
func (f *Field) SetOptionsOff(opts Char) error {
	err := int(C.field_opts_off(f.field, C.Field_Options(opts)))
	if err != C.E_OK {
		return ncursesError(syscall.Errno(err))
	}
	return nil
}