0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
obs-studio/obs/window-basic-transform.hpp
jp9000 c9df41c1e2 (API Change) Remove pointers from all typedefs
Typedef pointers are unsafe.  If you do:
typedef struct bla *bla_t;
then you cannot use it as a constant, such as: const bla_t, because
that constant will be to the pointer itself rather than to the
underlying data.  I admit this was a fundamental mistake that must
be corrected.

All typedefs that were pointer types will now have their pointers
removed from the type itself, and the pointers will be used when they
are actually used as variables/parameters/returns instead.

This does not break ABI though, which is pretty nice.
2014-09-25 21:48:11 -07:00

48 lines
1.1 KiB
C++

#pragma once
#include <obs.hpp>
#include <memory>
#include "ui_OBSBasicTransform.h"
class OBSBasic;
class OBSBasicTransform : public QDialog {
Q_OBJECT
private:
std::unique_ptr<Ui::OBSBasicTransform> ui;
OBSBasic *main;
OBSSceneItem item;
OBSSignal channelChangedSignal;
OBSSignal transformSignal;
OBSSignal removeSignal;
OBSSignal selectSignal;
OBSSignal deselectSignal;
bool ignoreTransformSignal = false;
bool ignoreItemChange = false;
void HookWidget(QWidget *widget, const char *signal, const char *slot);
void SetScene(OBSScene scene);
void SetItem(OBSSceneItem newItem);
static void OBSChannelChanged(void *param, calldata_t *data);
static void OBSSceneItemTransform(void *param, calldata_t *data);
static void OBSSceneItemRemoved(void *param, calldata_t *data);
static void OBSSceneItemSelect(void *param, calldata_t *data);
static void OBSSceneItemDeselect(void *param, calldata_t *data);
private slots:
void RefreshControls();
void SetItemQt(OBSSceneItem newItem);
void OnBoundsType(int index);
void OnControlChanged();
public:
OBSBasicTransform(OBSBasic *parent);
};