After commit c018f5fd29 Fenrir is being switched over to go. If you do not want to be part of the testing process, please switch to master.

This commit is contained in:
Storm Dragon committed 2026-10-27 20:30:55 -04:00
1 parent c018f5fd29
commit 0e50de4c76
1047 files changed
+58364 -63747

No files matched your search

+55
View File
@@ -0,0 +1,55 @@
// Copyright (c) 2026 Storm Dragon
// SPDX-License-Identifier: GPL-3.0-or-later
package app
import (
"strconv"
"strings"
)
func (a *application) reading_regions_changed() {
a.spellFeedback++
if a.cues != nil {
a.cues.Clear_progress()
}
// Changing a filter must not make an old, newly exposed prompt restore
// speech. Observe it now as a baseline, without presenting the result.
a.prompts.Observe(a.engine.Automatic_snapshot())
}
// remote_window runs only after the existing section-specific authorization.
// Python accepts these operations in both COMMAND and SETTING sections. Remote
// coordinates are zero-based inclusive cells, unlike spoken row/column reports.
func (a *application) remote_window(text string) (string, bool) {
fields := strings.Fields(text)
if len(fields) == 0 {
return "", false
}
switch strings.ToUpper(fields[0]) {
case "WINDOW":
if len(fields) != 5 {
return "WINDOW requires four coordinates: x1 y1 x2 y2", true
}
var coordinates [4]int
for index := range coordinates {
value, err := strconv.Atoi(fields[index+1])
if err != nil {
return "Invalid WINDOW coordinate", true
}
coordinates[index] = value
}
if err := a.engine.Set_window(coordinates[0], coordinates[1], coordinates[2], coordinates[3]); err != nil {
return err.Error(), true
}
case "RESETWINDOW":
if len(fields) != 1 {
return "RESETWINDOW does not accept coordinates", true
}
a.engine.Clear_window()
default:
return "", false
}
a.reading_regions_changed()
return "", true
}