37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
#ifndef _HEXAGRAM_WINDOW_H
|
|
#define _HEXAGRAM_WINDOW_H
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <cairo.h>
|
|
|
|
#define HEXAGRAM_WINDOW_EVENT_MASK (ButtonMotionMask | ButtonPressMask | \
|
|
ButtonReleaseMask | ExposureMask | \
|
|
StructureNotifyMask)
|
|
|
|
#define HEXAGRAM_WINDOW_GC_FLAGS (GCForeground | GCBackground | \
|
|
GCGraphicsExposures)
|
|
|
|
typedef struct _hexagram_window hexagram_window;
|
|
|
|
hexagram_window *hexagram_window_new_x11(const char *display,
|
|
int width,
|
|
int height);
|
|
|
|
void hexagram_window_destroy(hexagram_window *window);
|
|
|
|
Display *hexagram_window_display(hexagram_window *window);
|
|
|
|
int hexagram_window_display_fd(hexagram_window *window);
|
|
|
|
int hexagram_window_show(hexagram_window *window);
|
|
|
|
int hexagram_window_refresh_bg(hexagram_window *window);
|
|
|
|
int hexagram_window_swap_buffer(hexagram_window *window);
|
|
|
|
cairo_t *hexagram_window_get_bg_context(hexagram_window *window);
|
|
|
|
cairo_t *hexagram_window_get_fg_context(hexagram_window *window);
|
|
|
|
#endif /* _HEXAGRAM_WINDOW_H */
|