refactor(port): rename GTKEntryInputTarget and improve engine-neutral doc comments
- commit
- dbd974ed21026c1d805a835d61704ba62379de79
- author
- brice · · 2026-03-18 05:46 UTC
- parent
- 3d33f1d
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
7 files · +49 -49
M .mockery.yaml +1 -1
| @@ -55,7 +55,7 @@ packages: | |||
| 55 | 55 | FilterManager: {} | |
| 56 | 56 | Focusable: {} | |
| 57 | 57 | FindController: {} | |
| 58 | - | GTKEntryInputTarget: {} | |
| 58 | + | EntryInputTarget: {} | |
| 59 | 59 | HomepageFavorites: {} | |
| 60 | 60 | HomepageHistory: {} | |
| 61 | 61 | AllKeybindingsResetter: {} | |
| @@ -55,7 +55,7 @@ packages: | |||||
| 55 | FilterManager: {} | 55 | FilterManager: {} | ||
| 56 | Focusable: {} | 56 | Focusable: {} | ||
| 57 | FindController: {} | 57 | FindController: {} | ||
| 58 | - | GTKEntryInputTarget: {} | 58 | + | EntryInputTarget: {} |
| 59 | HomepageFavorites: {} | 59 | HomepageFavorites: {} | ||
| 60 | HomepageHistory: {} | 60 | HomepageHistory: {} | ||
| 61 | AllKeybindingsResetter: {} | 61 | AllKeybindingsResetter: {} | ||
M internal/application/port/engine.go +3 -2
| @@ -222,8 +222,9 @@ type ScriptRefresher interface { | |||
| 222 | 222 | } | |
| 223 | 223 | ||
| 224 | 224 | // NativeWidgetProvider is an optional capability for WebViews that can provide | |
| 225 | - | // a native GTK widget pointer for embedding into the UI layout. | |
| 225 | + | // a native widget pointer for embedding into the host toolkit's layout system. | |
| 226 | + | // For GTK-based engines this returns a *gtk.Widget pointer; other engines | |
| 227 | + | // provide their equivalent embedding handle. | |
| 226 | 228 | type NativeWidgetProvider interface { | |
| 227 | - | // NativeWidget returns the underlying native widget pointer. | |
| 228 | 229 | NativeWidget() uintptr | |
| 229 | 230 | } | |
| @@ -222,8 +222,9 @@ type ScriptRefresher interface { | |||||
| 222 | } | 222 | } | ||
| 223 | 223 | ||||
| 224 | // NativeWidgetProvider is an optional capability for WebViews that can provide | 224 | // NativeWidgetProvider is an optional capability for WebViews that can provide | ||
| 225 | - | // a native GTK widget pointer for embedding into the UI layout. | 225 | + | // a native widget pointer for embedding into the host toolkit's layout system. |
| 226 | + | // For GTK-based engines this returns a *gtk.Widget pointer; other engines | |||
| 227 | + | // provide their equivalent embedding handle. | |||
| 226 | type NativeWidgetProvider interface { | 228 | type NativeWidgetProvider interface { | ||
| 227 | - | // NativeWidget returns the underlying native widget pointer. | |||
| 228 | NativeWidget() uintptr | 229 | NativeWidget() uintptr | ||
| 229 | } | 230 | } | ||
M internal/application/port/mocks/mocks.go +36 -36
| @@ -9525,13 +9525,13 @@ func (_c *MockFocusable_Focus_Call) RunAndReturn(run func(ctx context.Context)) | |||
| 9525 | 9525 | return _c | |
| 9526 | 9526 | } | |
| 9527 | 9527 | ||
| 9528 | - | // NewMockGTKEntryInputTarget creates a new instance of MockGTKEntryInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 9528 | + | // NewMockEntryInputTarget creates a new instance of MockEntryInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | |
| 9529 | 9529 | // The first argument is typically a *testing.T value. | |
| 9530 | - | func NewMockGTKEntryInputTarget(t interface { | |
| 9530 | + | func NewMockEntryInputTarget(t interface { | |
| 9531 | 9531 | mock.TestingT | |
| 9532 | 9532 | Cleanup(func()) | |
| 9533 | - | }) *MockGTKEntryInputTarget { | |
| 9534 | - | mock := &MockGTKEntryInputTarget{} | |
| 9533 | + | }) *MockEntryInputTarget { | |
| 9534 | + | mock := &MockEntryInputTarget{} | |
| 9535 | 9535 | mock.Mock.Test(t) | |
| 9536 | 9536 | ||
| 9537 | 9537 | t.Cleanup(func() { mock.AssertExpectations(t) }) | |
| @@ -9539,21 +9539,21 @@ func NewMockGTKEntryInputTarget(t interface { | |||
| 9539 | 9539 | return mock | |
| 9540 | 9540 | } | |
| 9541 | 9541 | ||
| 9542 | - | // MockGTKEntryInputTarget is an autogenerated mock type for the GTKEntryInputTarget type | |
| 9543 | - | type MockGTKEntryInputTarget struct { | |
| 9542 | + | // MockEntryInputTarget is an autogenerated mock type for the EntryInputTarget type | |
| 9543 | + | type MockEntryInputTarget struct { | |
| 9544 | 9544 | mock.Mock | |
| 9545 | 9545 | } | |
| 9546 | 9546 | ||
| 9547 | - | type MockGTKEntryInputTarget_Expecter struct { | |
| 9547 | + | type MockEntryInputTarget_Expecter struct { | |
| 9548 | 9548 | mock *mock.Mock | |
| 9549 | 9549 | } | |
| 9550 | 9550 | ||
| 9551 | - | func (_m *MockGTKEntryInputTarget) EXPECT() *MockGTKEntryInputTarget_Expecter { | |
| 9552 | - | return &MockGTKEntryInputTarget_Expecter{mock: &_m.Mock} | |
| 9551 | + | func (_m *MockEntryInputTarget) EXPECT() *MockEntryInputTarget_Expecter { | |
| 9552 | + | return &MockEntryInputTarget_Expecter{mock: &_m.Mock} | |
| 9553 | 9553 | } | |
| 9554 | 9554 | ||
| 9555 | - | // DeleteBeforeCursor provides a mock function for the type MockGTKEntryInputTarget | |
| 9556 | - | func (_mock *MockGTKEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error { | |
| 9555 | + | // DeleteBeforeCursor provides a mock function for the type MockEntryInputTarget | |
| 9556 | + | func (_mock *MockEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error { | |
| 9557 | 9557 | ret := _mock.Called(ctx, n) | |
| 9558 | 9558 | ||
| 9559 | 9559 | if len(ret) == 0 { | |
| @@ -9569,19 +9569,19 @@ func (_mock *MockGTKEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n | |||
| 9569 | 9569 | return r0 | |
| 9570 | 9570 | } | |
| 9571 | 9571 | ||
| 9572 | - | // MockGTKEntryInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor' | |
| 9573 | - | type MockGTKEntryInputTarget_DeleteBeforeCursor_Call struct { | |
| 9572 | + | // MockEntryInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor' | |
| 9573 | + | type MockEntryInputTarget_DeleteBeforeCursor_Call struct { | |
| 9574 | 9574 | *mock.Call | |
| 9575 | 9575 | } | |
| 9576 | 9576 | ||
| 9577 | 9577 | // DeleteBeforeCursor is a helper method to define mock.On call | |
| 9578 | 9578 | // - ctx context.Context | |
| 9579 | 9579 | // - n int | |
| 9580 | - | func (_e *MockGTKEntryInputTarget_Expecter) DeleteBeforeCursor(ctx interface{}, n interface{}) *MockGTKEntryInputTarget_DeleteBeforeCursor_Call { | |
| 9581 | - | return &MockGTKEntryInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)} | |
| 9580 | + | func (_e *MockEntryInputTarget_Expecter) DeleteBeforeCursor(ctx interface{}, n interface{}) *MockEntryInputTarget_DeleteBeforeCursor_Call { | |
| 9581 | + | return &MockEntryInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)} | |
| 9582 | 9582 | } | |
| 9583 | 9583 | ||
| 9584 | - | func (_c *MockGTKEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockGTKEntryInputTarget_DeleteBeforeCursor_Call { | |
| 9584 | + | func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockEntryInputTarget_DeleteBeforeCursor_Call { | |
| 9585 | 9585 | _c.Call.Run(func(args mock.Arguments) { | |
| 9586 | 9586 | var arg0 context.Context | |
| 9587 | 9587 | if args[0] != nil { | |
| @@ -9599,18 +9599,18 @@ func (_c *MockGTKEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx cont | |||
| 9599 | 9599 | return _c | |
| 9600 | 9600 | } | |
| 9601 | 9601 | ||
| 9602 | - | func (_c *MockGTKEntryInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockGTKEntryInputTarget_DeleteBeforeCursor_Call { | |
| 9602 | + | func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockEntryInputTarget_DeleteBeforeCursor_Call { | |
| 9603 | 9603 | _c.Call.Return(err) | |
| 9604 | 9604 | return _c | |
| 9605 | 9605 | } | |
| 9606 | 9606 | ||
| 9607 | - | func (_c *MockGTKEntryInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockGTKEntryInputTarget_DeleteBeforeCursor_Call { | |
| 9607 | + | func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockEntryInputTarget_DeleteBeforeCursor_Call { | |
| 9608 | 9608 | _c.Call.Return(run) | |
| 9609 | 9609 | return _c | |
| 9610 | 9610 | } | |
| 9611 | 9611 | ||
| 9612 | - | // InsertText provides a mock function for the type MockGTKEntryInputTarget | |
| 9613 | - | func (_mock *MockGTKEntryInputTarget) InsertText(ctx context.Context, text string) error { | |
| 9612 | + | // InsertText provides a mock function for the type MockEntryInputTarget | |
| 9613 | + | func (_mock *MockEntryInputTarget) InsertText(ctx context.Context, text string) error { | |
| 9614 | 9614 | ret := _mock.Called(ctx, text) | |
| 9615 | 9615 | ||
| 9616 | 9616 | if len(ret) == 0 { | |
| @@ -9626,19 +9626,19 @@ func (_mock *MockGTKEntryInputTarget) InsertText(ctx context.Context, text strin | |||
| 9626 | 9626 | return r0 | |
| 9627 | 9627 | } | |
| 9628 | 9628 | ||
| 9629 | - | // MockGTKEntryInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText' | |
| 9630 | - | type MockGTKEntryInputTarget_InsertText_Call struct { | |
| 9629 | + | // MockEntryInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText' | |
| 9630 | + | type MockEntryInputTarget_InsertText_Call struct { | |
| 9631 | 9631 | *mock.Call | |
| 9632 | 9632 | } | |
| 9633 | 9633 | ||
| 9634 | 9634 | // InsertText is a helper method to define mock.On call | |
| 9635 | 9635 | // - ctx context.Context | |
| 9636 | 9636 | // - text string | |
| 9637 | - | func (_e *MockGTKEntryInputTarget_Expecter) InsertText(ctx interface{}, text interface{}) *MockGTKEntryInputTarget_InsertText_Call { | |
| 9638 | - | return &MockGTKEntryInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)} | |
| 9637 | + | func (_e *MockEntryInputTarget_Expecter) InsertText(ctx interface{}, text interface{}) *MockEntryInputTarget_InsertText_Call { | |
| 9638 | + | return &MockEntryInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)} | |
| 9639 | 9639 | } | |
| 9640 | 9640 | ||
| 9641 | - | func (_c *MockGTKEntryInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockGTKEntryInputTarget_InsertText_Call { | |
| 9641 | + | func (_c *MockEntryInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockEntryInputTarget_InsertText_Call { | |
| 9642 | 9642 | _c.Call.Run(func(args mock.Arguments) { | |
| 9643 | 9643 | var arg0 context.Context | |
| 9644 | 9644 | if args[0] != nil { | |
| @@ -9656,18 +9656,18 @@ func (_c *MockGTKEntryInputTarget_InsertText_Call) Run(run func(ctx context.Cont | |||
| 9656 | 9656 | return _c | |
| 9657 | 9657 | } | |
| 9658 | 9658 | ||
| 9659 | - | func (_c *MockGTKEntryInputTarget_InsertText_Call) Return(err error) *MockGTKEntryInputTarget_InsertText_Call { | |
| 9659 | + | func (_c *MockEntryInputTarget_InsertText_Call) Return(err error) *MockEntryInputTarget_InsertText_Call { | |
| 9660 | 9660 | _c.Call.Return(err) | |
| 9661 | 9661 | return _c | |
| 9662 | 9662 | } | |
| 9663 | 9663 | ||
| 9664 | - | func (_c *MockGTKEntryInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockGTKEntryInputTarget_InsertText_Call { | |
| 9664 | + | func (_c *MockEntryInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockEntryInputTarget_InsertText_Call { | |
| 9665 | 9665 | _c.Call.Return(run) | |
| 9666 | 9666 | return _c | |
| 9667 | 9667 | } | |
| 9668 | 9668 | ||
| 9669 | - | // IsGTKEntryTarget provides a mock function for the type MockGTKEntryInputTarget | |
| 9670 | - | func (_mock *MockGTKEntryInputTarget) IsGTKEntryTarget() bool { | |
| 9669 | + | // IsGTKEntryTarget provides a mock function for the type MockEntryInputTarget | |
| 9670 | + | func (_mock *MockEntryInputTarget) IsGTKEntryTarget() bool { | |
| 9671 | 9671 | ret := _mock.Called() | |
| 9672 | 9672 | ||
| 9673 | 9673 | if len(ret) == 0 { | |
| @@ -9683,29 +9683,29 @@ func (_mock *MockGTKEntryInputTarget) IsGTKEntryTarget() bool { | |||
| 9683 | 9683 | return r0 | |
| 9684 | 9684 | } | |
| 9685 | 9685 | ||
| 9686 | - | // MockGTKEntryInputTarget_IsGTKEntryTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsGTKEntryTarget' | |
| 9687 | - | type MockGTKEntryInputTarget_IsGTKEntryTarget_Call struct { | |
| 9686 | + | // MockEntryInputTarget_IsGTKEntryTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsGTKEntryTarget' | |
| 9687 | + | type MockEntryInputTarget_IsGTKEntryTarget_Call struct { | |
| 9688 | 9688 | *mock.Call | |
| 9689 | 9689 | } | |
| 9690 | 9690 | ||
| 9691 | 9691 | // IsGTKEntryTarget is a helper method to define mock.On call | |
| 9692 | - | func (_e *MockGTKEntryInputTarget_Expecter) IsGTKEntryTarget() *MockGTKEntryInputTarget_IsGTKEntryTarget_Call { | |
| 9693 | - | return &MockGTKEntryInputTarget_IsGTKEntryTarget_Call{Call: _e.mock.On("IsGTKEntryTarget")} | |
| 9692 | + | func (_e *MockEntryInputTarget_Expecter) IsGTKEntryTarget() *MockEntryInputTarget_IsGTKEntryTarget_Call { | |
| 9693 | + | return &MockEntryInputTarget_IsGTKEntryTarget_Call{Call: _e.mock.On("IsGTKEntryTarget")} | |
| 9694 | 9694 | } | |
| 9695 | 9695 | ||
| 9696 | - | func (_c *MockGTKEntryInputTarget_IsGTKEntryTarget_Call) Run(run func()) *MockGTKEntryInputTarget_IsGTKEntryTarget_Call { | |
| 9696 | + | func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Run(run func()) *MockEntryInputTarget_IsGTKEntryTarget_Call { | |
| 9697 | 9697 | _c.Call.Run(func(args mock.Arguments) { | |
| 9698 | 9698 | run() | |
| 9699 | 9699 | }) | |
| 9700 | 9700 | return _c | |
| 9701 | 9701 | } | |
| 9702 | 9702 | ||
| 9703 | - | func (_c *MockGTKEntryInputTarget_IsGTKEntryTarget_Call) Return(b bool) *MockGTKEntryInputTarget_IsGTKEntryTarget_Call { | |
| 9703 | + | func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Return(b bool) *MockEntryInputTarget_IsGTKEntryTarget_Call { | |
| 9704 | 9704 | _c.Call.Return(b) | |
| 9705 | 9705 | return _c | |
| 9706 | 9706 | } | |
| 9707 | 9707 | ||
| 9708 | - | func (_c *MockGTKEntryInputTarget_IsGTKEntryTarget_Call) RunAndReturn(run func() bool) *MockGTKEntryInputTarget_IsGTKEntryTarget_Call { | |
| 9708 | + | func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) RunAndReturn(run func() bool) *MockEntryInputTarget_IsGTKEntryTarget_Call { | |
| 9709 | 9709 | _c.Call.Return(run) | |
| 9710 | 9710 | return _c | |
| 9711 | 9711 | } | |
| @@ -9525,13 +9525,13 @@ func (_c *MockFocusable_Focus_Call) RunAndReturn(run func(ctx context.Context)) | |||||
| 9525 | return _c | 9525 | return _c | ||
| 9526 | } | 9526 | } | ||
| 9527 | 9527 | ||||
| 9528 | - | // NewMockGTKEntryInputTarget creates a new instance of MockGTKEntryInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. | 9528 | + | // NewMockEntryInputTarget creates a new instance of MockEntryInputTarget. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. |
| 9529 | // The first argument is typically a *testing.T value. | 9529 | // The first argument is typically a *testing.T value. | ||
| 9530 | - | func NewMockGTKEntryInputTarget(t interface { | 9530 | + | func NewMockEntryInputTarget(t interface { |
| 9531 | mock.TestingT | 9531 | mock.TestingT | ||
| 9532 | Cleanup(func()) | 9532 | Cleanup(func()) | ||
| 9533 | - | }) *MockGTKEntryInputTarget { | 9533 | + | }) *MockEntryInputTarget { |
| 9534 | - | mock := &MockGTKEntryInputTarget{} | 9534 | + | mock := &MockEntryInputTarget{} |
| 9535 | mock.Mock.Test(t) | 9535 | mock.Mock.Test(t) | ||
| 9536 | 9536 | ||||
| 9537 | t.Cleanup(func() { mock.AssertExpectations(t) }) | 9537 | t.Cleanup(func() { mock.AssertExpectations(t) }) | ||
| @@ -9539,21 +9539,21 @@ func NewMockGTKEntryInputTarget(t interface { | |||||
| 9539 | return mock | 9539 | return mock | ||
| 9540 | } | 9540 | } | ||
| 9541 | 9541 | ||||
| 9542 | - | // MockGTKEntryInputTarget is an autogenerated mock type for the GTKEntryInputTarget type | 9542 | + | // MockEntryInputTarget is an autogenerated mock type for the EntryInputTarget type |
| 9543 | - | type MockGTKEntryInputTarget struct { | 9543 | + | type MockEntryInputTarget struct { |
| 9544 | mock.Mock | 9544 | mock.Mock | ||
| 9545 | } | 9545 | } | ||
| 9546 | 9546 | ||||
| 9547 | - | type MockGTKEntryInputTarget_Expecter struct { | 9547 | + | type MockEntryInputTarget_Expecter struct { |
| 9548 | mock *mock.Mock | 9548 | mock *mock.Mock | ||
| 9549 | } | 9549 | } | ||
| 9550 | 9550 | ||||
| 9551 | - | func (_m *MockGTKEntryInputTarget) EXPECT() *MockGTKEntryInputTarget_Expecter { | 9551 | + | func (_m *MockEntryInputTarget) EXPECT() *MockEntryInputTarget_Expecter { |
| 9552 | - | return &MockGTKEntryInputTarget_Expecter{mock: &_m.Mock} | 9552 | + | return &MockEntryInputTarget_Expecter{mock: &_m.Mock} |
| 9553 | } | 9553 | } | ||
| 9554 | 9554 | ||||
| 9555 | - | // DeleteBeforeCursor provides a mock function for the type MockGTKEntryInputTarget | 9555 | + | // DeleteBeforeCursor provides a mock function for the type MockEntryInputTarget |
| 9556 | - | func (_mock *MockGTKEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error { | 9556 | + | func (_mock *MockEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n int) error { |
| 9557 | ret := _mock.Called(ctx, n) | 9557 | ret := _mock.Called(ctx, n) | ||
| 9558 | 9558 | ||||
| 9559 | if len(ret) == 0 { | 9559 | if len(ret) == 0 { | ||
| @@ -9569,19 +9569,19 @@ func (_mock *MockGTKEntryInputTarget) DeleteBeforeCursor(ctx context.Context, n | |||||
| 9569 | return r0 | 9569 | return r0 | ||
| 9570 | } | 9570 | } | ||
| 9571 | 9571 | ||||
| 9572 | - | // MockGTKEntryInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor' | 9572 | + | // MockEntryInputTarget_DeleteBeforeCursor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBeforeCursor' |
| 9573 | - | type MockGTKEntryInputTarget_DeleteBeforeCursor_Call struct { | 9573 | + | type MockEntryInputTarget_DeleteBeforeCursor_Call struct { |
| 9574 | *mock.Call | 9574 | *mock.Call | ||
| 9575 | } | 9575 | } | ||
| 9576 | 9576 | ||||
| 9577 | // DeleteBeforeCursor is a helper method to define mock.On call | 9577 | // DeleteBeforeCursor is a helper method to define mock.On call | ||
| 9578 | // - ctx context.Context | 9578 | // - ctx context.Context | ||
| 9579 | // - n int | 9579 | // - n int | ||
| 9580 | - | func (_e *MockGTKEntryInputTarget_Expecter) DeleteBeforeCursor(ctx interface{}, n interface{}) *MockGTKEntryInputTarget_DeleteBeforeCursor_Call { | 9580 | + | func (_e *MockEntryInputTarget_Expecter) DeleteBeforeCursor(ctx interface{}, n interface{}) *MockEntryInputTarget_DeleteBeforeCursor_Call { |
| 9581 | - | return &MockGTKEntryInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)} | 9581 | + | return &MockEntryInputTarget_DeleteBeforeCursor_Call{Call: _e.mock.On("DeleteBeforeCursor", ctx, n)} |
| 9582 | } | 9582 | } | ||
| 9583 | 9583 | ||||
| 9584 | - | func (_c *MockGTKEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockGTKEntryInputTarget_DeleteBeforeCursor_Call { | 9584 | + | func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx context.Context, n int)) *MockEntryInputTarget_DeleteBeforeCursor_Call { |
| 9585 | _c.Call.Run(func(args mock.Arguments) { | 9585 | _c.Call.Run(func(args mock.Arguments) { | ||
| 9586 | var arg0 context.Context | 9586 | var arg0 context.Context | ||
| 9587 | if args[0] != nil { | 9587 | if args[0] != nil { | ||
| @@ -9599,18 +9599,18 @@ func (_c *MockGTKEntryInputTarget_DeleteBeforeCursor_Call) Run(run func(ctx cont | |||||
| 9599 | return _c | 9599 | return _c | ||
| 9600 | } | 9600 | } | ||
| 9601 | 9601 | ||||
| 9602 | - | func (_c *MockGTKEntryInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockGTKEntryInputTarget_DeleteBeforeCursor_Call { | 9602 | + | func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) Return(err error) *MockEntryInputTarget_DeleteBeforeCursor_Call { |
| 9603 | _c.Call.Return(err) | 9603 | _c.Call.Return(err) | ||
| 9604 | return _c | 9604 | return _c | ||
| 9605 | } | 9605 | } | ||
| 9606 | 9606 | ||||
| 9607 | - | func (_c *MockGTKEntryInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockGTKEntryInputTarget_DeleteBeforeCursor_Call { | 9607 | + | func (_c *MockEntryInputTarget_DeleteBeforeCursor_Call) RunAndReturn(run func(ctx context.Context, n int) error) *MockEntryInputTarget_DeleteBeforeCursor_Call { |
| 9608 | _c.Call.Return(run) | 9608 | _c.Call.Return(run) | ||
| 9609 | return _c | 9609 | return _c | ||
| 9610 | } | 9610 | } | ||
| 9611 | 9611 | ||||
| 9612 | - | // InsertText provides a mock function for the type MockGTKEntryInputTarget | 9612 | + | // InsertText provides a mock function for the type MockEntryInputTarget |
| 9613 | - | func (_mock *MockGTKEntryInputTarget) InsertText(ctx context.Context, text string) error { | 9613 | + | func (_mock *MockEntryInputTarget) InsertText(ctx context.Context, text string) error { |
| 9614 | ret := _mock.Called(ctx, text) | 9614 | ret := _mock.Called(ctx, text) | ||
| 9615 | 9615 | ||||
| 9616 | if len(ret) == 0 { | 9616 | if len(ret) == 0 { | ||
| @@ -9626,19 +9626,19 @@ func (_mock *MockGTKEntryInputTarget) InsertText(ctx context.Context, text strin | |||||
| 9626 | return r0 | 9626 | return r0 | ||
| 9627 | } | 9627 | } | ||
| 9628 | 9628 | ||||
| 9629 | - | // MockGTKEntryInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText' | 9629 | + | // MockEntryInputTarget_InsertText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertText' |
| 9630 | - | type MockGTKEntryInputTarget_InsertText_Call struct { | 9630 | + | type MockEntryInputTarget_InsertText_Call struct { |
| 9631 | *mock.Call | 9631 | *mock.Call | ||
| 9632 | } | 9632 | } | ||
| 9633 | 9633 | ||||
| 9634 | // InsertText is a helper method to define mock.On call | 9634 | // InsertText is a helper method to define mock.On call | ||
| 9635 | // - ctx context.Context | 9635 | // - ctx context.Context | ||
| 9636 | // - text string | 9636 | // - text string | ||
| 9637 | - | func (_e *MockGTKEntryInputTarget_Expecter) InsertText(ctx interface{}, text interface{}) *MockGTKEntryInputTarget_InsertText_Call { | 9637 | + | func (_e *MockEntryInputTarget_Expecter) InsertText(ctx interface{}, text interface{}) *MockEntryInputTarget_InsertText_Call { |
| 9638 | - | return &MockGTKEntryInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)} | 9638 | + | return &MockEntryInputTarget_InsertText_Call{Call: _e.mock.On("InsertText", ctx, text)} |
| 9639 | } | 9639 | } | ||
| 9640 | 9640 | ||||
| 9641 | - | func (_c *MockGTKEntryInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockGTKEntryInputTarget_InsertText_Call { | 9641 | + | func (_c *MockEntryInputTarget_InsertText_Call) Run(run func(ctx context.Context, text string)) *MockEntryInputTarget_InsertText_Call { |
| 9642 | _c.Call.Run(func(args mock.Arguments) { | 9642 | _c.Call.Run(func(args mock.Arguments) { | ||
| 9643 | var arg0 context.Context | 9643 | var arg0 context.Context | ||
| 9644 | if args[0] != nil { | 9644 | if args[0] != nil { | ||
| @@ -9656,18 +9656,18 @@ func (_c *MockGTKEntryInputTarget_InsertText_Call) Run(run func(ctx context.Cont | |||||
| 9656 | return _c | 9656 | return _c | ||
| 9657 | } | 9657 | } | ||
| 9658 | 9658 | ||||
| 9659 | - | func (_c *MockGTKEntryInputTarget_InsertText_Call) Return(err error) *MockGTKEntryInputTarget_InsertText_Call { | 9659 | + | func (_c *MockEntryInputTarget_InsertText_Call) Return(err error) *MockEntryInputTarget_InsertText_Call { |
| 9660 | _c.Call.Return(err) | 9660 | _c.Call.Return(err) | ||
| 9661 | return _c | 9661 | return _c | ||
| 9662 | } | 9662 | } | ||
| 9663 | 9663 | ||||
| 9664 | - | func (_c *MockGTKEntryInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockGTKEntryInputTarget_InsertText_Call { | 9664 | + | func (_c *MockEntryInputTarget_InsertText_Call) RunAndReturn(run func(ctx context.Context, text string) error) *MockEntryInputTarget_InsertText_Call { |
| 9665 | _c.Call.Return(run) | 9665 | _c.Call.Return(run) | ||
| 9666 | return _c | 9666 | return _c | ||
| 9667 | } | 9667 | } | ||
| 9668 | 9668 | ||||
| 9669 | - | // IsGTKEntryTarget provides a mock function for the type MockGTKEntryInputTarget | 9669 | + | // IsGTKEntryTarget provides a mock function for the type MockEntryInputTarget |
| 9670 | - | func (_mock *MockGTKEntryInputTarget) IsGTKEntryTarget() bool { | 9670 | + | func (_mock *MockEntryInputTarget) IsGTKEntryTarget() bool { |
| 9671 | ret := _mock.Called() | 9671 | ret := _mock.Called() | ||
| 9672 | 9672 | ||||
| 9673 | if len(ret) == 0 { | 9673 | if len(ret) == 0 { | ||
| @@ -9683,29 +9683,29 @@ func (_mock *MockGTKEntryInputTarget) IsGTKEntryTarget() bool { | |||||
| 9683 | return r0 | 9683 | return r0 | ||
| 9684 | } | 9684 | } | ||
| 9685 | 9685 | ||||
| 9686 | - | // MockGTKEntryInputTarget_IsGTKEntryTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsGTKEntryTarget' | 9686 | + | // MockEntryInputTarget_IsGTKEntryTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsGTKEntryTarget' |
| 9687 | - | type MockGTKEntryInputTarget_IsGTKEntryTarget_Call struct { | 9687 | + | type MockEntryInputTarget_IsGTKEntryTarget_Call struct { |
| 9688 | *mock.Call | 9688 | *mock.Call | ||
| 9689 | } | 9689 | } | ||
| 9690 | 9690 | ||||
| 9691 | // IsGTKEntryTarget is a helper method to define mock.On call | 9691 | // IsGTKEntryTarget is a helper method to define mock.On call | ||
| 9692 | - | func (_e *MockGTKEntryInputTarget_Expecter) IsGTKEntryTarget() *MockGTKEntryInputTarget_IsGTKEntryTarget_Call { | 9692 | + | func (_e *MockEntryInputTarget_Expecter) IsGTKEntryTarget() *MockEntryInputTarget_IsGTKEntryTarget_Call { |
| 9693 | - | return &MockGTKEntryInputTarget_IsGTKEntryTarget_Call{Call: _e.mock.On("IsGTKEntryTarget")} | 9693 | + | return &MockEntryInputTarget_IsGTKEntryTarget_Call{Call: _e.mock.On("IsGTKEntryTarget")} |
| 9694 | } | 9694 | } | ||
| 9695 | 9695 | ||||
| 9696 | - | func (_c *MockGTKEntryInputTarget_IsGTKEntryTarget_Call) Run(run func()) *MockGTKEntryInputTarget_IsGTKEntryTarget_Call { | 9696 | + | func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Run(run func()) *MockEntryInputTarget_IsGTKEntryTarget_Call { |
| 9697 | _c.Call.Run(func(args mock.Arguments) { | 9697 | _c.Call.Run(func(args mock.Arguments) { | ||
| 9698 | run() | 9698 | run() | ||
| 9699 | }) | 9699 | }) | ||
| 9700 | return _c | 9700 | return _c | ||
| 9701 | } | 9701 | } | ||
| 9702 | 9702 | ||||
| 9703 | - | func (_c *MockGTKEntryInputTarget_IsGTKEntryTarget_Call) Return(b bool) *MockGTKEntryInputTarget_IsGTKEntryTarget_Call { | 9703 | + | func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) Return(b bool) *MockEntryInputTarget_IsGTKEntryTarget_Call { |
| 9704 | _c.Call.Return(b) | 9704 | _c.Call.Return(b) | ||
| 9705 | return _c | 9705 | return _c | ||
| 9706 | } | 9706 | } | ||
| 9707 | 9707 | ||||
| 9708 | - | func (_c *MockGTKEntryInputTarget_IsGTKEntryTarget_Call) RunAndReturn(run func() bool) *MockGTKEntryInputTarget_IsGTKEntryTarget_Call { | 9708 | + | func (_c *MockEntryInputTarget_IsGTKEntryTarget_Call) RunAndReturn(run func() bool) *MockEntryInputTarget_IsGTKEntryTarget_Call { |
| 9709 | _c.Call.Return(run) | 9709 | _c.Call.Return(run) | ||
| 9710 | return _c | 9710 | return _c | ||
| 9711 | } | 9711 | } | ||
M internal/application/port/text_input.go +3 -3
| @@ -18,9 +18,9 @@ type Focusable interface { | |||
| 18 | 18 | Focus(ctx context.Context) | |
| 19 | 19 | } | |
| 20 | 20 | ||
| 21 | - | // GTKEntryInputTarget is a marker interface implemented by text input targets | |
| 22 | - | // that wrap a GTK Entry widget. Used for keyboard routing decisions. | |
| 23 | - | type GTKEntryInputTarget interface { | |
| 21 | + | // EntryInputTarget is a marker interface implemented by text input targets | |
| 22 | + | // that wrap a native entry widget. Used for keyboard routing decisions. | |
| 23 | + | type EntryInputTarget interface { | |
| 24 | 24 | TextInputTarget | |
| 25 | 25 | IsGTKEntryTarget() bool | |
| 26 | 26 | } | |
| @@ -18,9 +18,9 @@ type Focusable interface { | |||||
| 18 | Focus(ctx context.Context) | 18 | Focus(ctx context.Context) | ||
| 19 | } | 19 | } | ||
| 20 | 20 | ||||
| 21 | - | // GTKEntryInputTarget is a marker interface implemented by text input targets | 21 | + | // EntryInputTarget is a marker interface implemented by text input targets |
| 22 | - | // that wrap a GTK Entry widget. Used for keyboard routing decisions. | 22 | + | // that wrap a native entry widget. Used for keyboard routing decisions. |
| 23 | - | type GTKEntryInputTarget interface { | 23 | + | type EntryInputTarget interface { |
| 24 | TextInputTarget | 24 | TextInputTarget | ||
| 25 | IsGTKEntryTarget() bool | 25 | IsGTKEntryTarget() bool | ||
| 26 | } | 26 | } | ||
M internal/application/port/webview.go +3 -4
| @@ -70,11 +70,10 @@ type PopupRequest struct { | |||
| 70 | 70 | ParentViewID WebViewID | |
| 71 | 71 | } | |
| 72 | 72 | ||
| 73 | - | // Texture represents a graphics texture (abstraction over gdk.Texture). | |
| 74 | - | // This interface allows the port layer to work with textures without | |
| 75 | - | // importing GTK/GDK packages directly. | |
| 73 | + | // Texture represents a graphics texture returned by the engine. | |
| 74 | + | // GoPointer returns a native toolkit pointer (e.g. *gdk.Texture in GTK engines). | |
| 75 | + | // Engine implementations are responsible for the concrete type. | |
| 76 | 76 | type Texture interface { | |
| 77 | - | // GoPointer returns the underlying C pointer for GTK interop. | |
| 78 | 77 | GoPointer() uintptr | |
| 79 | 78 | } | |
| 80 | 79 | ||
| @@ -70,11 +70,10 @@ type PopupRequest struct { | |||||
| 70 | ParentViewID WebViewID | 70 | ParentViewID WebViewID | ||
| 71 | } | 71 | } | ||
| 72 | 72 | ||||
| 73 | - | // Texture represents a graphics texture (abstraction over gdk.Texture). | 73 | + | // Texture represents a graphics texture returned by the engine. |
| 74 | - | // This interface allows the port layer to work with textures without | 74 | + | // GoPointer returns a native toolkit pointer (e.g. *gdk.Texture in GTK engines). |
| 75 | - | // importing GTK/GDK packages directly. | 75 | + | // Engine implementations are responsible for the concrete type. |
| 76 | type Texture interface { | 76 | type Texture interface { | ||
| 77 | - | // GoPointer returns the underlying C pointer for GTK interop. | |||
| 78 | GoPointer() uintptr | 77 | GoPointer() uintptr | ||
| 79 | } | 78 | } | ||
| 80 | 79 | ||||
M internal/infrastructure/textinput/gtk_entry_target.go +2 -2
| @@ -16,9 +16,9 @@ type GTKEntryTarget struct { | |||
| 16 | 16 | ||
| 17 | 17 | // Compile-time interface checks. | |
| 18 | 18 | var _ port.TextInputTarget = (*GTKEntryTarget)(nil) | |
| 19 | - | var _ port.GTKEntryInputTarget = (*GTKEntryTarget)(nil) | |
| 19 | + | var _ port.EntryInputTarget = (*GTKEntryTarget)(nil) | |
| 20 | 20 | ||
| 21 | - | // IsGTKEntryTarget implements port.GTKEntryInputTarget. | |
| 21 | + | // IsGTKEntryTarget implements port.EntryInputTarget. | |
| 22 | 22 | func (t *GTKEntryTarget) IsGTKEntryTarget() bool { return true } | |
| 23 | 23 | ||
| 24 | 24 | // NewGTKEntryTarget creates a new GTK entry target for a SearchEntry. | |
| @@ -16,9 +16,9 @@ type GTKEntryTarget struct { | |||||
| 16 | 16 | ||||
| 17 | // Compile-time interface checks. | 17 | // Compile-time interface checks. | ||
| 18 | var _ port.TextInputTarget = (*GTKEntryTarget)(nil) | 18 | var _ port.TextInputTarget = (*GTKEntryTarget)(nil) | ||
| 19 | - | var _ port.GTKEntryInputTarget = (*GTKEntryTarget)(nil) | 19 | + | var _ port.EntryInputTarget = (*GTKEntryTarget)(nil) |
| 20 | 20 | ||||
| 21 | - | // IsGTKEntryTarget implements port.GTKEntryInputTarget. | 21 | + | // IsGTKEntryTarget implements port.EntryInputTarget. |
| 22 | func (t *GTKEntryTarget) IsGTKEntryTarget() bool { return true } | 22 | func (t *GTKEntryTarget) IsGTKEntryTarget() bool { return true } | ||
| 23 | 23 | ||||
| 24 | // NewGTKEntryTarget creates a new GTK entry target for a SearchEntry. | 24 | // NewGTKEntryTarget creates a new GTK entry target for a SearchEntry. | ||
M internal/ui/app.go +1 -1
| @@ -677,7 +677,7 @@ func (a *App) initKeyboardHandler(ctx context.Context) { | |||
| 677 | 677 | // visible after focus returns to the WebView, so visibility alone | |
| 678 | 678 | // would misroute keys. | |
| 679 | 679 | if a.accentFocusProvider != nil { | |
| 680 | - | if _, ok := a.accentFocusProvider.GetFocusedInput().(port.GTKEntryInputTarget); ok { | |
| 680 | + | if _, ok := a.accentFocusProvider.GetFocusedInput().(port.EntryInputTarget); ok { | |
| 681 | 681 | // GTK Entry focused (omnibox or find bar): Alt-modified keys go to | |
| 682 | 682 | // shortcuts (pane navigation), other keys pass through to the widget's | |
| 683 | 683 | // own capture-phase key controller (which handles accent detection) | |
| @@ -677,7 +677,7 @@ func (a *App) initKeyboardHandler(ctx context.Context) { | |||||
| 677 | // visible after focus returns to the WebView, so visibility alone | 677 | // visible after focus returns to the WebView, so visibility alone | ||
| 678 | // would misroute keys. | 678 | // would misroute keys. | ||
| 679 | if a.accentFocusProvider != nil { | 679 | if a.accentFocusProvider != nil { | ||
| 680 | - | if _, ok := a.accentFocusProvider.GetFocusedInput().(port.GTKEntryInputTarget); ok { | 680 | + | if _, ok := a.accentFocusProvider.GetFocusedInput().(port.EntryInputTarget); ok { |
| 681 | // GTK Entry focused (omnibox or find bar): Alt-modified keys go to | 681 | // GTK Entry focused (omnibox or find bar): Alt-modified keys go to | ||
| 682 | // shortcuts (pane navigation), other keys pass through to the widget's | 682 | // shortcuts (pane navigation), other keys pass through to the widget's | ||
| 683 | // own capture-phase key controller (which handles accent detection) | 683 | // own capture-phase key controller (which handles accent detection) | ||