… | |
… | |
18 | # define ENABLE_XEMBED 1 |
18 | # define ENABLE_XEMBED 1 |
19 | # define ENABLE_EWMH 1 |
19 | # define ENABLE_EWMH 1 |
20 | # define ENABLE_XIM_ONTHESPOT 1 |
20 | # define ENABLE_XIM_ONTHESPOT 1 |
21 | # define CURSOR_BLINK 1 |
21 | # define CURSOR_BLINK 1 |
22 | # define OPTION_HC 1 |
22 | # define OPTION_HC 1 |
|
|
23 | # define BUILTIN_GLYPHS 1 |
23 | #else |
24 | #else |
24 | # define ENABLE_MINIMAL 1 |
25 | # define ENABLE_MINIMAL 1 |
25 | #endif |
26 | #endif |
26 | |
27 | |
27 | #include <limits.h> |
28 | #include <limits.h> |
… | |
… | |
1011 | stringvec *argv, *envv; /* if != 0, will be freed at destroy time */ |
1012 | stringvec *argv, *envv; /* if != 0, will be freed at destroy time */ |
1012 | |
1013 | |
1013 | #ifdef KEYSYM_RESOURCE |
1014 | #ifdef KEYSYM_RESOURCE |
1014 | keyboard_manager *keyboard; |
1015 | keyboard_manager *keyboard; |
1015 | #endif |
1016 | #endif |
|
|
1017 | #ifndef NO_RESOURCES |
|
|
1018 | XrmDatabase option_db; |
|
|
1019 | #endif |
1016 | |
1020 | |
1017 | const char *rs[NUM_RESOURCES]; |
1021 | const char *rs[NUM_RESOURCES]; |
1018 | /* command input buffering */ |
1022 | /* command input buffering */ |
1019 | char *cmdbuf_ptr, *cmdbuf_endp; |
1023 | char *cmdbuf_ptr, *cmdbuf_endp; |
1020 | char cmdbuf_base[CBUFSIZ]; |
1024 | char cmdbuf_base[CBUFSIZ]; |
… | |
… | |
1048 | void rootwin_cb (XEvent &xev); |
1052 | void rootwin_cb (XEvent &xev); |
1049 | xevent_watcher rootwin_ev; |
1053 | xevent_watcher rootwin_ev; |
1050 | #endif |
1054 | #endif |
1051 | #ifdef HAVE_BG_PIXMAP |
1055 | #ifdef HAVE_BG_PIXMAP |
1052 | int update_background (); |
1056 | int update_background (); |
|
|
1057 | #if TRACE_PIXMAPS |
|
|
1058 | int trace_update_background (const char *file, int line); |
|
|
1059 | # define update_background() trace_update_background (__FILE__, __LINE__) |
|
|
1060 | #endif |
1053 | void update_background_cb (ev::timer &w, int revents); |
1061 | void update_background_cb (ev::timer &w, int revents); |
1054 | ev::timer update_background_ev; |
1062 | ev::timer update_background_ev; |
1055 | #endif |
1063 | #endif |
1056 | |
1064 | |
1057 | void x_cb (XEvent &xev); |
1065 | void x_cb (XEvent &xev); |
… | |
… | |
1061 | xevent_watcher scrollbar_ev; |
1069 | xevent_watcher scrollbar_ev; |
1062 | #endif |
1070 | #endif |
1063 | |
1071 | |
1064 | void child_cb (ev::child &w, int revents); ev::child child_ev; |
1072 | void child_cb (ev::child &w, int revents); ev::child child_ev; |
1065 | void prepare_cb (ev::prepare &w, int revents); ev::prepare prepare_ev; |
1073 | void prepare_cb (ev::prepare &w, int revents); ev::prepare prepare_ev; |
1066 | void destroy_cb (ev::check &w, int revents); ev::check destroy_ev; |
1074 | void destroy_cb (ev::idle &w, int revents); ev::idle destroy_ev; |
1067 | void flush (); |
1075 | void flush (); |
1068 | void flush_cb (ev::timer &w, int revents); ev::timer flush_ev; |
1076 | void flush_cb (ev::timer &w, int revents); ev::timer flush_ev; |
1069 | bool pty_fill (); |
1077 | bool pty_fill (); |
1070 | void pty_cb (ev::io &w, int revents); ev::io pty_ev; |
1078 | void pty_cb (ev::io &w, int revents); ev::io pty_ev; |
1071 | void incr_cb (ev::timer &w, int revents) NOTHROW; ev::timer incr_ev; |
1079 | void incr_cb (ev::timer &w, int revents) NOTHROW; ev::timer incr_ev; |
… | |
… | |
1263 | return base; |
1271 | return base; |
1264 | } |
1272 | } |
1265 | |
1273 | |
1266 | bool option (uint8_t opt) const NOTHROW |
1274 | bool option (uint8_t opt) const NOTHROW |
1267 | { |
1275 | { |
|
|
1276 | if (!opt) |
|
|
1277 | return 0; |
|
|
1278 | |
|
|
1279 | --opt; |
1268 | return options[opt >> 3] & (1 << (opt & 7)); |
1280 | return options[opt >> 3] & (1 << (opt & 7)); |
1269 | } |
1281 | } |
1270 | |
1282 | |
1271 | void set_option (uint8_t opt, bool set = true) NOTHROW |
1283 | void set_option (uint8_t opt, bool set = true) NOTHROW |
1272 | { |
1284 | { |
|
|
1285 | if (!opt) |
|
|
1286 | return; |
|
|
1287 | |
|
|
1288 | --opt; |
1273 | if (set) |
1289 | if (set) |
1274 | options[opt >> 3] |= (1 << (opt & 7)); |
1290 | options[opt >> 3] |= (1 << (opt & 7)); |
1275 | else |
1291 | else |
1276 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1292 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1277 | } |
1293 | } |