galaxy
1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Clipboard.cpp
Go to the documentation of this file.
1
7
8
#include <SDL3/SDL_clipboard.h>
9
10
#include "
Clipboard.hpp
"
11
12
namespace
galaxy
13
{
14
namespace
input
15
{
16
void
set_clipboard
(
const
std::string& contents)
noexcept
17
{
18
SDL_SetClipboardText(contents.c_str());
19
}
20
21
std::string
get_clipboard
() noexcept
22
{
23
if
(SDL_HasClipboardText())
24
{
25
std::string text {SDL_GetClipboardText()};
26
return
text;
27
}
28
else
29
{
30
return
{};
31
}
32
}
33
}
// namespace input
34
}
// namespace galaxy
Clipboard.hpp
galaxy::input::set_clipboard
void set_clipboard(const std::string &contents) noexcept
Set clipboard contents.
Definition
Clipboard.cpp:16
galaxy::input::get_clipboard
std::string get_clipboard() noexcept
Get clipboard contents.
Definition
Clipboard.cpp:21
galaxy
Animated.cpp galaxy.
Definition
Animated.cpp:16
galaxy
src
galaxy
input
Clipboard.cpp
Generated on Fri Sep 12 2025 07:29:48 for galaxy by
1.12.0