// The data Rust gives the UI and the callbacks it handles. Models are // VecModels that Rust updates row by row (src/vm/), so screens can bind to // them freely. export struct ServerItem { id: int, name: string, address: string, // "offline", "connecting", "observing" or "connected" status: string, // Avatar of a server without an icon. initials: string, tint: color, // The server's icon, empty without one. icon: image, // Unread messages in its chats. unread: int, // Someone streams in our channel there. live: bool, // "9 online · 7 channels" while its presence is known, else the address. detail: string, // "TeamSpeak 6", "TeamSpeak 3", "" before it was reached. flavor: string, // Gateway or query credentials: presence without joining. gateway: bool, } export struct TreeItem { is-channel: bool, // A TeamSpeak spacer channel, its name without the `[cspacer1]` part: // 0 none, 1 left, 2 centred, 3 right, 4 a line (the name repeats its // pattern across the row). spacer: int, depth: int, id: int, name: string, own: bool, talking: bool, muted: bool, sound-off: bool, away: bool, streaming: bool, locked: bool, collapsed: bool, // Local playback of this client: muted, or its volume in percent // (100 = unchanged). local-muted: bool, local-volume: int, // Our own client. myself: bool, // Avatar of a client. initials: string, tint: color, // The client's avatar picture, empty without one. avatar: image, // Channels: clients inside, and the limit (-1: none). members: int, max-members: int, // Leading channel icon or trailing client icons, empty where absent: a channel's // icon; a client's server group icons, its channel group's and its own, // in that order (the first three). icon: image, icon-2: image, icon-3: image, // A client's badges (myTeamSpeak), the first three in its order, empty // where absent; shown after the name. badge: image, badge-2: image, badge-3: image, // A channel's banner picture (TeamSpeak 6), drawn behind the row; // Wire sizing metadata; compact decorative backgrounds always cover. banner: image, banner-mode: int, } // A client for the members panel (everyone on the server) and the voice // channel view (our channel). export struct MemberItem { id: int, name: string, initials: string, tint: color, avatar: image, talking: bool, muted: bool, sound-off: bool, away: bool, streaming: bool, myself: bool, // "Speaking", "Streaming", "Away", ... status: string, // The away message, empty without one. away-message: string, // The section the row is in (a server group, "In Voice", // "Streaming"), and the group's icon. group: string, group-icon: image, // The first row of its section draws the heading, with the number of // rows in the section. first-in-group: bool, group-count: int, // Badges: a crown for the server's admin groups. admin: bool, // A moderator group's name, shown as a role next to the name. role: string, priority: bool, commander: bool, recording: bool, // Its channel needs more talk power than it has (and it is no // talker): it cannot speak. cannot-talk: bool, // myTeamSpeak badges, as in `TreeItem`. badge: image, badge-2: image, badge-3: image, } // A myTeamSpeak badge on the member card: "Badge" and its GUID for one // the app does not know; its picture is empty until it is downloaded. export struct BadgeItem { name: string, description: string, icon: image, } // The member card over a member row: everything about one client and what // can be done with them. export struct MemberCard { open: bool, id: int, name: string, initials: string, tint: color, avatar: image, status: string, description: string, // Server groups, one per line. groups: [string], // The badges the client shows (at most three, in its order). badges: [BadgeItem], country: string, talk-power: int, friend: bool, blocked: bool, // Local playback, in percent. volume: float, muted: bool, // The client has a unique id, so contacts and private chats work. known: bool, // The client streams: the card offers to watch it. streaming: bool, } export struct ChatTab { // "Lobby", "@alice", "Server" title: string, // The name alone ("Lobby"). name: string, // 0 = server chat, 1 = channel chat, 2 = private chat kind: int, id: int, unread: int, // The channel's topic (channel chats). topic: string, // The last message ("Mira: the banner I promised") and its time. last: string, time: string, // The channel's banner picture behind the chat's header (as TreeItem). banner: image, banner-mode: int, } // A piece of a chat line: a word in its style, or an emoji shown as an // image (`emoji` is its Twemoji key, e.g. "1f600"; `text` then holds the // characters). export struct TextRun { text: string, emoji: string, bold: bool, italic: bool, underline: bool, strike: bool, // Code: on a background. code: bool, // The author's colour, made readable on each theme; transparent: the // text's own. ink-dark: color, ink-light: color, // Where it links to ("": nowhere), and whether its text shows something // else (a page's name, another address): asked about before it opens. link: string, masked: bool, } // A block of a chat line (`vm::bbcode`): its runs, and what it is. export struct TextBlock { runs: [TextRun], // 0 = a line, 1 = a quote's line, 2 = a line of code, 3 = a list item, // 4 = a rule (no runs) kind: int, // Who a quote quotes, on its first line. caption: string, } // One emoji under a message, with how many put it there. export struct ReactionItem { // The Twemoji key of the first emoji in `text` ("1f389"), for the image. key: string, text: string, count: int, // We reacted with it. me: bool, } // A file linked in a message (`ChatMessage::file_refs`). export struct FileItem { name: string, // "2.4 MB", or what the transfer is doing. detail: string, // Index of the link in the message (what `download-file` takes). index: int, // "", "running", "done", "failed" state: string, // 0 … 1 while it downloads. progress: float, // A picture, so the icon differs. picture: bool, // The picture itself, once downloaded: shown inline instead of the card. preview: image, } export struct ChatLine { // A handle for this message in its chat, stable while the chat is open // (the engine's ids do not fit a Slint int). key: int, author: string, // The text without formatting, a line per block (shown as it is when // the message has neither formatting nor emoji, and read out). text: string, time: string, // The text in blocks of styled runs; only filled when it has // formatting or emoji (`rich`). blocks: [TextBlock], rich: bool, // Only one to three emoji: shown large. jumbo: bool, // Same author as the line before, shortly after: no header. continued: bool, initials: string, tint: color, avatar: image, // From a blocked contact. blocked: bool, pinned: bool, reactions: [ReactionItem], files: [FileItem], // The gateway knows this message: it can be pinned, reacted to and // made into a topic. remote: bool, // The topic it belongs to, "" outside a topic. topic: string, // Highlighted after jumping to it from the pins. marked: bool, // The first web address it links to, "" if none. link: string, // The first new message: the "New" divider is above it (never // `continued`). unread-start: bool, } // A pinned message in the pins drawer. export struct PinItem { line: ChatLine, // "pinned by Nova · 12:04" by: string, } // A gateway topic (thread). export struct TopicItem { id: int, title: string, creator: string, // "12 messages · by Nova" detail: string, // "Last active 3 min ago", and whether that was within the hour. activity: string, recent: bool, archived: bool, } // The server dialog: a bookmark (id -1: a new one) and, from a link, where // Connect goes. export struct BookmarkForm { id: int, name: string, address: string, nickname: string, server-password: string, // The server has voice: no Connect. connected: bool, // From a link, not stored with the server: the channel to join (a // path, or /), its password and a privilege key. channel: string, channel-password: string, token: string, } // A stream on the server, ours first: a stream can be watched from any // channel. An empty id: a client that streams, but whose stream is still // being looked up (it started before we joined, or in another channel). export struct StreamItem { id: string, name: string, streamer: string, // The streamer's channel when it is not ours; empty in ours. channel: string, // The streamer's client id (their avatar in the members). streamer-id: int, // How many watch it (the gateway's directory; 0 unknown). viewers: int, audio: bool, // "Screen", "Window", "Camera"; and the announced bitrate ("8 Mbit/s"). kind: string, bitrate: string, // Shown in the viewer. watching: bool, // Our own stream. own: bool, } // A viewer of our stream. state: "requested", "connecting" or "connected". export struct ViewerItem { client: int, name: string, state: string, message: string, // Their avatar picture, empty without one. avatar: image, } // A capture source for the share dialog. export struct SourceItem { name: string, detail: string, } export struct ShareForm { source: int, name: string, // Index into the frame rate choices (15, 30, 60, 120, 144, 240, 320). fps-index: int, // Frames per second as typed; a choice fills it in. Any number above 0. fps: string, // Index into the bitrate choices (Auto, 2.5, 4.6, 8, 10, 20, 40, 60 // Mbit/s). bitrate-index: int, // Video bitrate in kbit/s as typed; a choice fills it in. Empty with // Auto: from the size and frame rate shared, up to 60 Mbit/s. bitrate: string, audio: bool, auto-accept: bool, } export struct AudioForm { // 0 = system default, then the devices. input-index: int, output-index: int, // 0 = push-to-talk, 1 = voice activation, 2 = continuous. transmit: int, // dBFS. vad-threshold: float, echo-cancellation: bool, noise-suppression: bool, // 0 = low ... 3 = very high. noise-level: int, auto-gain: bool, // dB. input-gain: float, // Percent. output-volume: float, // Milliseconds. playback-buffer: float, } // Local playback settings of one client. volume in percent. export struct ClientAudio { id: int, name: string, volume: float, muted: bool, // The client streams: the dialog offers to watch it. streaming: bool, } // The appearance settings (`ui.*` keys). export struct AppearanceForm { // "dark", "light" or "system" theme: string, font-scale: float, // Pixels. narrow-breakpoint: float, image-cache-mb: float, } // Home, friends, direct messages, notifications, search, events and the // settings pages (docs/ui.md). Lists are models Rust syncs row by row. // A contact (friend, blocked or neutral) and where they are now. export struct ContactItem { uid: string, name: string, initials: string, tint: color, avatar: image, // "friend", "blocked" or "neutral" relation: string, online: bool, away: bool, streaming: bool, // What they do: "In Chill Zone", "Streaming", "Away: brb", "Offline". status: string, // Where: the server of the first session that sees them, or "Last seen // 2 h ago on Nightfall Guild". place: string, // "12m ago": online since (this run), else when last seen. when: string, note: string, // Local playback in percent. volume: float, muted: bool, // "Contact since 14 Jan 2022". since: string, // Every session that sees them: "Nightfall Guild · Chill Zone". spots: [string], // A voice connection sees them: they can be messaged, poked, joined. reachable: bool, selected: bool, } // A live stream on one of our servers (home page). export struct LiveItem { // The session (bookmark id) and the stream (directory or stream id). session: int, id: string, title: string, streamer: string, initials: string, tint: color, avatar: image, server: string, channel: string, // 0: unknown. viewers: int, // "Screen", "Camera", ... kind: string, // The server's colour, for the card's picture. backdrop: color, // In our voice channel: it can be watched at once. watchable: bool, } // A chat in the recent chats and in the direct messages list. export struct ConversationItem { // Index in Rust's list (what `open-conversation` takes). key: int, // 0 server chat, 1 channel chat, 2 private chat, 3 offline message. kind: int, title: string, // The server's name. server: string, // "You: That works!", "Sent a file". preview: string, // "11:42", "Yesterday", "Mon", "12 Mar". time: string, // "10m ago". ago: string, unread: int, initials: string, tint: color, avatar: image, online: bool, selected: bool, } // A notification of the bell. export struct NoticeItem { key: int, // "mention", "poke", "message", "event", "friend" kind: string, title: string, body: string, // "3 min ago" time: string, unread: bool, initials: string, tint: color, avatar: image, } // A result of the search (Ctrl+K). export struct SearchItem { // "server", "channel", "person", "contact", "setting" kind: string, title: string, subtitle: string, initials: string, tint: color, avatar: image, // The first result of a group names it ("Servers", "People", ...). header: string, } // Something on our servers: an event, a scheduled stream or server news. export struct HappeningItem { // "event", "stream", "news" kind: string, title: string, subtitle: string, // "Sat 26 Apr · 19:00" when: string, session: int, id: int, live: bool, } // Home's "Continue where you left off": the voice channel we were in last. export struct ResumeItem { // There is one: its server is still a bookmark at the same address. shown: bool, server-id: int, server: string, initials: string, tint: color, icon: image, // The channel's name as the tree shows it. channel: string, // Voice is connected there: the button shows the server; else it // connects into the channel. open: bool, connecting: bool, } // A scheduled event of a server's gateway. export struct EventItem { id: int, title: string, description: string, // The date block: "SAT", "26", "APR". weekday: string, day: string, month: string, // "Sat 26 Apr, 19:00 – 21:00" when: string, // "Raid Night" or "Server-wide". place: string, // A scheduled stream: "Exploring the Lands Between · Elden Ring". stream: string, live: bool, going: int, maybe: int, not-going: int, // "going", "maybe", "not_going" or "". rsvp: string, creator: string, // We may edit and delete it (ours, or we moderate). editable: bool, // "Starts in 15 min", "Started 5 min ago", "". soon: string, // "Nova (going)", ...; filled once the event was opened. attendees: [string], expanded: bool, } // The event form (create or edit). export struct EventForm { // -1: a new event. id: int, title: string, description: string, // "2026-10-04 19:00", local time. start: string, // Empty: no end. end: string, // Index into `event-channels` (0: server-wide). channel: int, stream: bool, stream-title: string, game: string, } // An offline message to write (mail the server keeps). export struct OfflineForm { // The peer's unique id and name. uid: string, to: string, subject: string, text: string, } // The open direct message: who, and what can be done. export struct DmPeer { open: bool, uid: string, name: string, initials: string, tint: color, avatar: image, online: bool, // "Online · Nightfall Guild · Chill Zone", "Offline · last seen 2 h ago". status: string, description: string, groups: [string], note: string, since: string, // Where they are now, or where they were last seen. servers: [string], // Pictures linked in the conversation that are downloaded, newest // first (at most six; `media-more` counts the others), and the other // files: name, "2.4 MB · Today at 11:36", picture. media: [image], media-more: int, files: [FileItem], friend: bool, blocked: bool, volume: float, muted: bool, // Messages can be sent now (a voice connection that sees them). can-send: bool, // Why not: "Kairo is offline.", "Connect to Nightfall Guild to send." notice: string, // The server keeps offline messages: offer one. offline: bool, // Connect with voice to the server of this conversation. can-connect: bool, // The messages come from the store, without a session: read-only. stored: bool, // An offline message is shown instead of the conversation. mail: bool, mail-subject: string, mail-text: string, mail-time: string, } // An identity (Profiles page); never its key. export struct IdentityItem { id: int, name: string, // Unique ids on TeamSpeak 3 and TeamSpeak 6 servers. uid: string, uid6: string, level: int, // The store's default: servers see us as this one unless a bookmark // names another. default: bool, // Where it came from: "Made in Voelin", "Imported", "Chosen by you". origin: string, // Raising its level: the level aimed at and the best one reached (0: no). improving: int, reached: int, // The bookmarks that use it. used-by: string, } // An identity found in another client's files (import). export struct FoundIdentity { name: string, uid: string, level: int, source: string, // Already in our identities. known: bool, picked: bool, } // A bookmark and the identity it connects with (Profiles page). export struct BookmarkIdentity { id: int, name: string, // Index into `identity-names` (0: the default identity). identity: int, } // Camera, video and stream quality (Voice & Video page). export struct VideoForm { // Index into `cameras`. camera: int, // 0 none, 1 blur. background: int, // "auto", "1280x720", ... resolution: string, // `stream.fps` as typed. fps: string, // auto, vp8, vp9, h264, av1. codec: int, hardware: bool, mirror: bool, // everyone, friends, channel, nobody. permissions: int, // 0 auto, 1 720p, 2 1080p, 3 1440p, -1 other layers. quality: int, // kbit/s. bitrate: float, // The camera preview runs. preview: bool, } // A simulcast layer of our stream (Streaming page); numbers as typed. export struct LayerItem { // "1920x1080", or a scale like "0.5". size: string, // Frames per second; "" no cap. fps: string, // kbit/s. bitrate: string, min-bitrate: string, max-bitrate: string, } // An audio source mixed into our stream. export struct AudioSourceItem { // "desktop", "app", "window", "microphone", "synthetic" kind: string, name: string, detail: string, // Percent. gain: float, muted: bool, } // Stream defaults (Streaming page). export struct StreamingForm { fps: string, bitrate: string, // auto, vp8, vp9, h264, av1. codec: int, // auto, portal, wlroots, x11. capture: int, replay-seconds: string, replay-memory: string, recording-dir: string, } // Notification kinds: 0 off, 1 in the app, 2 also on the desktop. export struct NotifyForm { mentions: int, pokes: int, messages: int, events: int, friends: int, } // Privacy & Safety. export struct PrivacyForm { // 0 hide, 1 show flagged. block-mode: int, // everyone, friends, nobody. messages: int, pokes: int, } // A server's gateway (Integrations page). export struct GatewayItem { session: int, server: string, url: string, // "connected", "connecting", "off" status: string, features: [string], admin: bool, } // A gateway configuration key (gateway administration). export struct ConfigItem { key: string, // JSON. value: string, source: string, description: string, kind: string, bootstrap: bool, } // A gateway permission rule. export struct PermItem { action: string, // "Everyone", "Server groups 6, 7", "Default: server admins". rule: string, source: string, everyone: bool, server-groups: string, channel-groups: string, } // A video encoder backend (Integrations page). export struct EncoderItem { name: string, api: string, codec: string, hardware: bool, ok: bool, // Why it does not work, or "used first". status: string, } // Any registered setting (Advanced page). export struct SettingItem { key: string, doc: string, // JSON. value: string, // "set here", "command line", "config file", "default". source: string, } // A recording or clip of the Stream Studio (Library). export struct RecordingItem { name: string, // "12.3 MB · 3 Oct 18:04". detail: string, clip: bool, path: string, } // Encoders, chat history, cache and logs (Advanced page); numbers as typed. export struct AdvancedForm { encoder: string, hardware: bool, // `stream.decoder_backend`, `stream.hardware_decoding`. decoder: string, hardware-decoding: bool, store-history: bool, history-page: string, dedupe-ms: string, retention-days: string, cache-mb: string, fetch-images: bool, progress-ms: string, // `ui.image_preview_kb`. preview-kb: string, logs: string, crash-dir: string, } // Who we are (My Account page). export struct MytsForm { prompt: bool, uuid: string, myts-id: string, identity-status: int, available: bool, signed_in: bool, // A saved session is being checked: its profile shows meanwhile. restoring: bool, email: string, username: string, // From the account service: the avatar, the initials without one, the // description, dates as YYYY-MM-DD ("" when not known), badge names and // the signed-in devices ("name · region · date"). avatar: image, initials: string, description: string, member-since: string, last-login: string, badges: [string], devices: [string], status: int, persistence-status: int, busy: bool, otp_required: bool, can_forget: bool, } export struct AccountForm { nickname: string, identity: string, uid: string, uid6: string, level: int, server: string, } export global Bridge { in property <[ServerItem]> servers; in-out property current-server: -1; in property <[TreeItem]> tree; // Clients in our channel. in property <[MemberItem]> members; // Everyone on the server, in sections, for the members panel. in property <[MemberItem]> server-members; // How many people are on the server (not counting query clients). in property member-total; in property <[ChatTab]> tabs; in-out property current-tab: 0; in property <[ChatLine]> messages; // Older messages can still be loaded in the current chat. in property more-history; in property loading-history; // The current chat holds only what this device saw (no gateway sync). in property local-history; // Features of the session's gateway: hide what is missing. in property has-pins; in property has-reactions; in property has-topics; // How many pins and topics the current chat has, for the header's // buttons; -1 until the gateway answered. in property pins-count: -1; in property topics-count: -1; // The pins drawer. in property <[PinItem]> pins; in property pins-loading; // The topics drawer, and the open topic. in property <[TopicItem]> topics; in property topics-loading; in-out property current-topic: -1; in property topic-title; in property <[ChatLine]> topic-messages; // The member card over the members panel. in-out property member-card; // Jumping to a pinned message: its row in `messages`, and a counter // that changes with every jump. in property jump-index: -1; in property jump-requests; // The "New" divider of the current chat: its row in `messages` (-1: // none), how many messages are new from there, and since when // ("10:14"). It stays until the chat is left or marked read. in property unread-index: -1; in property unread-count; in property unread-since; in property status-text; // Unread messages in all chats of the current server. in property unread-total; in property server-title: @tr("No server selected"); // "12 online · 8 channels" in property server-stats; // The server's host banner, empty without one (the server card shows its // painted art then); mode as TreeItem.banner-mode. in property server-icon; in property server-banner; in property server-banner-mode; // Our nickname on the current server, our avatar there (empty without // one), and the channel we are in. in property nickname; in property own-avatar; in property own-channel; // Its topic, and how many people it takes (-1: no limit). in property own-channel-topic; in property own-channel-limit: -1; // Its banner picture (TeamSpeak 6), as TreeItem.banner. in property own-channel-banner; in property own-channel-banner-mode; in property voice-connected; in property voice-connecting; // Presence without joining (gateway or query), started when the server // is selected. in property observing; in property input-muted; in property output-muted; in property transmitting; in property presence-source; // Streams (TeamSpeak 6 while connected with voice). in property streams-available; in property <[StreamItem]> streams; // Our stream: "", "starting", "live" or "ended". in property share-state; in property share-status; in property <[ViewerItem]> share-viewers; in property share-requests; in property <[SourceItem]> share-sources; in property share-error; in property share-busy; // Our share carries sound: its audio mixer can change it. in property share-audio; // Whether capture and encoding are built in. in property can-share: true; // The stream shown in the viewer. in property viewer-open; in property viewer-frame; in property viewer-has-frame; in property viewer-title; // Who streams it (their client id: -1 unknown). in property viewer-streamer; // The voice channel the watched stream is in. in property viewer-channel; in property viewer-streamer-id: -1; // Shown instead of (or over) the picture: waiting, ended, errors. in property viewer-status; in property viewer-info; in property viewer-ended; in-out property viewer-volume: 100; in property viewer-fullscreen; // The viewer fills the window without the shell ("pop out"). in-out property viewer-popped; // "12:34" since the stream was joined. in property viewer-elapsed; in property viewer-count; // Simulcast layers the streamer offers, "Auto" first. in property <[string]> viewer-qualities; in-out property viewer-quality: 0; // What "Auto" picked ("720p · 2.4 Mbit/s"). in property viewer-quality-detail; // The streamer is in an admin group (the crown beside their name). in property viewer-streamer-admin; // Settings. in property <[string]> input-devices; in property <[string]> output-devices; in-out property audio; // Microphone level in dBFS and whether voice is sent. in property input-level: -100; in property input-sending; in property mic-test; in-out property global-ptt; in-out property ptt-key; in property ptt-status; in-out property h264-enabled; in property h264-loaded; in property h264-busy; in property h264-status; in property h264-attribution; in-out property appearance; // "3.2 of 64 MB" in property image-cache-usage; // The product name (voelin_platform::APP_NAME, not translated) and version. in property app-name: "Voelin"; in property app-version; // False in the Android app; the one platform flag (tooltips are desktop // only). The studio's own window, desktop only, keeps the default. in property desktop: true; in-out property client-audio; // Opt-in local crash reports, and a notice about reports on disk. in-out property crash-reports; in property crash-notice; // Third-party notices, one entry per line, for the About page. in property <[string]> notices; // Settings → Profiles: the identity servers see us as (the store's // default, from the next connection) and the import of the official // clients' identities on start (identity.import_from_teamspeak). in-out property identity-import; callback use-identity(int); callback set-identity-import(bool); callback select-server(int); // The search field of the top bar: filters the channel tree. callback search(string); callback connect-voice(); callback disconnect-voice(); // A double-click on a channel: Rust moves there, or asks for its // password first (Nav.channel-password-open); the dialog's Join. callback join-channel(int); callback join-with-password(string); callback open-channel-chat(int); callback toggle-collapse(int); callback select-tab(int); callback close-tab(int); callback send-message(string); // The page before the oldest shown message. callback load-older(); // The current chat is read: its "New" divider goes. callback mark-read(); // The current chat's messages came on screen or left it // (Nav.chat-shown): messages are read only while they are shown. callback chat-shown-changed(); // A message of the current chat, by its `key`. callback react(int, string); callback pin(int, bool); callback download-file(int, int); // Attach a file to the current channel chat (opens a file chooser). callback attach-file(); // Pins drawer. callback open-pins(); callback jump-to-pin(int); // Topics drawer: load them, open one (-1 closes), post into the open // one, start one from a message (by its `key`). callback open-topics(); callback open-topic(int); callback send-topic-message(string); callback create-topic(int, string); // The member card: open it for a client (-1 closes it). callback open-member(int); callback member-action(string); // The poke dialog's Send (Nav.poke-open, opened by Rust for the member // card and contacts), with its message. callback send-poke(string); callback member-volume(float); callback set-input-muted(bool); callback set-output-muted(bool); callback push-to-talk(bool); callback edit-bookmark(int) -> BookmarkForm; callback save-bookmark(BookmarkForm); // The server dialog's Connect: save, then connect with voice (into the // form's channel, if any); false when saving failed, and nothing // connects. callback save-and-connect(BookmarkForm) -> bool; callback delete-bookmark(int); callback open-share() -> ShareForm; callback start-share(ShareForm); callback stop-share(); callback respond-viewer(int, bool); callback kick-viewer(int); callback watch-stream(string); // Watch the stream of a client (a streaming user in the tree or the // members), as soon as it is known. callback watch-client(int); callback show-viewer(); callback hide-viewer(); callback leave-stream(); callback set-stream-volume(float); callback toggle-fullscreen(); // A simulcast layer of the watched stream (0: Auto). callback set-stream-quality(int); callback open-settings(); callback close-settings(); callback audio-changed(AudioForm); callback toggle-mic-test(); callback apply-ptt(bool, string); callback set-h264(bool); callback download-h264(); callback appearance-changed(AppearanceForm); // The members panel was dragged to another width (pixels). callback panel-resized(float); // The voice channel view was opened or closed. callback show-voice-view(bool); // The members panel's search field. callback search-members(string); // The topics drawer's search field. callback search-topics(string); callback open-client(int) -> bool; callback client-audio-changed(ClientAudio); callback set-crash-reports(bool); callback open-crash-folder(); callback delete-crash-reports(); callback dismiss-crash-notice(); callback open-about(); // A link to our voice channel (`ts3server://`) to hand to others; the // caller copies it (Nav.copy). callback invite() -> string; // A link in a message was clicked (`TextRun.link` and `masked`): Rust // opens a page on the web (a masked one after asking: Nav.link-open), // or a TeamSpeak link in the app (the server dialog, or a move). callback open-link(string, bool); // A message's text (`ChatLine.text`) by its author as a quote for the // composer: "> Author: line" and "> line" for the next ones. callback quote-text(string, string) -> string; // Nav.copy put text on the clipboard: Rust says so in the toast. callback copied(); // Home, friends, direct messages, notifications, search, events and // the settings pages. // Home: where we were with voice last and the unread mentions (at most // three, newest first), friends online, live streams on our servers, // the latest chats, what friends do, events and server news, the // Library; in the sidebar the newest private chats (five, unread // first). in property last-place; in property <[NoticeItem]> home-mentions; in property <[ConversationItem]> sidebar-dms; in property <[ContactItem]> friends-online; in property <[LiveItem]> live-rooms; in property <[ConversationItem]> recent-chats; in property <[ContactItem]> friend-activity; in property <[HappeningItem]> happenings; in property <[RecordingItem]> recordings; in property recordings-dir; callback open-conversation(int); // The messages page and the Library were opened. callback open-messages(); callback open-library(); callback watch-live(int, string); callback open-happening(int); callback open-recording(string); callback open-recordings-folder(); // Connect a bookmark with voice (the Join buttons). callback connect-server(int); // The last place's button: its server, connected into the channel if // voice is not there yet. callback resume(); // Friends: the contacts (friends, then the others), the selected one. in property <[ContactItem]> contacts; in property contact; in property contacts-online; in property contacts-all; in property contacts-blocked; callback friends-tab(int); callback search-contacts(string); callback select-contact(string); // "message", "poke", "join", "watch", "friend", "block", "neutral", // "remove", "mute". callback contact-action(string, string); callback contact-note(string, string); callback contact-volume(string, float); // Direct messages: the conversations, the open one (its messages are // `messages` while a session holds it, else `dm-messages`). in property <[ConversationItem]> conversations; in property dm-unread; in property inbox-unread; in property dm; in property <[ChatLine]> dm-messages; callback dm-tab(int); callback search-conversations(string); // "poke", "join", "friend", "block", "mute", "connect", "delete-mail", // "unread-mail". callback dm-action(string); callback dm-volume(float); callback send-offline(OfflineForm); // The bell. in property <[NoticeItem]> notifications; in property notifications-unread; callback open-notice(int); callback mark-notices-read(); callback clear-notices(); // The search (Ctrl+K): `search` fills the results. in property <[SearchItem]> search-results; callback search-activate(int); // A server's events (gateway `events`). in property has-events; in property <[EventItem]> events; in property events-loading; in property can-create-events; in property <[string]> event-channels; callback open-events(); callback rsvp(int, string); callback toggle-event(int); callback edit-event(int) -> EventForm; callback save-event(EventForm) -> string; callback delete-event(int); callback watch-event(int); // A picture linked in chat, opened larger: the message and the link. callback open-preview(int, int) -> image; // Settings pages: a section was shown (its data is loaded then). callback settings-section(int); in property account; in property myts; in property primary-name: myts.signed-in || myts.restoring ? (myts.username != "" ? myts.username : myts.email) : nickname != "" ? nickname : app-name; callback myts-dismiss(); callback myts-retry(); callback myts-portal(int); callback myts-login(string, string, string); callback myts-logout(); in property <[IdentityItem]> identities; in property <[string]> identity-names; in property <[BookmarkIdentity]> bookmark-identities; in property <[FoundIdentity]> found-identities; in property identity-status; // "default", "delete", "export", "improve", "stop". callback identity-action(int, string); callback rename-identity(int, string); callback improve-target(int, int); callback find-identities(); callback pick-found(int, bool); callback import-identities(); callback bookmark-identity(int, int); in-out property video; in property <[string]> cameras; in property camera-frame; in property camera-status; callback video-changed(VideoForm); callback toggle-camera-preview(); callback test-sound(); in-out property streaming; in property <[LayerItem]> layers; in property <[AudioSourceItem]> audio-sources; // Applications that play audio now (for an app source). in property <[string]> audio-apps; in property has-studio; callback streaming-changed(StreamingForm); callback layer-changed(int, LayerItem); callback add-layer(); callback remove-layer(int); callback audio-source-changed(int, AudioSourceItem); callback add-audio-source(string, string); callback remove-audio-source(int); in-out property notify; callback notify-changed(NotifyForm); callback test-notification(); in-out property privacy; in property <[ContactItem]> blocked; callback privacy-changed(PrivacyForm); in property <[GatewayItem]> gateways; // The gateway being administered (-1: none) and its keys and rules. in property admin-session: -1; in property <[ConfigItem]> gateway-config; in property <[PermItem]> gateway-perms; in property ffmpeg-status; in property zero-copy-status; in property <[EncoderItem]> encoders; // The decoders, each codec's in the order they are tried. in property <[EncoderItem]> decoders; in property encoders-loading; callback gateway-admin(int); callback config-set(string, string); callback config-reset(string); callback config-reload(); callback perm-set(string, bool, string, string); callback perm-reset(string); callback refresh-encoders(); in-out property advanced; // `stream.srtp_profiles` in order, and those left out. in property <[string]> srtp-profiles; in property <[string]> srtp-unused; in property <[SettingItem]> all-settings; in property <[string]> capture-sources; callback advanced-changed(AdvancedForm); callback srtp-move(int, int); callback srtp-toggle(string); // A key's JSON value: "" when taken, else why not. callback setting-set(string, string) -> string; callback setting-reset(string); callback search-settings(string); callback open-logs(); } // Decoded images by key, from Rust's image cache (src/images.rs): each is // decoded once and kept while the cache (setting `ui.image_cache_mb`) has // room. export global Images { // A Twemoji by key ("1f600", "1f468-200d-1f4bb"); empty if unknown. pure callback emoji(string) -> image; // The characters of a Twemoji key, to react with or to insert. pure callback emoji-text(string) -> string; // The first letter of initials, for small avatars (Slint cannot cut // strings). pure callback first-letter(string) -> string; } // One emoji of the picker. `text` is what picking it inserts. export struct EmojiCell { key: string, name: string, text: string, } export struct EmojiRow { cells: [EmojiCell], } // The emoji picker's data (src/bind/emoji.rs). export global Emoji { // The shown category as rows of `columns` cells. in property <[EmojiRow]> rows; // The category shown (see EmojiPicker), -1 while searching. in-out property category: 0; in property columns: 8; // Filled once the picker is first opened. callback load(); callback show-category(int); callback search(string); }