Platform: Add initial Clipboard support (only text is supported)

This commit is contained in:
Jérôme Leclercq
2021-11-28 20:14:15 +01:00
parent 2cdd7d0b44
commit d0aad3ee1e
8 changed files with 130 additions and 31 deletions

View File

@@ -29,6 +29,7 @@
#ifndef NAZARA_GLOBAL_PLATFORM_HPP
#define NAZARA_GLOBAL_PLATFORM_HPP
#include <Nazara/Platform/Clipboard.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Cursor.hpp>
#include <Nazara/Platform/CursorController.hpp>

View File

@@ -0,0 +1,31 @@
// 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_CLIPBOARD_HPP
#define NAZARA_PLATFORM_CLIPBOARD_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Enums.hpp>
#include <string>
namespace Nz
{
class NAZARA_PLATFORM_API Clipboard
{
public:
Clipboard() = delete;
~Clipboard() = delete;
static ClipboardContentType GetContentType();
static std::string GetString();
static void SetString(const std::string& str);
};
}
#include <Nazara/Platform/Clipboard.inl>
#endif // NAZARA_PLATFORM_CLIPBOARD_HPP

View File

@@ -0,0 +1,12 @@
// 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
#include <Nazara/Platform/Clipboard.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
}
#include <Nazara/Platform/DebugOff.hpp>