mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-24 14:58:19 -05:00
Restructure library and plugins
The "core" macro conditions and actions have been extracted out to the "base" plugin. The library now mostly contains functionality which is required across all plugins and (e.g. definitions for macro segments). The goal is to reduce the complexity and cross-dependencies and group the source files in a better way. This should relsove the "library limit of 65535 objects exceeded" build issue occuring in some Windows build environments.
This commit is contained in:
parent
498bf31295
commit
7d0332dd0e
508
CMakeLists.txt
508
CMakeLists.txt
|
|
@ -27,338 +27,195 @@ include(GetGitRevisionDescription)
|
|||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||
git_describe(GIT_TAG)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.cpp.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/src/version.cpp" @ONLY)
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/lib/version.cpp" @ONLY)
|
||||
|
||||
# --- Set target sources ---
|
||||
|
||||
# Module sources
|
||||
target_sources(${PROJECT_NAME} PRIVATE src/advanced-scene-switcher-module.c)
|
||||
target_sources(${PROJECT_NAME} PRIVATE module/advanced-scene-switcher-module.c)
|
||||
|
||||
# Generic sources
|
||||
target_sources(
|
||||
${LIB_NAME}
|
||||
PRIVATE src/advanced-scene-switcher.cpp
|
||||
src/advanced-scene-switcher.hpp
|
||||
src/general.cpp
|
||||
src/platform-funcs.hpp
|
||||
src/switcher-data.cpp
|
||||
src/switcher-data.hpp
|
||||
src/version.cpp
|
||||
src/version.h)
|
||||
PRIVATE lib/advanced-scene-switcher.cpp
|
||||
lib/advanced-scene-switcher.hpp
|
||||
lib/general.cpp
|
||||
lib/platform-funcs.hpp
|
||||
lib/switcher-data.cpp
|
||||
lib/switcher-data.hpp
|
||||
lib/version.cpp
|
||||
lib/version.h)
|
||||
|
||||
# Legacy function sources
|
||||
target_sources(
|
||||
${LIB_NAME}
|
||||
PRIVATE src/legacy/scene-group.cpp
|
||||
src/legacy/scene-group.hpp
|
||||
src/legacy/scene-trigger.cpp
|
||||
src/legacy/scene-trigger.hpp
|
||||
src/legacy/switch-audio.cpp
|
||||
src/legacy/switch-audio.hpp
|
||||
src/legacy/switch-executable.cpp
|
||||
src/legacy/switch-executable.hpp
|
||||
src/legacy/switch-file.cpp
|
||||
src/legacy/switch-file.hpp
|
||||
src/legacy/switch-generic.cpp
|
||||
src/legacy/switch-generic.hpp
|
||||
src/legacy/switch-idle.cpp
|
||||
src/legacy/switch-idle.hpp
|
||||
src/legacy/switch-media.cpp
|
||||
src/legacy/switch-media.hpp
|
||||
src/legacy/switch-network.cpp
|
||||
src/legacy/switch-network.hpp
|
||||
src/legacy/switch-pause.cpp
|
||||
src/legacy/switch-pause.hpp
|
||||
src/legacy/switch-random.cpp
|
||||
src/legacy/switch-random.hpp
|
||||
src/legacy/switch-screen-region.cpp
|
||||
src/legacy/switch-screen-region.hpp
|
||||
src/legacy/switch-sequence.cpp
|
||||
src/legacy/switch-sequence.hpp
|
||||
src/legacy/switch-time.cpp
|
||||
src/legacy/switch-time.hpp
|
||||
src/legacy/switch-transitions.cpp
|
||||
src/legacy/switch-transitions.hpp
|
||||
src/legacy/switch-video.cpp
|
||||
src/legacy/switch-video.hpp
|
||||
src/legacy/switch-window.cpp
|
||||
src/legacy/switch-window.hpp)
|
||||
PRIVATE lib/legacy/scene-group.cpp
|
||||
lib/legacy/scene-group.hpp
|
||||
lib/legacy/scene-trigger.cpp
|
||||
lib/legacy/scene-trigger.hpp
|
||||
lib/legacy/switch-audio.cpp
|
||||
lib/legacy/switch-audio.hpp
|
||||
lib/legacy/switch-executable.cpp
|
||||
lib/legacy/switch-executable.hpp
|
||||
lib/legacy/switch-file.cpp
|
||||
lib/legacy/switch-file.hpp
|
||||
lib/legacy/switch-generic.cpp
|
||||
lib/legacy/switch-generic.hpp
|
||||
lib/legacy/switch-idle.cpp
|
||||
lib/legacy/switch-idle.hpp
|
||||
lib/legacy/switch-media.cpp
|
||||
lib/legacy/switch-media.hpp
|
||||
lib/legacy/switch-network.cpp
|
||||
lib/legacy/switch-network.hpp
|
||||
lib/legacy/switch-pause.cpp
|
||||
lib/legacy/switch-pause.hpp
|
||||
lib/legacy/switch-random.cpp
|
||||
lib/legacy/switch-random.hpp
|
||||
lib/legacy/switch-screen-region.cpp
|
||||
lib/legacy/switch-screen-region.hpp
|
||||
lib/legacy/switch-sequence.cpp
|
||||
lib/legacy/switch-sequence.hpp
|
||||
lib/legacy/switch-time.cpp
|
||||
lib/legacy/switch-time.hpp
|
||||
lib/legacy/switch-transitions.cpp
|
||||
lib/legacy/switch-transitions.hpp
|
||||
lib/legacy/switch-video.cpp
|
||||
lib/legacy/switch-video.hpp
|
||||
lib/legacy/switch-window.cpp
|
||||
lib/legacy/switch-window.hpp)
|
||||
|
||||
# Maro sources
|
||||
target_sources(
|
||||
${LIB_NAME}
|
||||
PRIVATE src/macro-core/action-queue.cpp
|
||||
src/macro-core/action-queue.hpp
|
||||
src/macro-core/macro-action-audio.cpp
|
||||
src/macro-core/macro-action-audio.hpp
|
||||
src/macro-core/macro-action-clipboard.cpp
|
||||
src/macro-core/macro-action-clipboard.hpp
|
||||
src/macro-core/macro-action-edit.cpp
|
||||
src/macro-core/macro-action-edit.hpp
|
||||
src/macro-core/macro-action-factory.cpp
|
||||
src/macro-core/macro-action-factory.hpp
|
||||
src/macro-core/macro-action-file.cpp
|
||||
src/macro-core/macro-action-file.hpp
|
||||
src/macro-core/macro-action-filter.cpp
|
||||
src/macro-core/macro-action-filter.hpp
|
||||
src/macro-core/macro-action-hotkey.cpp
|
||||
src/macro-core/macro-action-hotkey.hpp
|
||||
src/macro-core/macro-action-http.cpp
|
||||
src/macro-core/macro-action-http.hpp
|
||||
src/macro-core/macro-action-macro.cpp
|
||||
src/macro-core/macro-action-macro.hpp
|
||||
src/macro-core/macro-action-media.cpp
|
||||
src/macro-core/macro-action-media.hpp
|
||||
src/macro-core/macro-action-osc.cpp
|
||||
src/macro-core/macro-action-osc.hpp
|
||||
src/macro-core/macro-action-plugin-state.cpp
|
||||
src/macro-core/macro-action-plugin-state.hpp
|
||||
src/macro-core/macro-action-profile.cpp
|
||||
src/macro-core/macro-action-profile.hpp
|
||||
src/macro-core/macro-action-projector.cpp
|
||||
src/macro-core/macro-action-projector.hpp
|
||||
src/macro-core/macro-action-queue.cpp
|
||||
src/macro-core/macro-action-queue.hpp
|
||||
src/macro-core/macro-action-random.cpp
|
||||
src/macro-core/macro-action-random.hpp
|
||||
src/macro-core/macro-action-recording.cpp
|
||||
src/macro-core/macro-action-recording.hpp
|
||||
src/macro-core/macro-action-replay-buffer.cpp
|
||||
src/macro-core/macro-action-replay-buffer.hpp
|
||||
src/macro-core/macro-action-run.cpp
|
||||
src/macro-core/macro-action-run.hpp
|
||||
src/macro-core/macro-action-scene-collection.cpp
|
||||
src/macro-core/macro-action-scene-collection.hpp
|
||||
src/macro-core/macro-action-scene-lock.cpp
|
||||
src/macro-core/macro-action-scene-lock.hpp
|
||||
src/macro-core/macro-action-scene-order.cpp
|
||||
src/macro-core/macro-action-scene-order.hpp
|
||||
src/macro-core/macro-action-scene-switch.cpp
|
||||
src/macro-core/macro-action-scene-switch.hpp
|
||||
src/macro-core/macro-action-scene-transform.cpp
|
||||
src/macro-core/macro-action-scene-transform.hpp
|
||||
src/macro-core/macro-action-scene-visibility.cpp
|
||||
src/macro-core/macro-action-scene-visibility.hpp
|
||||
src/macro-core/macro-action-screenshot.cpp
|
||||
src/macro-core/macro-action-screenshot.hpp
|
||||
src/macro-core/macro-action-sequence.cpp
|
||||
src/macro-core/macro-action-sequence.hpp
|
||||
src/macro-core/macro-action-source.cpp
|
||||
src/macro-core/macro-action-source.hpp
|
||||
src/macro-core/macro-action-streaming.cpp
|
||||
src/macro-core/macro-action-streaming.hpp
|
||||
src/macro-core/macro-action-studio-mode.cpp
|
||||
src/macro-core/macro-action-studio-mode.hpp
|
||||
src/macro-core/macro-action-systray.cpp
|
||||
src/macro-core/macro-action-systray.hpp
|
||||
src/macro-core/macro-action-timer.cpp
|
||||
src/macro-core/macro-action-timer.hpp
|
||||
src/macro-core/macro-action-transition.cpp
|
||||
src/macro-core/macro-action-transition.hpp
|
||||
src/macro-core/macro-action-variable.cpp
|
||||
src/macro-core/macro-action-variable.hpp
|
||||
src/macro-core/macro-action-virtual-cam.cpp
|
||||
src/macro-core/macro-action-virtual-cam.hpp
|
||||
src/macro-core/macro-action-wait.cpp
|
||||
src/macro-core/macro-action-wait.hpp
|
||||
src/macro-core/macro-action-websocket.cpp
|
||||
src/macro-core/macro-action-websocket.hpp
|
||||
src/macro-core/macro-action.cpp
|
||||
src/macro-core/macro-action.hpp
|
||||
src/macro-core/macro-condition-audio.cpp
|
||||
src/macro-core/macro-condition-audio.hpp
|
||||
src/macro-core/macro-condition-cursor.cpp
|
||||
src/macro-core/macro-condition-cursor.hpp
|
||||
src/macro-core/macro-condition-date.cpp
|
||||
src/macro-core/macro-condition-date.hpp
|
||||
src/macro-core/macro-condition-display.cpp
|
||||
src/macro-core/macro-condition-display.hpp
|
||||
src/macro-core/macro-condition-edit.cpp
|
||||
src/macro-core/macro-condition-edit.hpp
|
||||
src/macro-core/macro-condition-factory.cpp
|
||||
src/macro-core/macro-condition-factory.hpp
|
||||
src/macro-core/macro-condition-file.cpp
|
||||
src/macro-core/macro-condition-file.hpp
|
||||
src/macro-core/macro-condition-filter.cpp
|
||||
src/macro-core/macro-condition-filter.hpp
|
||||
src/macro-core/macro-condition-hotkey.cpp
|
||||
src/macro-core/macro-condition-hotkey.hpp
|
||||
src/macro-core/macro-condition-idle.cpp
|
||||
src/macro-core/macro-condition-idle.hpp
|
||||
src/macro-core/macro-condition-macro.cpp
|
||||
src/macro-core/macro-condition-macro.hpp
|
||||
src/macro-core/macro-condition-media.cpp
|
||||
src/macro-core/macro-condition-media.hpp
|
||||
src/macro-core/macro-condition-obs-stats.cpp
|
||||
src/macro-core/macro-condition-obs-stats.hpp
|
||||
src/macro-core/macro-condition-plugin-state.cpp
|
||||
src/macro-core/macro-condition-plugin-state.hpp
|
||||
src/macro-core/macro-condition-process.cpp
|
||||
src/macro-core/macro-condition-process.hpp
|
||||
src/macro-core/macro-condition-profile.cpp
|
||||
src/macro-core/macro-condition-profile.hpp
|
||||
src/macro-core/macro-condition-queue.cpp
|
||||
src/macro-core/macro-condition-queue.hpp
|
||||
src/macro-core/macro-condition-recording.cpp
|
||||
src/macro-core/macro-condition-recording.hpp
|
||||
src/macro-core/macro-condition-replay-buffer.cpp
|
||||
src/macro-core/macro-condition-replay-buffer.hpp
|
||||
src/macro-core/macro-condition-run.cpp
|
||||
src/macro-core/macro-condition-run.hpp
|
||||
src/macro-core/macro-condition-scene-order.cpp
|
||||
src/macro-core/macro-condition-scene-order.hpp
|
||||
src/macro-core/macro-condition-scene-transform.cpp
|
||||
src/macro-core/macro-condition-scene-transform.hpp
|
||||
src/macro-core/macro-condition-scene-visibility.cpp
|
||||
src/macro-core/macro-condition-scene-visibility.hpp
|
||||
src/macro-core/macro-condition-slideshow.cpp
|
||||
src/macro-core/macro-condition-slideshow.hpp
|
||||
src/macro-core/macro-condition-scene.cpp
|
||||
src/macro-core/macro-condition-scene.hpp
|
||||
src/macro-core/macro-condition-source.cpp
|
||||
src/macro-core/macro-condition-source.hpp
|
||||
src/macro-core/macro-condition-streaming.cpp
|
||||
src/macro-core/macro-condition-streaming.hpp
|
||||
src/macro-core/macro-condition-studio-mode.cpp
|
||||
src/macro-core/macro-condition-studio-mode.hpp
|
||||
src/macro-core/macro-condition-tempvar.cpp
|
||||
src/macro-core/macro-condition-tempvar.hpp
|
||||
src/macro-core/macro-condition-timer.cpp
|
||||
src/macro-core/macro-condition-timer.hpp
|
||||
src/macro-core/macro-condition-transition.cpp
|
||||
src/macro-core/macro-condition-transition.hpp
|
||||
src/macro-core/macro-condition-variable.cpp
|
||||
src/macro-core/macro-condition-variable.hpp
|
||||
src/macro-core/macro-condition-virtual-cam.cpp
|
||||
src/macro-core/macro-condition-virtual-cam.hpp
|
||||
src/macro-core/macro-condition-websocket.cpp
|
||||
src/macro-core/macro-condition-websocket.hpp
|
||||
src/macro-core/macro-condition-window.cpp
|
||||
src/macro-core/macro-condition-window.hpp
|
||||
src/macro-core/macro-condition.cpp
|
||||
src/macro-core/macro-condition.hpp
|
||||
src/macro-core/macro-dock.cpp
|
||||
src/macro-core/macro-dock.hpp
|
||||
src/macro-core/macro-helpers.cpp
|
||||
src/macro-core/macro-helpers.hpp
|
||||
src/macro-core/macro-properties.cpp
|
||||
src/macro-core/macro-properties.hpp
|
||||
src/macro-core/macro-ref.cpp
|
||||
src/macro-core/macro-ref.hpp
|
||||
src/macro-core/macro-segment-list.cpp
|
||||
src/macro-core/macro-segment-list.hpp
|
||||
src/macro-core/macro-segment.cpp
|
||||
src/macro-core/macro-segment.hpp
|
||||
src/macro-core/macro-selection.cpp
|
||||
src/macro-core/macro-selection.hpp
|
||||
src/macro-core/macro-tab.cpp
|
||||
src/macro-core/macro-tree.cpp
|
||||
src/macro-core/macro-tree.hpp
|
||||
src/macro-core/macro.cpp
|
||||
src/macro-core/macro.hpp)
|
||||
PRIVATE lib/macro/macro-action-edit.cpp
|
||||
lib/macro/macro-action-edit.hpp
|
||||
lib/macro/macro-action-factory.cpp
|
||||
lib/macro/macro-action-factory.hpp
|
||||
lib/macro/macro-action-macro.cpp
|
||||
lib/macro/macro-action-macro.hpp
|
||||
lib/macro/macro-action-queue.cpp
|
||||
lib/macro/macro-action-queue.hpp
|
||||
lib/macro/macro-action-variable.cpp
|
||||
lib/macro/macro-action-variable.hpp
|
||||
lib/macro/macro-action.cpp
|
||||
lib/macro/macro-action.hpp
|
||||
lib/macro/macro-condition-edit.cpp
|
||||
lib/macro/macro-condition-edit.hpp
|
||||
lib/macro/macro-condition-factory.cpp
|
||||
lib/macro/macro-condition-factory.hpp
|
||||
lib/macro/macro-condition-macro.cpp
|
||||
lib/macro/macro-condition-macro.hpp
|
||||
lib/macro/macro-condition-queue.cpp
|
||||
lib/macro/macro-condition-queue.hpp
|
||||
lib/macro/macro-condition-tempvar.cpp
|
||||
lib/macro/macro-condition-tempvar.hpp
|
||||
lib/macro/macro-condition-variable.cpp
|
||||
lib/macro/macro-condition-variable.hpp
|
||||
lib/macro/macro-condition.cpp
|
||||
lib/macro/macro-condition.hpp
|
||||
lib/macro/macro-dock.cpp
|
||||
lib/macro/macro-dock.hpp
|
||||
lib/macro/macro-export-import-dialog.cpp
|
||||
lib/macro/macro-export-import-dialog.hpp
|
||||
lib/macro/macro-helpers.cpp
|
||||
lib/macro/macro-helpers.hpp
|
||||
lib/macro/macro-list.cpp
|
||||
lib/macro/macro-list.hpp
|
||||
lib/macro/macro-properties.cpp
|
||||
lib/macro/macro-properties.hpp
|
||||
lib/macro/macro-ref.cpp
|
||||
lib/macro/macro-ref.hpp
|
||||
lib/macro/macro-run-button.cpp
|
||||
lib/macro/macro-run-button.hpp
|
||||
lib/macro/macro-segment-list.cpp
|
||||
lib/macro/macro-segment-list.hpp
|
||||
lib/macro/macro-segment-selection.cpp
|
||||
lib/macro/macro-segment-selection.hpp
|
||||
lib/macro/macro-segment.cpp
|
||||
lib/macro/macro-segment.hpp
|
||||
lib/macro/macro-selection.cpp
|
||||
lib/macro/macro-selection.hpp
|
||||
lib/macro/macro-tab.cpp
|
||||
lib/macro/macro-tree.cpp
|
||||
lib/macro/macro-tree.hpp
|
||||
lib/macro/macro.cpp
|
||||
lib/macro/macro.hpp)
|
||||
|
||||
# Utility function sources
|
||||
target_sources(
|
||||
${LIB_NAME}
|
||||
PRIVATE src/utils/connection-manager.cpp
|
||||
src/utils/connection-manager.hpp
|
||||
src/utils/curl-helper.cpp
|
||||
src/utils/curl-helper.hpp
|
||||
src/utils/duration.cpp
|
||||
src/utils/duration.hpp
|
||||
src/utils/duration-control.cpp
|
||||
src/utils/duration-control.hpp
|
||||
src/utils/export-symbol-helper.hpp
|
||||
src/utils/item-selection-helpers.cpp
|
||||
src/utils/item-selection-helpers.hpp
|
||||
src/utils/log-helper.hpp
|
||||
src/utils/file-selection.cpp
|
||||
src/utils/file-selection.hpp
|
||||
src/utils/filter-combo-box.cpp
|
||||
src/utils/filter-combo-box.hpp
|
||||
src/utils/filter-selection.cpp
|
||||
src/utils/filter-selection.hpp
|
||||
src/utils/hotkey.cpp
|
||||
src/utils/hotkey.hpp
|
||||
src/utils/macro-export-import-dialog.cpp
|
||||
src/utils/macro-export-import-dialog.hpp
|
||||
src/utils/macro-list.cpp
|
||||
src/utils/macro-list.hpp
|
||||
src/utils/macro-run-button.cpp
|
||||
src/utils/macro-run-button.hpp
|
||||
src/utils/macro-segment-selection.cpp
|
||||
src/utils/macro-segment-selection.hpp
|
||||
src/utils/math-helpers.cpp
|
||||
src/utils/math-helpers.hpp
|
||||
src/utils/mouse-wheel-guard.cpp
|
||||
src/utils/mouse-wheel-guard.hpp
|
||||
src/utils/name-dialog.cpp
|
||||
src/utils/name-dialog.hpp
|
||||
src/utils/non-modal-dialog.cpp
|
||||
src/utils/non-modal-dialog.hpp
|
||||
src/utils/obs-dock.hpp
|
||||
src/utils/obs-module-helper.cpp
|
||||
src/utils/obs-module-helper.hpp
|
||||
src/utils/osc-helpers.cpp
|
||||
src/utils/osc-helpers.hpp
|
||||
src/utils/plugin-state-helpers.cpp
|
||||
src/utils/plugin-state-helpers.hpp
|
||||
src/utils/priority-helper.cpp
|
||||
src/utils/priority-helper.hpp
|
||||
src/utils/process-config.cpp
|
||||
src/utils/process-config.hpp
|
||||
src/utils/regex-config.cpp
|
||||
src/utils/regex-config.hpp
|
||||
src/utils/resizing-text-edit.cpp
|
||||
src/utils/resizing-text-edit.hpp
|
||||
src/utils/scene-item-selection.cpp
|
||||
src/utils/scene-item-selection.hpp
|
||||
src/utils/scene-selection.cpp
|
||||
src/utils/scene-selection.hpp
|
||||
src/utils/scene-switch-helpers.cpp
|
||||
src/utils/scene-switch-helpers.hpp
|
||||
src/utils/screenshot-helper.cpp
|
||||
src/utils/screenshot-helper.hpp
|
||||
src/utils/section.cpp
|
||||
src/utils/section.hpp
|
||||
src/utils/slider-spinbox.cpp
|
||||
src/utils/slider-spinbox.hpp
|
||||
src/utils/source-selection.cpp
|
||||
src/utils/source-selection.hpp
|
||||
src/utils/source-setting.cpp
|
||||
src/utils/source-setting.hpp
|
||||
src/utils/status-control.cpp
|
||||
src/utils/status-control.hpp
|
||||
src/utils/string-list.cpp
|
||||
src/utils/string-list.hpp
|
||||
src/utils/striped-frame.cpp
|
||||
src/utils/striped-frame.hpp
|
||||
src/utils/switch-button.cpp
|
||||
src/utils/switch-button.hpp
|
||||
src/utils/sync-helpers.cpp
|
||||
src/utils/sync-helpers.hpp
|
||||
src/utils/temp-variable.cpp
|
||||
src/utils/temp-variable.hpp
|
||||
src/utils/transition-selection.cpp
|
||||
src/utils/transition-selection.hpp
|
||||
src/utils/utility.cpp
|
||||
src/utils/utility.hpp
|
||||
src/utils/variable.cpp
|
||||
src/utils/variable.hpp
|
||||
src/utils/variable-line-edit.cpp
|
||||
src/utils/variable-line-edit.hpp
|
||||
src/utils/variable-number.tpp
|
||||
src/utils/variable-number.hpp
|
||||
src/utils/variable-spinbox.cpp
|
||||
src/utils/variable-spinbox.hpp
|
||||
src/utils/variable-string.cpp
|
||||
src/utils/variable-string.hpp
|
||||
src/utils/variable-text-edit.cpp
|
||||
src/utils/variable-text-edit.hpp
|
||||
src/utils/volume-control.cpp
|
||||
src/utils/volume-control.hpp
|
||||
src/utils/websocket-helpers.cpp
|
||||
src/utils/websocket-helpers.hpp)
|
||||
PRIVATE lib/utils/action-queue.cpp
|
||||
lib/utils/action-queue.hpp
|
||||
lib/utils/curl-helper.cpp
|
||||
lib/utils/curl-helper.hpp
|
||||
lib/utils/duration-control.cpp
|
||||
lib/utils/duration-control.hpp
|
||||
lib/utils/duration.cpp
|
||||
lib/utils/duration.hpp
|
||||
lib/utils/export-symbol-helper.hpp
|
||||
lib/utils/file-selection.cpp
|
||||
lib/utils/file-selection.hpp
|
||||
lib/utils/filter-combo-box.cpp
|
||||
lib/utils/filter-combo-box.hpp
|
||||
lib/utils/item-selection-helpers.cpp
|
||||
lib/utils/item-selection-helpers.hpp
|
||||
lib/utils/log-helper.cpp
|
||||
lib/utils/log-helper.hpp
|
||||
lib/utils/math-helpers.cpp
|
||||
lib/utils/math-helpers.hpp
|
||||
lib/utils/mouse-wheel-guard.cpp
|
||||
lib/utils/mouse-wheel-guard.hpp
|
||||
lib/utils/name-dialog.cpp
|
||||
lib/utils/name-dialog.hpp
|
||||
lib/utils/non-modal-dialog.cpp
|
||||
lib/utils/non-modal-dialog.hpp
|
||||
lib/utils/obs-dock.hpp
|
||||
lib/utils/obs-module-helper.cpp
|
||||
lib/utils/obs-module-helper.hpp
|
||||
lib/utils/plugin-state-helpers.cpp
|
||||
lib/utils/plugin-state-helpers.hpp
|
||||
lib/utils/priority-helper.cpp
|
||||
lib/utils/priority-helper.hpp
|
||||
lib/utils/regex-config.cpp
|
||||
lib/utils/regex-config.hpp
|
||||
lib/utils/resizing-text-edit.cpp
|
||||
lib/utils/resizing-text-edit.hpp
|
||||
lib/utils/scene-selection.cpp
|
||||
lib/utils/scene-selection.hpp
|
||||
lib/utils/scene-switch-helpers.cpp
|
||||
lib/utils/scene-switch-helpers.hpp
|
||||
lib/utils/screenshot-helper.cpp
|
||||
lib/utils/screenshot-helper.hpp
|
||||
lib/utils/section.cpp
|
||||
lib/utils/section.hpp
|
||||
lib/utils/slider-spinbox.cpp
|
||||
lib/utils/slider-spinbox.hpp
|
||||
lib/utils/source-selection.cpp
|
||||
lib/utils/source-selection.hpp
|
||||
lib/utils/status-control.cpp
|
||||
lib/utils/status-control.hpp
|
||||
lib/utils/switch-button.cpp
|
||||
lib/utils/switch-button.hpp
|
||||
lib/utils/sync-helpers.cpp
|
||||
lib/utils/sync-helpers.hpp
|
||||
lib/utils/temp-variable.cpp
|
||||
lib/utils/temp-variable.hpp
|
||||
lib/utils/utility.cpp
|
||||
lib/utils/utility.hpp
|
||||
lib/utils/variable-line-edit.cpp
|
||||
lib/utils/variable-line-edit.hpp
|
||||
lib/utils/variable-number.hpp
|
||||
lib/utils/variable-number.tpp
|
||||
lib/utils/variable-spinbox.cpp
|
||||
lib/utils/variable-spinbox.hpp
|
||||
lib/utils/variable-string.cpp
|
||||
lib/utils/variable-string.hpp
|
||||
lib/utils/variable-text-edit.cpp
|
||||
lib/utils/variable-text-edit.hpp
|
||||
lib/utils/variable.cpp
|
||||
lib/utils/variable.hpp
|
||||
lib/utils/volume-control.cpp
|
||||
lib/utils/volume-control.hpp)
|
||||
|
||||
# --- End of section ---
|
||||
|
||||
|
|
@ -378,10 +235,10 @@ target_link_libraries(${LIB_NAME} PUBLIC Qt::Core Qt::Widgets)
|
|||
|
||||
target_include_directories(
|
||||
${LIB_NAME}
|
||||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/legacy"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/macro-core"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/utils"
|
||||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/lib"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/legacy"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/macro"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/lib/utils"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/forms")
|
||||
|
||||
set_target_properties(
|
||||
|
|
@ -390,6 +247,7 @@ set_target_properties(
|
|||
AUTOUIC ON
|
||||
AUTORCC ON
|
||||
AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/forms")
|
||||
set_target_properties(${LIB_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
|
||||
target_compile_features(${LIB_NAME} PUBLIC cxx_std_17)
|
||||
|
|
@ -422,9 +280,8 @@ if(OS_WINDOWS)
|
|||
target_compile_options(${LIB_NAME} PUBLIC /MP /d2FH4- /wd4267 /wd4267
|
||||
/bigobj)
|
||||
endif()
|
||||
target_sources(${LIB_NAME} PRIVATE src/win/advanced-scene-switcher-win.cpp)
|
||||
target_sources(${LIB_NAME} PRIVATE lib/win/advanced-scene-switcher-win.cpp)
|
||||
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)
|
||||
set_property(TARGET ${LIB_NAME} PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS true)
|
||||
# --- End of section ---
|
||||
|
||||
# -- macOS specific build settings and tasks --
|
||||
|
|
@ -438,7 +295,7 @@ elseif(OS_MACOS)
|
|||
|
||||
target_compile_options(
|
||||
${LIB_NAME} PRIVATE -Wall -Wextra -Werror-implicit-function-declaration
|
||||
-stdlib=libc++ -fvisibility=default)
|
||||
-stdlib=libc++)
|
||||
|
||||
set_target_properties(${LIB_NAME} PROPERTIES PREFIX "" SUFFIX ".so")
|
||||
|
||||
|
|
@ -456,7 +313,7 @@ elseif(OS_MACOS)
|
|||
message(FATAL_ERROR "Couldn't find CURL or Libcurl - abort")
|
||||
endif()
|
||||
|
||||
target_sources(${LIB_NAME} PRIVATE src/osx/advanced-scene-switcher-osx.mm)
|
||||
target_sources(${LIB_NAME} PRIVATE lib/osx/advanced-scene-switcher-osx.mm)
|
||||
set_source_files_properties(advanced-scene-switcher-osx.mm
|
||||
PROPERTIES COMPILE_FLAGS "-fobjc-arc")
|
||||
# --- End of section ---
|
||||
|
|
@ -468,10 +325,9 @@ else()
|
|||
set_target_properties(${LIB_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${LIB_NAME} PROPERTIES SOVERSION 1)
|
||||
|
||||
find_package(X11 REQUIRED COMPONENTS Xtst Xss)
|
||||
target_include_directories(
|
||||
${LIB_NAME} PRIVATE "${X11_INCLUDE_DIR}" "${X11_Xtst_INCLUDE_PATH}"
|
||||
"${X11_Xss_INCLUDE_PATH}")
|
||||
find_package(X11 REQUIRED COMPONENTS Xss)
|
||||
target_include_directories(${LIB_NAME} PRIVATE "${X11_INCLUDE_DIR}"
|
||||
"${X11_Xss_INCLUDE_PATH}")
|
||||
target_link_libraries(${LIB_NAME} PRIVATE ${X11_LIBRARIES})
|
||||
|
||||
find_path(PROCPS_INCLUDE_DIR NAMES proc/procps.h)
|
||||
|
|
@ -506,7 +362,7 @@ else()
|
|||
message(FATAL_ERROR "Couldn't find CURL or Libcurl - abort")
|
||||
endif()
|
||||
|
||||
target_sources(${LIB_NAME} PRIVATE src/linux/advanced-scene-switcher-nix.cpp)
|
||||
target_sources(${LIB_NAME} PRIVATE lib/linux/advanced-scene-switcher-nix.cpp)
|
||||
endif()
|
||||
# --- End of section ---
|
||||
|
||||
|
|
@ -533,5 +389,5 @@ endif()
|
|||
|
||||
# --- End of section ---
|
||||
|
||||
add_subdirectory(src/macro-external)
|
||||
add_subdirectory(plugins)
|
||||
add_subdirectory(tests)
|
||||
|
|
|
|||
|
|
@ -264,6 +264,9 @@ function(setup_advss_plugin target)
|
|||
AUTOUIC ON
|
||||
AUTORCC ON)
|
||||
|
||||
target_compile_features(${target} PUBLIC cxx_std_17)
|
||||
set_target_properties(${target} PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
target_link_libraries(${target} PRIVATE advanced-scene-switcher-lib)
|
||||
|
||||
get_target_property(ADVSS_SOURCE_DIR advanced-scene-switcher-lib SOURCE_DIR)
|
||||
|
|
@ -290,9 +293,9 @@ function(setup_advss_plugin target)
|
|||
# General includes
|
||||
target_include_directories(
|
||||
${target}
|
||||
PRIVATE "${ADVSS_SOURCE_DIR}/src" "${ADVSS_SOURCE_DIR}/src/legacy"
|
||||
"${ADVSS_SOURCE_DIR}/src/macro-core"
|
||||
"${ADVSS_SOURCE_DIR}/src/utils" "${ADVSS_SOURCE_DIR}/forms")
|
||||
PRIVATE "${ADVSS_SOURCE_DIR}/lib" "${ADVSS_SOURCE_DIR}/lib/legacy"
|
||||
"${ADVSS_SOURCE_DIR}/lib/macro" "${ADVSS_SOURCE_DIR}/lib/utils"
|
||||
"${ADVSS_SOURCE_DIR}/forms")
|
||||
endfunction()
|
||||
|
||||
function(install_advss_plugin_dependency)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "switcher-data.hpp"
|
||||
#include "macro-helpers.hpp"
|
||||
#include "obs-module-helper.hpp"
|
||||
#include "status-control.hpp"
|
||||
#include "scene-switch-helpers.hpp"
|
||||
#include "curl-helper.hpp"
|
||||
|
|
@ -15,7 +16,6 @@
|
|||
#include <QDirIterator>
|
||||
#include <regex>
|
||||
#include <filesystem>
|
||||
#include <obs-module.h>
|
||||
#include <obs-frontend-api.h>
|
||||
|
||||
namespace advss {
|
||||
|
|
@ -541,9 +541,12 @@ bool SwitcherData::AnySceneTransitionStarted()
|
|||
/******************************************************************************
|
||||
* OBS module setup
|
||||
******************************************************************************/
|
||||
extern "C" void FreeSceneSwitcher()
|
||||
extern "C" EXPORT void FreeSceneSwitcher()
|
||||
{
|
||||
PlatformCleanup();
|
||||
for (const auto &cleanupStep : switcher->pluginCleanupSteps) {
|
||||
cleanupStep();
|
||||
}
|
||||
|
||||
delete switcher;
|
||||
switcher = nullptr;
|
||||
|
|
@ -753,11 +756,17 @@ QWidget *GetSettingsWindow()
|
|||
return SettingsWindowIsOpened() ? AdvSceneSwitcher::window : nullptr;
|
||||
}
|
||||
|
||||
void SetupConnectionManager();
|
||||
void SetupWebsocketHelpers();
|
||||
void SetupActionQueues();
|
||||
|
||||
extern "C" void InitSceneSwitcher(obs_module_t *module, translateFunc translate)
|
||||
extern "C" EXPORT void RunPostLoadSteps()
|
||||
{
|
||||
for (const auto &postLoadStep : switcher->pluginPostLoadSteps) {
|
||||
postLoadStep();
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" EXPORT void InitSceneSwitcher(obs_module_t *module,
|
||||
translateFunc translate)
|
||||
{
|
||||
blog(LOG_INFO, "version: %s", g_GIT_TAG);
|
||||
blog(LOG_INFO, "version: %s", g_GIT_SHA1);
|
||||
|
|
@ -767,10 +776,12 @@ extern "C" void InitSceneSwitcher(obs_module_t *module, translateFunc translate)
|
|||
PlatformInit();
|
||||
LoadPlugins();
|
||||
SetupDock();
|
||||
SetupConnectionManager();
|
||||
SetupWebsocketHelpers();
|
||||
SetupActionQueues();
|
||||
|
||||
for (const auto &initStep : switcher->pluginInitSteps) {
|
||||
initStep();
|
||||
}
|
||||
|
||||
obs_frontend_add_save_callback(SaveSceneSwitcher, nullptr);
|
||||
obs_frontend_add_event_callback(OBSEvent, switcher);
|
||||
|
||||
|
|
@ -429,9 +429,14 @@ void AdvSceneSwitcher::SetCurrentTab()
|
|||
}
|
||||
}
|
||||
|
||||
static bool windowPosValid(QPoint pos)
|
||||
{
|
||||
return !!QGuiApplication::screenAt(pos);
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::RestoreWindowGeo()
|
||||
{
|
||||
if (switcher->saveWindowGeo && WindowPosValid(switcher->windowPos)) {
|
||||
if (switcher->saveWindowGeo && windowPosValid(switcher->windowPos)) {
|
||||
this->resize(switcher->windowSize);
|
||||
this->move(switcher->windowPos);
|
||||
}
|
||||
|
|
@ -7,9 +7,10 @@
|
|||
******************************************************************************/
|
||||
#pragma once
|
||||
#include "switch-generic.hpp"
|
||||
#include "obs-module-helper.hpp"
|
||||
|
||||
#include <QPlainTextEdit>
|
||||
#include <QDateTime>
|
||||
#include <obs-module.h>
|
||||
|
||||
namespace advss {
|
||||
|
||||
|
|
@ -7,6 +7,7 @@ Most of this code is based on https://github.com/Palakis/obs-websocket
|
|||
#include <QMessageBox>
|
||||
|
||||
#include "advanced-scene-switcher.hpp"
|
||||
#include "obs-module-helper.hpp"
|
||||
#include "switcher-data.hpp"
|
||||
#include "scene-switch-helpers.hpp"
|
||||
#include "utility.hpp"
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
#include <QSpinBox>
|
||||
|
||||
#include "switch-generic.hpp"
|
||||
#include "obs-module-helper.hpp"
|
||||
#include "screenshot-helper.hpp"
|
||||
|
||||
namespace advss {
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,7 +3,6 @@
|
|||
#include "macro.hpp"
|
||||
#include "macro-properties.hpp"
|
||||
#include "advanced-scene-switcher.hpp"
|
||||
#include "macro-action-scene-switch.hpp"
|
||||
#include "section.hpp"
|
||||
#include "switch-button.hpp"
|
||||
#include "utility.hpp"
|
||||
|
|
@ -176,8 +175,7 @@ void AdvSceneSwitcher::AddMacroAction(int idx)
|
|||
if (idx - 1 >= 0) {
|
||||
id = macro->Actions().at(idx - 1)->GetId();
|
||||
} else {
|
||||
MacroActionSwitchScene temp(nullptr);
|
||||
id = temp.GetId();
|
||||
id = MacroAction::GetDefaultID();
|
||||
}
|
||||
{
|
||||
auto lock = LockContext();
|
||||
|
|
@ -465,8 +463,7 @@ void AdvSceneSwitcher::AddMacroElseAction(int idx)
|
|||
if (idx - 1 >= 0) {
|
||||
id = macro->ElseActions().at(idx - 1)->GetId();
|
||||
} else {
|
||||
MacroActionSwitchScene temp(nullptr);
|
||||
id = temp.GetId();
|
||||
id = MacroAction::GetDefaultID();
|
||||
}
|
||||
{
|
||||
auto lock = LockContext();
|
||||
|
|
@ -13,9 +13,10 @@ class MacroActionEdit : public MacroSegmentEdit {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MacroActionEdit(QWidget *parent = nullptr,
|
||||
std::shared_ptr<MacroAction> * = nullptr,
|
||||
const std::string &id = "scene_switch");
|
||||
MacroActionEdit(
|
||||
QWidget *parent = nullptr,
|
||||
std::shared_ptr<MacroAction> * = nullptr,
|
||||
const std::string &id = MacroAction::GetDefaultID().data());
|
||||
void UpdateEntryData(const std::string &id);
|
||||
void SetEntryData(std::shared_ptr<MacroAction> *);
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ class MacroActionFactory {
|
|||
public:
|
||||
MacroActionFactory() = delete;
|
||||
|
||||
static bool Register(const std::string &id, MacroActionInfo);
|
||||
EXPORT static bool Register(const std::string &id, MacroActionInfo);
|
||||
static std::shared_ptr<MacroAction> Create(const std::string &id,
|
||||
Macro *m);
|
||||
static QWidget *CreateWidget(const std::string &id, QWidget *parent,
|
||||
|
|
@ -38,6 +38,11 @@ bool MacroAction::Enabled() const
|
|||
return _enabled;
|
||||
}
|
||||
|
||||
std::string_view MacroAction::GetDefaultID()
|
||||
{
|
||||
return "scene_switch";
|
||||
}
|
||||
|
||||
MacroRefAction::MacroRefAction(Macro *m, bool supportsVariableValue)
|
||||
: MacroAction(m, supportsVariableValue)
|
||||
{
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace advss {
|
||||
|
||||
class MacroAction : public MacroSegment {
|
||||
class EXPORT MacroAction : public MacroSegment {
|
||||
public:
|
||||
MacroAction(Macro *m, bool supportsVariableValue = false);
|
||||
virtual ~MacroAction() = default;
|
||||
|
|
@ -15,11 +15,13 @@ public:
|
|||
void SetEnabled(bool);
|
||||
bool Enabled() const;
|
||||
|
||||
static std::string_view GetDefaultID();
|
||||
|
||||
private:
|
||||
bool _enabled = true;
|
||||
};
|
||||
|
||||
class MacroRefAction : virtual public MacroAction {
|
||||
class EXPORT MacroRefAction : virtual public MacroAction {
|
||||
public:
|
||||
MacroRefAction(Macro *m, bool supportsVariableValue = false);
|
||||
bool PostLoad() override;
|
||||
|
|
@ -27,7 +29,7 @@ public:
|
|||
MacroRef _macro;
|
||||
};
|
||||
|
||||
class MultiMacroRefAction : virtual public MacroAction {
|
||||
class EXPORT MultiMacroRefAction : virtual public MacroAction {
|
||||
public:
|
||||
MultiMacroRefAction(Macro *m, bool supportsVariableValue = false);
|
||||
bool PostLoad() override;
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
#include "macro.hpp"
|
||||
#include "macro-properties.hpp"
|
||||
#include "advanced-scene-switcher.hpp"
|
||||
#include "macro-condition-scene.hpp"
|
||||
#include "section.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
|
|
@ -309,8 +308,7 @@ void AdvSceneSwitcher::AddMacroCondition(int idx)
|
|||
logic = macro->Conditions().at(idx - 1)->GetLogicType();
|
||||
}
|
||||
} else {
|
||||
MacroConditionScene temp(macro.get());
|
||||
id = temp.GetId();
|
||||
id = MacroCondition::GetDefaultID();
|
||||
logic = LogicType::ROOT_NONE;
|
||||
}
|
||||
{
|
||||
|
|
@ -33,9 +33,11 @@ class MacroConditionEdit : public MacroSegmentEdit {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MacroConditionEdit(QWidget *parent = nullptr,
|
||||
std::shared_ptr<MacroCondition> * = nullptr,
|
||||
const std::string &id = "scene", bool root = true);
|
||||
MacroConditionEdit(
|
||||
QWidget *parent = nullptr,
|
||||
std::shared_ptr<MacroCondition> * = nullptr,
|
||||
const std::string &id = MacroCondition::GetDefaultID().data(),
|
||||
bool root = true);
|
||||
bool IsRootNode();
|
||||
void SetRootNode(bool);
|
||||
void UpdateEntryData(const std::string &id);
|
||||
|
|
@ -18,7 +18,7 @@ struct MacroConditionInfo {
|
|||
class MacroConditionFactory {
|
||||
public:
|
||||
MacroConditionFactory() = delete;
|
||||
static bool Register(const std::string &, MacroConditionInfo);
|
||||
EXPORT static bool Register(const std::string &, MacroConditionInfo);
|
||||
static std::shared_ptr<MacroCondition> Create(const std::string &,
|
||||
Macro *m);
|
||||
static QWidget *CreateWidget(const std::string &id, QWidget *parent,
|
||||
|
|
@ -153,6 +153,11 @@ void MacroCondition::SetDuration(const Duration &duration)
|
|||
_duration.SetValue(duration);
|
||||
}
|
||||
|
||||
std::string_view MacroCondition::GetDefaultID()
|
||||
{
|
||||
return "scene";
|
||||
}
|
||||
|
||||
MacroRefCondition::MacroRefCondition(Macro *m, bool supportsVariableValue)
|
||||
: MacroCondition(m, supportsVariableValue)
|
||||
{
|
||||
|
|
@ -58,7 +58,7 @@ private:
|
|||
bool _timeReached = false;
|
||||
};
|
||||
|
||||
class MacroCondition : public MacroSegment {
|
||||
class EXPORT MacroCondition : public MacroSegment {
|
||||
public:
|
||||
MacroCondition(Macro *m, bool supportsVariableValue = false);
|
||||
virtual ~MacroCondition() = default;
|
||||
|
|
@ -74,12 +74,14 @@ public:
|
|||
void SetDurationModifier(DurationModifier::Type m);
|
||||
void SetDuration(const Duration &duration);
|
||||
|
||||
static std::string_view GetDefaultID();
|
||||
|
||||
private:
|
||||
LogicType _logic = LogicType::ROOT_NONE;
|
||||
DurationModifier _duration;
|
||||
};
|
||||
|
||||
class MacroRefCondition : virtual public MacroCondition {
|
||||
class EXPORT MacroRefCondition : virtual public MacroCondition {
|
||||
public:
|
||||
MacroRefCondition(Macro *m, bool supportsVariableValue = false);
|
||||
bool PostLoad() override;
|
||||
|
|
@ -87,7 +89,7 @@ public:
|
|||
MacroRef _macro;
|
||||
};
|
||||
|
||||
class MultiMacroRefCondtition : virtual public MacroCondition {
|
||||
class EXPORT MultiMacroRefCondtition : virtual public MacroCondition {
|
||||
public:
|
||||
MultiMacroRefCondtition(Macro *m, bool supportsVariableValue = false);
|
||||
bool PostLoad() override;
|
||||
|
|
@ -26,6 +26,11 @@ GetMacroConditions(Macro *macro)
|
|||
return macro->Conditions();
|
||||
}
|
||||
|
||||
std::string_view GetSceneSwitchActionId()
|
||||
{
|
||||
return MacroAction::GetDefaultID();
|
||||
}
|
||||
|
||||
std::condition_variable &GetMacroWaitCV()
|
||||
{
|
||||
static std::condition_variable cv;
|
||||
64
lib/macro/macro-helpers.hpp
Normal file
64
lib/macro/macro-helpers.hpp
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
#pragma once
|
||||
#include "export-symbol-helper.hpp"
|
||||
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <deque>
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
|
||||
struct obs_data;
|
||||
typedef struct obs_data obs_data_t;
|
||||
|
||||
namespace advss {
|
||||
|
||||
class Macro;
|
||||
class MacroAction;
|
||||
class MacroCondition;
|
||||
|
||||
EXPORT std::deque<std::shared_ptr<Macro>> &GetMacros();
|
||||
|
||||
EXPORT std::optional<std::deque<std::shared_ptr<MacroAction>>>
|
||||
GetMacroActions(Macro *);
|
||||
EXPORT std::optional<std::deque<std::shared_ptr<MacroCondition>>>
|
||||
GetMacroConditions(Macro *);
|
||||
|
||||
std::string_view GetSceneSwitchActionId();
|
||||
|
||||
constexpr auto macro_func = 10;
|
||||
|
||||
EXPORT std::condition_variable &GetMacroWaitCV();
|
||||
EXPORT std::condition_variable &GetMacroTransitionCV();
|
||||
|
||||
EXPORT std::atomic_bool &MacroWaitShouldAbort();
|
||||
EXPORT void SetMacroAbortWait(bool);
|
||||
|
||||
EXPORT bool ShutdownCheckIsNecessary();
|
||||
EXPORT std::atomic_int &GetShutdownConditionCount();
|
||||
|
||||
EXPORT void SetMacroSwitchedScene(bool value);
|
||||
EXPORT bool MacroSwitchedScene();
|
||||
|
||||
EXPORT std::string GetMacroName(Macro *);
|
||||
|
||||
EXPORT int64_t MillisecondsSinceMacroConditionCheck(Macro *);
|
||||
|
||||
EXPORT bool MacroIsStopped(Macro *);
|
||||
EXPORT bool MacroIsPaused(Macro *);
|
||||
|
||||
EXPORT void AddMacroHelperThread(Macro *, std::thread &&);
|
||||
|
||||
EXPORT bool CheckMacros();
|
||||
|
||||
EXPORT bool RunMacroActions(Macro *);
|
||||
EXPORT bool RunMacros();
|
||||
|
||||
EXPORT void LoadMacros(obs_data_t *obj);
|
||||
EXPORT void SaveMacros(obs_data_t *obj);
|
||||
|
||||
EXPORT void InvalidateMacroTempVarValues();
|
||||
EXPORT void ResetMacroConditionTimers(Macro *);
|
||||
EXPORT void ResetMacroRunCount(Macro *);
|
||||
|
||||
} // namespace advss
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
namespace advss {
|
||||
|
||||
class MacroList : public QWidget {
|
||||
class ADVSS_EXPORT MacroList : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
MacroList(QWidget *parent, bool allowDuplicates, bool reorder);
|
||||
36
lib/macro/macro-ref.hpp
Normal file
36
lib/macro/macro-ref.hpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
#include "export-symbol-helper.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <QString>
|
||||
#include <obs-data.h>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class Macro;
|
||||
|
||||
class MacroRef {
|
||||
public:
|
||||
MacroRef(){};
|
||||
EXPORT MacroRef(std::string name);
|
||||
EXPORT void operator=(const QString &);
|
||||
EXPORT void operator=(const std::shared_ptr<Macro> &);
|
||||
EXPORT void Save(obs_data_t *obj) const;
|
||||
EXPORT void Load(obs_data_t *obj);
|
||||
void PostLoad();
|
||||
EXPORT std::shared_ptr<Macro> GetMacro() const;
|
||||
EXPORT std::string Name() const;
|
||||
|
||||
private:
|
||||
std::string _postLoadName;
|
||||
std::weak_ptr<Macro> _macro;
|
||||
};
|
||||
|
||||
EXPORT void SaveMacroList(obs_data_t *obj, const std::vector<MacroRef> ¯os,
|
||||
const std::string &name = "macros");
|
||||
EXPORT void LoadMacroList(obs_data_t *obj, std::vector<MacroRef> ¯os,
|
||||
const std::string &name = "macros");
|
||||
|
||||
} // namespace advss
|
||||
|
|
@ -19,7 +19,7 @@ namespace advss {
|
|||
|
||||
class Macro;
|
||||
|
||||
class MacroSegment {
|
||||
class EXPORT MacroSegment {
|
||||
public:
|
||||
MacroSegment(Macro *m, bool supportsVariableValue);
|
||||
virtual ~MacroSegment() = default;
|
||||
|
|
@ -8,7 +8,7 @@ namespace advss {
|
|||
class Macro;
|
||||
class MacroRef;
|
||||
|
||||
class MacroSelection : public FilterComboBox {
|
||||
class ADVSS_EXPORT MacroSelection : public FilterComboBox {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
#include "macro-dock.hpp"
|
||||
#include "macro-helpers.hpp"
|
||||
#include "plugin-state-helpers.hpp"
|
||||
#include "hotkey.hpp"
|
||||
#include "sync-helpers.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
|
|
@ -1181,8 +1180,6 @@ void SaveMacros(obs_data_t *obj)
|
|||
|
||||
void LoadMacros(obs_data_t *obj)
|
||||
{
|
||||
Hotkey::ClearAllHotkeys();
|
||||
|
||||
macros.clear();
|
||||
obs_data_array_t *macroArray = obs_data_get_array(obj, "macros");
|
||||
size_t count = obs_data_array_count(macroArray);
|
||||
|
|
@ -13,8 +13,8 @@
|
|||
#include <memory>
|
||||
#include <map>
|
||||
#include <thread>
|
||||
#include <obs.hpp>
|
||||
#include <obs-module.h>
|
||||
#include <obs-data.h>
|
||||
#include <obs-module-helper.hpp>
|
||||
|
||||
namespace advss {
|
||||
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
#include "platform-funcs.hpp"
|
||||
#include "hotkey.hpp"
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <CoreFoundation/CoreFoundation.h>
|
||||
|
|
@ -15,12 +14,6 @@
|
|||
|
||||
namespace advss {
|
||||
|
||||
bool canSimulateKeyPresses = false;
|
||||
|
||||
std::chrono::high_resolution_clock::time_point lastMouseLeftClickTime{};
|
||||
std::chrono::high_resolution_clock::time_point lastMouseMiddleClickTime{};
|
||||
std::chrono::high_resolution_clock::time_point lastMouseRightClickTime{};
|
||||
|
||||
void GetWindowList(std::vector<std::string> &windows)
|
||||
{
|
||||
windows.resize(0);
|
||||
|
|
@ -342,132 +335,6 @@ bool IsInFocus(const QString &executable)
|
|||
return (equals || matches);
|
||||
}
|
||||
|
||||
static std::map<HotkeyType, CGKeyCode> keyTable = {
|
||||
// Chars
|
||||
{HotkeyType::Key_A, kVK_ANSI_A},
|
||||
{HotkeyType::Key_B, kVK_ANSI_B},
|
||||
{HotkeyType::Key_C, kVK_ANSI_C},
|
||||
{HotkeyType::Key_D, kVK_ANSI_D},
|
||||
{HotkeyType::Key_E, kVK_ANSI_E},
|
||||
{HotkeyType::Key_F, kVK_ANSI_F},
|
||||
{HotkeyType::Key_G, kVK_ANSI_G},
|
||||
{HotkeyType::Key_H, kVK_ANSI_H},
|
||||
{HotkeyType::Key_I, kVK_ANSI_I},
|
||||
{HotkeyType::Key_J, kVK_ANSI_J},
|
||||
{HotkeyType::Key_K, kVK_ANSI_K},
|
||||
{HotkeyType::Key_L, kVK_ANSI_L},
|
||||
{HotkeyType::Key_M, kVK_ANSI_M},
|
||||
{HotkeyType::Key_N, kVK_ANSI_N},
|
||||
{HotkeyType::Key_O, kVK_ANSI_O},
|
||||
{HotkeyType::Key_P, kVK_ANSI_P},
|
||||
{HotkeyType::Key_Q, kVK_ANSI_Q},
|
||||
{HotkeyType::Key_R, kVK_ANSI_R},
|
||||
{HotkeyType::Key_S, kVK_ANSI_S},
|
||||
{HotkeyType::Key_T, kVK_ANSI_T},
|
||||
{HotkeyType::Key_U, kVK_ANSI_U},
|
||||
{HotkeyType::Key_V, kVK_ANSI_V},
|
||||
{HotkeyType::Key_W, kVK_ANSI_W},
|
||||
{HotkeyType::Key_X, kVK_ANSI_X},
|
||||
{HotkeyType::Key_Y, kVK_ANSI_Y},
|
||||
{HotkeyType::Key_Z, kVK_ANSI_Z},
|
||||
|
||||
// Numbers
|
||||
{HotkeyType::Key_0, kVK_ANSI_0},
|
||||
{HotkeyType::Key_1, kVK_ANSI_1},
|
||||
{HotkeyType::Key_2, kVK_ANSI_2},
|
||||
{HotkeyType::Key_3, kVK_ANSI_3},
|
||||
{HotkeyType::Key_4, kVK_ANSI_4},
|
||||
{HotkeyType::Key_5, kVK_ANSI_5},
|
||||
{HotkeyType::Key_6, kVK_ANSI_6},
|
||||
{HotkeyType::Key_7, kVK_ANSI_7},
|
||||
{HotkeyType::Key_8, kVK_ANSI_8},
|
||||
{HotkeyType::Key_9, kVK_ANSI_9},
|
||||
|
||||
{HotkeyType::Key_F1, kVK_F1},
|
||||
{HotkeyType::Key_F2, kVK_F2},
|
||||
{HotkeyType::Key_F3, kVK_F3},
|
||||
{HotkeyType::Key_F4, kVK_F4},
|
||||
{HotkeyType::Key_F5, kVK_F5},
|
||||
{HotkeyType::Key_F6, kVK_F6},
|
||||
{HotkeyType::Key_F7, kVK_F7},
|
||||
{HotkeyType::Key_F8, kVK_F8},
|
||||
{HotkeyType::Key_F9, kVK_F9},
|
||||
{HotkeyType::Key_F10, kVK_F10},
|
||||
{HotkeyType::Key_F11, kVK_F11},
|
||||
{HotkeyType::Key_F12, kVK_F12},
|
||||
{HotkeyType::Key_F13, kVK_F13},
|
||||
{HotkeyType::Key_F14, kVK_F14},
|
||||
{HotkeyType::Key_F15, kVK_F15},
|
||||
{HotkeyType::Key_F16, kVK_F16},
|
||||
{HotkeyType::Key_F17, kVK_F17},
|
||||
{HotkeyType::Key_F18, kVK_F18},
|
||||
{HotkeyType::Key_F19, kVK_F19},
|
||||
{HotkeyType::Key_F20, kVK_F20},
|
||||
// F21-F24 does not exist on MacOS
|
||||
|
||||
{HotkeyType::Key_Escape, kVK_Escape},
|
||||
{HotkeyType::Key_Space, kVK_Space},
|
||||
{HotkeyType::Key_Return, kVK_Return},
|
||||
{HotkeyType::Key_Backspace, kVK_Delete},
|
||||
{HotkeyType::Key_Tab, kVK_Tab},
|
||||
|
||||
{HotkeyType::Key_Shift_L, kVK_Shift},
|
||||
{HotkeyType::Key_Shift_R, kVK_RightShift},
|
||||
{HotkeyType::Key_Control_L, kVK_Control},
|
||||
{HotkeyType::Key_Control_R, kVK_RightControl},
|
||||
{HotkeyType::Key_Alt_L, kVK_Option},
|
||||
{HotkeyType::Key_Alt_R, kVK_RightOption},
|
||||
{HotkeyType::Key_Win_L, kVK_Command},
|
||||
{HotkeyType::Key_Win_R, kVK_RightCommand},
|
||||
// Not sure what Key_Apps would correspond to
|
||||
|
||||
{HotkeyType::Key_CapsLock, kVK_CapsLock},
|
||||
{HotkeyType::Key_NumLock, kVK_ANSI_KeypadClear},
|
||||
{HotkeyType::Key_ScrollLock, kVK_F14},
|
||||
|
||||
{HotkeyType::Key_PrintScreen, kVK_F13},
|
||||
{HotkeyType::Key_Pause, kVK_F15},
|
||||
|
||||
{HotkeyType::Key_Insert, kVK_Help},
|
||||
{HotkeyType::Key_Delete, kVK_ForwardDelete},
|
||||
{HotkeyType::Key_PageUP, kVK_PageUp},
|
||||
{HotkeyType::Key_PageDown, kVK_PageDown},
|
||||
{HotkeyType::Key_Home, kVK_Home},
|
||||
{HotkeyType::Key_End, kVK_End},
|
||||
|
||||
{HotkeyType::Key_Left, kVK_LeftArrow},
|
||||
{HotkeyType::Key_Up, kVK_UpArrow},
|
||||
{HotkeyType::Key_Right, kVK_RightArrow},
|
||||
{HotkeyType::Key_Down, kVK_DownArrow},
|
||||
|
||||
{HotkeyType::Key_Numpad0, kVK_ANSI_Keypad0},
|
||||
{HotkeyType::Key_Numpad1, kVK_ANSI_Keypad1},
|
||||
{HotkeyType::Key_Numpad2, kVK_ANSI_Keypad2},
|
||||
{HotkeyType::Key_Numpad3, kVK_ANSI_Keypad3},
|
||||
{HotkeyType::Key_Numpad4, kVK_ANSI_Keypad4},
|
||||
{HotkeyType::Key_Numpad5, kVK_ANSI_Keypad5},
|
||||
{HotkeyType::Key_Numpad6, kVK_ANSI_Keypad6},
|
||||
{HotkeyType::Key_Numpad7, kVK_ANSI_Keypad7},
|
||||
{HotkeyType::Key_Numpad8, kVK_ANSI_Keypad8},
|
||||
{HotkeyType::Key_Numpad9, kVK_ANSI_Keypad9},
|
||||
|
||||
{HotkeyType::Key_NumpadAdd, kVK_ANSI_KeypadPlus},
|
||||
{HotkeyType::Key_NumpadSubtract, kVK_ANSI_KeypadMinus},
|
||||
{HotkeyType::Key_NumpadMultiply, kVK_ANSI_KeypadMultiply},
|
||||
{HotkeyType::Key_NumpadDivide, kVK_ANSI_KeypadDivide},
|
||||
{HotkeyType::Key_NumpadDecimal, kVK_ANSI_KeypadDecimal},
|
||||
{HotkeyType::Key_NumpadEnter, kVK_ANSI_KeypadEnter},
|
||||
};
|
||||
|
||||
void PressKeys(const std::vector<HotkeyType> keys, int duration)
|
||||
{
|
||||
// TODO:
|
||||
// I can't seem to get this to work so drop support for this functionality
|
||||
// on MacOS
|
||||
canSimulateKeyPresses = false;
|
||||
return;
|
||||
}
|
||||
|
||||
void PlatformCleanup() {}
|
||||
|
||||
void PlatformInit() {}
|
||||
27
lib/platform-funcs.hpp
Normal file
27
lib/platform-funcs.hpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#pragma once
|
||||
#include "export-symbol-helper.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <QStringList>
|
||||
#include <chrono>
|
||||
#include <optional>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class HotkeyType;
|
||||
|
||||
EXPORT void GetWindowList(std::vector<std::string> &windows);
|
||||
EXPORT void GetWindowList(QStringList &windows);
|
||||
EXPORT void GetCurrentWindowTitle(std::string &title);
|
||||
EXPORT bool IsFullscreen(const std::string &title);
|
||||
EXPORT bool IsMaximized(const std::string &title);
|
||||
EXPORT std::optional<std::string> GetTextInWindow(const std::string &window);
|
||||
EXPORT int SecondsSinceLastInput();
|
||||
EXPORT void GetProcessList(QStringList &processes);
|
||||
EXPORT void GetForegroundProcessName(std::string &name);
|
||||
EXPORT bool IsInFocus(const QString &executable);
|
||||
void PlatformInit();
|
||||
void PlatformCleanup();
|
||||
|
||||
} // namespace advss
|
||||
|
|
@ -19,11 +19,6 @@ std::unique_lock<std::mutex> *GetSwitcherLoopLock()
|
|||
return switcher ? switcher->mainLoopLock : nullptr;
|
||||
}
|
||||
|
||||
bool VerboseLoggingEnabled()
|
||||
{
|
||||
return switcher ? switcher->verbose : false;
|
||||
}
|
||||
|
||||
SwitcherData::SwitcherData(obs_module_t *m, translateFunc t)
|
||||
{
|
||||
_modulePtr = m;
|
||||
|
|
@ -184,6 +179,24 @@ void SwitcherData::AddIntervalResetStep(std::function<void()> function,
|
|||
resetIntervalSteps.emplace_back(function);
|
||||
}
|
||||
|
||||
void SwitcherData::AddPluginInitStep(std::function<void()> function)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
pluginInitSteps.emplace_back(function);
|
||||
}
|
||||
|
||||
void SwitcherData::AddPluginPostLoadStep(std::function<void()> function)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
pluginPostLoadSteps.emplace_back(function);
|
||||
}
|
||||
|
||||
void SwitcherData::AddPluginCleanupStep(std::function<void()> function)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
pluginCleanupSteps.emplace_back(function);
|
||||
}
|
||||
|
||||
void SwitcherData::AddSaveStep(std::function<void(obs_data_t *)> function)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
|
|
@ -201,4 +214,136 @@ void SwitcherData::AddPostLoadStep(std::function<void()> function)
|
|||
postLoadSteps.emplace_back(function);
|
||||
}
|
||||
|
||||
static void startHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *, bool pressed)
|
||||
{
|
||||
if (pressed) {
|
||||
if (!(switcher->th && switcher->th->isRunning())) {
|
||||
switcher->Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void stopHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *, bool pressed)
|
||||
{
|
||||
if (pressed) {
|
||||
if (switcher->th && switcher->th->isRunning()) {
|
||||
switcher->Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void startStopToggleHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *,
|
||||
bool pressed)
|
||||
{
|
||||
if (pressed) {
|
||||
if (switcher->th && switcher->th->isRunning()) {
|
||||
switcher->Stop();
|
||||
} else {
|
||||
switcher->Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QWidget *GetSettingsWindow();
|
||||
|
||||
static void upMacroSegmentHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *,
|
||||
bool pressed)
|
||||
{
|
||||
if (pressed && SettingsWindowIsOpened()) {
|
||||
QMetaObject::invokeMethod(GetSettingsWindow(),
|
||||
"UpMacroSegementHotkey",
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
}
|
||||
|
||||
static void downMacroSegmentHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *,
|
||||
bool pressed)
|
||||
{
|
||||
if (pressed && SettingsWindowIsOpened()) {
|
||||
QMetaObject::invokeMethod(GetSettingsWindow(),
|
||||
"DownMacroSegementHotkey",
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
}
|
||||
|
||||
static void removeMacroSegmentHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *,
|
||||
bool pressed)
|
||||
{
|
||||
if (pressed && SettingsWindowIsOpened()) {
|
||||
QMetaObject::invokeMethod(GetSettingsWindow(),
|
||||
"DeleteMacroSegementHotkey",
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
}
|
||||
|
||||
static void registerHotkeys()
|
||||
{
|
||||
switcher->startHotkey = obs_hotkey_register_frontend(
|
||||
"startSwitcherHotkey",
|
||||
obs_module_text("AdvSceneSwitcher.hotkey.startSwitcherHotkey"),
|
||||
startHotkeyFunc, NULL);
|
||||
switcher->stopHotkey = obs_hotkey_register_frontend(
|
||||
"stopSwitcherHotkey",
|
||||
obs_module_text("AdvSceneSwitcher.hotkey.stopSwitcherHotkey"),
|
||||
stopHotkeyFunc, NULL);
|
||||
switcher->toggleHotkey = obs_hotkey_register_frontend(
|
||||
"startStopToggleSwitcherHotkey",
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey"),
|
||||
startStopToggleHotkeyFunc, NULL);
|
||||
switcher->upMacroSegment = obs_hotkey_register_frontend(
|
||||
"upMacroSegmentSwitcherHotkey",
|
||||
obs_module_text("AdvSceneSwitcher.hotkey.upMacroSegmentHotkey"),
|
||||
upMacroSegmentHotkeyFunc, NULL);
|
||||
switcher->downMacroSegment = obs_hotkey_register_frontend(
|
||||
"downMacroSegmentSwitcherHotkey",
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.hotkey.downMacroSegmentHotkey"),
|
||||
downMacroSegmentHotkeyFunc, NULL);
|
||||
switcher->removeMacroSegment = obs_hotkey_register_frontend(
|
||||
"removeMacroSegmentSwitcherHotkey",
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.hotkey.removeMacroSegmentHotkey"),
|
||||
removeMacroSegmentHotkeyFunc, NULL);
|
||||
|
||||
switcher->hotkeysRegistered = true;
|
||||
}
|
||||
|
||||
static void saveHotkey(obs_data_t *obj, obs_hotkey_id id, const char *name)
|
||||
{
|
||||
obs_data_array_t *a = obs_hotkey_save(id);
|
||||
obs_data_set_array(obj, name, a);
|
||||
obs_data_array_release(a);
|
||||
}
|
||||
|
||||
void SwitcherData::SaveHotkeys(obs_data_t *obj)
|
||||
{
|
||||
saveHotkey(obj, startHotkey, "startHotkey");
|
||||
saveHotkey(obj, stopHotkey, "stopHotkey");
|
||||
saveHotkey(obj, toggleHotkey, "toggleHotkey");
|
||||
saveHotkey(obj, upMacroSegment, "upMacroSegmentHotkey");
|
||||
saveHotkey(obj, downMacroSegment, "downMacroSegmentHotkey");
|
||||
saveHotkey(obj, removeMacroSegment, "removeMacroSegmentHotkey");
|
||||
}
|
||||
|
||||
static void loadHotkey(obs_data_t *obj, obs_hotkey_id id, const char *name)
|
||||
{
|
||||
obs_data_array_t *a = obs_data_get_array(obj, name);
|
||||
obs_hotkey_load(id, a);
|
||||
obs_data_array_release(a);
|
||||
}
|
||||
|
||||
void SwitcherData::LoadHotkeys(obs_data_t *obj)
|
||||
{
|
||||
if (!hotkeysRegistered) {
|
||||
registerHotkeys();
|
||||
}
|
||||
loadHotkey(obj, startHotkey, "startHotkey");
|
||||
loadHotkey(obj, stopHotkey, "stopHotkey");
|
||||
loadHotkey(obj, toggleHotkey, "toggleHotkey");
|
||||
loadHotkey(obj, upMacroSegment, "upMacroSegmentHotkey");
|
||||
loadHotkey(obj, downMacroSegment, "downMacroSegmentHotkey");
|
||||
loadHotkey(obj, removeMacroSegment, "removeMacroSegmentHotkey");
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
@ -19,7 +19,6 @@
|
|||
#include "macro-properties.hpp"
|
||||
#include "duration-control.hpp"
|
||||
#include "priority-helper.hpp"
|
||||
#include "log-helper.hpp"
|
||||
#include "plugin-state-helpers.hpp"
|
||||
|
||||
#include <condition_variable>
|
||||
|
|
@ -46,7 +45,6 @@ extern SwitcherData *switcher;
|
|||
SwitcherData *GetSwitcher();
|
||||
std::mutex *GetSwitcherMutex();
|
||||
std::unique_lock<std::mutex> *GetSwitcherLoopLock();
|
||||
bool VerboseLoggingEnabled();
|
||||
|
||||
class SwitcherData {
|
||||
public:
|
||||
|
|
@ -67,6 +65,9 @@ public:
|
|||
void AddLoadStep(std::function<void(obs_data_t *)>);
|
||||
void AddPostLoadStep(std::function<void()>);
|
||||
void AddIntervalResetStep(std::function<void()>, bool lock = true);
|
||||
void AddPluginInitStep(std::function<void()>);
|
||||
void AddPluginPostLoadStep(std::function<void()>);
|
||||
void AddPluginCleanupStep(std::function<void()>);
|
||||
bool CheckForMatch(OBSWeakSource &scene, OBSWeakSource &transition,
|
||||
int &linger, bool &setPreviousSceneAsMatch,
|
||||
bool ¯oMatch);
|
||||
|
|
@ -107,6 +108,9 @@ public:
|
|||
std::vector<std::function<void(obs_data_t *)>> loadSteps;
|
||||
std::vector<std::function<void()>> postLoadSteps;
|
||||
std::vector<std::function<void()>> resetIntervalSteps;
|
||||
std::vector<std::function<void()>> pluginInitSteps;
|
||||
std::vector<std::function<void()>> pluginPostLoadSteps;
|
||||
std::vector<std::function<void()>> pluginCleanupSteps;
|
||||
|
||||
bool firstBoot = true;
|
||||
bool transitionActive = false;
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
#include "action-queue.hpp"
|
||||
#include "obs-module-helper.hpp"
|
||||
#include "plugin-state-helpers.hpp"
|
||||
|
||||
namespace advss {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user