1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
/*
* Copyright (C) 2023 - 2024:
* The Trinitrix Project <soispha@vhack.eu, antifallobst@systemausfall.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* This file is part of the Trixy crate for Trinitrix.
*
* Trixy is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* and the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
*/
/**
* Closes the application
*/
extern int ;
/**
* Send a message to the current room
* The send message is interpreted literally.
*/
extern int ;
;
/**
* Change the active mode
*/
extern int ;
/**
* Go to the next plane
*/
extern int ;
/**
* Go to the previous plane
*/
extern int ;
/**
* Add a new keymapping
*/
extern int ;
/**
* Remove a keymapping
*
* Does nothing, if the keymapping doesn't exists yet
*/
extern int ;
/**
* List declared keymappings
*/
extern int ;
/**
* Send an error to the default error output
*/
extern int ;
/**
* Send output to the default output
* This is mainly used to display the final
* output of evaluated lua commands.
*/
extern int ;
/**
* Input a character without checking for possible keymaps
* If the current state does not expect input, this character is ignored
* The encoding is the same as in the `trinitrix.api.keymaps` commands
*/
extern int ;
/**
* Language specific functions, which mirror the `trinitrix.api` namespace.
* That is, if you have to choose between a `std` and a `api` function choose
* the `std` one as it will most likely be more high-level and easier to use
* (as it isn't abstracted over multiple languages). Feel free to drop down to
* the lower level api, if you feel like that more, it should be as stable and
* user-oriented as the `std` functions
*/
;
/**
* Function that change the UI, or UI state
*/
;
/**
* Manipulate keymappings, the mode is specified as a String build up of all
* mode the keymapping should be active in. The mapping works as follows: n =>
* normal Mode c => command Mode i => insert Mode
*
* The key works in a similar matter, specifying the required keypresses to
* trigger the callback. For example "aba" for require the user to press "a"
* then "b" then "a" again to trigger the mapping. Special characters are
* encoded as follows:
* "<C-a>ba" => "Ctrl+a" then "b" then "a"
* "<S-a>" => "A" or "Shift+a"
* "A" => "A"
* "<M-a> " => "Alt+a" (<A-a>) or "Meta+a"(<M-a>) (most terminals can't
* really differentiate between these characters) "a<C-b><C-a>" => "a" then
* "Ctrl+b" then "Ctrl+a" (also works for Shift, Alt and Super)
* "<CSM-b>" => "Ctrl+Shift+Alt+b" (the ordering doesn't matter)
* "a " => "a" then a literal space (" ")
* "å🙂" => "å" then "🙂" (full Unicode support!)
* "<ESC>" => escape key
* "<F3>" => F3 key
* "<BACKSPACE>" => backspace key (and so forth)
* "<DASH>" => a literal "-"
* "<ANGULAR_BRACKET_OPEN>" or "<ABO>" => a literal "<"
* "<ANGULAR_BRACKET_CLOSE>" or "<ABC>" => a literal ">"
*
* The callback MUST be registered first by calling
* `trinitrix.api.register_function()` the returned value can than be used to
* set the keymap.
*/
;
/**
* This namespace is used to store some command specific data (like functions,
* as ensuring memory locations stay allocated in garbage collected language is
* hard)
*
* Treat it as an implementation detail
*/
;
/**
* Functions only used internally within Trinitrix
*/
;
/**
* General API to change stuff in Trinitrix
*/
;
;
const struct stdi stdi = ;
const struct ui ui = ;
const struct keymaps keymaps = ;
const struct __private __private = ;
const struct raw raw = ;
const struct api api = ;
const struct trinitrix trinitrix = ;
// if !defined TRIXY_MAIN_HEADER
// vim: filetype=c