Files
NazaraEngine/src/Nazara/Platform/SDL2/CursorImpl.hpp
2021-10-26 15:52:46 +02:00

41 lines
1.1 KiB
C++

// Copyright (C) 2021 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_PLATFORM_SDL2_CURSORIMPL_HPP
#define NAZARA_PLATFORM_SDL2_CURSORIMPL_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Core/MovablePtr.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Platform/Enums.hpp>
#include <Nazara/Utility/Image.hpp>
#include <SDL2/SDL_mouse.h>
namespace Nz
{
class CursorImpl
{
public:
CursorImpl(const Image& image, const Vector2i& hotSpot);
CursorImpl(SystemCursor cursor);
CursorImpl(const CursorImpl&) = delete;
CursorImpl(CursorImpl&&) noexcept = default;
~CursorImpl();
SDL_Cursor* GetCursor();
CursorImpl& operator=(const CursorImpl&) = delete;
CursorImpl& operator=(CursorImpl&&) noexcept = default;
private:
MovablePtr<SDL_Cursor> m_cursor;
MovablePtr<SDL_Surface> m_surface;
Image m_cursorImage;
};
}
#endif // NAZARA_PLATFORM_SDL2_CURSORIMPL_HPP