You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hexview/src/graphics.cpp

34 lines
596 B

4 years ago
#include <tickit.h>
#include <graphics.hpp>
4 years ago
static int on_geomchange(TickitWindow* win, TickitEventFlags flags, void* info, void* data)
{
tickit_window_expose(win, NULL);
gr::Context* ctx = (gr::Context*)data;
}
4 years ago
namespace gr
{
struct Context::_impl
{
Tickit* context;
4 years ago
TickitWindow* root;
4 years ago
};
Context::Context()
: impl(std::make_unique<_impl>())
{
4 years ago
impl->context = tickit_new_stdtty();
impl->root = tickit_get_rootwin(impl->context);
if(!impl->root) throw "couldn't create window.";
4 years ago
}
Context::~Context()
{
tickit_unref(impl->context);
}
}