detached 88a2e86

feat(port): add Texture interface for favicon abstraction

Introduce Texture interface in port layer for clean architecture abstraction over gdk.Texture, avoiding GTK imports in application layer. Add OnFaviconChanged callback to WebViewCallbacks for favicon change notifications.
commit
88a2e8688a61581e441d62cb6eecdc30e9e67681
author
brice · · 2025-12-15 17:53 UTC
committer
brice · · 2025-12-15 17:56 UTC
parent
4130d3e
signature
unsigned
1 file · +11 -0
M internal/application/port/webview.go +11 -0
@@ -60,6 +60,14 @@ type PopupRequest struct {
6060 ParentViewID WebViewID
6161 }
6262
63+// Texture represents a graphics texture (abstraction over gdk.Texture).
64+// This interface allows the port layer to work with textures without
65+// importing GTK/GDK packages directly.
66+type Texture interface {
67+ // GoPointer returns the underlying C pointer for GTK interop.
68+ GoPointer() uintptr
69+}
70+
6371 // WebViewCallbacks defines callback handlers for WebView events.
6472 // Implementations should invoke these on the main thread/goroutine.
6573 type WebViewCallbacks struct {
@@ -71,6 +79,9 @@ type WebViewCallbacks struct {
7179 OnURIChanged func(uri string)
7280 // OnProgressChanged is called during page load with progress 0.0-1.0.
7381 OnProgressChanged func(progress float64)
82+ // OnFaviconChanged is called when the page favicon changes.
83+ // The parameter is a *gdk.Texture (passed as Texture interface to avoid GTK import in port layer).
84+ OnFaviconChanged func(favicon Texture)
7485 // OnClose is called when the WebView requests to close.
7586 OnClose func()
7687 // OnCreate is called when a popup window is requested.
@@ -60,6 +60,14 @@ type PopupRequest struct {
60 ParentViewID WebViewID60 ParentViewID WebViewID
61 }61 }
62 62
63+// Texture represents a graphics texture (abstraction over gdk.Texture).
64+// This interface allows the port layer to work with textures without
65+// importing GTK/GDK packages directly.
66+type Texture interface {
67+ // GoPointer returns the underlying C pointer for GTK interop.
68+ GoPointer() uintptr
69+}
70+
63 // WebViewCallbacks defines callback handlers for WebView events.71 // WebViewCallbacks defines callback handlers for WebView events.
64 // Implementations should invoke these on the main thread/goroutine.72 // Implementations should invoke these on the main thread/goroutine.
65 type WebViewCallbacks struct {73 type WebViewCallbacks struct {
@@ -71,6 +79,9 @@ type WebViewCallbacks struct {
71 OnURIChanged func(uri string)79 OnURIChanged func(uri string)
72 // OnProgressChanged is called during page load with progress 0.0-1.0.80 // OnProgressChanged is called during page load with progress 0.0-1.0.
73 OnProgressChanged func(progress float64)81 OnProgressChanged func(progress float64)
82+ // OnFaviconChanged is called when the page favicon changes.
83+ // The parameter is a *gdk.Texture (passed as Texture interface to avoid GTK import in port layer).
84+ OnFaviconChanged func(favicon Texture)
74 // OnClose is called when the WebView requests to close.85 // OnClose is called when the WebView requests to close.
75 OnClose func()86 OnClose func()
76 // OnCreate is called when a popup window is requested.87 // OnCreate is called when a popup window is requested.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close