draw_util.h - ledit - Text editor (WIP)
HTML git clone git://lumidify.org/ledit.git (fast, but not encrypted)
HTML git clone https://lumidify.org/git/ledit.git (encrypted, but very slow)
HTML git clone git://4kcetb7mo7hj6grozzybxtotsub5bempzo4lirzc3437amof2c2impyd.onion/ledit.git (over tor)
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
draw_util.h (690B)
---
1 #ifndef _DRAW_UTIL_H_
2 #define _DRAW_UTIL_H_
3
4 #include <X11/Xlib.h>
5 #include <X11/Xft/Xft.h>
6
7 #include "window.h"
8
9 /*
10 * This is just a basic wrapper for XftDraws and Pixmaps
11 * that is used by the window for its text display at the bottom.
12 */
13 typedef struct {
14 XftDraw *xftdraw;
15 Pixmap pixmap;
16 int w, h;
17 } ledit_draw;
18
19 /*
20 * Create a draw with the specified width and height.
21 */
22 ledit_draw *draw_create(ledit_window *window, int w, int h);
23
24 /*
25 * Make sure the size of the draw is at least the given width and height.
26 */
27 void draw_grow(ledit_window *window, ledit_draw *draw, int w, int h);
28
29 /*
30 * Destroy a draw.
31 */
32 void draw_destroy(ledit_window *window, ledit_draw *draw);
33
34 #endif