Cthulhu is no longer a fork. Now it is a screen reader written in Golang.
This commit is contained in:
1 parent
a998fe67de
commit
069fc674dc
708 files changed
+112482
-532
No files matched your search
@@ -0,0 +1,35 @@
|
||||
// Copyright (c) 2026 Storm Dragon
|
||||
// Authors: Storm Dragon, Angus Kola
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
package app
|
||||
|
||||
import (
|
||||
"git.stormux.org/storm/cthulhu/internal/config"
|
||||
"git.stormux.org/storm/cthulhu/internal/wine"
|
||||
"sync/atomic"
|
||||
)
|
||||
|
||||
// Published settings are immutable snapshots shared by the preferences, input,
|
||||
// and accessibility workers. Each event uses one complete snapshot.
|
||||
type liveSettings struct {
|
||||
current atomic.Pointer[config.Settings]
|
||||
application atomic.Pointer[string]
|
||||
requestedApplication atomic.Pointer[string]
|
||||
clipboardChanges chan struct{}
|
||||
onApplication func(string)
|
||||
wineTitles chan wineWindowTitle
|
||||
wineReview *wine.ReviewRegistry
|
||||
}
|
||||
|
||||
func (live *liveSettings) Store(settings config.Settings) {
|
||||
live.current.Store(&settings)
|
||||
live.notify_clipboard()
|
||||
}
|
||||
func (live *liveSettings) notify_clipboard() {
|
||||
select {
|
||||
case live.clipboardChanges <- struct{}{}:
|
||||
default:
|
||||
}
|
||||
}
|
||||
func (live *liveSettings) Load() config.Settings { return *live.current.Load() }
|
||||
Reference in new issue
Block a user