… | |
… | |
2 | #include <rxvt.h> |
2 | #include <rxvt.h> |
3 | #include <rxvtcolor.h> |
3 | #include <rxvtcolor.h> |
4 | |
4 | |
5 | #include <unistd.h> |
5 | #include <unistd.h> |
6 | #include <fcntl.h> |
6 | #include <fcntl.h> |
|
|
7 | |
|
|
8 | class byteorder byteorder; |
|
|
9 | |
|
|
10 | byteorder::byteorder () |
|
|
11 | { |
|
|
12 | union { |
|
|
13 | uint32_t u; |
|
|
14 | uint8_t b[4]; |
|
|
15 | } w; |
|
|
16 | |
|
|
17 | w.b[0] = 0x11; |
|
|
18 | w.b[1] = 0x22; |
|
|
19 | w.b[2] = 0x33; |
|
|
20 | w.b[3] = 0x44; |
|
|
21 | |
|
|
22 | e = w.u; |
|
|
23 | } |
7 | |
24 | |
8 | refcounted::refcounted (const char *id) |
25 | refcounted::refcounted (const char *id) |
9 | { |
26 | { |
10 | this->id = STRDUP (id); |
27 | this->id = STRDUP (id); |
11 | } |
28 | } |
… | |
… | |
255 | void rxvt_display::put_xim (rxvt_xim *xim) |
272 | void rxvt_display::put_xim (rxvt_xim *xim) |
256 | { |
273 | { |
257 | xims.put (xim); |
274 | xims.put (xim); |
258 | } |
275 | } |
259 | |
276 | |
|
|
277 | Atom rxvt_display::atom (const char *name) |
|
|
278 | { |
|
|
279 | return XInternAtom (display, name, False); |
|
|
280 | } |
|
|
281 | |
260 | ///////////////////////////////////////////////////////////////////////////// |
282 | ///////////////////////////////////////////////////////////////////////////// |
261 | |
283 | |
262 | template refcache<rxvt_display>; |
284 | template refcache<rxvt_display>; |
263 | refcache<rxvt_display> displays; |
285 | refcache<rxvt_display> displays; |
264 | |
286 | |