aboutsummaryrefslogtreecommitdiff
path: root/connection.h
blob: d028cceb69397055355676759763470a63c65441 (plain)
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
27
28
29
#ifndef COMET_CONNECTION_H
#define COMET_CONNECTION_H

#include <glib.h>
#include <xcb/xcb.h>
#include <xcb/xcb_ewmh.h>
#include <xcb/xcb_xrm.h>
#include <xcb/xcb_errors.h>
#include <xcb/randr.h>


// TODO: Make this opaque
typedef struct {
    xcb_connection_t *connection;
    xcb_screen_t *screen;
    xcb_randr_screen_size_t *screen_size;
    double screen_dpi;
    xcb_visualtype_t *visual_type;
    xcb_depth_t *depth;
    xcb_xrm_database_t *database;
    xcb_errors_context_t *errors;
    xcb_ewmh_connection_t ewmh;
} Connection;

Connection *connection_create();

void connection_destroy(Connection *con);

#endif