aboutsummaryrefslogtreecommitdiffstats
path: root/term.c
blob: 8c23619b2971590217cc4ec58f21331b12ce4a09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdlib.h>

#include "runes.h"

RunesTerm *runes_term_create(int argc, char *argv[])
{
    RunesTerm *t;

    t = malloc(sizeof(RunesTerm));

    t->w       = runes_window_create(argc, argv);
    t->surface = runes_surface_create(t);
    t->cr      = cairo_create(t->surface);
    t->loop    = runes_loop_create(t);

    return t;
}

void runes_term_destroy(RunesTerm *t)
{
    cairo_destroy(t->cr);
    cairo_surface_destroy(t->surface);
    runes_window_destroy(t->w);

    free(t);
}