From 919b12510b49b7b32850b1153d04bb40506bf0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 21 Sep 2022 12:13:30 +0200 Subject: xC/xP: relay and render channel topics --- xC-proto | 73 ++++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 37 insertions(+), 36 deletions(-) (limited to 'xC-proto') diff --git a/xC-proto b/xC-proto index ea39b86..25d48e8 100644 --- a/xC-proto +++ b/xC-proto @@ -53,12 +53,12 @@ struct EventMessage { u32 event_seq; union EventData switch (enum Event { PING, + BUFFER_LINE, BUFFER_UPDATE, BUFFER_STATS, BUFFER_RENAME, BUFFER_REMOVE, BUFFER_ACTIVATE, - BUFFER_LINE, BUFFER_CLEAR, SERVER_UPDATE, SERVER_RENAME, @@ -69,41 +69,6 @@ struct EventMessage { case PING: void; - case BUFFER_UPDATE: - string buffer_name; - bool hide_unimportant; - union BufferContext switch (enum BufferKind { - GLOBAL, - SERVER, - CHANNEL, - PRIVATE_MESSAGE, - } kind) { - case GLOBAL: - void; - case SERVER: - string server_name; - case CHANNEL: - string server_name; - case PRIVATE_MESSAGE: - string server_name; - } context; - case BUFFER_STATS: - string buffer_name; - // These are cumulative, even for lines flushed out from buffers. - // Updates to these values aren't broadcasted, thus handle: - // - BUFFER_LINE by bumping/setting them as appropriate, - // - BUFFER_ACTIVATE by clearing them for the previous buffer - // (this way, they can be used to mark unread messages). - u32 new_messages; - u32 new_unimportant_messages; - bool highlighted; - case BUFFER_RENAME: - string buffer_name; - string new; - case BUFFER_REMOVE: - string buffer_name; - case BUFFER_ACTIVATE: - string buffer_name; case BUFFER_LINE: string buffer_name; // Whether the line should also be displayed in the active buffer. @@ -150,6 +115,42 @@ struct EventMessage { case FLIP_MONOSPACE: void; } items<>; + case BUFFER_UPDATE: + string buffer_name; + bool hide_unimportant; + union BufferContext switch (enum BufferKind { + GLOBAL, + SERVER, + CHANNEL, + PRIVATE_MESSAGE, + } kind) { + case GLOBAL: + void; + case SERVER: + string server_name; + case CHANNEL: + string server_name; + ItemData topic<>; + case PRIVATE_MESSAGE: + string server_name; + } context; + case BUFFER_STATS: + string buffer_name; + // These are cumulative, even for lines flushed out from buffers. + // Updates to these values aren't broadcasted, thus handle: + // - BUFFER_LINE by bumping/setting them as appropriate, + // - BUFFER_ACTIVATE by clearing them for the previous buffer + // (this way, they can be used to mark unread messages). + u32 new_messages; + u32 new_unimportant_messages; + bool highlighted; + case BUFFER_RENAME: + string buffer_name; + string new; + case BUFFER_REMOVE: + string buffer_name; + case BUFFER_ACTIVATE: + string buffer_name; case BUFFER_CLEAR: string buffer_name; -- cgit v1.2.3