Пример #1
0
void OBSBasicTransform::OBSSceneItemDeselect(void *param, calldata_t *data)
{
	OBSBasicTransform *window = reinterpret_cast<OBSBasicTransform*>(param);
	OBSScene     scene = (obs_scene_t*)calldata_ptr(data, "scene");
	OBSSceneItem item  = (obs_sceneitem_t*)calldata_ptr(data, "item");

	if (item == window->item)
		window->SetItem(FindASelectedItem(scene));
}
void BiliSceneWidgetItem::OnItemVisibleChanged(void *param, calldata_t *data)
{
	obs_scene_t* pScene = (obs_scene_t*)calldata_ptr(data, "scene");
	obs_sceneitem_t* pSceneItem = (obs_sceneitem_t*)calldata_ptr(data, "item");
	bool visible = calldata_bool(data, "visible");

	auto This = (BiliSceneWidgetItem*)param;
	
	This->OnItemVisibleChangedImpl(pScene, pSceneItem, visible);
}
void OBSBasicAdvAudio::OBSSourceAdded(void *param, calldata_t *calldata)
{
	OBSSource source((obs_source_t*)calldata_ptr(calldata, "source"));

	QMetaObject::invokeMethod(reinterpret_cast<OBSBasicAdvAudio*>(param),
			"SourceAdded", Q_ARG(OBSSource, source));
}
void OBSBasicSourceSelect::OBSSourceRemoved(void *data, calldata_t calldata)
{
	OBSBasicSourceSelect *window = static_cast<OBSBasicSourceSelect*>(data);
	obs_source_t source = (obs_source_t)calldata_ptr(calldata, "source");

	QMetaObject::invokeMethod(window, "SourceRemoved",
			Q_ARG(OBSSource, source));
}
Пример #5
0
void OBSBasicTransform::OBSSceneItemSelect(void *param, calldata_t *data)
{
	OBSBasicTransform *window = reinterpret_cast<OBSBasicTransform*>(param);
	OBSSceneItem item  = (obs_sceneitem_t*)calldata_ptr(data, "item");

	if (item != window->item)
		window->SetItem(item);
}
Пример #6
0
void OBSBasicTransform::OBSSceneItemTransform(void *param, calldata_t *data)
{
	OBSBasicTransform *window = reinterpret_cast<OBSBasicTransform*>(param);
	OBSSceneItem item = (obs_sceneitem_t*)calldata_ptr(data, "item");

	if (item == window->item && !window->ignoreTransformSignal)
		QMetaObject::invokeMethod(window, "RefreshControls");
}
Пример #7
0
void OBSHotkeyWidget::BindingsChanged(void *data, calldata_t *param)
{
	auto widget = static_cast<OBSHotkeyWidget*>(data);
	auto key    = static_cast<obs_hotkey_t*>(calldata_ptr(param, "key"));

	QMetaObject::invokeMethod(widget, "HandleChangedBindings",
			Q_ARG(obs_hotkey_id, obs_hotkey_get_id(key)));
}
Пример #8
0
void OBSBasicTransform::OBSChannelChanged(void *param, calldata_t *data)
{
	OBSBasicTransform *window = reinterpret_cast<OBSBasicTransform*>(param);
	uint32_t channel = (uint32_t)calldata_int(data, "channel");
	OBSSource source = (obs_source_t*)calldata_ptr(data, "source");

	if (channel == 0) {
		OBSScene scene = obs_scene_from_source(source);
		window->SetScene(scene);

		if (!scene)
			window->SetItem(nullptr);
		else
			window->SetItem(FindASelectedItem(scene));
	}
}