mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 14:43:34 +00:00
fixing warnings in kvf
This commit is contained in:
@@ -25,6 +25,7 @@ namespace mlx
|
||||
inline Handle NewGraphicsSuport(std::size_t w, std::size_t h, const char* title);
|
||||
inline void ClearGraphicsSupport(Handle win);
|
||||
inline void DestroyGraphicsSupport(Handle win);
|
||||
inline void SetGraphicsSupportPosition(Handle win, int x, int y);
|
||||
|
||||
inline void PixelPut(Handle win, int x, int y, std::uint32_t color) const noexcept;
|
||||
inline void StringPut(Handle win, int x, int y, std::uint32_t color, char* str);
|
||||
|
||||
@@ -104,6 +104,15 @@ namespace mlx
|
||||
m_graphics.erase(m_graphics.begin() + *static_cast<int*>(win));
|
||||
}
|
||||
|
||||
void Application::SetGraphicsSupportPosition(Handle win, int x, int y)
|
||||
{
|
||||
CHECK_WINDOW_PTR(win);
|
||||
if(!m_graphics[*static_cast<int*>(win)]->HasWindow())
|
||||
Warning("trying to move a window that is targeting an image and not a real window, this is not allowed");
|
||||
else
|
||||
m_graphics[*static_cast<int*>(win)]->GetWindow()->SetPosition(x, y);
|
||||
}
|
||||
|
||||
void Application::PixelPut(Handle win, int x, int y, std::uint32_t color) const noexcept
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace mlx
|
||||
Vec2ui GetVulkanDrawableSize(Handle window) const noexcept;
|
||||
void MoveMouseOnWindow(Handle window, int x, int y) const noexcept;
|
||||
void GetScreenSizeWindowIsOn(Handle window, int* x, int* y) const noexcept;
|
||||
void SetWindowPosition(Handle window, int x, int y) const noexcept;
|
||||
|
||||
inline void SetEventCallback(func::function<void(mlx_event_type, int, int, void*)> functor, void* userdata) { f_callback = std::move(functor); p_callback_data = userdata; }
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace mlx
|
||||
|
||||
inline void MoveMouse(int x, int y) { SDLManager::Get().MoveMouseOnWindow(p_window, x, y); }
|
||||
inline void GetScreenSizeWindowIsOn(int* x, int* y) { SDLManager::Get().GetScreenSizeWindowIsOn(p_window, x, y); }
|
||||
inline void SetPosition(int x, int y) { SDLManager::Get().SetWindowPosition(p_window, x, y); }
|
||||
|
||||
inline VkSurfaceKHR CreateVulkanSurface(VkInstance instance) const noexcept { return SDLManager::Get().CreateVulkanSurface(p_window, instance); }
|
||||
inline std::vector<const char*> GetRequiredVulkanInstanceExtentions() const noexcept { return SDLManager::Get().GetRequiredVulkanInstanceExtentions(p_window); }
|
||||
|
||||
Reference in New Issue
Block a user