wails/v3/pkg/application/dialogs_android.go
2025-12-22 19:41:22 +11:00

96 lines
2.2 KiB
Go

//go:build android
package application
// dialogsImpl implements dialogs for Android
type dialogsImpl struct {
// Android-specific fields if needed
}
func newDialogsImpl() *dialogsImpl {
return &dialogsImpl{}
}
// Android dialog implementations would use AlertDialog
// These are placeholder implementations for now
func (d *dialogsImpl) info(id uint, param MessageDialogOptions) {
// TODO: Implement using AlertDialog
}
func (d *dialogsImpl) warning(id uint, param MessageDialogOptions) {
// TODO: Implement using AlertDialog
}
func (d *dialogsImpl) error(id uint, param MessageDialogOptions) {
// TODO: Implement using AlertDialog
}
func (d *dialogsImpl) question(id uint, param MessageDialogOptions) chan bool {
// TODO: Implement using AlertDialog
ch := make(chan bool, 1)
ch <- false
return ch
}
func (d *dialogsImpl) openFile(id uint, param OpenFileDialogOptions) chan string {
// TODO: Implement using Android file picker intent
ch := make(chan string, 1)
ch <- ""
return ch
}
func (d *dialogsImpl) openMultipleFiles(id uint, param OpenFileDialogOptions) chan []string {
// TODO: Implement using Android file picker intent
ch := make(chan []string, 1)
ch <- []string{}
return ch
}
func (d *dialogsImpl) openDirectory(id uint, param OpenFileDialogOptions) chan string {
// TODO: Implement using Android file picker intent
ch := make(chan string, 1)
ch <- ""
return ch
}
func (d *dialogsImpl) saveFile(id uint, param SaveFileDialogOptions) chan string {
// TODO: Implement using Android file picker intent
ch := make(chan string, 1)
ch <- ""
return ch
}
type androidDialog struct {
dialog *MessageDialog
}
func (d *androidDialog) show() error {
// TODO: Implement using AlertDialog
return nil
}
func (d *androidDialog) result() (string, error) {
// TODO: Implement using AlertDialog
return "", nil
}
func newDialogImpl(d *MessageDialog) *androidDialog {
return &androidDialog{
dialog: d,
}
}
func (d *dialogsImpl) show() (chan string, error) {
ch := make(chan string, 1)
ch <- ""
return ch, nil
}
func newOpenFileDialogImpl(_ *OpenFileDialogStruct) openFileDialogImpl {
return &dialogsImpl{}
}
func newSaveFileDialogImpl(_ *SaveFileDialogStruct) saveFileDialogImpl {
return &dialogsImpl{}
}