Dependency injection for apu/gpu/hid.

This commit is contained in:
Ben Vanik
2015-11-08 15:02:24 -08:00
parent 9a6c5c5c74
commit 5834a42ef3
34 changed files with 217 additions and 158 deletions

View File

@@ -15,8 +15,8 @@ namespace xe {
namespace hid {
namespace nop {
std::unique_ptr<InputDriver> Create(InputSystem* input_system) {
return std::make_unique<NopInputDriver>(input_system);
std::unique_ptr<InputDriver> Create(xe::ui::Window* window) {
return std::make_unique<NopInputDriver>(window);
}
} // namespace nop

View File

@@ -18,7 +18,7 @@ namespace xe {
namespace hid {
namespace nop {
std::unique_ptr<InputDriver> Create(InputSystem* input_system);
std::unique_ptr<InputDriver> Create(xe::ui::Window* window);
} // namespace nop
} // namespace hid

View File

@@ -15,10 +15,9 @@ namespace xe {
namespace hid {
namespace nop {
NopInputDriver::NopInputDriver(InputSystem* input_system)
: InputDriver(input_system) {}
NopInputDriver::NopInputDriver(xe::ui::Window* window) : InputDriver(window) {}
NopInputDriver::~NopInputDriver() {}
NopInputDriver::~NopInputDriver() = default;
X_STATUS NopInputDriver::Setup() { return X_STATUS_SUCCESS; }

View File

@@ -18,7 +18,7 @@ namespace nop {
class NopInputDriver : public InputDriver {
public:
explicit NopInputDriver(InputSystem* input_system);
explicit NopInputDriver(xe::ui::Window* window);
~NopInputDriver() override;
X_STATUS Setup() override;