keyboard.go 714 B

1234567891011121314151617181920212223242526
  1. package mobile
  2. import (
  3. "fyne.io/fyne/v2"
  4. )
  5. // KeyboardType represents a type of virtual keyboard
  6. type KeyboardType int32
  7. const (
  8. // DefaultKeyboard is the keyboard with default input style and "return" return key
  9. DefaultKeyboard KeyboardType = iota
  10. // SingleLineKeyboard is the keyboard with default input style and "Done" return key
  11. SingleLineKeyboard
  12. // NumberKeyboard is the keyboard with number input style and "Done" return key
  13. NumberKeyboard
  14. // PasswordKeyboard is used to ensure that text is not leaked to 3rd party keyboard providers
  15. PasswordKeyboard
  16. )
  17. // Keyboardable describes any CanvasObject that needs a keyboard
  18. type Keyboardable interface {
  19. fyne.Focusable
  20. Keyboard() KeyboardType
  21. }