/*
 * Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
 */

#include <GLFW/glfw3.h>

#include <ox/std/string.hpp>

#include <nostalgia/core/core.hpp>

#include "core.hpp"

namespace nostalgia::core {

ox::String getClipboardText(Context *ctx) noexcept {
	const auto id = ctx->windowerData<GlfwImplData>();
	return glfwGetClipboardString(id->window);
}

void setClipboardText(Context *ctx, const ox::String &text) noexcept {
	const auto id = ctx->windowerData<GlfwImplData>();
	glfwSetClipboardString(id->window, text.c_str());
}

}
