streamdeck-obs-replay/obsws/event_utils.go

110 lines
4.1 KiB
Go
Raw Permalink Normal View History

2020-01-15 04:32:53 +00:00
package obsws
// This file is automatically generated.
// https://github.com/christopher-dG/go-obs-websocket/blob/master/codegen/protocol.py
var eventMap = map[string]func() Event{
"SwitchScenes": func() Event { return &SwitchScenesEvent{} },
"ScenesChanged": func() Event { return &ScenesChangedEvent{} },
"SceneCollectionChanged": func() Event { return &SceneCollectionChangedEvent{} },
"SceneCollectionListChanged": func() Event { return &SceneCollectionListChangedEvent{} },
"SwitchTransition": func() Event { return &SwitchTransitionEvent{} },
"TransitionListChanged": func() Event { return &TransitionListChangedEvent{} },
"TransitionDurationChanged": func() Event { return &TransitionDurationChangedEvent{} },
"TransitionBegin": func() Event { return &TransitionBeginEvent{} },
"ProfileChanged": func() Event { return &ProfileChangedEvent{} },
"ProfileListChanged": func() Event { return &ProfileListChangedEvent{} },
"StreamStarting": func() Event { return &StreamStartingEvent{} },
"StreamStarted": func() Event { return &StreamStartedEvent{} },
"StreamStopping": func() Event { return &StreamStoppingEvent{} },
"StreamStopped": func() Event { return &StreamStoppedEvent{} },
"StreamStatus": func() Event { return &StreamStatusEvent{} },
"RecordingStarting": func() Event { return &RecordingStartingEvent{} },
"RecordingStarted": func() Event { return &RecordingStartedEvent{} },
"RecordingStopping": func() Event { return &RecordingStoppingEvent{} },
"RecordingStopped": func() Event { return &RecordingStoppedEvent{} },
"ReplayStarting": func() Event { return &ReplayStartingEvent{} },
"ReplayStarted": func() Event { return &ReplayStartedEvent{} },
"ReplayStopping": func() Event { return &ReplayStoppingEvent{} },
"ReplayStopped": func() Event { return &ReplayStoppedEvent{} },
"Exiting": func() Event { return &ExitingEvent{} },
"Heartbeat": func() Event { return &HeartbeatEvent{} },
"SourceOrderChanged": func() Event { return &SourceOrderChangedEvent{} },
"SceneItemAdded": func() Event { return &SceneItemAddedEvent{} },
"SceneItemRemoved": func() Event { return &SceneItemRemovedEvent{} },
"SceneItemVisibilityChanged": func() Event { return &SceneItemVisibilityChangedEvent{} },
"PreviewSceneChanged": func() Event { return &PreviewSceneChangedEvent{} },
"StudioModeSwitched": func() Event { return &StudioModeSwitchedEvent{} },
}
// derefEvent returns an Event struct from a pointer to an Event struct.
func derefEvent(e Event) Event {
switch e := e.(type) {
case *SwitchScenesEvent:
return *e
case *ScenesChangedEvent:
return *e
case *SceneCollectionChangedEvent:
return *e
case *SceneCollectionListChangedEvent:
return *e
case *SwitchTransitionEvent:
return *e
case *TransitionListChangedEvent:
return *e
case *TransitionDurationChangedEvent:
return *e
case *TransitionBeginEvent:
return *e
case *ProfileChangedEvent:
return *e
case *ProfileListChangedEvent:
return *e
case *StreamStartingEvent:
return *e
case *StreamStartedEvent:
return *e
case *StreamStoppingEvent:
return *e
case *StreamStoppedEvent:
return *e
case *StreamStatusEvent:
return *e
case *RecordingStartingEvent:
return *e
case *RecordingStartedEvent:
return *e
case *RecordingStoppingEvent:
return *e
case *RecordingStoppedEvent:
return *e
case *ReplayStartingEvent:
return *e
case *ReplayStartedEvent:
return *e
case *ReplayStoppingEvent:
return *e
case *ReplayStoppedEvent:
return *e
case *ExitingEvent:
return *e
case *HeartbeatEvent:
return *e
case *SourceOrderChangedEvent:
return *e
case *SceneItemAddedEvent:
return *e
case *SceneItemRemovedEvent:
return *e
case *SceneItemVisibilityChangedEvent:
return *e
case *PreviewSceneChangedEvent:
return *e
case *StudioModeSwitchedEvent:
return *e
default:
return nil
}
}