parent
7788284b9e
commit
b3dd6c608b
@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace gr
|
||||
{
|
||||
struct Context
|
||||
{
|
||||
Context();
|
||||
~Context();
|
||||
private:
|
||||
struct _impl;
|
||||
std::unique_ptr<_impl> impl;
|
||||
};
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
#include <tickit.h>
|
||||
|
||||
#include <graphics.hpp>
|
||||
|
||||
static int on_geomchange(TickitWindow* win, TickitEventFlags flags, void* info, void* data)
|
||||
{
|
||||
tickit_window_expose(win, NULL);
|
||||
gr::Context* ctx = (gr::Context*)data;
|
||||
|
||||
}
|
||||
|
||||
namespace gr
|
||||
{
|
||||
struct Context::_impl
|
||||
{
|
||||
Tickit* context;
|
||||
TickitWindow* root;
|
||||
};
|
||||
|
||||
Context::Context()
|
||||
: impl(std::make_unique<_impl>())
|
||||
{
|
||||
impl->context = tickit_new_stdtty();
|
||||
impl->root = tickit_get_rootwin(impl->context);
|
||||
|
||||
if(!impl->root) throw "couldn't create window.";
|
||||
}
|
||||
|
||||
Context::~Context()
|
||||
{
|
||||
tickit_unref(impl->context);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue