From ac33d9ee9738e69b9a6c77c040cff666ccea3351 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Thu, 19 Nov 2026 11:34:08 -0800 Subject: [PATCH 1/2] test: characterize hotkey combination background id and require extraction (RED, Refs #5275) --- test/cmocka/build/test-graph.json | 24 +++ .../test_hotkey_combination_background_id.c | 188 ++++++++++++++++++ ...est_hotkey_combination_background_id.cmake | 1 + 3 files changed, 213 insertions(+) create mode 100644 test/cmocka/test_hotkey_combination_background_id.c create mode 100644 test/cmocka/tests.d/test_hotkey_combination_background_id.cmake diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index c9b5daa111..96f3041bb1 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -6525,6 +6525,24 @@ "frontend/settings/OBSHotkeyCapture.hpp" ] }, + "test_hotkey_combination_background_id": { + "libraries": [ + "OBS::libobs", + "OBS::caption", + "Uthash::Uthash", + "OBS::native-test-cmocka", + { + "name": "OBS::w32-pthreads", + "requires": "OS_WINDOWS" + } + ], + "sources": [ + "test/cmocka/test_hotkey_combination_background_id.c" + ], + "header_libraries": [ + "SIMDe::SIMDe" + ] + }, "test_hotkey_context_data": { "sources": [ "test/cmocka/test_hotkey_context_data.c" @@ -24352,6 +24370,12 @@ "timing" ] }, + "test_hotkey_combination_background_id": { + "command": [ + "${target}" + ], + "target": "test_hotkey_combination_background_id" + }, "test_hotkey_context_data": { "target": "test_hotkey_context_data", "command": [ diff --git a/test/cmocka/test_hotkey_combination_background_id.c b/test/cmocka/test_hotkey_combination_background_id.c new file mode 100644 index 0000000000..625fb5c727 --- /dev/null +++ b/test/cmocka/test_hotkey_combination_background_id.c @@ -0,0 +1,188 @@ +/* C-source characterization; the external seam is reserved for the Rust swap. + * No desktop or threads: recording hooks enforce lock/callback ordering. */ +#include +#include +#include +#include +#include +#include "libobs/build/libobs.pch.h" + +static struct obs_core core; +static bool lock_result, locked; +static unsigned locks, unlocks, reads, calls, frees; +static char events[32]; +static size_t event_count; +static obs_key_combination_t expected_combo; +static char *allocation; +static bool (*lock_callback)(obs_key_combination_t, struct dstr *); + +enum output_kind { NO_OUTPUT, EMPTY_OUTPUT, TEXT_OUTPUT, PARTIAL_OUTPUT, FAILED_EMPTY, REENTER }; +static enum output_kind output_kind; + +static void event(char value) +{ + assert_true(event_count + 1 < sizeof(events)); + events[event_count++] = value; + events[event_count] = '\0'; +} + +static struct obs_core *record_core(void) +{ + assert_true(locked); + reads++; + event('R'); + return &core; +} + +static bool wrong_callback(obs_key_combination_t combo, struct dstr *id) +{ + (void)combo; + (void)id; + assert_true(false); + return false; +} + +static inline bool lock(void) +{ + assert_false(locked); + locks++; + event('L'); + locked = lock_result; + /* The current callback becomes available only when locking succeeds. */ + core.hotkeys.background.shortcut_id = lock_callback; + return lock_result; +} + +static inline void unlock(void) +{ + assert_true(locked); + assert_int_equal(reads, locks); + unlocks++; + event('U'); + locked = false; + /* The wrapper must invoke its saved callback, not read this after unlock. */ + core.hotkeys.background.shortcut_id = wrong_callback; +} + +static void record_free(struct dstr *id) +{ + assert_false(locked); + frees++; + event('F'); + assert_ptr_equal(id->array, allocation); + dstr_free(id); + assert_null(id->array); + assert_int_equal(id->len, 0); + assert_int_equal(id->capacity, 0); +} + +#ifndef HOTKEY_COMBO_ID_EXTERNAL +#ifndef HOTKEY_COMBO_ID_SOURCE +#define HOTKEY_COMBO_ID_SOURCE "libobs/obs-hotkey-combination-background-id.c.h" +#endif +#define obs record_core() +#define dstr_free record_free +#include HOTKEY_COMBO_ID_SOURCE +#undef dstr_free +#undef obs +#endif + +static bool callback(obs_key_combination_t combo, struct dstr *id) +{ + assert_false(locked); + assert_int_equal(unlocks, 1); + assert_int_equal(calls, 0); + calls++; + event('C'); + assert_int_equal(combo.key, expected_combo.key); + assert_int_equal(combo.modifiers, expected_combo.modifiers); + assert_null(id->array); + assert_int_equal(id->len, 0); + assert_int_equal(id->capacity, 0); + if (output_kind == REENTER) { + /* Reenter the public wrapper after release, with no nested callback. */ + lock_callback = NULL; + assert_null(obs_hotkey_combination_get_background_id(combo)); + } else if (output_kind != NO_OUTPUT && output_kind != FAILED_EMPTY) { + dstr_copy(id, output_kind == EMPTY_OUTPUT ? "" : "background-id"); + /* An empty successful result may still own an allocated empty string. */ + if (!id->array) + id->array = bzalloc(1); + allocation = id->array; + } + return output_kind != PARTIAL_OUTPUT && output_kind != FAILED_EMPTY; +} + +static void query(bool success, bool with_callback, enum output_kind kind, obs_key_combination_t combo) +{ + memset(&core, 0, sizeof(core)); + memset(events, 0, sizeof(events)); + lock_result = success; + locked = false; + locks = unlocks = reads = calls = frees = 0; + event_count = 0; + allocation = NULL; + output_kind = kind; + expected_combo = combo; + lock_callback = with_callback ? callback : NULL; + core.hotkeys.background.shortcut_id = wrong_callback; + long before = bnum_allocs(); + char *result = obs_hotkey_combination_get_background_id(combo); + bool invoked = success && with_callback; + bool nested = invoked && kind == REENTER; + assert_false(locked); + assert_int_equal(locks, nested ? 2 : 1); + assert_int_equal(unlocks, success ? (nested ? 2 : 1) : 0); + assert_int_equal(reads, unlocks); + assert_int_equal(calls, invoked ? 1 : 0); + assert_int_equal( + frees, success && (!with_callback || kind == PARTIAL_OUTPUT || kind == FAILED_EMPTY || nested) ? 1 : 0); + if (!success) { + assert_string_equal(events, "L"); + } else if (!with_callback) { + assert_string_equal(events, "LRUF"); + } else { + assert_string_equal(events, nested ? "LRUCLRUF" + : (kind == PARTIAL_OUTPUT || kind == FAILED_EMPTY) ? "LRUCF" + : "LRUC"); + } + if (invoked && (kind == EMPTY_OUTPUT || kind == TEXT_OUTPUT)) { + assert_ptr_equal(result, allocation); + assert_non_null(result); + assert_string_equal(result, kind == EMPTY_OUTPUT ? "" : "background-id"); + assert_int_equal(bnum_allocs(), before + 1); + /* Exact C allocator ownership transfers to the caller. */ + bfree(result); + } else { + /* Characterized, not endorsed: callback success may return NULL. */ + assert_null(result); + } + assert_int_equal(bnum_allocs(), before); +} + +static void lock_and_callback_contract(void **unused) +{ + (void)unused; + const obs_key_combination_t combinations[] = { + {0, OBS_KEY_NONE}, + {INTERACT_CONTROL_KEY | INTERACT_SHIFT_KEY, OBS_KEY_A}, + {UINT32_MAX, OBS_KEY_MOUSE1}, + }; + for (size_t i = 0; i < sizeof(combinations) / sizeof(combinations[0]); i++) { + query(false, false, NO_OUTPUT, combinations[i]); + query(false, true, PARTIAL_OUTPUT, combinations[i]); + query(true, false, NO_OUTPUT, combinations[i]); + query(true, true, NO_OUTPUT, combinations[i]); + query(true, true, EMPTY_OUTPUT, combinations[i]); + query(true, true, TEXT_OUTPUT, combinations[i]); + query(true, true, PARTIAL_OUTPUT, combinations[i]); + query(true, true, FAILED_EMPTY, combinations[i]); + query(true, true, REENTER, combinations[i]); + } +} + +int main(void) +{ + const struct CMUnitTest tests[] = {cmocka_unit_test(lock_and_callback_contract)}; + return cmocka_run_group_tests(tests, NULL, NULL); +} diff --git a/test/cmocka/tests.d/test_hotkey_combination_background_id.cmake b/test/cmocka/tests.d/test_hotkey_combination_background_id.cmake new file mode 100644 index 0000000000..097d1362a9 --- /dev/null +++ b/test/cmocka/tests.d/test_hotkey_combination_background_id.cmake @@ -0,0 +1 @@ +# Both target and test are declared in ../build/test-graph.json. From 0858b16d135dcb7d14066e5674cc1a18a7fd1379 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Thu, 19 Nov 2026 11:37:02 -0800 Subject: [PATCH 2/2] libobs: extract hotkey combination background id verbatim (Refs #5275) Ci-Attestation: {"at":1795124964,"gate":"general/all/client-lint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"44c8ffffc36b9aa2235ed0a0cb972828","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124970,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"681c16b3678da13df7283ca3db7fe17e","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124971,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"59df1d9ae07c76bca955af338378782e","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124968,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"89dc8e81329812e3e25cf4edb413e846","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124969,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"8d713602bd376c987d7dbc78b0039a40","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124966,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"4a06c4f644058bf25551f81ac7feaecc","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124967,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"7f07fa076920f2a8607d078110aa6545","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124970,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"91113e18292be5b566046b3e2c08056d","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124970,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"c48ed21ef75d8e20bfb31cd048499a65","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124967,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"538401b13285c6a94888afe56a2122ed","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124968,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"6390cd77607ba92bbd7bebbde3609fa2","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124965,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"913437ae6aaf2784e1291986b9efb768","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} Ci-Attestation: {"at":1795124966,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"5984feb9ecb7cdcb7e28fc8ce2cb13a1a1e481a206ba042c700f23cea662221c","lane":"client-lint","parents":["ac33d9ee9738e69b9a6c77c040cff666ccea3351"],"secs":1188,"stamp":"6f4e159cc4c6244e47604b0a797b097c","tree":"f9a042082323e0c3205a76b12e24c462b6ad547b","v":1,"via":"run"} --- ci/test_hotkey_register_extraction.py | 8 ++++++- libobs/build/libobs.core+.h.c | 1 + .../obs-hotkey-combination-background-id.c.h | 21 ++++++++++++++++++ libobs/obs-hotkey.c.h | 16 -------------- .../headless_characterizations_expected.json | 2 ++ .../registration/portal_output_expected.json | 2 ++ .../test_hotkey_background_enum.json | 2 ++ .../test_hotkey_background_press.json | 2 ++ .../test_hotkey_background_trigger.json | 2 ++ .../test_hotkey_binding_press_steps.json | 2 ++ .../test_hotkey_getters_characterization.json | 2 ++ .../hotkey-control/test_hotkey_load.json | 2 ++ .../test_hotkey_pair_steps.json | 2 ++ .../test_hotkey_press_steps.json | 2 ++ .../test_hotkey_unregister_entry.json | 2 ++ .../hotkey-control/test_portal_shortcuts.json | 2 ++ .../hotkey-control/test_wayland_hotkeys.json | 2 ++ test/cmocka/build/test-graph.json | 22 +++++++++++++++++++ 18 files changed, 77 insertions(+), 17 deletions(-) create mode 100644 libobs/obs-hotkey-combination-background-id.c.h diff --git a/ci/test_hotkey_register_extraction.py b/ci/test_hotkey_register_extraction.py index effde6f92e..972e369b99 100644 --- a/ci/test_hotkey_register_extraction.py +++ b/ci/test_hotkey_register_extraction.py @@ -46,7 +46,13 @@ def test_isolated_cores_compile_registration_in_the_same_translation_unit(self): self.assertEqual(target.get("pch"), "libobs/build/libobs.pch.h") groups = list(target.get("unity_groups", {}).values()) self.assertIn( - [EXTRACTED, "libobs/obs-hotkey-background-state.c.h", ORIGINAL], groups + [ + EXTRACTED, + "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", + ORIGINAL, + ], + groups, ) self.assertCountEqual( [source for group in groups for source in group], target["sources"] diff --git a/libobs/build/libobs.core+.h.c b/libobs/build/libobs.core+.h.c index 4f39379c9b..4489fe769a 100644 --- a/libobs/build/libobs.core+.h.c +++ b/libobs/build/libobs.core+.h.c @@ -25,6 +25,7 @@ #include "libobs/obs-hotkey-background-press-fields.c.h" #include "libobs/obs-hotkey-background-state.c.h" #include "libobs/obs-hotkey-background-trigger-fields.c.h" +#include "libobs/obs-hotkey-combination-background-id.c.h" #include "libobs/obs-hotkey-enum-fields.c.h" #include "libobs/obs-hotkey-identity-fields.c.h" #include "libobs/obs-hotkey-identity-setter-fields.c.h" diff --git a/libobs/obs-hotkey-combination-background-id.c.h b/libobs/obs-hotkey-combination-background-id.c.h new file mode 100644 index 0000000000..190dfcb049 --- /dev/null +++ b/libobs/obs-hotkey-combination-background-id.c.h @@ -0,0 +1,21 @@ +#include "libobs/build/libobs.pch.h" + +/* Defined in obs-hotkey.c.h, later in the same unity group. */ +static inline bool lock(void); +static inline void unlock(void); + +char *obs_hotkey_combination_get_background_id(obs_key_combination_t combo) +{ + if (!lock()) + return NULL; + + struct dstr id = {0}; + bool (*shortcut_id)(obs_key_combination_t, struct dstr *) = obs->hotkeys.background.shortcut_id; + unlock(); + + if (!shortcut_id || !shortcut_id(combo, &id)) { + dstr_free(&id); + return NULL; + } + return id.array; +} diff --git a/libobs/obs-hotkey.c.h b/libobs/obs-hotkey.c.h index 9b73669900..dbc91f7661 100644 --- a/libobs/obs-hotkey.c.h +++ b/libobs/obs-hotkey.c.h @@ -475,22 +475,6 @@ void obs_hotkeys_background_status_changed(void) signal_handler_signal(obs->hotkeys.signals, "hotkey_background_status_changed", NULL); } -char *obs_hotkey_combination_get_background_id(obs_key_combination_t combo) -{ - if (!lock()) - return NULL; - - struct dstr id = {0}; - bool (*shortcut_id)(obs_key_combination_t, struct dstr *) = obs->hotkeys.background.shortcut_id; - unlock(); - - if (!shortcut_id || !shortcut_id(combo, &id)) { - dstr_free(&id); - return NULL; - } - return id.array; -} - struct obs_query_hotkeys_helper { uint32_t modifiers; bool no_press; diff --git a/rust/obs-build/tests/native/registration/headless_characterizations_expected.json b/rust/obs-build/tests/native/registration/headless_characterizations_expected.json index 7678262dd7..594bb800e1 100644 --- a/rust/obs-build/tests/native/registration/headless_characterizations_expected.json +++ b/rust/obs-build/tests/native/registration/headless_characterizations_expected.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -76,6 +77,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/portal_output_expected.json b/rust/obs-build/tests/native/registration/portal_output_expected.json index 939027a17b..e86e4f2c89 100644 --- a/rust/obs-build/tests/native/registration/portal_output_expected.json +++ b/rust/obs-build/tests/native/registration/portal_output_expected.json @@ -87,6 +87,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -160,6 +161,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json index e04204e27f..c31a05fd07 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_enum.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -61,6 +62,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json index ca7835ce9f..de96d06840 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_press.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -61,6 +62,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json index b1082cd601..a8dfcd7b86 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_background_trigger.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -61,6 +62,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json index a277a863e3..b669cf3d27 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_binding_press_steps.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -59,6 +60,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json index eb5d068c01..901f95a4f2 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_getters_characterization.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -57,6 +58,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json index d3c28d9896..7d945a61e0 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_load.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -56,6 +57,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json index 9fb3c2acad..bb8fe1a94a 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_pair_steps.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -59,6 +60,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json index a5bd7e5e08..572cb33cfa 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_press_steps.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -59,6 +60,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_unregister_entry.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_unregister_entry.json index d0069da039..43521f2285 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_unregister_entry.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_hotkey_unregister_entry.json @@ -9,6 +9,7 @@ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -58,6 +59,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister_entry": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json index 4151c47d38..c56635a2f9 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_portal_shortcuts.json @@ -14,6 +14,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -81,6 +82,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json index 4130bec955..e20ad0ba55 100644 --- a/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json +++ b/rust/obs-build/tests/native/registration/rust-static/cases/hotkey-control/test_wayland_hotkeys.json @@ -10,6 +10,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -70,6 +71,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ diff --git a/test/cmocka/build/test-graph.json b/test/cmocka/build/test-graph.json index 96f3041bb1..f6f7e86018 100644 --- a/test/cmocka/build/test-graph.json +++ b/test/cmocka/build/test-graph.json @@ -5878,6 +5878,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -5929,6 +5930,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ @@ -6029,6 +6031,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -6080,6 +6083,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ @@ -6183,6 +6187,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -6234,6 +6239,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ @@ -6380,6 +6386,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -6435,6 +6442,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ @@ -6584,6 +6592,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -6636,6 +6645,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ @@ -6755,6 +6765,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -6806,6 +6817,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ @@ -6932,6 +6944,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -6987,6 +7000,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ @@ -7053,6 +7067,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -7108,6 +7123,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ @@ -7188,6 +7204,7 @@ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -7242,6 +7259,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister_entry": [ @@ -12052,6 +12070,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -12125,6 +12144,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [ @@ -20966,6 +20986,7 @@ "libobs/obs-hotkey-background-control-fields.c.h", "libobs/obs-hotkey-unregister.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h", "libobs/obs-hotkey-unregister-entry-fields.c.h", "libobs/obs-hotkey-inject-entry-fields.c.h", @@ -21032,6 +21053,7 @@ "hotkey_registration": [ "libobs/obs-hotkey-register.c.h", "libobs/obs-hotkey-background-state.c.h", + "libobs/obs-hotkey-combination-background-id.c.h", "libobs/obs-hotkey.c.h" ], "hotkey_unregister": [