diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-08-07 21:24:46 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-08-07 22:57:15 -0700 |
commit | fbc1f309d8b11f4fa06d8b2c5d71a1feb7a35248 (patch) | |
tree | 8ddcb72890ab8bbd160a87aa4bff041f35600028 /browse_slack/environment.mu | |
parent | 3e6da6e25c74f170dd896e5e0bc82b54f21b4d8e (diff) | |
download | mu-fbc1f309d8b11f4fa06d8b2c5d71a1feb7a35248.tar.gz |
.
Diffstat (limited to 'browse_slack/environment.mu')
-rw-r--r-- | browse_slack/environment.mu | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/browse_slack/environment.mu b/browse_slack/environment.mu new file mode 100644 index 00000000..8f68a3fa --- /dev/null +++ b/browse_slack/environment.mu @@ -0,0 +1,26 @@ +# The environment is a thin layer in this app, just a history of 'tabs' that +# are fully specified by the operations used to generate them. + +type environment { + tabs: (handle array tab) + current: int # index into tabs +} + +type tab { + type: int + # type 0: items by a user + # type 1: items in a channel + # type 2: comments for a post + # type 3: items containing a search (TODO) + root-index: int # into either users, items or comments + item-index: int # what item in the corresponding list we start rendering + # the current page at + grapheme-index: int # what character in the item we start rendering + # the current page at +} + +fn render-environment env: (addr environment), users: (addr array user), channels: (addr array channel), items: (addr array item) { +} + +fn update-environment env: (addr environment), key: byte { +} |