| 68 | const char RPCHandshakeHeader::RESPONSE_MAGIC[9] = "DFHack!\n"; |
| 69 | |
| 70 | void color_ostream_proxy::decode(CoreTextNotification *data) |
| 71 | { |
| 72 | flush_proxy(); |
| 73 | |
| 74 | int cnt = data->fragments_size(); |
| 75 | if (cnt > 0) { |
| 76 | target->begin_batch(); |
| 77 | |
| 78 | for (int i = 0; i < cnt; i++) |
| 79 | { |
| 80 | auto &frag = data->fragments(i); |
| 81 | |
| 82 | color_value color = frag.has_color() ? color_value(frag.color()) : COLOR_RESET; |
| 83 | target->add_text(color, frag.text()); |
| 84 | } |
| 85 | |
| 86 | target->end_batch(); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | RemoteClient::RemoteClient(color_ostream *default_output) |
| 91 | : p_default_output(default_output) |
no test coverage detected