Cthulhu is no longer a fork. Now it is a screen reader written in Golang.

This commit is contained in:
Storm Dragon committed 2026-10-14 00:16:34 -04:00
1 parent a998fe67de
commit 069fc674dc
708 files changed
+112482 -532

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
// Copyright (c) 2026 Storm Dragon
// Authors: Storm Dragon, Angus Kola
// SPDX-License-Identifier: GPL-3.0-or-later
package atspi
import "git.stormux.org/storm/cthulhu/internal/platform/xorg"
// ForegroundTitle binds copied title metadata to the foreground ownership epoch.
type ForegroundTitle struct {
Title xorg.WindowTitle
Epoch uint64
}
func (adapter *Adapter) ForegroundTitle() ForegroundTitle {
if title := adapter.foregroundTitle.Load(); title != nil {
return *title
}
return ForegroundTitle{}
}
func (adapter *Adapter) TitleChanges() <-chan struct{} { return adapter.titleChanges }
// Called only by the GLib owner; consumers never issue X11 requests.
func (adapter *Adapter) refreshWindowTitle() {
state := adapter.Foreground()
value := ForegroundTitle{Title: adapter.foregroundReader.ReadTitle(state.Client.Window), Epoch: state.Epoch}
if value == adapter.ForegroundTitle() {
return
}
adapter.foregroundTitle.Store(&value)
select {
case adapter.titleChanges <- struct{}{}:
default:
}
}