Skip to content

Commit

Permalink
event_noop: rename from event_dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Aug 31, 2024
1 parent 5ef89fc commit 6f039d6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
21 changes: 0 additions & 21 deletions event/event_dummy.go

This file was deleted.

24 changes: 24 additions & 0 deletions event/event_noop.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package event

// NoopEventHandler is an implementation of [EventHandler] interface with all
// methods doing nothing. It is a good starting point to be embedded your own
// struct to be extended.
type NoopEventHandler struct{}

func (e *NoopEventHandler) Workspace(WorkspaceName) {}
func (e *NoopEventHandler) FocusedMonitor(FocusedMonitor) {}
func (e *NoopEventHandler) ActiveWindow(ActiveWindow) {}
func (e *NoopEventHandler) Fullscreen(bool) {}
func (e *NoopEventHandler) MonitorRemoved(MonitorName) {}
func (e *NoopEventHandler) MonitorAdded(MonitorName) {}
func (e *NoopEventHandler) CreateWorkspace(WorkspaceName) {}
func (e *NoopEventHandler) DestroyWorkspace(WorkspaceName) {}
func (e *NoopEventHandler) MoveWorkspace(MoveWorkspace) {}
func (e *NoopEventHandler) ActiveLayout(ActiveLayout) {}
func (e *NoopEventHandler) OpenWindow(OpenWindow) {}
func (e *NoopEventHandler) CloseWindow(CloseWindow) {}
func (e *NoopEventHandler) MoveWindow(MoveWindow) {}
func (e *NoopEventHandler) OpenLayer(OpenLayer) {}
func (e *NoopEventHandler) CloseLayer(CloseLayer) {}
func (e *NoopEventHandler) SubMap(SubMap) {}
func (e *NoopEventHandler) Screencast(Screencast) {}
2 changes: 1 addition & 1 deletion event/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type FakeEventClient struct {
}

type FakeEventHandler struct {
DummyEvHandler
NoopEventHandler
}

func (f *FakeEventClient) Receive() ([]ReceivedData, error) {
Expand Down

0 comments on commit 6f039d6

Please sign in to comment.