mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-08 08:50:04 +08:00
Continue the implementation of trigger rules (ex scene rules)
This commit is contained in:
27
pkg/windowmanagerhandler/window_manager_handler.go
Normal file
27
pkg/windowmanagerhandler/window_manager_handler.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package windowmanagerhandler
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type WindowManagerHandler struct {
|
||||
*PlatformSpecificWindowManagerHandler
|
||||
}
|
||||
|
||||
func New() (*WindowManagerHandler, error) {
|
||||
wmh := &WindowManagerHandler{}
|
||||
if err := wmh.init(); err != nil {
|
||||
return nil, fmt.Errorf("unable to initialize a window manager handler: %w", err)
|
||||
}
|
||||
return wmh, nil
|
||||
}
|
||||
|
||||
func (wmh *WindowManagerHandler) WindowFocusChangeChan(ctx context.Context) <-chan WindowFocusChange {
|
||||
return wmh.PlatformSpecificWindowManagerHandler.WindowFocusChangeChan(ctx)
|
||||
}
|
||||
|
||||
type WindowFocusChange struct {
|
||||
WindowID WindowID
|
||||
WindowTitle string
|
||||
}
|
Reference in New Issue
Block a user