Skip to content

Commit

Permalink
Sanitate the names of the window and event system members.
Browse files Browse the repository at this point in the history
Wrap the event system implementation to a class.
  • Loading branch information
zhangdoa committed Dec 9, 2023
1 parent 463f8fd commit 4813478
Show file tree
Hide file tree
Showing 27 changed files with 349 additions and 361 deletions.
40 changes: 20 additions & 20 deletions Source/Client/LogicClient/Player.inl
Original file line number Diff line number Diff line change
Expand Up @@ -216,32 +216,32 @@ namespace Inno
static_cast<ICameraSystem*>(g_Engine->getComponentManager()->GetComponentSystem<CameraComponent>())->SetActiveCamera(m_activeCameraComponent);
};

g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_W, true }, ButtonEvent{ EventLifeTime::Continuous, &f_moveForward });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_S, true }, ButtonEvent{ EventLifeTime::Continuous, &f_moveBackward });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_A, true }, ButtonEvent{ EventLifeTime::Continuous, &f_moveLeft });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_D, true }, ButtonEvent{ EventLifeTime::Continuous, &f_moveRight });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_W, true }, ButtonEvent{ EventLifeTime::Continuous, &f_moveForward });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_S, true }, ButtonEvent{ EventLifeTime::Continuous, &f_moveBackward });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_A, true }, ButtonEvent{ EventLifeTime::Continuous, &f_moveLeft });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_D, true }, ButtonEvent{ EventLifeTime::Continuous, &f_moveRight });

g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_W, true }, ButtonEvent{ EventLifeTime::OneShot, &f_move });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_S, true }, ButtonEvent{ EventLifeTime::OneShot, &f_move });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_A, true }, ButtonEvent{ EventLifeTime::OneShot, &f_move });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_D, true }, ButtonEvent{ EventLifeTime::OneShot, &f_move });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_W, true }, ButtonEvent{ EventLifeTime::OneShot, &f_move });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_S, true }, ButtonEvent{ EventLifeTime::OneShot, &f_move });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_A, true }, ButtonEvent{ EventLifeTime::OneShot, &f_move });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_D, true }, ButtonEvent{ EventLifeTime::OneShot, &f_move });

g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_W, false }, ButtonEvent{ EventLifeTime::OneShot, &f_stop });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_S, false }, ButtonEvent{ EventLifeTime::OneShot, &f_stop });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_A, false }, ButtonEvent{ EventLifeTime::OneShot, &f_stop });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_D, false }, ButtonEvent{ EventLifeTime::OneShot, &f_stop });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_W, false }, ButtonEvent{ EventLifeTime::OneShot, &f_stop });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_S, false }, ButtonEvent{ EventLifeTime::OneShot, &f_stop });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_A, false }, ButtonEvent{ EventLifeTime::OneShot, &f_stop });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_D, false }, ButtonEvent{ EventLifeTime::OneShot, &f_stop });

g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_E, true }, ButtonEvent{ EventLifeTime::OneShot, &f_addForce });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_E, true }, ButtonEvent{ EventLifeTime::OneShot, &f_addForce });

g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_SPACE, true }, ButtonEvent{ EventLifeTime::Continuous, &f_speedUp });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_SPACE, false }, ButtonEvent{ EventLifeTime::Continuous, &f_speedDown });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_SPACE, true }, ButtonEvent{ EventLifeTime::Continuous, &f_speedUp });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_SPACE, false }, ButtonEvent{ EventLifeTime::Continuous, &f_speedDown });

g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_MOUSE_BUTTON_RIGHT, true }, ButtonEvent{ EventLifeTime::Continuous, &f_allowMove });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_MOUSE_BUTTON_RIGHT, false }, ButtonEvent{ EventLifeTime::Continuous, &f_forbidMove });
g_Engine->getEventSystem()->addMouseMovementCallback(MouseMovementAxis::Horizontal, MouseMovementEvent{ EventLifeTime::OneShot, &f_rotateAroundPositiveYAxis });
g_Engine->getEventSystem()->addMouseMovementCallback(MouseMovementAxis::Vertical, MouseMovementEvent{ EventLifeTime::OneShot, &f_rotateAroundRightAxis });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_MOUSE_BUTTON_RIGHT, true }, ButtonEvent{ EventLifeTime::Continuous, &f_allowMove });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_MOUSE_BUTTON_RIGHT, false }, ButtonEvent{ EventLifeTime::Continuous, &f_forbidMove });
g_Engine->getEventSystem()->AddMouseMovementCallback(MouseMovementAxis::Horizontal, MouseMovementEvent{ EventLifeTime::OneShot, &f_rotateAroundPositiveYAxis });
g_Engine->getEventSystem()->AddMouseMovementCallback(MouseMovementAxis::Vertical, MouseMovementEvent{ EventLifeTime::OneShot, &f_rotateAroundRightAxis });

g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_O, true }, ButtonEvent{ EventLifeTime::OneShot, &f_switchCamera });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_O, true }, ButtonEvent{ EventLifeTime::OneShot, &f_switchCamera });

m_isEventsRegistered = true;

Expand Down
10 changes: 5 additions & 5 deletions Source/Client/LogicClient/World.inl
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ namespace Inno
f_runRayTracing = [&]() { g_Engine->getRenderingFrontend()->RunRayTracing(); };
f_pauseGame = [&]() { allowUpdate = !allowUpdate; };

g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_N, true }, ButtonEvent{ EventLifeTime::OneShot, &f_runRayTracing });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_F, true }, ButtonEvent{ EventLifeTime::OneShot, &f_pauseGame });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_N, true }, ButtonEvent{ EventLifeTime::OneShot, &f_runRayTracing });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_F, true }, ButtonEvent{ EventLifeTime::OneShot, &f_pauseGame });

f_sceneLoadingFinishCallback = [&]() {
if (!m_player)
Expand Down Expand Up @@ -484,8 +484,8 @@ namespace Inno
g_Engine->getAssetSystem()->ConvertModel("..//Res//Models//Wolf//Wolf.fbx", "..//Res//ConvertedAssets//");
};

g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_R, true }, ButtonEvent{ EventLifeTime::OneShot, &f_loadTestScene });
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_Y, true }, ButtonEvent{ EventLifeTime::OneShot, &f_convertModel });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_R, true }, ButtonEvent{ EventLifeTime::OneShot, &f_loadTestScene });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_Y, true }, ButtonEvent{ EventLifeTime::OneShot, &f_convertModel });

return true;
}
Expand Down Expand Up @@ -563,7 +563,7 @@ namespace Inno
Vec4 WorldSystem::getMousePositionInWorldSpace()
{
auto l_screenResolution = g_Engine->getRenderingFrontend()->GetScreenResolution();
auto l_mousePositionSS = g_Engine->getEventSystem()->getMousePosition();
auto l_mousePositionSS = g_Engine->getEventSystem()->GetMousePosition();

auto l_x = 2.0f * l_mousePositionSS.x / l_screenResolution.x - 1.0f;
auto l_y = 1.0f - 2.0f * l_mousePositionSS.y / l_screenResolution.y;
Expand Down
12 changes: 6 additions & 6 deletions Source/Client/RenderingClient/DefaultRenderingClientImpl.inl
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,22 @@ namespace Inno
bool DefaultRenderingClientImpl::Setup(ISystemConfig* systemConfig)
{
f_showLightHeatmap = [&]() { m_showLightHeatmap = !m_showLightHeatmap; };
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_H, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showLightHeatmap });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_H, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showLightHeatmap });

f_showProbe = [&]() { m_showProbe = !m_showProbe; };
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_G, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showProbe });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_G, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showProbe });

f_showVoxel = [&]() { m_showVoxel = !m_showVoxel; };
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_V, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showVoxel });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_V, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showVoxel });

f_showTransparent = [&]() { m_showTransparent = !m_showTransparent; };
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_T, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showTransparent });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_T, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showTransparent });

f_showVolumetric = [&]() { m_showVolumetric = !m_showVolumetric; };
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_J, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showVolumetric });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_J, true }, ButtonEvent{ EventLifeTime::OneShot, &f_showVolumetric });

f_saveScreenCapture = [&]() { m_saveScreenCapture = !m_saveScreenCapture; };
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_C, true }, ButtonEvent{ EventLifeTime::OneShot, &f_saveScreenCapture });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_C, true }, ButtonEvent{ EventLifeTime::OneShot, &f_saveScreenCapture });

f_SetupJob = [&]() {
DefaultGPUBuffers::Setup();
Expand Down
2 changes: 1 addition & 1 deletion Source/Client/RenderingClient/GIResolvePass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ bool GIResolvePass::Setup()
auto l_renderingServer = g_Engine->getRenderingServer();

f_reloadGIData = [&]() { m_needToReloadGIData = true; };
g_Engine->getEventSystem()->addButtonStateCallback(ButtonState{ INNO_KEY_B, true }, ButtonEvent{ EventLifeTime::OneShot, &f_reloadGIData });
g_Engine->getEventSystem()->AddButtonStateCallback(ButtonState{ INNO_KEY_B, true }, ButtonEvent{ EventLifeTime::OneShot, &f_reloadGIData });

setupSky();
setupSurfels();
Expand Down
16 changes: 8 additions & 8 deletions Source/Editor/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Viewport::Viewport(QWidget *parent)

Viewport::~Viewport()
{
g_Engine->getWindowSystem()->sendEvent(WM_DESTROY, WM_DESTROY, 0);
g_Engine->getWindowSystem()->SendEvent(WM_DESTROY, WM_DESTROY, 0);
}

void Viewport::initialize()
Expand Down Expand Up @@ -90,7 +90,7 @@ bool ViewportEventFilter::eventFilter(QObject *obj, QEvent *event)
auto l_key = reinterpret_cast<QKeyEvent*>(event);
if(l_key->key() < Qt::Key_Escape)
{
g_Engine->getWindowSystem()->sendEvent(WM_KEYDOWN, l_key->key(), 0);
g_Engine->getWindowSystem()->SendEvent(WM_KEYDOWN, l_key->key(), 0);
}

}
Expand All @@ -99,7 +99,7 @@ bool ViewportEventFilter::eventFilter(QObject *obj, QEvent *event)
auto l_key = reinterpret_cast<QKeyEvent*>(event);
if(l_key->key() < Qt::Key_Escape)
{
g_Engine->getWindowSystem()->sendEvent(WM_KEYUP, l_key->key(), 0);
g_Engine->getWindowSystem()->SendEvent(WM_KEYUP, l_key->key(), 0);
}
}
if (l_eventType == QEvent::MouseButtonPress)
Expand All @@ -108,10 +108,10 @@ bool ViewportEventFilter::eventFilter(QObject *obj, QEvent *event)
switch (l_key->button())
{
case Qt::MouseButton::LeftButton:
g_Engine->getWindowSystem()->sendEvent(WM_LBUTTONDOWN, WM_LBUTTONDOWN, 0);
g_Engine->getWindowSystem()->SendEvent(WM_LBUTTONDOWN, WM_LBUTTONDOWN, 0);
break;
case Qt::MouseButton::RightButton:
g_Engine->getWindowSystem()->sendEvent(WM_RBUTTONDOWN, WM_RBUTTONDOWN, 0);
g_Engine->getWindowSystem()->SendEvent(WM_RBUTTONDOWN, WM_RBUTTONDOWN, 0);
break;
default:
break;
Expand All @@ -123,10 +123,10 @@ bool ViewportEventFilter::eventFilter(QObject *obj, QEvent *event)
switch (l_mouseButton->button())
{
case Qt::MouseButton::LeftButton:
g_Engine->getWindowSystem()->sendEvent(WM_LBUTTONUP, WM_LBUTTONUP, 0);
g_Engine->getWindowSystem()->SendEvent(WM_LBUTTONUP, WM_LBUTTONUP, 0);
break;
case Qt::MouseButton::RightButton:
g_Engine->getWindowSystem()->sendEvent(WM_RBUTTONUP, WM_RBUTTONUP, 0);
g_Engine->getWindowSystem()->SendEvent(WM_RBUTTONUP, WM_RBUTTONUP, 0);
break;
default:
break;
Expand All @@ -138,7 +138,7 @@ bool ViewportEventFilter::eventFilter(QObject *obj, QEvent *event)
auto l_x = l_mouseMovement->pos().x() * MOUSE_SENSITIVITY;
auto l_y = l_mouseMovement->pos().y() * MOUSE_SENSITIVITY;
auto l_lparm = MAKELONG(l_x, l_y);
g_Engine->getWindowSystem()->sendEvent(WM_MOUSEMOVE, WM_MOUSEMOVE, l_lparm);
g_Engine->getWindowSystem()->SendEvent(WM_MOUSEMOVE, WM_MOUSEMOVE, l_lparm);
}
return false;
}
8 changes: 4 additions & 4 deletions Source/Engine/Engine/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ bool EngineNS::Setup(void* appHook, void* extraHook, char* pScmdline, IRendering
SystemSetup(TaskSystem);

SystemSetup(TestSystem);

SystemSetup(EventSystem);

IWindowSystemConfig l_windowSystemConfig;
l_windowSystemConfig.m_AppHook = appHook;
l_windowSystemConfig.m_ExtraHook = extraHook;
Expand All @@ -458,7 +459,6 @@ bool EngineNS::Setup(void* appHook, void* extraHook, char* pScmdline, IRendering

SystemSetup(SceneSystem);
SystemSetup(PhysicsSystem);
SystemSetup(EventSystem);

IRenderingFrontendConfig l_renderingFrontendConfig;
l_renderingFrontendConfig.m_RenderingServer = m_RenderingServer.get();
Expand Down Expand Up @@ -509,7 +509,7 @@ bool EngineNS::Setup(void* appHook, void* extraHook, char* pScmdline, IRendering

m_RenderingServer->Present();

m_WindowSystem->getWindowSurface()->swapBuffer();
m_WindowSystem->GetWindowSurface()->swapBuffer();

auto l_tickEndTime = m_TimeSystem->getCurrentTimeFromEpoch();

Expand Down Expand Up @@ -767,7 +767,7 @@ float Engine::getTickTime()
return m_tickTime;
}

const FixedSizeString<128>& Engine::getApplicationName()
const FixedSizeString<128>& Engine::GetApplicationName()
{
return m_applicationName;
}
2 changes: 1 addition & 1 deletion Source/Engine/Engine/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ namespace Inno

InitConfig getInitConfig() override;
float getTickTime() override;
const FixedSizeString<128>& getApplicationName() override;
const FixedSizeString<128>& GetApplicationName() override;
};
}
2 changes: 1 addition & 1 deletion Source/Engine/Interface/IEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ namespace Inno

INNO_ENGINE_API virtual float getTickTime() = 0;

INNO_ENGINE_API virtual const FixedSizeString<128>& getApplicationName() = 0;
INNO_ENGINE_API virtual const FixedSizeString<128>& GetApplicationName() = 0;
};
}
16 changes: 8 additions & 8 deletions Source/Engine/Interface/IEventSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ namespace Inno
public:
INNO_CLASS_INTERFACE_NON_COPYABLE(IEventSystem);

virtual InputConfig getInputConfig() = 0;
virtual InputConfig GetInputConfig() = 0;

virtual void addButtonStateCallback(ButtonState buttonState, ButtonEvent buttonEvent) = 0;
virtual void addMouseMovementCallback(MouseMovementAxis mouseMovementAxis, MouseMovementEvent mouseMovementEvent) = 0;
virtual void AddButtonStateCallback(ButtonState buttonState, ButtonEvent buttonEvent) = 0;
virtual void AddMouseMovementCallback(MouseMovementAxis mouseMovementAxis, MouseMovementEvent mouseMovementEvent) = 0;

virtual void buttonStateCallback(ButtonState buttonState) = 0;
virtual void windowSizeCallback(int32_t width, int32_t height) = 0;
virtual void mouseMovementCallback(float mouseXPos, float mouseYPos) = 0;
virtual void scrollCallback(float xoffset, float yoffset) = 0;
virtual void ButtonStateCallback(ButtonState buttonState) = 0;
virtual void WindowResizeCallback(int32_t width, int32_t height) = 0;
virtual void MouseMovementCallback(float mouseXPos, float mouseYPos) = 0;
virtual void ScrollCallback(float xOffset, float yOffset) = 0;

virtual Vec2 getMousePosition() = 0;
virtual Vec2 GetMousePosition() = 0;
};
}
10 changes: 5 additions & 5 deletions Source/Engine/Interface/IWindowSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Inno
{
using WindowEventCallbackFunctor = std::function<void(void*, uint32_t, uint64_t, int64_t)>;
using WindowEventCallback = std::function<void(void*, uint32_t, uint64_t, int64_t)>;

class IWindowSystemConfig : public ISystemConfig
{
Expand All @@ -18,11 +18,11 @@ namespace Inno
public:
INNO_CLASS_INTERFACE_NON_COPYABLE(IWindowSystem);

virtual IWindowSurface* getWindowSurface() = 0;
virtual const std::vector<ButtonState>& getButtonState() = 0;
virtual IWindowSurface* GetWindowSurface() = 0;
virtual const std::vector<ButtonState>& GetButtonState() = 0;

// Editor only
virtual bool sendEvent(uint32_t umsg, uint32_t WParam, int32_t LParam) = 0;
virtual bool addEventCallback(WindowEventCallbackFunctor* functor) = 0;
virtual bool SendEvent(uint32_t uMsg, uint32_t wParam, int32_t lParam) = 0;
virtual bool AddEventCallback(WindowEventCallback* callback) = 0;
};
}
24 changes: 12 additions & 12 deletions Source/Engine/Platform/LinuxWindow/LinuxWindowSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ namespace LinuxWindowSystemNS
bool Update();
bool Terminate();

IWindowSurface* m_windowSurface;
IWindowSurface* m_WindowSurface;
ObjectStatus m_ObjectStatus = ObjectStatus::Terminated;
InitConfig m_initConfig;
std::vector<ButtonState> m_buttonState;
std::set<WindowEventCallbackFunctor*> m_windowEventCallbackFunctor;
InitConfig m_InitConfig;
std::vector<ButtonState> m_ButtonStates;
std::set<WindowEventCallback*> m_WindowEventCallbacks;

Display* m_display;
Window m_window;
Expand Down Expand Up @@ -68,7 +68,7 @@ bool LinuxWindowSystemNS::Setup(ISystemConfig* systemConfig)

/* Show_the_window
--------------- */
auto l_windowName = g_Engine->getApplicationName();
auto l_windowName = g_Engine->GetApplicationName();
XStoreName(m_display, m_window, l_windowName.c_str());
XSelectInput(m_display, m_window, ExposureMask | StructureNotifyMask);

Expand Down Expand Up @@ -177,24 +177,24 @@ ObjectStatus LinuxWindowSystem::GetStatus()
return LinuxWindowSystemNS::m_ObjectStatus;
}

IWindowSurface* LinuxWindowSystem::getWindowSurface()
IWindowSurface* LinuxWindowSystem::GetWindowSurface()
{
return LinuxWindowSystemNS::m_windowSurface;
return LinuxWindowSystemNS::m_WindowSurface;
}

const std::vector<ButtonState>& LinuxWindowSystem::getButtonState()
const std::vector<ButtonState>& LinuxWindowSystem::GetButtonState()
{
return LinuxWindowSystemNS::m_buttonState;
return LinuxWindowSystemNS::m_ButtonStates;
}

bool LinuxWindowSystem::sendEvent(uint32_t umsg, uint32_t WParam, int32_t LParam)
bool LinuxWindowSystem::SendEvent(uint32_t uMsg, uint32_t wParam, int32_t lParam)
{
return true;
}

bool LinuxWindowSystem::addEventCallback(WindowEventCallbackFunctor* functor)
bool LinuxWindowSystem::AddEventCallback(WindowEventCallback* callback)
{
LinuxWindowSystemNS::m_windowEventCallbackFunctor.emplace(functor);
LinuxWindowSystemNS::m_WindowEventCallbacks.emplace(functor);
return true;
}

Expand Down
Loading

0 comments on commit 4813478

Please sign in to comment.